Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
C++ example working on Mappy, but not hardware (using MBV2)   Message List  
Reply | Forward Message #9137 of 15019 |
Hi,

Over the past few days I've been trying to get some C++ code to
compile and were able to do so. The code runs fine on the Mappy
emulator but when transferring the multiboot image to my GBA using
the MBV2 cable I simply get a blank screen once the transfer
completes. What could be the problem?

After looking through some group posts and browsing the web, I
eventually found some useful information about compiling C++ code for
the GBA in the "Newbie's Guide to GameBoy Advance Development", by
VerticalE. There's a section providing some details on the CPPTest
example, written by Jaap Suter if I'm not mistaken, which I used to
figure out how to get my C++ code to compile. Following that
example's documentation to the letter, which also includes the source
code, I can produce a binary that have this behavior: it runs on the
emulator but not on the hardware. The example simply sets up
graphics Mode 3, paints the screen blue and then has an endless
loop. It uses Jeff Frohwein's startup code (based on crt0.S v1.25)
with the ".equ __MultiBootInclude, 1" and ".equ __CPPSupport, 1"
lines defined. It doesn't define the __gba_multiboot variable in
main.cpp, but even doing so doesn't make any difference.

When compiling my own application as a pure C application it works
just fine on both hardware and emulator – it uses graphics Mode 0.
But when calling this code from a basic C++ class and then compiling
it, it just won't work on real hardware. In my application I've used
Jeff's latest crt0.S & Linkscript code and am using the crtbegin.o &
crtend.o files that come with the latest version of DevKitAdvance.

Could it be a memory alignment issue, or maybe a name mangling issue
with the __gba_multiboot variable? What other differences could
there be? Any help would be appreciated.

Thanks,
Tiaan.






Thu Jan 3, 2002 5:36 pm

gbatag
Offline Offline
Send Email Send Email

Forward
Message #9137 of 15019 |
Expand Messages Author Sort by Date

Hi, Over the past few days I've been trying to get some C++ code to compile and were able to do so. The code runs fine on the Mappy emulator but when...
gbatag
Offline Send Email
Jan 3, 2002
6:05 pm

I had problems doing multiboot with gcc, its ugly but it worked, see the dhrygccmb.zip file at http://www.dwelch.com/gba/dhry.htm for the makefile Here is the...
gba@...
Send Email
Jan 3, 2002
6:34 pm

Jeff F. suggested that I should use the linker's -Map command-line option to generate a map file. From that I was able to figure out that the code ended up at...
gbatag
Offline Send Email
Jan 4, 2002
3:03 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help