![]() |
||
Thanks to Julio Marchi for this space in MSX All |
||
Create animated displays for MSX screen 2 images.
Here we present the available displays to load a image on screen 2. Each display follows the Assembly source code, a program in Basic to test the algorithm and the source code in RSCII assembler "ASM" format. Author: Marcelo Silveira Programs license: GNU-GPL v. 3.x - http://www.gnu.org/licenses/gpl-3.0.txt. For testing the display code, please run the program in Basic that follows each code. It is located at the bottom of the "txt" file. After running the program, the display code is already in the memory and ready to run. But, for that, you must clear MSX memory using command NEW and running the next program. 10 SCREEN 2 20 DEFUSR=&HC000 30 X=USR(0) Displays using map Maybe the easiest way to create screen 2 displays is by using a pointer map in RAM, which contains the 8x8 blocks (tiles) inserting order. According to that, we are just concerned in set the order of the tiles instead of coding. The map has 768 positions of 2 bytes each, taking 1536 bytes at all. Each position in the map has a generic pointer to memory, starting from 0 and stepping 8. The map is placed right after the generic display codes "map" or "map 2", at the fix RAM address &HC100. Then, the display code reads the map from &HC100 to &HC6FF in search of the tiles that have to be moved to VRAM. Which are the differences between "map" and "map 2"? The program "map" use frames, where a delay is inserted whenever a frame is detected. The MSB of the first tile of the new frame is set, in order to sign the frame changing. Example: | blc 1 | blc 2 | blc 3 | blc 4 | +-------+-------+-------+-------+ | 00 80 | 08 00 | 10 80 | 18 00 | +-------+-------+-------+-------+ | frame 1 | frame 2 |The MSB is signed in red. The program "map 2" inserts a display between all tiles loading without using frames. The programs are compatible. So, the maps work well in both programs. Available display maps: Author: Marcelo Silveira Maps license: GNU-GPL v. 3.x - http://www.gnu.org/licenses/gpl-3.0.txt. The new displays are available from MSX Viewer 5.2 on. |
||