News:

11 March 2016 - Forum Rules

Main Menu

Issues with SNES ROMS and assembly

Started by lowena, July 04, 2013, 03:19:00 PM

Previous topic - Next topic

lowena

So here's the problem. The only functioning debugger i can find, no$sns, won't let me edit instructions. I enter completely valid instructions (like one shown in the debugger for example) and it says "Unknown command" or "Parameter fail". So I can't edit the ASM with that. So I try using asmdev, and the addresses are completely different. And if I try searching for any instruction found in the debugger, it takes me to something completely different. So, I try disassembling the ROM. The addresses are different again (starting at C00000 instead of 000000) and this time the instructions can't be found at all.

I know the instruction exists (in this case the sanity check for Secret of Evermore, which I found in the SRAM doc for it) and I can find it in the debugger just fine. However, neither in asmdev nor in a disassembly with dispel does it exist. What am I doing wrong? Why can't I edit it with no$sns, and why don't asmdev and dispel give a complete disassembly?

EDIT: I've read here that hirom games start usually at 0xC00000, and lorom at 0x808000. When I load up Secret of Evermore in no$sns, the addresses are all around 0x808000, whereas in asmdev and with dispel, the game starts at 0xC00000. Clearly Secret of Evermore is a hirom game (or at least that's what no$sns reports, and what people on the internet say), so why is the code in the area that is usually associated with lorom games?

STARWIN

I have used http://www.romhacking.net/utilities/241/ as a SNES debugger, so it should be a functioning alternative.

I have edited the ROMs with a hex editor directly, to change the assembly instructions. Perhaps it is too tedious for you, but it works for small changes and at least acts as a sanity check. (searching for opcode sequences helps you understand the mapping between logical and ROM offsets as it gives you the ROM offset)

lowena

Yeah, I guess I will just have to use a hex editor. Unfortunately that build you linked terribly scrambles the graphics of Secret of Evermore for some reason.

LostTemplar

For any larger changes you should use an assembler (e.g. xkas, bass) anyway.

Even in HiROM games $808000~$bfffff (where the last 16 bits >= $8000; < $8000 is RAM and hardware registers) is still a mirror of $c00000~$dfffff. I suggest reading documents about SNES memory mapping, for instance http://www.romhacking.net/documents/173/.

Utopia

Interesting that Evermore functions like that, If you mind me asking what are you trying to edit with SoE?
Always looking to hear from the fans! Feel free to shoot me a PM or email me at BornofDreamers@gmail.com

Social Media: https://twitter.com/bornofdreamers

lowena

Nothing in particular. I've been getting into some reverse engineering, and saw a thread here about some guy wanting to edit the maps of Secret of Evermore, and just wanted to see if I could figure anything out for the game. But it turns out that the ROM uses DTE, and I have no idea how to make a text table for that, so I gave up. :)

neagix

Quote from: lowena on July 05, 2013, 04:33:24 PM
Nothing in particular. I've been getting into some reverse engineering, and saw a thread here about some guy wanting to edit the maps of Secret of Evermore, and just wanted to see if I could figure anything out for the game. But it turns out that the ROM uses DTE, and I have no idea how to make a text table for that, so I gave up. :)

How far did you get? I would like to approach the same, and I am interested in finding other maps or possibly decoding the compiled SIGIL scripts that must be there