Tileinfo ... again!

Request patches for Keens 1-3.
Post Reply
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Tileinfo ... again!

Post by ckguy »

Grrrr ... what's wrong with my logic?

Let's say that in Keen 1 I wanted to change the general properties for tile 255. That's in array number two (starting at zero). In Keen 1 there are 611 tiles. That means that each array is 1222 long. So to get the address of the low byte to patch is:

{starting address} + 2 * 1222 + 255

By the way, what is the starting address for keen 1-3 version 1.31? I think I've got them right, but this could be my whole problem ...
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

Not quite right -- it should be:
{starting address} + 2 * 1222 + 2 * 255

For Keen 1 version 1.1, the offset is $131F8
For version 1.31, it's $130F8
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Oh

Post by ckguy »

Whoops, yeah I get it now. Gee, I feel dumb now. *grins sheepishly* Thanks Andy!
Post Reply