KD tileinfo
Posted: Wed Nov 04, 2009 12:20 pm
I found what really look like 3 tile collision procedures in which ES:BX is set to seg:offs directly coded in the .exe
Procedure #1. Up/down blocking + slopechecking.
1FA5:D36
1fA5:16A2
(1FA5:0 contains the rlew flag, followed by the pointers to the data in the map file, and then the lengths of the huffman compressed headers, so it would make sense that the tileinfo follows shortly thereafter. I suspect that these are the locations of top and bottom blocking planes because I am seeing values from 0 to 11 in these two planes.)
Procedure #2A. Blocking leftwards movement.
ES:BX = 1FA5:11EC. (The updated position of box_left_x is checked)
Procedure #2B. Blocking rightwards movement.
ES:BX = 1FA5:1B58. (The updated position of box_right_x is checked)
All of these offsets are $4B6 = 1206 bytes apart. ckdtiles shows 67rows*18columns = 1206 tiles. :D
That leaves room for two more 1206-byte planes at 1FA5:3CA and 1FA5:880. Likely, background TimeFlag and AnimFlag
And EXACTLY room for three more 1206-byte planes at 1FA5:200E, :24C4, :297A, before the segment ends. Likely, Anim, Misc and Timeflags.
So it looks like the first plane of tileinfo begins at 1FA5:3CA = $1FE1A. And each plane is $4B6 bytes long.
Now... to figure out what all the different codes mean =).
Procedure #1. Up/down blocking + slopechecking.
1FA5:D36
1fA5:16A2
(1FA5:0 contains the rlew flag, followed by the pointers to the data in the map file, and then the lengths of the huffman compressed headers, so it would make sense that the tileinfo follows shortly thereafter. I suspect that these are the locations of top and bottom blocking planes because I am seeing values from 0 to 11 in these two planes.)
Procedure #2A. Blocking leftwards movement.
ES:BX = 1FA5:11EC. (The updated position of box_left_x is checked)
Procedure #2B. Blocking rightwards movement.
ES:BX = 1FA5:1B58. (The updated position of box_right_x is checked)
All of these offsets are $4B6 = 1206 bytes apart. ckdtiles shows 67rows*18columns = 1206 tiles. :D
That leaves room for two more 1206-byte planes at 1FA5:3CA and 1FA5:880. Likely, background TimeFlag and AnimFlag
And EXACTLY room for three more 1206-byte planes at 1FA5:200E, :24C4, :297A, before the segment ends. Likely, Anim, Misc and Timeflags.
So it looks like the first plane of tileinfo begins at 1FA5:3CA = $1FE1A. And each plane is $4B6 bytes long.
Now... to figure out what all the different codes mean =).