#99063 - biubid_boy - Sat Aug 19, 2006 11:02 am
Hello everybody.
Being a newb, I was following the Pern Project to find my footing in the world of GBA development. Unfortunately, the tools Dovoto recommends for .o files are outdated. Whenever I use them with devkitARM r19b, I get an error about the eabi version being 1, instead of 4.
I have managed to find a replacment for bin2o, but a working pcx2sprite still eludes me. Can someone point me to some equivilant tools, or an alternate way of loading sprites I can use to finish the series?
Thankyou for your time,
Biubid_boy.
#99085 - Cearn - Sat Aug 19, 2006 2:24 pm
Ye olde gfx2gba should be able to do the pcx conversions , my olde tools should do the trick as well. Slightly newer versions should be available Real Soon Now.
None of these convert directly into object files, but using c/asm/binary intermediates works just as well in the end.
#99094 - tepples - Sat Aug 19, 2006 3:05 pm
Cearn wrote: |
using c/asm/binary intermediates works just as well in the end. |
This is what he means: - If you can output to assembly language (.s) files, you can use arm-eabi-gcc to turn .s files into .o files.
- If you can output to binary (.chr), you can use bin2s to turn .chr files into .s files.
- If you can output to binary, you can use GBFS to turn all your project's .chr files into a .gbfs file, which can in turn be converted to a .s file or simply appended to your .gba file.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#99203 - biubid_boy - Sun Aug 20, 2006 1:13 am
Thanks for the advice everyone, but I have ran into a problem. I was trying to use the method tepples suggested first, (namely use an .s file to make the object) but when I try to compile, I get the following error.
Code: |
c:/devkitarm/bin/../lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib\libc.a(exit.o): In function `exit':
(.text+0x28): undefined reference to `_exit'
c:/devkitarm/bin/../lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib\libc.a(sbrkr.o): In function `_sbrk_r':
(.text+0x1c): undefined reference to `_sbrk'
collect2: ld returned 1 exit status |
The .s file was made using Usenti, which I already had on my harddrive. I'm not sure if it is outdated. Anyway, I am awaiting your knowledge inspiring answers :P.
Biubid_boy.[/code]
#99211 - tepples - Sun Aug 20, 2006 1:45 am
In devkitARM, you need to specify -specs=gba_mb.specs on the linker command line. (If you're making a GBA program larger than 200 KB, specify -specs=gba.specs instead.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#99214 - biubid_boy - Sun Aug 20, 2006 2:52 am
I think you may misunderstand me. When I say compile, I mean transforming the .s file into a .o file. Since I haven't been able to do that, I haven't even been able to compile my ROM yet.
#99215 - tepples - Sun Aug 20, 2006 2:57 am
You need to use the -c flag when turning a .s into a .o. If you don't use -c, GCC assumes that the file is a complete program and that you're trying to compile and link the file.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#99218 - biubid_boy - Sun Aug 20, 2006 3:22 am
Thankyou! It worked like a charm. I have one question, though. Is there any reason Dovoto uses un-decoded pcx files for the background in Lesson 2? Wouldn't having things already in the right format speed up the code and make it easier to understand and use?
:)
Biubid_boy.
#99232 - tepples - Sun Aug 20, 2006 5:19 am
biubid_boy wrote: |
Is there any reason Dovoto uses un-decoded pcx files for the background in Lesson 2? |
I'm guessing that he thought that having a known-good GBA-side decoder was worth not having to translate the bitmaps on the PC and deal with 4-bit vs. 8-bit tiled vs. 8-bit linear vs. 16-bit linear.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.