Trevor Merritt e29ac45c84 scroll down works on CHIP-8 and High-Res modes
scroll left and right work in stdef and hidef
adds octo test roms
adds schip fonts to memory
2024-10-27 11:41:25 -04:00

40 lines
835 B
Plaintext

###########################################
#
# Tank
#
# Classic Chip8 program translated from
# VIPer Volume 1 Issue 1 (June 1978), pg 12-14
# https://github.com/mattmikolay/viper/blob/master/volume1/issue1.pdf
#
# Press 2/E/S/Q to move the tank.
#
###########################################
: tankup
0x10 0x54 0x7c 0x6c 0x7c 0x7c
: tankdown
0x44 0x7c 0x7c 0x6c 0x7c 0x54 0x10
: tankleft
0x0 0xfc 0x78 0x6e 0x78 0xfc
: tankright
0x0 0x3f 0x1e 0x76 0x1e 0x3f 0x0
: up v2 += -1 i := tankup ;
: down v2 += 1 i := tankdown ;
: right v1 += -1 i := tankright ;
: left v1 += 1 i := tankleft ;
: main
v1 := 0x20
v2 := 0x10
i := tankup
loop
sprite v1 v2 7
v0 := key
sprite v1 v2 7
if v0 == 2 then up
if v0 == 4 then right
if v0 == 6 then left
if v0 == 8 then down
again