Thanks to Julio Marchi for this space in MSX All

Screen 2 Show

  Create animated displays for MSX screen 2 images.

Available displays
  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.

Display Description Source
  Direct - Loads the image directly.
  Top-down - Loads the image from top to down.
  Left-right - Loads the image from the left to the right.
  Diagonal - Loads the image in diagonal.
  Snail-in - Loads the image as snail effect.
  Frame-in - Loads the image in frame.
  Window blind - Loads the image as a window blind.
  Map - Generic code for display maps.
  Map 2 - Generic code for display maps.

  Author: Marcelo Silveira
  Programs license: GNU-GPL v. 3.x -

  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.
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 represents 768 blocks of 8x8 pixels of 2 bytes each, taking 1536 bytes at all. Each position in the map has a generic pointer to memory, using the MSX 1x8 pattern, starting from 0 and stepping by 8.
  The map is placed right after the generic display codes "map" or "map 2", at the 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.

  | blc 1  | blc 2  | blc 3  | blc 4  |
  | &H8000 | &H0008 | &H8010 | &H0018 |
  |     frame 1     |     frame 2     |
  In the example above, we have 4 blocks of 8x8 pixels, where 2 frames with 2 blocks each were created. We can have many frames and with arbitrary size, as we wish. For that, we must sign the first block of the frame. The frame bit is signed in red.

  The program "map 2" forces a delay between all tiles loading, ignoring the delay bit.
  The programs are compatible. So, the maps work well in both programs.

  Available display maps:

Display Description Map/Sources
  Random - Load blocks randomly.
  Chess - Load image as chess board.
  Ball - Load in ball shape.
  Cross - Load in a spinning cross way.
  Stripes - Load using horizontal stripes.
  Diagonal 2 - Load in diagonal.
  Vertical close - Load from both up and down.
  Horizontal close - Load from both sides.
  Clock - Load by rotating from the center.

  Author: Marcelo Silveira
  Maps license: GNU-GPL v. 3.x -

  The new displays are available from MSX Viewer 5.2 on.

Marcelo Silveira
Systems and Computing Engineer
Expert in Image Processing and Artificial Intelligence
© MarMSX 1999-2024