#7497 - Psyk - Wed Jun 18, 2003 6:37 pm
How do i name a GBA rom? When i put it onto my XG flash cart its on the menu but it has no name. So what i want to know is how do i put a name there? I'm pretty sure there is some header data for the rom but i don't know how to alter it.
#7501 - tepples - Wed Jun 18, 2003 7:00 pm
Psyk wrote: |
How do i name a GBA rom? When i put it onto my XG flash cart its on the menu but it has no name. So what i want to know is how do i put a name there? I'm pretty sure there is some header data for the rom but i don't know how to alter it. |
Go to the header tools section of gbadev.org and get the GBA ROM Fixer by DarkFader, which lets you specify a name on the command line. However, names have to be 12 characters or shorter.
gbafix -tGAMENAME file.mb.gba
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#7502 - niltsair - Wed Jun 18, 2003 7:41 pm
Or, if it's a rom you programmed, in the lnkscript or ctr0 file, there's the header data that you can set. (make sure you preserve the number of bytes used by each)
#7504 - SimonB - Wed Jun 18, 2003 8:55 pm
or just put it there yourself with a hexeditor etc
0x000000A0-0x000000AB or something isnt it?
/Simon
#7521 - Psyk - Thu Jun 19, 2003 6:38 am
I used gbafix and that worked fine
#7522 - Quirky - Thu Jun 19, 2003 7:53 am
I usually have a single crt0.s for a particular project. There's this section:
Code: |
@ Nintendo Logo Character Data (8000004h)
.fill 156,1,0
@ Game Title (80000A0h)
.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.byte 0x00,0x00,0x00,0x00
|
and I change the 0x00's to the particular ASCII values I want. Then the name's included for every build.
#7538 - tepples - Thu Jun 19, 2003 5:08 pm
Quirky wrote: |
Code: | @ Game Title (80000A0h)
.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.byte 0x00,0x00,0x00,0x00
|
and I change the 0x00's to the particular ASCII values I want. Then the name's included for every build. |
Do you compute the header checksum by hand? I just stick gbafix in my makefile right after arm-agb-elf-objcopy.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#7574 - Quirky - Fri Jun 20, 2003 7:57 am
tepples wrote: |
Do you compute the header checksum by hand? |
Say wha...?
No. I didn't even know there *was* a checksum - it certainly isn't used for anything!
EDIT: Just checked Darkfader's gbafix - it seems to set the checksum to 0 anyway, unless you uncomment out a section of the code and recompile it.
#7575 - tepples - Fri Jun 20, 2003 8:06 am
By "header checksum" I meant what some sources call the 'complement'. (The reasoning behind that name escapes me.)
Some of the flash cart menus search for valid complements to determine the starting points of programs in the cart. If a program's complement is valid but the name is blank, you get a blank space on the menu that, when selected, starts the program. If the complement is invalid, the program probably won't show up on the menu at all.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#7576 - Quirky - Fri Jun 20, 2003 8:50 am
I've never had a problem with any of my compiled programs - the compliment value 0xf0 seems to always work on the default visoly boot menu and also in pogoshell. Anyway, can't harm to add the gbafix to a makefile, as you mention, just in case.
#7606 - Jason Wilkins - Fri Jun 20, 2003 8:14 pm
Why would you put all the ASCII hex values in by hand when you can use .ascii "blahblahblah" to do the exact same thing but ten times easier?
Why are people always doing things the hard way?
_________________
http://devkitadv.sourceforge.net
#7703 - Quirky - Mon Jun 23, 2003 8:42 am
Jason Wilkins wrote: |
Why would you put all the ASCII hex values in by hand when you can use .ascii "blahblahblah" to do the exact same thing but ten times easier?
Why are people always doing things the hard way? |
Because I didn't know you could do that. Thanks for the tip :)
#7704 - tepples - Mon Jun 23, 2003 8:59 am
Jason Wilkins wrote: |
Why are people always doing things the hard way? |
From Quirky's response, I'm guessing lack of docs. How's the DevKit Advance documentation coming?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#7706 - Quirky - Mon Jun 23, 2003 9:14 am
Lack of docs? More like me being daft - a couple of lines lower down in crt0.s than the Game Title section there's a few lines of code that go:
.ifdef __MultibootDedicated
.ascii "MB "
.else
.byte 0x00,0x00,0x00,0x00
It's obvious now that someone's mentioned it... but until now I have been working out ascii codes by hand! >_<
#7713 - Jason Wilkins - Mon Jun 23, 2003 2:11 pm
Actually, my 'Why do people do things the hard way' is directed at whoever originally wrote the crt0.S. I dunno if it was Jeff or Nintendo or whoever. I just get frustrated when people release code into the wild, which other people unwaveringly use as an example and that code is not the best or easiest to understand way to do something.
I'm also guilty of not sitting down and reading the whole documentation for gas or the ARM instruction set, so even my crt0.S probably has a lot of examples of 'the hard way', but it is more like 'the ignorant way' ^_^
_________________
http://devkitadv.sourceforge.net
#7882 - peebrain - Fri Jun 27, 2003 11:51 am
Why are you guys using GBAFIX? Use GBARM... I mean, look at that readme! That guy know's what he's talking about! He also says he calc's the checksum correctly in the readme.
~Sean
_________________
http://www.pbwhere.com