Well, my Snes Rom is Lorom80, with header, so these commands are included in the text file
Code:
#VAR(Table,TABLE)
#ADDTBL("dl3.tbl",Table)
#ACTIVETBL(Table)
#HDR($200)
#SMA("LOROM80")
#ADDTBL("dl3.tbl",Table)
#ACTIVETBL(Table)
#HDR($200)
#SMA("LOROM80")
Well, the pointers are offseted. They subtract 120k (120.000 hex) from themselves. I calculated pointers manually and it work. But when using Atlas, problems arise!
My Pointer table starts at $120218, the pointer is 3 byte. So these lines are included in the text file.
Code:
#VAR(MyPtr, CUSTOMPOINTER)
#VAR(PtrTable, POINTERTABLE)
#CREATEPTR(MyPtr, "LOROM80", $120000, 24)
#PTRTBL(PtrTable, $120218, 3, MyPtr)
#VAR(PtrTable, POINTERTABLE)
#CREATEPTR(MyPtr, "LOROM80", $120000, 24)
#PTRTBL(PtrTable, $120218, 3, MyPtr)
Well, the text starts at $2110F0
Then
Code:
#JMP($2110F0)
#WRITE(PtrTable)
#WRITE(PtrTable)
OK, nothing wrong.
But, since the text starts at 2110F0, then the pointer value is supposed to be
2110F0-200-120000=F0EF0
But when I ran Atlas, the result is B08EF0!
What the hell!
This mean Atlas adds A18000 hex to the pointer. Easy stuff.
2110F0-200-12000 + X =B08EF0
You can see X=A18000, easily.
So I must subtract that A18000 from the pointer by replacing
Code:
#CREATEPTR(MyPtr, "LOROM80", $120000, 24)
with this one
Code:
#CREATEPTR(MyPtr, "LOROM80", $B38000, 24)
Well, 120.000+A18.000=B38.000
Yeah!
The second run has the pointer value: F0EF0. Righ thing.
Then, the next text starts at $223FAD, the pointer value is supposed to be
223FAD-200-120000=103DAD
But Atlas gave me 113DAD!
The second pointer is not right! I don't understand.
PS: I starts at a new place, $12031D, the pointer supposed to be 12031D-200-120000=11D
But Atlas gave me 4A811D. This means Atlas add 4A8000 to the pointer.
Above, when at $2110F0, it add A18000, now at % 12031D, it add 4A811D.
I also try other place, and the result are not the same.
I don't get what the fuss is going on. Could anyone explain to my stupid head?
Thankyou so much.