6 ms·
If you ever programmed a ROM for a Gameboy or something this should look familiar. The BIOS of those old systems just jumps right into a certain address and al
by CoolGuySteve 8y ago
If you ever programmed a ROM for a Gameboy or something this should look familiar. The BIOS of those old systems just jumps right into a certain address and all you have to do is make sure your linker is setup properly to put crt0.s there.
The Gameboy Advance in particular is pretty fun and simple, I recommend it.
- shshhdhs 8y agoWhere should one go to get started with GBA dev work these days?
- raptorfactor 8y agohttp://www.gbadev.org/ http://www.gbadev.org/
- deleted 8y ago[deleted]
- pathompong 8y agohttp://www.loirak.com/gameboy/gbatutor.php http://www.loirak.com/gameboy/gbatutor.php
- GrantSolar 8y agoI've found this to be a good resource: https://www.coranac.com/tonc/text/ https://www.coranac.com/tonc/text/
- jchw 8y agoSomething neat about the original Gameboy is how its firmware actually works. As a developer, the entire region from $0000-$3FFF is mapped to the cartridge, and the entrypoint is at $0100. When the CPU boots up, there is a special temporary mapping for $0000-$0100 to the firmware. The firmware largely just validates the ROM header and displays the Nintendo logo. But my favorite part is this: it executes all the way to $0100. There is no jump to $0100 - the last two bytes are an instruction that simply removes the firmware mapping. Now the IP lands on $0100 and everything is mapped as expected. This simple mechanism made it notoriously difficult to extract the Gameboy BIOS. I recall reading that one way it was eventually extracted was via fault injection: by messing with the clock very precisely, you could get the processor to 'skip' the instruction that unmapped the firmware, thus allowing you to dump it. Of course, another way you could read the firmware is by "simply" decapping the processor and taking shots of it with a powerful microscope, and then optically extracting the 'bits.' I think this was also done, but as a person with little understanding of the actual details of how a decapping is done it seems like an incredibly expensive, error prone operation.
- deleted 8y ago[deleted]