+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  A couple of pointer question (SNES, Silva Saga 2)
Pages: [1]
Author Topic: A couple of pointer question (SNES, Silva Saga 2)  (Read 2 times)
aishsha
Guest
« on: February 24, 2009, 06:41:28 pm »

Well, as Bongo' has already mentioned somewhere - the game is a mess full of nonstandard ideas Smiley
1. The main point I want to solve now are specific pointers for well... a death screen.
The thing is that I can't define their type in order to move the text to some other bank. The game does have some hardcoded or divided in parts pointers so it won't be a surprise this one to be the same. Anyway, my address is at 10237. Through some heavy debugging and corrupting I found  my pointer at 100fb and it is "A937". The thing, as you see is that it is a bit nonstandard but that's not the whole thing - only exact line pointer (37) may be changed freely. Changing A9 gives very peculiar results like jumping into 2 locations in the rom (but only 2 of them and I can't figure out the pattern, cause various changes give the same results sometimes). The code line looks as follows: ...20A93748C220.
Debugging gives the following operations observed in this part:
Code:
$82/80F2 22 8C 8F 88 JSL $888F8C[$88:8F8C]
$82/80F6 F4 82 82        PEA $8282  [$7E:8282]
$82/80F9 E2 20         SEP #$20                     
$82/80FB A9 37         LDA #$37            
$82/80FD 48         PHA                   
$82/80FE C2 20         REP #$20              
$82/8100 AD DD 00 LDA $00DD  [$7E:00DD]
$82/8103 48         PHA                                
$82/8104 22 9D F6 80 JSL $80F69D[$80:F69D]
$82/8108 3B         TSC
What kind of pointer could that be anyway, cause I've never met 1-byte pointers on SNES and don't see "bank-number-part" somewhere around...

2. The second issue refers to the first one. How should one actually look for "block pointers"? I mean, what should I "break" Smiley Is it usually close to the text block it points too and if so, what is the starting byte for it?

Thanks for anything in advance.

DS: Edited twice to make the code line up.
« Last Edit: February 25, 2009, 06:35:06 pm by aishsha »
Tauwasser
Guest
« Reply #1 on: February 24, 2009, 07:34:55 pm »

Well as you see, it pushes 37 and whatever is at 00DD to stack. Bets are, the rest of the pointer is at 00DD and consists of the high bits of the current pointer for the current bank.

You might as well check out that JSL or see if you see pop instructions after this piece of code. Also, next time either step through and save every line or don't show register contents plz. At least, it confused me why A would stay 0xFF after LDA 0x37...

cYa,

Tauwasser
aishsha
Guest
« Reply #2 on: February 25, 2009, 09:24:58 am »

Thanks, I guess, I'll track further.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC