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

35 lines
895 B
Plaintext

# Chip8 is a virtual machine designed in 1977 for programming video games.
# Octo is a high level assembler, disassembler and simulator for Chip8.
# Click 'Run' and then press ASWD to move the sprite around the screen.
# Click the Octo logo for source, documentation and examples.
:alias px v1
:alias py v2
: main
px := random 0b0011111
py := random 0b0001111
i := person
sprite px py 8
loop
# erase the player, update its position and then redraw:
sprite px py 8
v0 := OCTO_KEY_W if v0 key then py += -1
v0 := OCTO_KEY_S if v0 key then py += 1
v0 := OCTO_KEY_A if v0 key then px += -1
v0 := OCTO_KEY_D if v0 key then px += 1
sprite px py 8
# lock the framerate of this program via the delay timer:
loop
vf := delay
if vf != 0 then
again
vf := 3
delay := vf
again
: person
0x70 0x70 0x20 0x70 0xA8 0x20 0x50 0x50