Page 1 of 1

GameBoy OS

Posted: Tue Nov 29, 2011 4:43 am
by amd64pager
I have a old gameboy lying around and I wanted to use it for osdev.
But is it possible(and efficient) to write an OS that runs on a gameboy?

Re: GameBoy OS

Posted: Tue Nov 29, 2011 4:51 am
by ACcurrent
Yes I think theres a gameboy barebones tutorial in the wiki. All gameboy games are essentially OSes. Does that answer your question? (I think there is this gameboy OS named jayOS or jimOS (cant remember the name started with J though).

p.s GameBoy uses Arm so there really is no problem in writing an OS.

Re: GameBoy OS

Posted: Tue Nov 29, 2011 5:12 am
by XanClic
Well, it depends on the GB. A GBA got an ARM7TDMI, so it's no big deal to write an OS for it (however it might be difficult to actually get your OS on that real Game Boy), in fact I have ported my latest OS (which has been lying around for nearly a year now, gosh) to it (but in lack of an actual GBA I could only test it on emulators and doubt it works on a real one). The only big restriction is that it got no MMU.

GBC and the original GB however got a Z80-like CPU. They are much more restricted concerning RAM and there is no gcc backend for Z80 CPUs, furthermore, note that those GBs don't have a real Z80 CPU but just a Z80 related one. So if you plan to write your OS in C, you first have to find a suiting compiler (there are, in fact, compilers which support those CPUs). If you plan to write it in assembly, of course, you'll need a fitting assembler (however, those should be fairly easy to find and to set up).

Re: GameBoy OS

Posted: Tue Nov 29, 2011 5:20 am
by Combuster
Define OS capabilities, define "efficient".

A real gameboy is a Z80 device. You'll have bad performance, very limited memory, and zero protection facilities, yet it might be just enough. Just be aware that it won't even be able to play DOOM regardless of that game's age. You will need to have a very limited feature set in your "OS" to run on this.

The Gameboy Advance (big difference!) is the ARM based one and can do quite a bit more, but it still isn't remotely a desktop machine in capabilities. Fortunately it is the most common homebrew device out there and therefore more likely to find help with.

Re: GameBoy OS

Posted: Tue Nov 29, 2011 5:24 am
by amd64pager
Combuster wrote:Define OS capabilities, define "efficient".

A real gameboy is a Z80 device. You'll have bad performance, very limited memory, and zero protection facilities, yet it might be just enough. Just be aware that it won't even be able to play DOOM regardless of that game's age. You will need to have a very limited feature set in your "OS" to run on this.

The Gameboy Advance (big difference!) is the ARM based one and can do quite a bit more, but it still isn't remotely a desktop machine in capabilities. Fortunately it is the most common homebrew device out there and therefore more likely to find help with.
I mean gameboy advance when I say gameboy.(I got an gameboy advance SP)
And by efficient I mean the best way to do it in an ARM machine.
ACcurrent wrote:Yes I think theres a gameboy barebones tutorial in the wiki. All gameboy games are essentially OSes. Does that answer your question? (I think there is this gameboy OS named jayOS or jimOS (cant remember the name started with J though).

p.s GameBoy uses Arm so there really is no problem in writing an OS.
I read the barebones,but what about the save memory and other stuff in the gameboy advance SP?


Does anyone know of a site where info about the GBA is given?

Re: GameBoy OS

Posted: Tue Nov 29, 2011 5:30 am
by Combuster

Re: GameBoy OS

Posted: Sun Dec 04, 2011 4:21 pm
by guyfawkes
This OS was ported to GBA
http://www.dex-os.com/ARM/gbademo.jpg

I test it some time ago.
So its possible.