Let's continue for 2K10 !
Game screen is composed of 8*5 blocks of 4*4 chars (8*8 pixies).Blocks are stored in memory in the same way as spritesexcept char pixies are always presents.
Per char :
*1 byte BYTE : flag flags, #36 = skipdefines color, bit 7 defines if char is solid.*BYTE*8 bytes : pixels in 1bitgraphics
There are 16 chars so 144 bytes per block.
Levels are composed of columns of 5 blocks.The index first column of the first level bloc is located at #C4B1 (byte).The first column number 0 is located at (#C4BC)
A column address (word) can be computed like this : (column*5) + (#C4BC)
Each byte of the column is a block number :
* bit 7 -> if set block if verticaly reversed* bit 6 -> if set block if horizontaly reversed
* bits 0->5 block index
Using block index , it is possible to compute address (word) with this simple formula :
(#C4BC)-((index+1)*144) Routine at #167B solves block index in A and return block address in HL. Code located at #5C4F draws the first screen of the level before scrolling.It uses the sprite code (#8D08,#8D70,#8DDE,#8E34) to put the level graphics on screen. Current column is located at #7A84 and there is a copy of (#C4BC) at #C4AE.When game passes a checkpoint , it saves the current column at #C4AE so when player dies, game restarts at #C4AE. Code located at #8A7F feeds scrolling , update attribute array , draw blocks on right side of the screen.There are 4 routines to feed scroll according to reverse flags. * #1E4C - x=N y=N* #1E83 - x=R y=N* #1EC3 - x=N y=R* #1640 - x=R y=R
[[User:Fano|Fano]] 20:23, 6 January 2010 (UTC)