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.

Coding > Boot type

#58826 - SittingDuck - Wed Oct 26, 2005 3:05 pm

Quote:
# --- boot type ---
MB = 1
ifeq ($(MB),1)
EXT := mb.gba
SPECS := -specs=gba_mb.specs
else
EXT := gba
SPECS := -specs=gba.specs
endif


This is part of a makefile. What is the boot type and what is gba_mb all about?

#58838 - legalize - Wed Oct 26, 2005 5:40 pm

I'm a bit of a n00b, but it looks to me like its changing the ROM header to support multiboot.

#58839 - SittingDuck - Wed Oct 26, 2005 5:47 pm

Aha!

#58871 - Cearn - Wed Oct 26, 2005 10:35 pm

legalize wrote:
I'm a bit of a n00b, but it looks to me like its changing the ROM header to support multiboot.

It's something like that, yeah.

Games can have two places in memory to reside in, ROM (0x0800:0000) or EWRAM (0x0200:0000). ROM is on the game cart itself and is the standard place for games. Multiboot is when you have one cart and multiple GBAs. In that case, the game-code is loaded into EWRAM. Well part of it, as EWRAM is a lot smaller than ROM.

Instead of a cart, you can also use the PC to supply a GBA with code, via an XBoo cable, for example. You can make these for a couple of bucks, which is a lot cheaper than a flash cart. Of course, you do have a lot less room to work with, but for small demos or tests.

With devkitARM, you can switch between the two by using the -specs thing. I use use variable MB as a switch between the two, rather than changing the specs manually. The extension .mb.gba vs .gba is more a convention than anything else, but it is a useful way to keep the two apart.