While I was busy with the ZX97 project I examined several methods of doing graphic on the ZX. Then I remembered a special feature of the MODE_nr1 Atari ST demo program: a real gray color on the screen. So I made this little game.
Several years later a member of the German ZX-Team reported that the V1.0 crashes on extended machines. These have the signal M1 decoded so that the HRG of GUUSFLATER fetches the wrong data. To get around this limitation I changed the HRG routine, and so V2.0 came into existence...
puzzle.zip Archive of V1.0 with source and program, 41KB.
puzzle2.zip Archive of V2.0 with source and program, 28KB.
After LOADing the program (most emulators will not show the gray colored pixels) a picture of me appears. It is divided in tiles and one of them is left out. Then the program juggles the tiles a while until it thinks it's enough. Now it's your task to rearrange the tiles to their original positions. You use the cursor keys to move a tile into the spare position.
The graphic core routine of V1.0 was taken from GUUSFLATER which is a similar game. You can stop the game with BREAK and examine the BASIC code. This HRG mode has two advantages over others: 1. you don't need seperate routines to switch to and from HRG mode; 2. if BASIC clears the text screen the HRG is automatically quit.
For V2.0 I looked into Wilf's WRX16K routines (Thanks, pal!) and adapted them. You are still able to BREAK into text mode...
The archive of V1.0 contains the source code for a very simple graphic file converter. You should compile it with any appropriate C compiler. It reads a standard 16 color BMP (bitmap) file and produces two assembler text files. These contain the planes for the screen which have to be switched synchronously to the vertical blank. This files will be included in the main source file to be assembled to binary codes.
Back to my home page.
Comments and such stuff go to: [email protected]