GameBoy OS

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
amd64pager
Member
Member
Posts: 73
Joined: Fri Nov 25, 2011 8:27 am
Location: In the 266 squadron of the RFC,near Maranique in the Southern Front in the WW1

GameBoy OS

Post 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?
It's surprising what the semiconductor industry's definition of macro is and what the CS description is.
ACcurrent
Member
Member
Posts: 125
Joined: Thu Aug 11, 2011 12:04 am
Location: Watching You

Re: GameBoy OS

Post 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.
Get back to work!
Github
User avatar
XanClic
Member
Member
Posts: 138
Joined: Wed Feb 13, 2008 9:38 am

Re: GameBoy OS

Post 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).
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: GameBoy OS

Post 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.
"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
amd64pager
Member
Member
Posts: 73
Joined: Fri Nov 25, 2011 8:27 am
Location: In the 266 squadron of the RFC,near Maranique in the Southern Front in the WW1

Re: GameBoy OS

Post 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?
It's surprising what the semiconductor industry's definition of macro is and what the CS description is.
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: GameBoy OS

Post by Combuster »

"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 ]
guyfawkes
Member
Member
Posts: 93
Joined: Mon Jul 18, 2011 9:47 am

Re: GameBoy OS

Post 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.
Post Reply