gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > I'd like some ROM header information...

#10267 - shaktool - Mon Sep 01, 2003 3:33 am

No, I don't want to hear about the tools that will fix the header for me. They're mostly for PC or whatever, and don't do much good for Mac users like me.

I want to see the header. I want to know the ins and outs of the header.

Okay, this is what I already know: The header seems to be nothing but the Nintendo logo. Somewhere after the header is the title of the game, and I would assume that the game code starts after that. I figured I could copy everything up to the beginning of the title (the first 160 bytes) of a ROM with a valid header, and replace the first 160 bytes of my ROM with that.

The result? Well, the BIOS screen worked fine, displaying the Nintendo logo properly, but it got hung up after that. That's not much better than when the Nintendo logo gets screwed up. When I skip the BIOS screen in my emulator, though, it still works fine. So it seems like neither the header nor the game code got screwed up, and yet it still doesn't work.

Got any idea what I might be doing wrong?

#10270 - tepples - Mon Sep 01, 2003 6:20 am

Some of the header tools, such as DarkFader's (my personal favorite), are written in reasonably portable ANSI C or ANSI C++ and can be recompiled for PowerPC architecture on any GNU C compiler such as the one included with Darwin. (If you don't already know, Darwin is the core built into Mac OS X. Or by "Mac" do you mean Mac OS 9?)

There are two things that must be correct in a header in order for a GBA to boot it. First of all, the Nintendo logo data must match exactly; because of this, reproducing it is a fair use rather than an infringement (Sega v. Accolade). Second, the so-called "complement", a checksum of the rest of the data in the header, must check out. To learn more, read about cartridge headers in Martin Korth's GBA technical document.

If "GAME BOY / Nintendo(R)" fades to white, the GBA is booting your program; any lockups after that are not in the header but in your code.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.