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

Author Topic: Wonderswan pointer tables?  (Read 1421 times)

SoujiroElric

  • Newbie
  • *
  • Posts: 2
    • View Profile
Wonderswan pointer tables?
« on: April 06, 2014, 02:01:35 am »
Greetings and nice to meet everyone. My issue is as follows.

I am trying to hack Digital Monster Card Game ver. Wonderswan. As a good card game it has a lot of text to describe each card's effect. I've been looking for the addresses and found the relevant texts. If, using Kruptar, I try to modify a string to a size longer than expected, the game will chop the text. That is why I need to find the pointer tables so I can make space for longer texts. And here is where the whole issue comes.

I took, as an example, one of the ROM text offsets to toy with. I noticed it got loaded into a memory address equal to the offset, except without the first four bytes. However, due to the way the Wonderswan pointers resolve (add 4 bits to the end of the segment and add the offset), I can't know which value the pointer has.

So, how am I supposed to find the pointer tables by knowing the offset? I'm really lost here. Thank you beforehand.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Wonderswan pointer tables?
« Reply #1 on: April 06, 2014, 08:10:20 am »
Breakpoint the memory access and then trace backwards in the code until you find the read from the pointer table. That read will obviously contain the address of the table.

SoujiroElric

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Wonderswan pointer tables?
« Reply #2 on: April 06, 2014, 03:36:50 pm »
I'm trying to do that using mednafen but I miss the exact moment where the emulator reads from the pointer table.

April 08, 2014, 03:28:35 am - (Auto Merged - Double Posts are not allowed before 7 days.)
OHOHOHO I JUST FOUND IT! Turns out the pointer table was RIGHT BELOW the whole script! And right above it there is another pointer table to something else that is as important as what I'm trying to modify!
« Last Edit: April 08, 2014, 03:28:35 am by SoujiroElric »