Thursday, May 17, 2018

Game Boy Advance Development 101: Compiling Tank Advance

If you've happen to download Tank Advance source code from Loirak Development, chances are you're having a problem compiling a working GBA file with devkitPro.


That's because of the compiler.


The pre-compiled GBA file inside the Tank Advance ZIP file was compiled 2002 -- that's more than a decade and a half.  Last 2002, GCC was just version 3.  As of this writing, devkitPro is using GCC version 7.


Without much further ado, use the following lines in MSYS2:
arm-none-eabi-gcc -c gfx.c -mthumb-interwork -mthumb -O2 -o gfx.o
arm-none-eabi-gcc -c main.c -mthumb-interwork -mthumb -O2 -o main.o
arm-none-eabi-gcc main.o gfx.o -mthumb-interwork -mthumb -specs=gba.specs -o tank.elf
arm-none-eabi-objcopy -v -O binary tank.elf tank.gba



If successful, you should have a freshly compiled Tank Advance and you can start changing the code to understand how it works so you can start writing your own Game Boy Advance game. :)


Happy GBA deving!


~creek23

Friday, May 4, 2018

Game Boy Advance Retro Gaming with Supercard

Why Retro Gaming?

On my early 30s now, and such a nostalgia seeing game boy games being played with Smart Phone.  But the little boy inside me still wants to play these games in a real Game Boy device.


How to do Retro Gaming?

Option 1, buy Chinese knock-off game device that natively runs emulators which then runs your ROM (the game file of your favorite Game Boy game).  Amazon and Ebay lists Game Boy Console but I'm not sure on their authenticity -- so, buy at your own risk!
 
Option 2, buy used Game Boy and used games -- a little harder approach but I was able to find one used Game Boy Advance SP and a used game which isn't my kind of game.
 
So, I had to resort to a Supercard, a cartridge that used SD Card (to which you save your ROM and plays on your Game Boy) -- this Supercard was a hit some 15 years ago when ROMs plagued the Internet.  I learned about this when I was learning how to write a game for Game Boy Advance using free Game Boy SDK -- thanks to Jonathan Harbour's Unofficial Guide!
 
This Supercard only costs about $18 USD which is available online -- the card is also supported by NDS.


Common Problems and Solutions

Where to find ROM -- Internet is still plagued with ROMs, and you are not going to get those links from me.


"not find SD" --  there could be lots of reasons and these are possible solutions:
  • check that your SD card IS NOT SDHC card; if it is, buy a new one -- the SD one!
  • check that your SD card is formatted with FAT and NOT FAT32; it it is, reformat it to FAT!
  • check that your SD card is 2GB and NOT MORE THAN 2G; if it is, buy a new 2GB one.
Cannot read ROM -- you need to convert the ROM to be compatible with Supercard;  I found version 2.71 dated 2010.03.25

Cannot SAVE game -- make sure to Run Supercard converter as Administrator to enable SAVE in your ROM

Conclusion

That's pretty much it!  Comment down for questions and if you happen to have additional information, kindly share them in comments :) Happy Retro Gaming! 

~creek23
 
DISCLAIMER: Yes, my approach is technically "Piracy" and I'm not trying to justify -- it's just that these games are not being sold anymore.  So, NO, I'm not promoting piracy.  Read more on Nintendo's stand on ROMs.


SIDE NOTE:  Nintendo might be able to make money if it had a ROM store much like Apple's App Store or Google's Play Store since it already re-released NES, and SNES -- might as well re-release a WIFI-enabled Game Boy! :)