I spent a lot of time as a kid playing (generally, pretty terrible) games on my Game Boy. Having never written code for anything other than ‘regular’ general purpose computers before, I’ve been wondering recently: how easy is it to write a Game Boy (Advance) game?
Anyone interested in this should check TONC out. It’s a devkit/tutorial for the GBA with up to date informations.
It’s here : http://coranac.com/tonc/text/
Edited 2015-08-22 10:38 UTC
Gameboy Advance was probably the last “classical” console where you simply accessed the hardware directly.
It had a more powerful CPU so writing games in mostly C was possible. Some strange things I remember from it:
1) It was mostly like the SNES, but with some main differences
2) Being 32-bits, the entire ROM was mapped to memory, so accessing it was really easy. It had a strange 16 bits alignment requirement though.
3) The CPU had a cache but no MMU, so you used the cache manually to do computation faster (copy stuff there and do it)
4) It had no fpu, but for simple 2D games you generally didn’t need it (unlike the DS, which was a pain to do 3D with)
5) It didn’t have any dedicated sound hardware (other than the gameboy compatibility) so, sound mixing had to be done using CPU. This was probably nintendo’s by far worse mistake with the device, which was corrected in the DS.
6) Emulators could run games of it, even games written using Nintendo’s official SDK, very early in it’s lifespan. This made development much easier.
2 – Not strange at all. The rom bus was 16 bits wide with no provision for accessing individual bytes within that word width. So all rom accesses had to match the bus width.
3 – It didn’t have a cache, it had a fast bank of ram to serve as a scratch pad for the CPU. There was no caching of data in the processor for the GBA at all. That was common at the time for older processors as cache inside a processor was expensive. Processors of the time often only had 4 or 8 KBytes for cache, while an external fast SRAM could be 32 to 128 KBytes for less than a more expensive CPU. Note that while you can make external caches for a processor, the ram in the GBA is NOT a cache as it is directly mapped in the processor address space – it does not actually cache anything; i.e., it’s just normal ram that happens to be faster than normal.
https://www.youtube.com/watch?v=OyVAp0tOk5A