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 > Running game from GBAMP (Multiboot?)

#54645 - mycatfreddy - Wed Sep 21, 2005 4:23 am

Hi - I have been working on a small game and I want to try it out on my GBA using movie player.

I know this is possible because a couple of GREAT games written by Damian Yerrick work on my GBA with Movie Player!

I suspect "multiboot" is the key or could be his GBAFS, but not sure - I have tried to implement multiboot but this results in a nice white screen (yay - no dead pixels on my new Micro!). I also tried Damians MultiBoot Menu - but still no luck.

My game works great on Visual Boy Advance - compiled using DevKitAdvance...
Any suggestions?
Thanks!
_________________
ok, but only if it's fun.

#54646 - tepples - Wed Sep 21, 2005 4:35 am

Yes, the key is multiboot, usually denoted by the .mb suffix. With GBA Movie Player, you need to take the .mb files and rename them to .mb.gba. Tetanus On Drugs is actually a .mb file but it's called "tod.gba" because so many people were confused by the .mb extension.

GBFS is just a way of embedding data in a .mb or .gba file.

The key to making multiboot work lies in the link stage: -specs=gba_mb.specs
Then if the resulting ROM is (about) 200 KB or smaller after objcopy, it should work.

Also note: if you use GBFS, you can't use the .sbss section.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#54681 - mycatfreddy - Wed Sep 21, 2005 4:49 pm

Hi - Thanks for the speedy reply!
Quote:
The key to making multiboot work lies in the link stage: -specs=gba_mb.specs


I am using a simple batch to make my gba file
Code:
gcc -c -O3 -mthumb -mthumb-interwork main.cpp
gcc -c -O3 -mthumb -mthumb-interwork Utility.cpp
gcc -c -O3 -mthumb -mthumb-interwork Startup.cpp
gcc -c -O3 -mthumb -mthumb-interwork Menu.cpp
gcc -c -O3 -mthumb -mthumb-interwork Engine.cpp
gcc -c -O3 -mthumb -mthumb-interwork Text.cpp
gcc -c -03 -mthumb -mthumb-interwork Gamesave.cpp

gcc -mthumb -mthumb-interwork -o gamename.elf main.o Utility.o Startup.o Menu.o Engine.o Text.o Gamesave.O

objcopy -O binary gamename.elf gamename.gba


So when change my last link line to:
Code:
gcc -specs=gba_mb.specs -mthumb -mthumb-interwork -o gamename.elf main.o Utility.o Startup.o Menu.o Engine.o Text.o Gamesave.O


I get a "file not found error" on gba_mb.specs. I am using the DevKitAdvanc (r5 beta3) from sourceforge... Is this file missing or am I doing something else wrong?
[/url]
_________________
ok, but only if it's fun.

#54739 - mycatfreddy - Thu Sep 22, 2005 3:06 am

So, I did some searching/reading and I guess that devKitAdv and DevKitPro are different packages for building GBA games. DevkitARM (in Pro) seems to have the gba_mb.specs file

I started out following a really good tutorial by gbajunkie and don't know much about DevkitARM. Should I be learning more about devkitARM or should I be able to do everything (ie. like create a multiboot) with devKitAdv?

Thanks again!
_________________
ok, but only if it's fun.

#54789 - tepples - Thu Sep 22, 2005 4:03 pm

DevKit Advance is no longer maintained. While you work on migrating your future projects to devkitARM, use this line in one of your source code files:
Code:
int __gba_multiboot;

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#54827 - vb_master - Thu Sep 22, 2005 9:52 pm

Sorry for hijacking this post, but what are some good Multiboot games?
_________________
Back.

#54864 - mycatfreddy - Fri Sep 23, 2005 5:30 am

Ok, I tried
Code:
int __gba_multiboot;
but still not luck.

My file is 180k and although it works well in Visual Boy -I can't seem to get it to run of GBAMP - white screen....

I guess I will try moving over to devkitARM and then start troubleshooting if I still have problems.... unless you have any other suggestions!!

Thanks again!
_________________
ok, but only if it's fun.

#54867 - mycatfreddy - Fri Sep 23, 2005 5:35 am

Scrap that last post it is working now...when I put that line in my source code outside of main{}.

Thanks very much for your help - it is very satisfying to see all my hard work on my gba!!
_________________
ok, but only if it's fun.