+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Need Help with Atlas the Beast
Pages: [1]
Author Topic: Need Help with Atlas the Beast  (Read 2 times)
Rappa
Guest
« on: September 14, 2009, 11:22:38 am »

Yeah, Atlas is a huge beast to deal with. I'm scratching my head with it, hoping someone could help me with this problem. I'm used to Atlas, but I have encountered these problem as described below.

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")

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)

Well, the text starts at $2110F0

Then

Code:
#JMP($2110F0)
#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.
Klarth
Guest
« Reply #1 on: September 16, 2009, 08:22:37 pm »

If your pointers are calculated merely by subtracting 120k (which seems very odd to me for a SNES game...), then they aren't "LOROM80" pointers.  You need to use "LINEAR" and offset by $120000.

Atlas never really added anything to the pointer.  LOROM80 means the pointer is converted from a linear address to how the SNES would memory map the ROM banks.

Let me know how it works out.
Pages: [1]  


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