Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Example assembly programs for the GameTank

Here I'll provide some code examples for the GameTank system. The information within will be cumulative, meaning that higher-numbered examples may include features from lower-numbered examples without the explanation repeated.

  1. Drawing pixels by direct video memory write

  2. Draw a colored rectangle using the blitter

  3. Load sprite data and draw it using the blitter

  4. Write a game loop that renders once per VSync

  5. Read input from gamepads

  6. Playing sounds and music

  7. Using a 2MB cartridge

  8. Accessing extended RAM and VRAM

This code was written for vasm by Dr. Volker Barthelmann availble at http://www.compilers.de/vasm.html

The examples that use sprites refer to a sprite sheet in the assets folder, compressed with zopfli.

zlib6502 by Pitor Fusik is used to extract the data. It is included here as a precompiled blob with the following assumptions:

Use Mapping
INFLATE code 0xE000 - 0xE1FC
reserved RAM 0x200 - 0x04FD
reserved Zero Page 0xF0 - 0xF3