#21753 - spanky - Fri Jun 04, 2004 2:09 pm
I am VERY new to GBA development, and have just one question at the moment - what is the difference between a .mb file and a .gba file ? Are there any converters to switch types ?
I have an MBV2, but still trying to find the money for a Flash cart...
Any help would be much appreciated !
#21756 - niltsair - Fri Jun 04, 2004 3:32 pm
.mb : Multiboot program. Can be send to Gba through a cable. Can't be bigger than 256k. Is run from the Gba memory.
.gba : Gba program. Need to be send to a flash cartridge. Size can go as high as 32MBytes or 256MBits (I think). Is run from the flash cart (some code can be loaded in ram too)
_________________
-Inside every large program is a small program struggling to get out. (Hoare's Law of Large Programs)
-The man who can smile when things go wrong has thought of someone he can blame it on. (Nixon's Theorem)
#21757 - spanky - Fri Jun 04, 2004 3:37 pm
Is there actually any difference between file formats, or do i need to compile it differently? Can I just rename a .gba file to .mb and use it through a linker ? Any helpful tips/tricks/links will be much appreciated...
"I seem to be having tremendous difficulty with my lifestyle"- Arthur Dent
#21758 - niltsair - Fri Jun 04, 2004 3:39 pm
It need to be compiled differently. When compiling with DevkitAdvance, I think you define the symbol MULTIBOOT to let the compiler know that you want it multiboot instead.
_________________
-Inside every large program is a small program struggling to get out. (Hoare's Law of Large Programs)
-The man who can smile when things go wrong has thought of someone he can blame it on. (Nixon's Theorem)
#21764 - wintermute - Fri Jun 04, 2004 5:19 pm
.mb is just a convention used to distinguish a ROM image which can be multibooted (all code and data is contained within ewram) .gba files are usually meant to run from a cartridge.
It's not possible to convert between the two, the code must be compiled for one or the other.
DevkitARM has built in linkscripts for both types
#21768 - tepples - Fri Jun 04, 2004 5:40 pm
wintermute wrote: |
.mb is just a convention used to distinguish a ROM image which can be multibooted (all code and data is contained within ewram) .gba files are usually meant to run from a cartridge.
It's not possible to convert between the two |
Oh really? Then what do you think of this tool that I wrote to convert multiple .mb programs into one .gba program?
Quote: |
DevkitARM has built in linkscripts for both types |
Does devkitARM's multiboot specs file make .mb (runs only from EWRAM) or .mb.gba (detects if it's running from ROM and if so copies itself to EWRAM)?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#21779 - dagamer34 - Fri Jun 04, 2004 7:26 pm
niltsair wrote: |
It need to be compiled differently. When compiling with DevkitAdvance, I think you define the symbol MULTIBOOT to let the compiler know that you want it multiboot instead. |
Actually, when using DevKitAdvance, you need to put this in your code:
Code: |
int __gba_multiboot = 0;
|
Most people just make a define out of it like this
Code: |
#define MULTIBOOT int __gba_multiboot = 0;
|
Just make sure it's defined in the global scope and it'll be a .mb ROM. DevKitAdvance's ctr0.s takes care of everything else for you.
_________________
Little kids and Playstation 2's don't mix. :(
#23446 - wintermute - Tue Jul 13, 2004 4:43 am
apologies for the late reply
tepples wrote: |
wintermute wrote: | .mb is just a convention used to distinguish a ROM image which can be multibooted (all code and data is contained within ewram) .gba files are usually meant to run from a cartridge.
It's not possible to convert between the two |
Oh really? Then what do you think of
this tool that I wrote to convert multiple .mb programs into one .gba program?
|
well, I did mean that it's not possible to convert a rom image compiled for cartridge into one that will be multibootable. Not without a great deal of work anyway.
Quote: |
Quote: | DevkitARM has built in linkscripts for both types |
Does devkitARM's multiboot specs file make .mb (runs only from EWRAM) or .mb.gba (detects if it's running from ROM and if so copies itself to EWRAM)? |
detect & copy so it still works with VBA or when written to a cart.