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/
>
>