Ok so I hope a) this is the right place and b) someone can help me. I'm trying to expand my capabilities on modifying/using
65816 assembly...but I'm still really a novice. So this is my research/learning project on the subject.
Ok here's the details of the ROM I'm working with--and all without spoiling what secret project I'm working on...and it isn't even a Final Fantasy.
ROM Type: LoROM 00:8000 - 6F:FFFF
Hex offset example of a pointer table: 55800
Trace log of the JSR to and the routine in question:
$08/F9BC 20 D0 FA JSR $FAD0 [$08:FAD0] Jumps to the below...
$08/FAD0 EB XBA
$08/FAD1 A9 00 LDA #$00
$08/FAD3 EB XBA
$08/FAD4 C2 20 REP #$20
$08/FAD6 0A ASL A
$08/FAD7 AA TAX
$08/FAD8 BD 00 D8 LDA $D800,x[$0A:D846]
$08/FADB 18 CLC
$08/FADC 69 00 D8 ADC #$D800
$08/FADF AA TAX
$08/FAE0 E2 20 SEP #$20
$08/FAE2 60 RTS
So the LDA $D800 is what I'm focusing on. According to the 65816 document I'm using for reference the LDA (BD) is "Absolute Indexed,X" where as the LDA (BF) is "Absolute Long Indexed,X". Shouldn't BF allow me to point to the new place in the ROM outside of the assumed $0A (50000)? I've relocated the JSR at the top to point to a new location in the ROM so I can relocate the above routine for expansion, and that part works perfectly. My problem is I expanded the routine and attempted to change the LDA (BD 00 D8) to LDA (BF 00 D8 2A) and that of course didn't work. I also did the same to the ADC (69 00 D8) by also changing it to ADC (6F 00 D8 2A). Didn't work...
Ok so without laughing, what am I doing wrong?