Page 1 of 1
Z80 OS/BIOS suggestion thread
Posted: Sun Nov 01, 2009 5:34 pm
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?
Re: Z80 OS/BIOS suggestion thread
Posted: Sun Nov 01, 2009 5:59 pm
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.
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 1:01 am
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.
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 3:29 am
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
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 3:44 am
by Combuster
You could always start with cooperative multitasking
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 8:04 am
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.
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 9:25 am
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
Re: Z80 OS/BIOS suggestion thread
Posted: Mon Nov 02, 2009 9:46 am
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+.