News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Issues with SNES ROMS and assembly  (Read 3636 times)

lowena

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Issues with SNES ROMS and assembly
« on: July 04, 2013, 03:19:00 pm »
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?
« Last Edit: July 04, 2013, 04:44:32 pm by lowena »

STARWIN

  • Sr. Member
  • ****
  • Posts: 454
    • View Profile
Re: Issues with SNES ROMS and assembly
« Reply #1 on: July 04, 2013, 07:54:55 pm »
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

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Issues with SNES ROMS and assembly
« Reply #2 on: July 04, 2013, 10:02:33 pm »
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

  • Hero Member
  • *****
  • Posts: 906
    • View Profile
    • au-ro-ra.net
Re: Issues with SNES ROMS and assembly
« Reply #3 on: July 05, 2013, 12:11:54 am »
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

  • Jr. Member
  • **
  • Posts: 25
  • Born of Dreamers
    • View Profile
    • Born of Dreamers
Re: Issues with SNES ROMS and assembly
« Reply #4 on: July 05, 2013, 03:24:06 pm »
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

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Issues with SNES ROMS and assembly
« Reply #5 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. :)

neagix

  • Jr. Member
  • **
  • Posts: 8
  • "impossible" is for loosers
    • View Profile
    • The tales of neagix
Re: Issues with SNES ROMS and assembly
« Reply #6 on: November 09, 2014, 04:28:50 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