Z80 OS/BIOS suggestion thread

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
BastetFurry
Posts: 4
Joined: Sun Nov 01, 2009 4:36 pm

Z80 OS/BIOS suggestion thread

Post by BastetFurry »

Hi Folks!
(Yay, firstpost!)

I am developing an OS/BIOS for a Z80 based console, Sega Master System if you care, to turn it into some sort of homebrew-heaven and homecomputer, maybe even getting CP/M to run.
After i looked around a bit i found no documentation at all about OS/BIOS deving for such old machines, so i come here for some advices.

So, i have text output, text input, some sort of "mouse" cursor and type conversion functions, all nicely packed behind jump vectors. I wait for "the hardware guy" to finish his CPLD+SRAM+Flash+PS/2-Connector+SD-Slot+... cart, what would you code now while waiting for THG?
User avatar
AndrewAPrice
Member
Member
Posts: 2303
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Z80 OS/BIOS suggestion thread

Post by AndrewAPrice »

Try multitasking. This could be as simple as multiple threads, or more complicated such as each process having it's own virtual terminal that you can cycle through.
My OS is Perception.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Z80 OS/BIOS suggestion thread

Post by Firestryke31 »

On the z80? Good luck. It'll be difficult unless the platform the OP's using has some hardware that'll make it easier.

That is, unless the OP doesn't care that any thread can execute any instruction, like "CLI," or the platform can generate a uniformly timed NMI.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Z80 OS/BIOS suggestion thread

Post by jal »

There are quite some OSes for the Z80 floating around. SymbOS is my personal favourite.

EDIT: As for the OP, simply google "Z80 OS" (without the quotes) and you'll get many, many usable links.


JAL
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Z80 OS/BIOS suggestion thread

Post by Combuster »

You could always start with cooperative multitasking
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
BastetFurry
Posts: 4
Joined: Sun Nov 01, 2009 4:36 pm

Re: Z80 OS/BIOS suggestion thread

Post by BastetFurry »

@Firestryke31:
I can move memory around on a SMS in 16k banks, i can even use a custom MMU that only has to be compatible with the smallest of all Sega MMUs because the system BIOS makes a checksum check on the original systems, only the Genesis and some versions of the GG skip this because they dont have said BIOS.
It all has to fit in a 72 macrocell CPLD, though... ;)

This way i could say, every programm has to be based at 0x8000, gets two 16k pages and has to stay away from the last 16 bytes of memory (0xfff0 - 0xffff). Every other 16k page the programm may need has to be requested from the OS.

@jal:
Yeah, much code i can look at, but the general lack of OS Dev material for small/old machines is a bit sad, it seems the world is only based on x86/x64. :/

@Combuster:
Would be nice to have, at least that could keep my ISR small. ATM i have the mousedriver inside the ISR and i dont like it. It should be easily exchangeable.

I even think about using this OS not only for the SMS but for a selfmade Z80 table computer too.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Z80 OS/BIOS suggestion thread

Post by jal »

BastetFurry wrote:Yeah, much code i can look at, but the general lack of OS Dev material for small/old machines is a bit sad, it seems the world is only based on x86/x64.
True. Most hobbyists use what is readily available, and I don't blame them. But this old stuff is imho a lot more enchanting than your standard desktop PC. You may find more challenge in (modern) embedded OSes using microcontrollers like the Atmel, or do-it-yourself game machines like the XGameStation.


JAL
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Z80 OS/BIOS suggestion thread

Post by Firestryke31 »

I've tried writing an OS for a z80-based platform once. It was rather difficult since none of the emulators got the boot verification part right, and hardware timing emulation was rarely correct, so even though it would work fine in the emulators I would only get a blank screen on RHW. I miss developing on the TI-83+.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Post Reply