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.

Coding > OAM Editing (more of a hacking question)

#21419 - Kajitani-Eizan - Fri May 28, 2004 10:57 pm

hey all, I'm not sure if this question is really appropriate for this part of the forum (or this forum at all), so i also posted it in 'Graphics'. sorry for the double topic.

so yeah, this is really about hacking more than actual development, but i thought i might as well ask in case anyone knows. a game i am translating (TotW:ND2) loads tiles (of variable location) into 1x1 tile OAM sprites. I would like to change which tiles are loaded into the sprites (for example, instead of using tile 460 (according to VBA tile viewer) in the sprite tile graphics area, use tile 465 in the sprite tile graphics area). is there any way to do this (perhaps using the VBA disassembler)?

#21423 - Lord Graga - Fri May 28, 2004 11:54 pm

You must use an hex editor... you could search for 0x01CC (460 in HEX), and try to replace the results by 0x01D1 (465 in HEX), one by one.

#21434 - sajiimori - Sat May 29, 2004 2:38 am

Quote:

You must use an hex editor... you could search for 0x01CC (460 in HEX), and try to replace the results by 0x01D1 (465 in HEX), one by one.

That's extremely unlikely to work. That value could appear in many places that are unrelated, and the relevant value might not be plainly visible in the ROM, for instance if it's compressed or otherwise procedurally generated.

ROM hacking is not a simple task. VBA has some good tools, but if you really want to get serious, check out IDA Pro.

#21440 - Kajitani-Eizan - Sat May 29, 2004 6:38 am

i'm fairly sure it's procedurally generated, since that 460 might be, say, 450 at a different time. it seems to depend on how many other sprites/spritetiles are in use at the moment. a relative search of some sort might work, but then what should be the relative search string? it seems dubious at best.

i would think the most likely way to be able to figure this out is find out where in the ROM the instruction to write the tile assignment to the sprite is. and that would probably be through some sort of run-time disassembly.

perhaps i should check out IDA pro. thanks for the tip, and thanks for the help overall ^_^