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 > Compiler Question

#11079 - RSP - Thu Sep 25, 2003 5:42 pm

Hello!! i'm kinda new to programming /w GBA.

Got me some tutorials and browsed trough gbajunkie's tutorials. found myself a tutorial about a tile scroller and i want to compile the altered code to see if it works. (i'm using Devkitadvance) but the make.bat seemed all different.

The tutorial has a data.asm and a start.s file of wich i don't know how to compile with devkitadvance. does any of you guys know how to solve my problem??

ow yeah, the make.bat file looks like this (now)
Quote:

@echo off
zarmasm -CPU ARM7TDMI -Littleend start.s
zarmasm -CPU ARM7TDMI -Littleend data.asm
zarmcc -c -Wall -Otime -ansic -fpu none -Littleend -cpu ARM7TDMI -apcs /narrow/noswst gbatest.c -o gbatest.o
zarmlink -bin -first start.o start.o data.o gbatest.o -map -ro-base 0x08000000 -o gbatest.bin
del *.o
c:\windows\igba.exe gbatest.bin


Thanks in Advance...

haha, advance, gameboy... aww nevermind....

#11143 - RSP - Sat Sep 27, 2003 12:20 pm

Mmm.. looks like nobody is answering my question. because it's too damn stupid? :)

maybe anyone can tell me how to compile this source with another compiler? everything helping me out would be great!

#11145 - yaustar - Sat Sep 27, 2003 12:48 pm

could you explain a 'tile scroller'?
_________________
[Blog] [Portfolio]

#11147 - RSP - Sat Sep 27, 2003 1:31 pm

Scrolling tiles on the background? :)

but the matter is the fricking compiler.. browsed through half the devkitadvance docs and still didn't found anything about assembly compiling :S

#11150 - yaustar - Sat Sep 27, 2003 2:59 pm

If you just want to scroll backgrounds in c or c++, you can just do with the normal make.bat file as in gbajunkies tutorials. if you want to do it in assembly language then sorry i cant help you :p
_________________
[Blog] [Portfolio]

#11162 - sajiimori - Sat Sep 27, 2003 7:35 pm

DevKit Advance is the GNU compiler suite adapted for GBA.

The assembly code you have probably uses a different syntax than the one used by GNU "as", which would mean you would have to translate it yourself. That's the hard part.

Object files can be generated from start.s, data.asm, and gbatest.c using "gcc -c" (but rename data.asm to data.s). They can be linked together using "gcc -o <elf_file> <object_files>". The resulting ELF binary has to be stripped using "objcopy -O binary <elf_file> <rom_image>".

Manuals are available at http://www.gnu.org/manual/

#11180 - RSP - Sun Sep 28, 2003 11:22 am

You're my hero :) thx alot!