Operating System
Moderator: BigEvilCorporation
Operating System
So I'm thinking about another project that I will never write, but since its still in my head and formulating other ideas with it I figured I post it just to what the scene thinks. (maybe someone can use this and since I've typed it hopefully my brain will go back to thinking about other matters)
So I've though about a limited OS for the megadrive for a while.
Mostly because I'm intrigued by such things and how it would work on a limited resources (at least compared to modern standards)
So I was thinking about Memory Allocation and Task Handling.
Memory, using the 68k I would divide it like so
4kb OS system ram
1kb for task stack (1 System Process input etc.. and 15 App process)
3kb for free memory map allocation(1kb for each 8,16,32 bytes)
8kb for single bytes (char)
16kb for words (int)
32kb for doubles (long)
For the Task handler I'd have it running on the Vint so technically I'd have 60(or 50) task slices in a second
The Vint Handler would need to push the current regs d0-d7 a0-a7 to the apps stack list check which process would run next, then pop it off the app stack into the regs so the reti should?? return to the new applications halt point.
Again how feasible this is I have Nooo idea.
So when making an app you would use the local stack (each process would get say 256 bytes of stack) for procedural vars and use the actual memory allocation for IPC and other stuff. Const's and data would of course be in ROM and should not be duplicated into RAM (unless modification is needed)
well theres my ramblings for another week, (what will next week hold? will it be a gui, or will it be a new file system (sadly I've thought about doing these too with this project -_- *sigh* wish I could just program random crap all day))
So I've though about a limited OS for the megadrive for a while.
Mostly because I'm intrigued by such things and how it would work on a limited resources (at least compared to modern standards)
So I was thinking about Memory Allocation and Task Handling.
Memory, using the 68k I would divide it like so
4kb OS system ram
1kb for task stack (1 System Process input etc.. and 15 App process)
3kb for free memory map allocation(1kb for each 8,16,32 bytes)
8kb for single bytes (char)
16kb for words (int)
32kb for doubles (long)
For the Task handler I'd have it running on the Vint so technically I'd have 60(or 50) task slices in a second
The Vint Handler would need to push the current regs d0-d7 a0-a7 to the apps stack list check which process would run next, then pop it off the app stack into the regs so the reti should?? return to the new applications halt point.
Again how feasible this is I have Nooo idea.
So when making an app you would use the local stack (each process would get say 256 bytes of stack) for procedural vars and use the actual memory allocation for IPC and other stuff. Const's and data would of course be in ROM and should not be duplicated into RAM (unless modification is needed)
well theres my ramblings for another week, (what will next week hold? will it be a gui, or will it be a new file system (sadly I've thought about doing these too with this project -_- *sigh* wish I could just program random crap all day))
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Actually, i though several time about turning my genesis libraries in a genesis OS. For now it's still "library" but i'm really close from the OS as i'm overloading V-Int handler to generate some controllers events. I plan to add timer event also (maybe with H-int overloading)...
I don't understand your byte, word, long allocation ?
Anyway i think in future my library will move to a mini OS with memory allocation functions, events, etc
I don't understand your byte, word, long allocation ?
Anyway i think in future my library will move to a mini OS with memory allocation functions, events, etc
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
I have the very early stages of a Palm OS clone running on the Sega CD. Memory allocation is done (though could use some improvements) and it has partial support for Palm Databases (which aren't much like what you would normally refer to as a databse). The very beginnings of process management are there. Processes can be started and their info gets added to the process list, but there isn't currently any multi-tasking support. Wouldn't be hard to add a simple round robin scheduler though. The syscall interface is mostly implemented, but register saving isn't done yet (I didn't have the 68K C ABI handy at the time).
The Palm OS clone is on hold at the moment, but I did recently use the memory allocator to get the interpretter for my programming language running on the Sega CD.
The Palm OS clone is an open source project. There's source up on Source Forge, but I don't think I ever committed the latest version. If anyone wants to take a look at it, just ask.
The Palm OS clone is on hold at the moment, but I did recently use the memory allocator to get the interpretter for my programming language running on the Sega CD.
The Palm OS clone is an open source project. There's source up on Source Forge, but I don't think I ever committed the latest version. If anyone wants to take a look at it, just ask.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Stupid question: why would you need an OS between your program and hardware ? I've always liked to manipulate everything directly
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
See the OS as a library. Instead of doing all the weird stuff to initiate a DMA, you agree it's more convenient to just do :TmEE co.(TM) wrote:Stupid question: why would you need an OS between your program and hardware ? I've always liked to manipulate everything directly
DoDMA(source, destination, len);
As uploading Z80 data, i prefer use :
Z80Upload(datas, destination, len);
than doing all the stuff by hand.
Same goes for the controller check...
Also using only the "OS" functions permit you to keep a level of integrity
I'd rather see Merlix's idea as a true OS.
Somewhere further, you could plug your Genesis to an Ethernet, or attach it to an USB device.
Devster has done something intersting
http://devster.monkeeh.com/pictures.html
Somewhere further, you could plug your Genesis to an Ethernet, or attach it to an USB device.
Devster has done something intersting
http://devster.monkeeh.com/pictures.html
-
- Very interested
- Posts: 70
- Joined: Tue Mar 06, 2007 6:30 pm
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
they did release a keyboard, it was only released in Japan though, no where else...Mask of Destiny wrote:The mouse was released and I own one, but AFAIK a keyboard wasn't. They may have developed a prototype, but it was never available for sale.evildragon wrote:Sega did make a keyboard for the Genesis at one point.. They also made a mouse too..
EDIT: This is the best information I can pull up right now.. When I get back later tonight I'll continue digging up information..
http://www.brouhaha.com/~eric/pic/segakb.html
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
According to this FAQ, it was never released even in Japan: http://www.classicgaming.com/museum/faqs/megadfaq.shtml
Given how infrequently it's mentioned compared to the Meganet Modem (which is quite obscure), I suspect it was indeed cancelled before release.
Anyway, last I checked the Saturn keyboard adapters were easy to find and quite cheap on eBay.
Given how infrequently it's mentioned compared to the Meganet Modem (which is quite obscure), I suspect it was indeed cancelled before release.
Anyway, last I checked the Saturn keyboard adapters were easy to find and quite cheap on eBay.
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
i could have sworn i seen it.. it was black, kinda small, and i remember it having blue on it..Mask of Destiny wrote:According to this FAQ, it was never released even in Japan: http://www.classicgaming.com/museum/faqs/megadfaq.shtml
Given how infrequently it's mentioned compared to the Meganet Modem (which is quite obscure), I suspect it was indeed cancelled before release.
Anyway, last I checked the Saturn keyboard adapters were easy to find and quite cheap on eBay.
-
- Very interested
- Posts: 70
- Joined: Tue Mar 06, 2007 6:30 pm
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
i know it wasn't the terradrive...commodorejohn wrote:Perhaps it was the keyboard from a Sega Teradrive? Was it with a computer or a Genesis proper?
(I saw a Teradrive at a Wal-Mart in Mexico - had I known how rare they were at the time, I would've snapped it up, but sadly I thought someone had just thrown a Genesis into a PC case. Argh.)