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 #9138 of 15019 |
Re: [gbadev] C++ example working on Mappy, but not hardware (using MBV2)


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 crt0.s that I used...

.TEXT

.GLOBAL _start
_start:
.ALIGN
.CODE 32
b start_vector

.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0
.word 0,0,0,0,0,0,0,0

start_vector:

b main

.END



----- Original Message -----
From: gbatag
Sent: 1/3/2002 10:36:13 AM
To: gbadev@yahoogroups.com
Subject: [gbadev] C++ example working on Mappy, but not hardware (using MBV2)

> 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.
>
>
>
>
>
> list rules: http://www.gbadev.org/rules.txt
> unsubscribe: gbadev-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>





Thu Jan 3, 2002 6:32 pm

gba@...
Send Email Send Email

Forward
Message #9138 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