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

Author Topic: SNES: Find ROM offset from RAM data  (Read 2156 times)

jununhere

  • Newbie
  • *
  • Posts: 2
    • View Profile
SNES: Find ROM offset from RAM data
« on: April 30, 2014, 05:31:00 pm »
I am trying to edit Romance of the Three Kingdoms II (ROTK II) for the SNES. I have located the offset of some data in the ROTK II ram that I would like to find in the rom, what are some good methods to find the location in the rom? I've tried searching for it but the data appears to be stored in a different format and I haven't found it.

RedScorpion

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Snes-Projects
Re: SNES: Find ROM offset from RAM data
« Reply #1 on: April 30, 2014, 05:49:45 pm »
Dialogs could be found on  0x22b20.

The text is uncpmpressed and used stad. ASCII Code.

USer snesedit and check relative search. Search for "star" (without "")

Have fun

red

Nightcrawler

  • Hero Member
  • *****
  • Posts: 5790
    • View Profile
    • Nightcrawler's Translation Corporation
Re: SNES: Find ROM offset from RAM data
« Reply #2 on: April 30, 2014, 05:55:26 pm »
There is no guarantee the data you find in RAM can be found in the ROM at all. I'd say most of the values stored in RAM will not be able to be found in the ROM unless it is buffered data, copied tables or some data like that. RAM is mostly used for variables, changing content, and buffers in general.

If you're lucky and the data in question did in fact come from the ROM, you can do some searching on the hex values. If that doesn't work, then you have no choice but to look at some code and try and decipher how it got to RAM and where it came from. You can start by placing some breakpoints on the RAM location in question in a debugger as a starting point to how that data got there. Then you work backwards to see where it came from.
TransCorp - Over 20 years of community dedication.
Dual Orb 2, Wozz, Emerald Dragon, Tenshi No Uta, Glory of Heracles IV SFC/SNES Translations

jununhere

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SNES: Find ROM offset from RAM data
« Reply #3 on: April 30, 2014, 05:59:57 pm »
@RedScorpion I should have been more specific. I'm trying to find the offset for how many soldiers, arms, and skill a general has.

@Nightcrawler, I've tried using breakpoints to determine the location in the past but I haven't had much success. I have a hard time telling which offsets that are generated are relevant and which aren't. I'll have to keep trying, thanks!
« Last Edit: April 30, 2014, 06:06:16 pm by jununhere »