Skip to content

Instantly share code, notes, and snippets.

@rmmh
Created August 17, 2014 21:35
Show Gist options
  • Save rmmh/a1a493d4e3ba05afe24f to your computer and use it in GitHub Desktop.
Save rmmh/a1a493d4e3ba05afe24f to your computer and use it in GitHub Desktop.
Disassembled Chip8 Programs
# INPUT FILE LISTING:
# chip8/Chip-8 Demos/Maze (alt) [David Winter, 199x].ch8
# chip8/Chip-8 Demos/Maze [David Winter, 199x].ch8
# chip8/Chip-8 Demos/Particle Demo [zeroZshadow, 2008].ch8
# chip8/Chip-8 Demos/Sierpinski [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Sirpinski [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Stars [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Trip8 Demo (2008) [Revival Studios].ch8
# chip8/Chip-8 Demos/Zero Demo [zeroZshadow, 2007].ch8
# chip8/Chip-8 Games/15 Puzzle [Roger Ivie] (alt).ch8
# chip8/Chip-8 Games/15 Puzzle [Roger Ivie].ch8
# chip8/Chip-8 Games/Addition Problems [Paul C. Moews].ch8
# chip8/Chip-8 Games/Airplane.ch8
# chip8/Chip-8 Games/Animal Race [Brian Astle].ch8
# chip8/Chip-8 Games/Astro Dodge [Revival Studios, 2008].ch8
# chip8/Chip-8 Games/Biorhythm [Jef Winsor].ch8
# chip8/Chip-8 Games/Blinky [Hans Christian Egeberg, 1991].ch8
# chip8/Chip-8 Games/Blinky [Hans Christian Egeberg] (alt).ch8
# chip8/Chip-8 Games/Blitz [David Winter].ch8
# chip8/Chip-8 Games/Bowling [Gooitzen van der Wal].ch8
# chip8/Chip-8 Games/Breakout (Brix hack) [David Winter, 1997].ch8
# chip8/Chip-8 Games/Breakout [Carmelo Cortez, 1979].ch8
# chip8/Chip-8 Games/Brick (Brix hack, 1990).ch8
# chip8/Chip-8 Games/Brix [Andreas Gustafsson, 1990].ch8
# chip8/Chip-8 Games/Cave.ch8
# chip8/Chip-8 Games/Coin Flipping [Carmelo Cortez, 1978].ch8
# chip8/Chip-8 Games/Connect 4 [David Winter].ch8
# chip8/Chip-8 Games/Craps [Camerlo Cortez, 1978].ch8
# chip8/Chip-8 Games/Deflection [John Fort].ch8
# chip8/Chip-8 Games/Figures.ch8
# chip8/Chip-8 Games/Filter.ch8
# chip8/Chip-8 Games/Guess [David Winter] (alt).ch8
# chip8/Chip-8 Games/Guess [David Winter].ch8
# chip8/Chip-8 Games/Hidden [David Winter, 1996].ch8
# chip8/Chip-8 Games/Hi-Lo [Jef Winsor, 1978].ch8
# chip8/Chip-8 Games/Kaleidoscope [Joseph Weisbecker, 1978].ch8
# chip8/Chip-8 Games/Landing.ch8
# chip8/Chip-8 Games/Lunar Lander (Udo Pernisz, 1979).ch8
# chip8/Chip-8 Games/Mastermind FourRow (Robert Lindley, 1978).ch8
# chip8/Chip-8 Games/Merlin [David Winter].ch8
# chip8/Chip-8 Games/Missile [David Winter].ch8
# chip8/Chip-8 Games/Most Dangerous Game [Peter Maruhnic].ch8
# chip8/Chip-8 Games/Nim [Carmelo Cortez, 1978].ch8
# chip8/Chip-8 Games/Paddles.ch8
# chip8/Chip-8 Games/Pong (1 player).ch8
# chip8/Chip-8 Games/Pong 2 (Pong hack) [David Winter, 1997].ch8
# chip8/Chip-8 Games/Pong (alt).ch8
# chip8/Chip-8 Games/Pong [Paul Vervalin, 1990].ch8
# chip8/Chip-8 Games/Programmable Spacefighters [Jef Winsor].ch8
# chip8/Chip-8 Games/Puzzle.ch8
# chip8/Chip-8 Games/Reversi [Philip Baltzer].ch8
# chip8/Chip-8 Games/Rocket [Joseph Weisbecker, 1978].ch8
# chip8/Chip-8 Games/Rocket Launcher.ch8
# chip8/Chip-8 Games/Rocket Launch [Jonas Lindstedt].ch8
# chip8/Chip-8 Games/Rush Hour [Hap, 2006] (alt).ch8
# chip8/Chip-8 Games/Rush Hour [Hap, 2006].ch8
# chip8/Chip-8 Games/Russian Roulette [Carmelo Cortez, 1978].ch8
# chip8/Chip-8 Games/Sequence Shoot [Joyce Weisbecker].ch8
# chip8/Chip-8 Games/Shooting Stars [Philip Baltzer, 1978].ch8
# chip8/Chip-8 Games/Slide [Joyce Weisbecker].ch8
# chip8/Chip-8 Games/Soccer.ch8
# chip8/Chip-8 Games/Space Flight.ch8
# chip8/Chip-8 Games/Space Intercept [Joseph Weisbecker, 1978].ch8
# chip8/Chip-8 Games/Space Invaders [David Winter] (alt).ch8
# chip8/Chip-8 Games/Space Invaders [David Winter].ch8
# chip8/Chip-8 Games/Spooky Spot [Joseph Weisbecker, 1978].ch8
# chip8/Chip-8 Games/Squash [David Winter].ch8
# chip8/Chip-8 Games/Submarine [Carmelo Cortez, 1978].ch8
# chip8/Chip-8 Games/Sum Fun [Joyce Weisbecker].ch8
# chip8/Chip-8 Games/Syzygy [Roy Trevino, 1990].ch8
# chip8/Chip-8 Games/Tank.ch8
# chip8/Chip-8 Games/Tapeworm [JDR, 1999].ch8
# chip8/Chip-8 Games/Tetris [Fran Dachille, 1991].ch8
# chip8/Chip-8 Games/Tic-Tac-Toe [David Winter].ch8
# chip8/Chip-8 Games/Timebomb.ch8
# chip8/Chip-8 Games/Tron.ch8
# chip8/Chip-8 Games/UFO [Lutz V, 1992].ch8
# chip8/Chip-8 Games/Vers [JMN, 1991].ch8
# chip8/Chip-8 Games/Vertical Brix [Paul Robson, 1996].ch8
# chip8/Chip-8 Games/Wall [David Winter].ch8
# chip8/Chip-8 Games/Wipe Off [Joseph Weisbecker].ch8
# chip8/Chip-8 Games/Worm V4 [RB-Revival Studios, 2007].ch8
# chip8/Chip-8 Games/X-Mirror.ch8
# chip8/Chip-8 Games/ZeroPong [zeroZshadow, 2007].ch8
# chip8/Chip-8 Hires/Astro Dodge Hires [Revival Studios, 2008].ch8
# chip8/Chip-8 Hires/Hires Maze [David Winter, 199x].ch8
# chip8/Chip-8 Hires/Hires Particle Demo [zeroZshadow, 2008].ch8
# chip8/Chip-8 Hires/Hires Sierpinski [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Hires/Hires Stars [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Hires/Hires Test [Tom Swan, 1979].ch8
# chip8/Chip-8 Hires/Hires Worm V4 [RB-Revival Studios, 2007].ch8
# chip8/Chip-8 Hires/Trip8 Hires Demo (2008) [Revival Studios].ch8
# chip8/Chip-8 Programs/BMP Viewer - Hello (C8 example) [Hap, 2005].ch8
# chip8/Chip-8 Programs/Chip8 emulator Logo [Garstyciuks].ch8
# chip8/Chip-8 Programs/Chip8 Picture.ch8
# chip8/Chip-8 Programs/Clock Program [Bill Fisher, 1981].ch8
# chip8/Chip-8 Programs/Delay Timer Test [Matthew Mikolay, 2010].ch8
# chip8/Chip-8 Programs/Division Test [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Programs/Fishie [Hap, 2005].ch8
# chip8/Chip-8 Programs/Framed MK1 [GV Samways, 1980].ch8
# chip8/Chip-8 Programs/Framed MK2 [GV Samways, 1980].ch8
# chip8/Chip-8 Programs/IBM Logo.ch8
# chip8/Chip-8 Programs/Jumping X and O [Harry Kleinberg, 1977].ch8
# chip8/Chip-8 Programs/Keypad Test [Hap, 2006].ch8
# chip8/Chip-8 Programs/Life [GV Samways, 1980].ch8
# chip8/Chip-8 Programs/Minimal game [Revival Studios, 2007].ch8
# chip8/Chip-8 Programs/Random Number Test [Matthew Mikolay, 2010].ch8
# chip8/Chip-8 Programs/SQRT Test [Sergey Naydenov, 2010].ch8
# chip8/Chip-8X and Hybrids/Pinball [Andrew Modla].ch8
# chip8/SuperChip Demos/Bounce [Les Harris].ch8
# chip8/SuperChip Demos/Car Race Demo [Erik Bryntse, 1991].ch8
# chip8/SuperChip Demos/Climax Slideshow - Part 1 [Revival Studios, 2008].ch8
# chip8/SuperChip Demos/Climax Slideshow - Part 2 [Revival Studios, 2008].ch8
# chip8/SuperChip Demos/Robot.ch8
# chip8/SuperChip Demos/SCSerpinski [Sergey Naydenov, 2010].ch8
# chip8/SuperChip Demos/SCStars [Sergey Naydenov, 2010].ch8
# chip8/SuperChip Demos/SuperMaze [David Winter, 199x].ch8
# chip8/SuperChip Demos/Super Particle Demo [zeroZshadow, 2008].ch8
# chip8/SuperChip Demos/SuperTrip8 Demo (2008) [Revival Studios].ch8
# chip8/SuperChip Demos/Worms demo.ch8
# chip8/SuperChip Games/Alien [Jonas Lindstedt, 1993].ch8
# chip8/SuperChip Games/Ant - In Search of Coke [Erin S. Catto].ch8
# chip8/SuperChip Games/Blinky [Hans Christian Egeberg, 1991].ch8
# chip8/SuperChip Games/Car [Klaus von Sengbusch, 1994].ch8
# chip8/SuperChip Games/Field! [Al Roland, 1993] (alt).ch8
# chip8/SuperChip Games/Field! [Al Roland, 1993].ch8
# chip8/SuperChip Games/H. Piper [Paul Raines, 1991].ch8
# chip8/SuperChip Games/Joust [Erin S. Catto, 1993].ch8
# chip8/SuperChip Games/Laser.ch8
# chip8/SuperChip Games/Loopz [Andreas Daumann].ch8
# chip8/SuperChip Games/Loopz (with difficulty select) [Hap, 2006].ch8
# chip8/SuperChip Games/Magic Square [David Winter, 1997].ch8
# chip8/SuperChip Games/Matches.ch8
# chip8/SuperChip Games/Mines! - The minehunter [David Winter, 1997].ch8
# chip8/SuperChip Games/Single Dragon (Bomber Section) [David Nurser, 1993].ch8
# chip8/SuperChip Games/Single Dragon (Stages 1-2) [David Nurser, 1993].ch8
# chip8/SuperChip Games/Sokoban [Hap, 2006] (alt).ch8
# chip8/SuperChip Games/Sokoban [Hap, 2006].ch8
# chip8/SuperChip Games/Spacefight 2091 [Carsten Soerensen, 1992].ch8
# chip8/SuperChip Games/Super Astro Dodge [Revival Studios, 2008].ch8
# chip8/SuperChip Games/SuperWorm V3 [RB, 1992].ch8
# chip8/SuperChip Games/SuperWorm V4 [RB-Revival Studios, 2007].ch8
# chip8/SuperChip Games/U-Boat [Michael Kemper, 1994].ch8
# chip8/SuperChip Test Programs/BMP Viewer (16x16 tiles) (MAME) [IQ_132].ch8
# chip8/SuperChip Test Programs/BMP Viewer - Flip-8 logo [Newsdee, 2006].ch8
# chip8/SuperChip Test Programs/BMP Viewer (Google) [IQ_132].ch8
# chip8/SuperChip Test Programs/BMP Viewer - Kyori (SC example) [Hap, 2005].ch8
# chip8/SuperChip Test Programs/BMP Viewer - Let's Chip-8! [Koppepan, 2005].ch8
# chip8/SuperChip Test Programs/Emutest [Hap, 2006].ch8
# chip8/SuperChip Test Programs/Font Test [Newsdee, 2006].ch8
# chip8/SuperChip Test Programs/Hex Mixt.ch8
# chip8/SuperChip Test Programs/Line Demo.ch8
# chip8/SuperChip Test Programs/SCHIP Test [iq_132].ch8
# chip8/SuperChip Test Programs/Scroll Test.ch8
# chip8/SuperChip Test Programs/Scroll Test (modified) [Garstyciuks].ch8
# chip8/SuperChip Test Programs/SC Test.ch8
# chip8/SuperChip Test Programs/SuperChip Test.ch8
# chip8/SuperChip Test Programs/Test128.ch8
######################################################################
# INPUT: chip8/Chip-8 Demos/Maze (alt) [David Winter, 199x].ch8
######################################################################
:proto D1 # 21E
:proto D2 # 222
: main
v0 := 0
v1 := 0
: L1
loop
i := D2
v2 := random 0b1
if v2 != 1 then i := D1
sprite v0 v1 4
v0 += 4
if v0 != 64 then jump L1
v0 := 0
v1 += 4
if v1 != 32 then
again
loop
again
: D1
0x80 0x40 0x20 0x10
: D2
0x20 0x40 0x80 0x10
######################################################################
# INPUT: chip8/Chip-8 Demos/Maze [David Winter, 199x].ch8
######################################################################
:proto D1 # 21A
:proto D2 # 21E
: main
loop
i := D2
v2 := random 0b1
if v2 != 1 then i := D1
sprite v0 v1 4
v0 += 4
if v0 != 64 then jump main
v0 := 0
v1 += 4
if v1 != 32 then
again
loop
again
: D1
0x80 0x40 0x20 0x10
: D2
0x20 0x40 0x80 0x10
######################################################################
# INPUT: chip8/Chip-8 Demos/Particle Demo [zeroZshadow, 2008].ch8
######################################################################
:proto Sub1 # 25C
:proto L4 # 262
:proto L5 # 292
:proto L6 # 294
:proto Sub2 # 29C
:proto L7 # 2B8
:proto Sub3 # 2CE
:proto D1 # 2D8
:proto D2 # 300
:proto D3 # 320
:proto D4 # 321
: main
i := D4
v0 := 0
v1 := 0
v2 := 8
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
i += v2
v0 += v2
sprite v0 v1 5
v6 := 5
v7 := 2
vA := 0
jump L7
: L1
vB := 0
vC := 0
loop
i := D1
i += vB
load v3
Sub3
Sub1
jump L4
: L3
Sub3
Sub1
vB += 4
vC += 1
if vC != v6 then
again
jump L1
0x12 0x0
: Sub1
i := D3
sprite vE vD 1
return
: L4
i := D1
i += vB
load v3
v0 += v2
v1 += v3
vE := v0
vD := v1
vE >>= vE
vD >>= vD
v4 := vE
v5 := 194
v4 += v5
if vF == 1 then jump L5
if vD == 0 then v3 := 1
v4 := vD
v5 := -31
v4 += v5
if vF == 1 then jump L5
if v3 != 2 then v3 += 1
jump L6
: L5
Sub2
: L6
i := D1
i += vB
save v3
jump L3
: Sub2
i := D2
i += vA
load v0
v2 := v0
vA += 1
v4 := 31
vA &= v4
v0 := 32
v1 := 30
v0 <<= v0
v1 <<= v1
v3 := random 0b11
v3 += -8
return
: L7
vB := 0
vC := 0
loop
Sub2
i := D1
i += vB
save v3
vB += 4
vC += 1
if vC != v6 then
again
jump L1
: Sub3
vE := v0
vD := v1
vE >>= vE
vD >>= vD
return
: D1
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D2
0xf8 0xfa 0xf9 0xfe 0xfb 0xfc 0xfd 0xff 0x2 0x1 0x3 0x5 0x4 0x6 0x7 0x8 0x6 0x7 0x4 0x5 0x3 0x1 0x2 0xfe 0xff 0xfc 0xfb 0xfd 0xfa 0xf9 0xf8 0xfa
: D3
0x80
: D4
0xf7 0x6 0x77 0x6 0x36 0x0 0x0 0x0 0xc7 0x6c 0xcf 0xc 0xc 0x0 0x0 0x0 0x9f 0xd9 0xdf 0xd9 0xd9 0x0 0x0 0x0 0x3f 0x8c 0xc 0x8c 0x8c 0x0 0x0 0x0 0x67 0x6c 0x6c 0x6c 0x67 0x0 0x0 0x0 0xb0 0x30 0x30 0x30 0xbe 0x0 0x0 0x0 0xf9 0xc3 0xf1 0xc0 0xfb 0x0 0x0 0x0 0xef 0x0 0xce 0x60 0xcc 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Demos/Sierpinski [Sergey Naydenov, 2010].ch8
######################################################################
:proto L1 # 205
:proto L4 # 2F9
:proto L5 # 321
:proto L6 # 349
:proto D1 # 3C2
:proto D2 # 3C3
:proto D3 # 3C4
:proto D4 # 3C5
:proto D5 # 3C6
:proto D6 # 3E6
:proto D7 # 406
:proto D8 # 407
: main
jump L1
0x43 0x38 0x50
: L1
v0 := 0
v5 := v0
v0 := 1
v1 := v5
i := D6
i += v1
save v0
v0 := 31
vA := v0
v0 := 0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
v0 := 1
i := D2
save v0
v0 := 31
i := D7
save v0
: L2
v0 := 1
i := D3
save v0
i := D2
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 += v1
i := D8
save v0
loop
i := D3
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 -= v1
i := D4
save v0
i := D3
load v0
v5 := v0
i := D4
load v0
i := D6
i += v0
load v0
v6 := v0
i := D3
load v0
v7 := v0
v0 := 1
v1 := v0
v0 := v7
v0 += v1
i := D6
i += v0
load v0
v1 := v0
v0 := v6
v0 ^= v1
v1 := v5
i := D5
i += v1
save v0
i := D4
load v0
v5 := v0
i := D4
load v0
i := D5
i += v0
load v0
v1 := v5
i := D6
i += v1
save v0
i := D3
load v0
i := D5
i += v0
load v0
v5 := v0
v0 := 1
v1 := v5
if v0 != v1 then vF := 1
if vF != 0 then jump L4
i := D3
load v0
v5 := v0
v0 := 31
v1 := v0
v0 := v5
v0 += v1
vA := v0
i := D2
load v0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
v0 := 31
v5 := v0
i := D3
load v0
v1 := v0
v0 := v5
v0 -= v1
vA := v0
i := D2
load v0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
: L4
i := D3
load v0
v5 := v0
i := D8
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L5
i := D3
load v0
v0 += 1
i := D3
save v0
again
: L5
i := D2
load v0
v5 := v0
i := D7
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L6
i := D2
load v0
v0 += 1
i := D2
save v0
jump L2
: L6
loop
again
0x81 0x0 0xa4 0x8 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x13 0x5d 0x80 0x30 0x0 0xee 0xa4 0x8 0xfe 0x1e 0xf6 0x55 0x66 0x0 0x82 0x0 0x82 0x15 0x3f 0x1 0x13 0x95 0x83 0x0 0x83 0x6 0x84 0x10 0x65 0x1 0x82 0x30 0x82 0x45 0x3f 0x1 0x13 0x8f 0x84 0xe 0x85 0xe 0x13 0x81 0x80 0x45 0x86 0x54 0x13 0x71 0xf5 0x65 0x80 0x60 0x0 0xee 0x82 0x0 0x80 0x15 0x3f 0x0 0x13 0x9b 0x80 0x20 0x0 0xee 0xa3 0xbf 0xf0 0x33 0xf2 0x65 0xf0 0x29 0xd3 0x45 0x73 0x6 0xf1 0x29 0xd3 0x45 0x73 0x6 0xf2 0x29 0xd3 0x45 0x0 0xee 0x28 0x63 0x29
: D1
0x80
: D2
0x0
: D3
0x0
: D4
0x0
: D5
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D6
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D7
0x0
: D8
0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Demos/Sirpinski [Sergey Naydenov, 2010].ch8
######################################################################
:proto L1 # 205
:proto L4 # 2F9
:proto L5 # 321
:proto L6 # 349
:proto D1 # 3C2
:proto D2 # 3C3
:proto D3 # 3C4
:proto D4 # 3C5
:proto D5 # 3C6
:proto D6 # 3E6
:proto D7 # 406
:proto D8 # 407
: main
jump L1
0x43 0x38 0x50
: L1
v0 := 0
v5 := v0
v0 := 1
v1 := v5
i := D6
i += v1
save v0
v0 := 31
vA := v0
v0 := 0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
v0 := 1
i := D2
save v0
v0 := 31
i := D7
save v0
: L2
v0 := 1
i := D3
save v0
i := D2
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 += v1
i := D8
save v0
loop
i := D3
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 -= v1
i := D4
save v0
i := D3
load v0
v5 := v0
i := D4
load v0
i := D6
i += v0
load v0
v6 := v0
i := D3
load v0
v7 := v0
v0 := 1
v1 := v0
v0 := v7
v0 += v1
i := D6
i += v0
load v0
v1 := v0
v0 := v6
v0 ^= v1
v1 := v5
i := D5
i += v1
save v0
i := D4
load v0
v5 := v0
i := D4
load v0
i := D5
i += v0
load v0
v1 := v5
i := D6
i += v1
save v0
i := D3
load v0
i := D5
i += v0
load v0
v5 := v0
v0 := 1
v1 := v5
if v0 != v1 then vF := 1
if vF != 0 then jump L4
i := D3
load v0
v5 := v0
v0 := 31
v1 := v0
v0 := v5
v0 += v1
vA := v0
i := D2
load v0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
v0 := 31
v5 := v0
i := D3
load v0
v1 := v0
v0 := v5
v0 -= v1
vA := v0
i := D2
load v0
vB := v0
i := D1
load v0
i := D1
sprite vA vB 1
: L4
i := D3
load v0
v5 := v0
i := D8
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L5
i := D3
load v0
v0 += 1
i := D3
save v0
again
: L5
i := D2
load v0
v5 := v0
i := D7
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L6
i := D2
load v0
v0 += 1
i := D2
save v0
jump L2
: L6
loop
again
0x81 0x0 0xa4 0x8 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x13 0x5d 0x80 0x30 0x0 0xee 0xa4 0x8 0xfe 0x1e 0xf6 0x55 0x66 0x0 0x82 0x0 0x82 0x15 0x3f 0x1 0x13 0x95 0x83 0x0 0x83 0x6 0x84 0x10 0x65 0x1 0x82 0x30 0x82 0x45 0x3f 0x1 0x13 0x8f 0x84 0xe 0x85 0xe 0x13 0x81 0x80 0x45 0x86 0x54 0x13 0x71 0xf5 0x65 0x80 0x60 0x0 0xee 0x82 0x0 0x80 0x15 0x3f 0x0 0x13 0x9b 0x80 0x20 0x0 0xee 0xa3 0xbf 0xf0 0x33 0xf2 0x65 0xf0 0x29 0xd3 0x45 0x73 0x6 0xf1 0x29 0xd3 0x45 0x73 0x6 0xf2 0x29 0xd3 0x45 0x0 0xee 0x28 0x63 0x29
: D1
0x80
: D2
0x0
: D3
0x0
: D4
0x0
: D5
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D6
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D7
0x0
: D8
0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Demos/Stars [Sergey Naydenov, 2010].ch8
######################################################################
:proto L1 # 205
:proto L5 # 2D5
:proto L6 # 2DB
:proto L7 # 301
:proto L8 # 323
:proto L11 # 3C5
:proto L12 # 3CB
:proto L13 # 3F1
:proto L14 # 413
:proto L15 # 46F
:proto L16 # 4F1
:proto D1 # 580
:proto D2 # 5A8
:proto D3 # 5B0
:proto D4 # 5B8
:proto D5 # 5C0
:proto D6 # 5C1
:proto D7 # 5C2
:proto D8 # 5C3
:proto D9 # 5C4
:proto D10 # 5C6
: main
jump L1
0x43 0x38 0x50
: L1
v0 := 0
v5 := v0
v0 := random 0b111000
v1 := v5
i := D3
i += v1
save v0
v0 := 0
v5 := v0
v0 := random 0b11000
v1 := v5
i := D4
i += v1
save v0
v0 := 0
i := D3
i += v0
load v0
vA := v0
v0 := 0
i := D4
i += v0
load v0
vB := v0
v0 := 0
i := D1
i += v0
sprite vA vB 8
v0 := 1
i := D7
save v0
v0 := 7
i := D9
save v0
: L2
i := D7
load v0
v5 := v0
v0 := random 0b111000
v1 := v5
i := D3
i += v1
save v0
: L3
v0 := 0
i := D6
save v0
i := D7
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 -= v1
i := D10
save v0
loop
i := D7
load v0
i := D3
i += v0
load v0
v5 := v0
i := D6
load v0
i := D3
i += v0
load v0
v6 := v0
v0 := 8
v1 := v0
v0 := v6
v0 += v1
v1 := v0
v0 := v5
v2 := v0
v0 -= v1
v0 := v2
if vF != 0 then jump L6
i := D7
load v0
i := D3
i += v0
load v0
v5 := v0
i := D6
load v0
i := D3
i += v0
load v0
v6 := v0
v0 := 8
v1 := v0
v0 := v6
v0 -= v1
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if vF != 0 then jump L5
v0 := 1
i := D8
save v0
jump L6
: L5
v0 := 0
i := D8
save v0
: L6
i := D6
load v0
v5 := v0
i := D10
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L7
i := D6
load v0
v0 += 1
save v0
again
: L7
i := D8
load v0
v5 := v0
v0 := 1
v1 := v5
if v0 != v1 then vF := 1
if vF != 0 then jump L8
i := D7
load v0
v5 := v0
v0 := random 0b1111000
v1 := v5
i := D3
i += v1
save v0
: L8
i := D8
load v0
v5 := v0
v0 := 0
v1 := v5
if v0 != v1 then vF := 1
if v0 == v1 then vF := 0
if vF != 0 then jump L3
i := D7
load v0
v5 := v0
v0 := random 0b11000
v1 := v5
i := D4
i += v1
save v0
: L9
v0 := 0
i := D6
save v0
i := D7
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 -= v1
i := D10
save v0
loop
i := D7
load v0
i := D4
i += v0
load v0
v5 := v0
i := D6
load v0
i := D4
i += v0
load v0
v6 := v0
v0 := 8
v1 := v0
v0 := v6
v0 += v1
v1 := v0
v0 := v5
v2 := v0
v0 -= v1
v0 := v2
if vF != 0 then jump L12
i := D7
load v0
i := D4
i += v0
load v0
v5 := v0
i := D6
load v0
i := D4
i += v0
load v0
v6 := v0
v0 := 8
v1 := v0
v0 := v6
v0 -= v1
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if vF != 0 then jump L11
v0 := 1
i := D8
save v0
jump L12
: L11
v0 := 0
i := D8
save v0
: L12
i := D6
load v0
v5 := v0
i := D10
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L13
i := D6
load v0
v0 += 1
save v0
again
: L13
i := D8
load v0
v5 := v0
v0 := 1
v1 := v5
if v0 != v1 then vF := 1
if vF != 0 then jump L14
i := D7
load v0
v5 := v0
v0 := random 0b11000
v1 := v5
i := D4
i += v1
save v0
: L14
i := D8
load v0
v5 := v0
v0 := 0
v1 := v5
if v0 != v1 then vF := 1
if v0 == v1 then vF := 0
if vF != 0 then jump L9
i := D7
load v0
i := D3
i += v0
load v0
vA := v0
i := D7
load v0
i := D4
i += v0
load v0
vB := v0
v0 := 0
i := D1
i += v0
sprite vA vB 8
i := D7
load v0
v5 := v0
i := D9
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 1 then jump L15
i := D7
load v0
v0 += 1
save v0
jump L2
: L15
loop
v0 := random 0b111
i := D5
save v0
i := D5
load v0
i := D3
i += v0
load v0
vA := v0
i := D5
load v0
i := D4
i += v0
load v0
vB := v0
i := D5
load v0
i := D2
i += v0
load v0
i := D1
i += v0
load v0
sprite vA vB 8
v0 := 10
delay := v0
i := D5
load v0
v5 := v0
i := D5
load v0
i := D2
i += v0
load v0
v6 := v0
v0 := 8
v1 := v0
v0 := v6
v0 += v1
v1 := v5
i := D2
i += v1
save v0
i := D5
load v0
i := D2
i += v0
load v0
v5 := v0
v0 := 32
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if vF != 0 then jump L16
i := D5
load v0
v5 := v0
v0 := 0
v1 := v5
i := D2
i += v1
save v0
: L16
i := D5
load v0
v5 := v0
v0 := 50
v1 := v5
if v0 != v1 then vF := 1
if v0 == v1 then vF := 0
if vF != 0 then
again
loop
again
0x81 0x0 0xa5 0xc7 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x15 0x1b 0x80 0x30 0x0 0xee 0xa5 0xc7 0xfe 0x1e 0xf6 0x55 0x66 0x0 0x82 0x0 0x82 0x15 0x3f 0x1 0x15 0x53 0x83 0x0 0x83 0x6 0x84 0x10 0x65 0x1 0x82 0x30 0x82 0x45 0x3f 0x1 0x15 0x4d 0x84 0xe 0x85 0xe 0x15 0x3f 0x80 0x45 0x86 0x54 0x15 0x2f 0xf5 0x65 0x80 0x60 0x0 0xee 0x82 0x0 0x80 0x15 0x3f 0x0 0x15 0x59 0x80 0x20 0x0 0xee 0xa5 0x7d 0xf0 0x33 0xf2 0x65 0xf0 0x29 0xd3 0x45 0x73 0x6 0xf1 0x29 0xd3 0x45 0x73 0x6 0xf2 0x29 0xd3 0x45 0x0 0xee 0x28 0x63 0x29
: D1
0x0 0x0 0x0 0x10 0x0 0x0 0x0 0x0 0x0 0x0 0x38 0x28 0x38 0x0 0x0 0x0 0x0 0x54 0x0 0x44 0x0 0x54 0x0 0x0 0x92 0x0 0x0 0x82 0x0 0x0 0x92 0x0 0x92 0x54 0x38 0xfe 0x38 0x54 0x92 0x0
: D2
0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8
: D3
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D4
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D5
0x0
: D6
0x0
: D7
0x0
: D8
0x0
: D9
0x0 0x0
: D10
0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Demos/Trip8 Demo (2008) [Revival Studios].ch8
######################################################################
:proto L1 # 214
:proto Sub1 # 270
:proto Sub2 # 290
:proto Sub3 # 2A2
:proto Sub4 # 2B4
:proto Sub5 # 2C6
:proto Sub6 # 2CC
:proto Sub7 # 2D4
:proto Sub8 # 2DC
:proto Sub9 # 2E4
:proto Sub10 # 2EC
:proto Sub11 # 2F4
:proto Sub12 # 2FC
:proto Sub13 # 308
:proto Sub14 # 318
:proto Sub15 # 324
:proto Sub16 # 33A
:proto Sub17 # 350
:proto Sub18 # 366
:proto Sub19 # 386
:proto Sub20 # 3BE
:proto Sub21 # 3C6
:proto D1 # 41E
:proto Sub22 # 448
:proto D2 # 47C
:proto D3 # 480
:proto D4 # 483
:proto D5 # 583
:proto D6 # 683
:proto D7 # 983
:proto D8 # B83
:proto D9 # D83
: main
jump L1
0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x53 0x54 0x55 0x44 0x49 0x4f 0x53 0x32 0x30 0x30 0x38
: L1
clear
vD := 32
delay := vD
Sub20
Sub21
vD := 64
delay := vD
Sub20
Sub21
vD := 32
delay := vD
Sub20
i := D4
Sub22
vD := 128
delay := vD
Sub20
i := D4
Sub22
i := D5
Sub22
vD := 0
vB := 0
Sub5
loop
if vB == 0 then Sub9
if vB == 1 then Sub19
if vB == 2 then Sub10
if vB == 3 then Sub19
if vB == 4 then Sub11
if vB == 5 then Sub19
v0 := 1
delay := v0
Sub20
vD += 1
v0 := 63
vC := vD
vC &= v0
if vC == 0 then Sub1
again
: Sub1
if vB == 0 then Sub2
if vB == 1 then Sub6
if vB == 2 then Sub3
if vB == 3 then Sub7
if vB == 4 then Sub4
if vB == 5 then Sub8
vB += 1
if vB == 6 then vB := 0
return
: Sub2
Sub13
v9 := random 0b11
v9 += v9
v9 += v9
v9 += v9
v9 += v9
v9 += v9
Sub18
return
: Sub3
Sub12
v9 := random 0b11
v9 += v9
v9 += v9
v9 += v9
v9 += v9
v9 += v9
Sub18
return
: Sub4
Sub14
v9 := random 0b11
v9 += v9
v9 += v9
v9 += v9
v9 += v9
v9 += v9
Sub18
return
: Sub5
vE := 0
Sub13
return
: Sub6
Sub18
vE := 0
Sub12
return
: Sub7
Sub18
vE := 0
Sub14
return
: Sub8
Sub18
vE := 0
Sub13
return
: Sub9
Sub13
vE += 3
Sub13
return
: Sub10
Sub12
vE += 2
Sub12
return
: Sub11
Sub14
vE += 2
Sub14
return
: Sub12
vC := 0
Sub16
Sub16
Sub16
Sub16
return
: Sub13
vC := 0
Sub15
Sub15
Sub15
Sub15
Sub15
Sub15
return
: Sub14
vC := 0
Sub17
Sub17
Sub17
Sub17
return
: Sub15
i := D6
i += vE
i += vE
i += vE
i += vE
i += vC
load v1
i := D2
sprite v0 v1 4
vC += 2
return
: Sub16
i := D7
i += vE
i += vE
i += vE
i += vE
i += vC
load v1
i := D2
sprite v0 v1 4
vC += 2
return
: Sub17
i := D8
i += vE
i += vE
i += vE
i += vE
i += vC
load v1
i := D2
sprite v0 v1 4
vC += 2
return
: Sub18
vC := 0
loop
v0 := 31
vA := vD
vA += vC
vA &= v0
vA += v9
i := D9
i += vA
i += vA
load v1
i := D3
sprite v0 v1 3
vC += 1
if vC != 8 then
again
return
: Sub19
v0 := 31
vA := vD
vA &= v0
vA += v9
i := D9
i += vA
i += vA
load v1
i := D3
sprite v0 v1 3
v0 := 31
vA := vD
vA += 8
vA &= v0
vA += v9
i := D9
i += vA
i += vA
load v1
i := D3
sprite v0 v1 3
return
0xa6 0x83 0xfd 0x1e 0xf0 0x65 0x30 0x0 0xf0 0x18 0x0 0xee
: Sub20
loop
v0 := delay
if v0 != 0 then
again
return
: Sub21
vD := 4
v1 := 12
v0 := 28
v2 := 18
i := D1
i += v2
sprite v0 v1 6
delay := vD
Sub20
v0 := 20
v2 := 12
i := D1
i += v2
sprite v0 v1 6
v0 := 36
v2 := 24
i := D1
i += v2
sprite v0 v1 6
delay := vD
Sub20
v0 := 12
v2 := 6
i := D1
i += v2
sprite v0 v1 6
v0 := 44
v2 := 30
i := D1
i += v2
sprite v0 v1 6
delay := vD
Sub20
i := D1
v0 := 4
sprite v0 v1 6
v0 := 52
v2 := 36
i := D1
i += v2
sprite v0 v1 6
delay := vD
Sub20
return
: D1
0x0 0x0 0xc 0x11 0x11 0x10 0x0 0x0 0x95 0x55 0x95 0xcd 0x0 0x0 0x53 0x55 0x55 0x33 0x40 0x40 0x44 0x42 0x41 0x46 0x0 0x40 0x6a 0x4a 0x4a 0x46 0x0 0x20 0x69 0xaa 0xaa 0x69 0x0 0x0 0x20 0x90 0x88 0x30
: Sub22
v4 := 1
v5 := 7
v2 := 0
v3 :=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e 0x11 0x7 0xb 0x17 0x18 0x10 0x7 0xc 0x11 0x9 0x6 0x16 0x17 0x12 0x8 0xa 0x10 0xa 0x3 0x13 0x14 0x14 0x1a 0xa 0xe 0xb 0x11 0x15 0x1d 0xd 0x3 0xf 0xd 0xa 0x1d 0x10 0xd 0x15 0x12 0x8 0xc 0x8 0x1a 0x14 0x9 0x13 0x15 0x9 0xd 0x6 0x15 0x17 0x7 0x11 0x18 0xb 0x10 0x17 0x10 0x5 0x19 0xe 0x6 0xe 0xa 0x15 0x13 0x5 0x18 0x10 0x7 0xc 0x6 0x10 0x17 0x5 0x16 0x13 0x9 0xa 0x5 0xc 0x1a 0x7 0x14 0x14 0xc 0x9 0x8 0x7 0x11 0x14 0x1c 0xa 0x5 0x11 0xc 0x4 0xe 0x13 0x1d 0xd 0x4 0xf 0xd 0x11 0x11 0x3 0x1d 0x10 0x3 0xd 0xe 0xf 0x16 0x4 0x1b 0x13 0x4 0x9 0x10 0xe 0x19 0x7 0x6 0x7 0x6 0x15 0x12 0xe 0x4 0x13 0x9 0x5 0x16 0x17 0x14 0xe 0x3 0x10 0xd 0x4 0x12 0x18 0x3 0xe 0x16 0x10 0x11 0x3 0xe 0x18 0x4 0xe 0x16 0x12 0x14 0x4 0xb 0x17 0x5 0xe 0x18 0x6 0x15 0x13 0xb 0xa 0x5 0xe 0x1a 0x8 0x13 0x15 0xc 0x8 0x5 0xe 0x1b 0xb 0x11 0x15 0xe 0x7 0x1b 0xe 0x4 0xe 0xf 0x15 0xf 0x7 0x19 0x10 0x3 0xd 0x11 0x7 0xe 0x15 0x15 0x12 0x2 0xc 0x13 0x7 0xc 0x14 0x11 0x12 0x3 0xa 0x14 0x8 0xb 0x14 0xd 0x11 0x15 0x8 0x5 0x8 0x1a 0x14 0xa 0xe 0x18 0x16 0x17 0x9 0x8 0x6 0xa 0xb 0x15 0x18 0x18 0xb 0x8 0x11 0xc 0x7 0x12 0x18 0x19 0xc 0x7 0x10 0x10 0x17 0x10 0x5 0x6 0xe 0x19 0xe 0xe 0x15 0x14 0x5 0x7 0xc 0x18 0x10 0xe 0x13 0x19 0x6 0x8 0xa 0x17 0x12 0xf 0x12 0x1c 0x9 0xb 0x8 0x5 0x12 0x11 0x11 0xe 0x7 0x2 0xf 0x1c 0xd 0x12 0x12 0x2 0xc 0x12 0x7 0xd 0x14 0x13 0x14 0x5 0x8 0x16 0x9 0xa 0x13 0x12 0x16 0xa 0x5 0x18 0xb 0x7 0x11 0xf 0x17 0x10 0x5 0x19 0xe 0x6 0xe 0x15 0x7 0xc 0x17 0x7 0xc 0x18 0x10 0x19 0xc 0x8 0x17 0x9 0x9 0x16 0x12 0x1a 0x10 0x5 0x15 0xb 0x8 0x13 0x13 0x17 0x15 0xe 0x8 0x3 0x12 0x1a 0xb 0x13 0x18 0x11 0x9 0x2 0xf 0x1b 0xd 0x12 0xb 0xe 0x19 0x2 0xc 0x1c 0xf 0x11 0xd 0x9 0x18 0x4 0x9 0x1b 0x13
: D9
0x10 0x10 0xc 0x14 0x7 0x17 0x4 0x1a 0x3 0x1c 0x3 0x1d 0x5 0x1d 0x8 0x1b 0xc 0x19 0x10 0x16 0x14 0x13 0x17 0x10 0x1a 0xd 0x1b 0xa 0x1b 0x8 0x19 0x6 0x17 0x5 0x13 0x6 0x10 0x7 0xd 0x8 0xa 0xb 0x7 0xe 0x6 0x10 0x6 0x12 0x8 0x15 0xa 0x17 0xd 0x18 0x10 0x19 0x13 0x19 0x16 0x18 0x18 0x17 0x19 0x14 0x10 0x19 0xf 0x17 0xd 0x17 0xa 0x19 0x6 0x1a 0x6 0x16 0x9 0x13 0x9 0x11 0x7 0x10 0x3 0xe 0x3 0xb 0x8 0xb 0xb 0xb 0xc 0xa 0xc 0x6 0xe 0x2 0x10 0x4 0x11 0x8 0x12 0xa 0x14 0x9 0x19 0x7 0x1b 0x9 0x19 0xd 0x17 0xf 0x17 0x10 0x1a 0x12 0x1d 0x15 0x1a 0x16 0x15 0x15 0x14 0x16 0x13 0x18 0x12 0x1d 0x10 0x19 0xe 0x17 0xd 0x17 0xb 0x17 0x8 0x17 0x5 0x19 0x2 0x19 0x3 0x17 0x8 0x14 0xb 0x12 0xe 0x11 0x10 0x10 0x11 0x10 0x14 0xe 0x19 0xb 0x1c 0x9 0x1c 0x9 0x19 0x9 0x17 0xa 0x16 0xa 0x14 0x9 0x13 0x7 0x11 0x4 0xf 0x2 0xb 0x3 0x9 0x6 0x9 0x9 0x9 0xa 0x9 0xb 0x8 0xb 0x7 0xb 0x7 0xb 0x10 0x19 0x13 0x18 0x15 0x17 0x16 0x16 0x18 0x15 0x18 0x15 0x18 0x14 0x15 0x12 0x10 0x10 0xb 0xe 0x9 0xc 0x8 0xc 0x9 0xb 0xa 0xa 0xb 0x9 0xd 0x8 0x10 0x6 0x14 0x4 0x1a 0x3 0x1d 0x4 0x1c 0x8 0x19 0xb 0x15 0xd 0x12 0xf 0x10 0x10 0xd 0x11 0xa 0x13 0x6 0x16 0x3 0x19 0x3 0x1c 0x7 0x1c 0xc 0x1a
######################################################################
# INPUT: chip8/Chip-8 Demos/Zero Demo [zeroZshadow, 2007].ch8
######################################################################
:proto D1 # 278
:proto D2 # 27E
:proto D3 # 284
:proto D4 # 28A
: main
v0 := 10
v5 := 5
v6 := 10
v7 := 15
v8 := 20
v1 := 1
v2 := 1
v3 := 1
v4 := 1
v0 := 10
i := D1
sprite v0 v5 6
v0 += 10
i := D2
sprite v0 v6 6
v0 += 10
i := D3
sprite v0 v7 6
v0 += 10
i := D4
sprite v0 v8 6
loop
vA := 3
delay := vA
v0 := 10
i := D1
sprite v0 v5 6
if v5 == 20 then v1 := -1
if v5 == 1 then v1 := 1
v5 += v1
sprite v0 v5 6
v0 += 10
i := D2
sprite v0 v6 6
if v6 == 20 then v2 := -1
if v6 == 1 then v2 := 1
v6 += v2
sprite v0 v6 6
v0 += 10
i := D3
sprite v0 v7 6
if v7 == 20 then v3 := -1
if v7 == 1 then v3 := 1
v7 += v3
sprite v0 v7 6
v0 += 10
i := D4
sprite v0 v8 6
if v8 == 20 then v4 := -1
if v8 == 1 then v4 := 1
v8 += v4
sprite v0 v8 6
again
: D1
0xff 0x3 0xc 0x30 0xc0 0xff
: D2
0xff 0xc0 0xc0 0xfc 0xc0 0xff
: D3
0xf0 0xcc 0xcc 0xf0 0xcc 0xc3
: D4
0x3c 0xc3 0xc3 0xc3 0xc3 0x3c
######################################################################
# INPUT: chip8/Chip-8 Games/15 Puzzle [Roger Ivie] (alt).ch8
######################################################################
:proto L3 # 234
:proto Sub2 # 246
:proto Sub3 # 25E
:proto Sub4 # 276
:proto Sub5 # 28E
:proto Sub6 # 2A6
:proto Sub7 # 2BE
:proto L4 # 2D2
:proto Sub8 # 2D8
:proto D2 # 2E8
:proto D3 # 2F8
: main
clear
0x6c : D1 0x0 # SMC: vC := 0
if vC == 0 then vE := 15
i := D1
v0 := 32
save v0
clear
loop
Sub7
Sub4
Sub5
Sub3
Sub2
again
: Sub1
v1 := 0
v2 := 23
v3 := 4
: L2
loop
if v1 == 16 then return
i := D2
i += v1
load v0
if v0 == 0 then jump L3
i := hex v0
sprite v2 v3 5
: L3
v1 += 1
v2 += 5
v4 := 3
v4 &= v1
if v4 != 0 then jump L2
v2 := 23
v3 += 6
again
: Sub2
loop
v4 := 3
v4 &= vE
v5 := 3
v5 &= vD
if v4 == v5 then return
if v4 == 3 then return
v4 := 1
v4 += vE
Sub6
again
: Sub3
loop
v4 := 3
v4 &= vE
v5 := 3
v5 &= vD
if v4 == v5 then return
if v4 == 0 then return
v4 := -1
v4 += vE
Sub6
again
: Sub4
loop
v4 := 12
v4 &= vE
v5 := 12
v5 &= vD
if v4 == v5 then return
if v4 == 0 then return
v4 := -4
v4 += vE
Sub6
again
: Sub5
loop
v4 := 12
v4 &= vE
v5 := 12
v5 &= vD
if v4 == v5 then return
if v4 == 12 then return
v4 := 4
v4 += vE
Sub6
again
: Sub6
i := D2
i += v4
load v0
i := D2
i += vE
save v0
v0 := 0
i := D2
i += v4
save v0
vE := v4
return
: Sub7
if vC != 0 then jump L4
Sub1
Sub8
Sub1
i := D3
i += vD
load v0
vD := v0
return
: L4
vC += -1
vD := random 0b1111
return
: Sub8
loop
vD += 1
v0 := 15
vD &= v0
if vD -key then
again
loop
if vD key then
again
return
: D2
0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x0
: D3
0xd 0x0 0x1 0x2 0x4 0x5 0x6 0x8 0x9 0xa 0xc 0xe 0x3 0x7 0xb 0xf
######################################################################
# INPUT: chip8/Chip-8 Games/15 Puzzle [Roger Ivie].ch8
######################################################################
:proto L3 # 234
:proto Sub2 # 246
:proto Sub3 # 25E
:proto Sub4 # 276
:proto Sub5 # 28E
:proto Sub6 # 2A6
:proto Sub7 # 2BE
:proto L4 # 2D2
:proto Sub8 # 2D8
:proto D2 # 2E8
:proto D3 # 2F8
: main
clear
0x6c : D1 0x0 # SMC: vC := 0
if vC == 0 then vE := 15
i := D1
v0 := 32
save v0
clear
loop
Sub7
Sub4
Sub5
Sub3
Sub2
again
: Sub1
v1 := 0
v2 := 23
v3 := 4
: L2
loop
if v1 == 16 then return
i := D2
i += v1
load v0
if v0 == 0 then jump L3
i := hex v0
sprite v2 v3 5
: L3
v1 += 1
v2 += 5
v4 := 3
v4 &= v1
if v4 != 0 then jump L2
v2 := 23
v3 += 6
again
: Sub2
loop
v4 := 3
v4 &= vE
v5 := 3
v5 &= vD
if v4 == v5 then return
if v4 == 3 then return
v4 := 1
v4 += vE
Sub6
again
: Sub3
loop
v4 := 3
v4 &= vE
v5 := 3
v5 &= vD
if v4 == v5 then return
if v4 == 0 then return
v4 := -1
v4 += vE
Sub6
again
: Sub4
loop
v4 := 12
v4 &= vE
v5 := 12
v5 &= vD
if v4 == v5 then return
if v4 == 0 then return
v4 := -4
v4 += vE
Sub6
again
: Sub5
loop
v4 := 12
v4 &= vE
v5 := 12
v5 &= vD
if v4 == v5 then return
if v4 == 12 then return
v4 := 4
v4 += vE
Sub6
again
: Sub6
i := D2
i += v4
load v0
i := D2
i += vE
save v0
v0 := 0
i := D2
i += v4
save v0
vE := v4
return
: Sub7
if vC != 0 then jump L4
Sub1
Sub8
Sub1
i := D3
i += vD
load v0
vD := v0
return
: L4
vC += -1
vD := random 0b1111
return
: Sub8
loop
vD += 1
v0 := 15
vD &= v0
if vD -key then
again
loop
if vD key then
again
return
: D2
0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x0
: D3
0xd 0x0 0x1 0x2 0x4 0x5 0x6 0x8 0x9 0xa 0xc 0xe 0x3 0x7 0xb 0xf 0x84 0xe4 0x22 0xa6 0x12 0x76 0x64 0xc 0x84 0xe2 0x65 0xc 0x85 0xd2 0x94 0x50 0x0 0xee 0x44 0xc 0x0 0xee 0x64 0x4 0x84 0xe4 0x22 0xa6 0x12 0x8e 0xa2 0xe8 0xf4 0x1e 0xf0 0x65 0xa2 0xe8 0xfe 0x1e 0xf0 0x55 0x60 0x0 0xa2 0xe8 0xf4 0x1e 0xf0 0x55 0x8e 0x40 0x0 0xee 0x3c 0x0 0x12 0xd2 0x22 0x1c 0x22 0xd8 0x22 0x1c 0xa2 0xf8 0xfd 0x1e 0xf0 0x65 0x8d 0x0 0x0 0xee 0x7c 0xff 0xcd 0xf 0x0 0xee 0x7d 0x1 0x60 0xf 0x8d 0x2 0xed 0x9e 0x12 0xd8 0xed 0xa1 0x12 0xe2 0x0 0xee 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x0 0xd 0x0 0x1 0x2 0x4 0x5 0x6 0x8
######################################################################
# INPUT: chip8/Chip-8 Games/Addition Problems [Paul C. Moews].ch8
######################################################################
:proto L1 # 262
:proto L2 # 26A
:proto Sub1 # 276
:proto D1 # 288
:proto D2 # 28E
:proto D3 # 292
:proto D4 # 2A2
:proto D5 # 2A5
: main
loop
clear
vD := random 0b1111111
vE := random 0b1111111
vC := vD
vC += vE
i := D4
vA := 0
vB := 0
bcd vD
load v2
Sub1
i := D1
vA += 7
sprite vA vB 5
i := D4
vA += 8
bcd vE
load v2
Sub1
i := D2
vA += 7
sprite vA vB 4
i := D3
vA := 24
vB := 8
sprite vA vB 15
v0 := key
v1 := key
v2 := key
sprite vA vB 15
vA := 21
Sub1
i := D5
save v2
i := D4
bcd vC
load v5
v3 -= v0
if v3 != 0 then jump L1
v4 -= v1
if v4 != 0 then jump L1
v5 -= v2
if v5 != 0 then jump L1
v6 := 12
buzzer := v6
jump L2
: L1
vA := 21
vB := 16
Sub1
v6 := 14
: L2
vA := 38
vB := 8
i := hex v6
sprite vA vB 5
v0 := key
again
: Sub1
i := hex v0
sprite vA vB 5
vA += 5
i := hex v1
sprite vA vB 5
vA += 5
i := hex v2
sprite vA vB 5
return
: D1
0x20 0x20 0xf8 0x20 0x20 0x0
: D2
0x0 0xff 0x0 0xff
: D3
0xff 0xff 0x3 0x3 0x3 0xff 0xff 0xc0 0xc0 0xc0 0xc0 0xc0 0x0 0xc0 0xc0 0x0
: D4
0x0 0x0 0x0
: D5
0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Airplane.ch8
######################################################################
:proto L4 # 23E
:proto Sub1 # 242
:proto Sub2 # 26C
:proto Sub3 # 27A
:proto Sub4 # 288
:proto Sub5 # 296
:proto Sub6 # 2A4
:proto Sub7 # 2B2
:proto L5 # 2E4
:proto L6 # 2F4
:proto L7 # 308
:proto Sub8 # 30A
:proto Sub9 # 320
:proto Sub10 # 326
:proto D1 # 354
:proto D2 # 356
:proto D3 # 357
:proto D4 # 359
:proto D5 # 35B
:proto D6 # 35F
:proto D7 # 360
:proto D8 # 361
:proto D9 # 362
: main
vA := 0
vB := 4
vC := 1
vD := 0
vE := 2
: L1
Sub10
Sub9
v0 := 48
v1 := 1
delay := v0
loop
v0 := delay
buzzer := v1
if v0 != 0 then
again
Sub1
loop
Sub9
vD += 1
Sub9
v0 := 8
if v0 key then Sub8
if vA == 0 then jump L4
i := D9
sprite v8 v9 1
v9 += 1
sprite v8 v9 1
if vF == 1 then jump L6
if v9 == 24 then jump L5
: L4
Sub7
again
: Sub1
if vC == 1 then Sub2
if vC == 2 then Sub3
if vC == 3 then Sub4
if vC == 4 then Sub5
if vC == 5 then Sub6
i := D4
sprite v6 v7 2
if v4 == 0 then return
i := D3
sprite v4 v5 2
if v2 == 0 then return
i := D5
sprite v2 v3 2
return
: Sub2
v6 := 40
v7 := 9
v4 := 0
v5 := 0
v2 := 0
v3 := 0
return
: Sub3
v6 := 40
v7 := 14
v4 := 40
v5 := 20
v2 := 0
v3 := 0
return
: Sub4
v6 := 40
v7 := 7
v4 := 40
v5 := 12
v2 := 22
v3 := 17
return
: Sub5
v6 := 40
v7 := 7
v4 := 40
v5 := 14
v2 := 22
v3 := 20
return
: Sub6
v6 := 40
v7 := 5
v4 := 40
v5 := 16
v2 := 22
v3 := 11
return
: Sub7
i := D4
sprite v6 v7 2
v6 += -2
sprite v6 v7 2
if v4 == 0 then return
i := D3
sprite v4 v5 2
v4 += 2
if v4 == 68 then v4 += 192
sprite v4 v5 2
if v2 == 0 then return
i := D5
sprite v2 v3 2
v2 += 2
if vC == 4 then v2 += 2
if vC == 5 then v2 += 2
if v2 == 68 then v2 += 192
sprite v2 v3 2
return
: L5
vC += 1
vD := 0
vE := 2
clear
if vC == 6 then vC := 1
vA := 0
jump L1
: L6
v0 := 6
buzzer := v0
vB += -1
if vB == 0 then jump L7
vD := 0
vE := 2
clear
vA := 0
jump L1
: L7
loop
again
: Sub8
if vA == 1 then return
v0 := 2
buzzer := v0
vA := 1
v8 := vD
v8 += 1
v9 := vE
v9 += 1
sprite v8 v9 1
return
: Sub9
i := D1
sprite vD vE 2
return
: Sub10
v4 := 25
v3 := 0
i := D2
loop
sprite v3 v4 1
v3 += 8
if v3 != 64 then
again
v3 := 30
v4 := 27
i := hex vC
sprite v3 v4 5
if vB == 4 then i := D6
if vB == 3 then i := D7
if vB == 2 then i := D8
if vB == 1 then i := D9
v3 := 1
v4 += 2
sprite v3 v4 1
return
: D1
0x80 0xf8
: D2
0xff
: D3
0x80 0xe0
: D4
0x10 0x70
: D5
0x88 0xee 0x11 0x77
: D6
0xaa
: D7
0xa8
: D8
0xa0
: D9
0x80 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Animal Race [Brian Astle].ch8
######################################################################
:proto L4 # 288
:proto L5 # 28C
:proto L6 # 292
:proto L9 # 2B8
:proto L13 # 2F6
:proto L19 # 35A
:proto L20 # 372
:proto L21 # 380
:proto L23 # 3C0
:proto L25 # 3E4
:proto L26 # 3EE
:proto L29 # 40C
:proto L34 # 436
:proto Sub1 # 44A
:proto Sub2 # 458
:proto Sub3 # 466
:proto Sub4 # 480
:proto Sub5 # 482
:proto Sub6 # 484
:proto Sub7 # 486
:proto Sub8 # 490
:proto Sub9 # 492
:proto Sub10 # 494
:proto Sub11 # 496
:proto Sub12 # 4A0
:proto Sub13 # 4B2
:proto Sub14 # 4C0
:proto D1 # 4D6
:proto D2 # 4D8
:proto D3 # 500
:proto D4 # 525
:proto D5 # 5B5
:proto D6 # 5E2
:proto D7 # 5F6
:proto D8 # 5FD
:proto D9 # 600
:proto D10 # 680
:proto D11 # 68A
:proto D12 # 694
:proto D13 # 69E
:proto D14 # 6A0
:proto D15 # 6A5
: main
vD := 10
vE := 2
v8 := 14
v9 := 11
i := D5
Sub5
v8 := 44
Sub6
v8 := 29
v9 := 24
Sub6
vB := 0
vC := 35
loop
Sub2
Sub14
v8 := 33
v9 := 0
i := D2
i += vB
sprite v8 v9 4
buzzer := vE
vB += 4
if vB == 28 then vB := 4
vC += -1
Sub14
if vC != 0 then
again
: L2
clear
buzzer := v9
Sub2
Sub14
vA := 0
vB := 10
loop
i := D9
i += vA
load v7
v2 := 12
v4 += 1
i := hex vB
sprite v2 v4 5
v2 := 19
i := hex v3
sprite v2 v4 5
v2 := 23
i := D14
sprite v2 v4 5
vA += 8
vB += 1
if vA != 40 then
again
v8 := 32
v9 := 2
i := D6
Sub4
v2 := 38
v3 := 8
sprite v2 v3 7
i := D8
bcd vD
load v2
v3 := 44
v4 := 9
if v0 == 0 then jump L4
i := hex v0
sprite v3 v4 5
jump L5
: L4
if v1 == 0 then jump L6
: L5
i := hex v1
v3 := 49
sprite v3 v4 5
: L6
i := hex v2
v3 := 54
sprite v3 v4 5
i := D10
v8 := 36
v9 := 17
Sub6
v8 := 54
i := D15
: L7
sprite v8 v9 5
vF := 10
delay := vF
loop
Sub1
if v0 != 16 then jump L9
vF := delay
if vF != 0 then
again
jump L7
: L9
buzzer := vE
vC := v0
vA := 9
vA -= vC
if vF == 1 then jump L7
if vC == 15 then jump L7
loop
sprite v8 v9 5
if vF == 0 then
again
i := hex vC
sprite v8 v9 5
Sub12
i := D7
v3 := 44
v4 := 23
sprite v3 v4 7
v3 := 54
v4 := 24
i := D15
: L11
sprite v3 v4 5
vF := 10
delay := vF
loop
Sub1
if v0 != 16 then jump L13
vF := delay
if vF != 0 then
again
jump L11
: L13
buzzer := vE
vB := v0
vA := vD
vA -= vB
if vF == 0 then jump L11
if vB == 0 then jump L11
vA := 9
vA -= vB
if vF == 0 then jump L11
loop
sprite v3 v4 5
if vF == 0 then
again
i := hex vB
sprite v3 v4 5
Sub10
clear
Sub14
Sub12
i := D1
v0 := 56
v1 := 0
loop
sprite v0 v1 1
v1 += 1
if v1 != 32 then
again
v0 := 30
v1 := 15
vA := 3
loop
i := hex vA
sprite v0 v1 5
buzzer := vE
Sub10
vA += -1
sprite v0 v1 5
if vA != 0 then
again
: L17
vA := 0
loop
i := D9
i += vA
load v6
i := D9
i += vA
v0 += -1
if v0 == 0 then jump L19
save v0
jump L20
: L19
v0 := random 0b1
v0 += 2
if v1 == v5 then v1 -= v6
v1 += 6
v2 += 1
save v2
i := D3
i += v1
sprite v2 v4 6
if v2 == 56 then jump L21
: L20
vA += 8
if vA == 24 then buzzer := vE
if vA != 40 then
again
buzzer := vE
jump L17
: L21
buzzer := v2
v8 := 6
v9 := 8
i := D6
Sub6
v7 >>= vA
v7 >>= v7
v7 >>= v7
v7 += 10
if v7 == vC then jump L23
i := D12
Sub6
Sub13
i := hex vB
vD -= vB
sprite v8 v9 5
if vD != 0 then jump L26
Sub8
sprite v8 v9 5
Sub13
i := D4
v8 := 8
v9 := 3
loop
sprite v8 v9 5
vF := 16
Sub11
sprite v8 v9 5
v9 ^= vF
again
0x0 0xee
: L23
i := D11
Sub6
Sub13
i := D9
i += vA
load v6
v7 := 0
loop
v7 += vB
v3 += -1
if v3 != 0 then
again
i := D8
bcd v7
load v2
if v1 == 0 then jump L25
i := hex v1
Sub7
: L25
i := hex v2
sprite v8 v9 5
vD += v7
if vF == 1 then jump L29
: L26
i := D9
i += vA
load v6
i := D3
i += v1
: L27
sprite v2 v4 5
vF := 24
delay := vF
loop
vF := delay
Sub1
if v0 != 16 then jump L2
if vF != 0 then
again
jump L27
: L29
Sub8
: L30
clear
v4 := 14
: L31
v2 := 0
v1 := 64
: L32
i := D6
v8 := 6
v9 := 8
Sub6
i := D11
Sub6
loop
i := D9
i += v1
sprite v2 v4 8
v2 += 1
if v2 != 64 then jump L34
v4 += 9
if v4 != 32 then jump L31
jump L30
: L34
v1 += 8
if v1 == 120 then v1 := 72
vD := 7
vD &= v2
if vD == 0 then jump L32
vF := 4
Sub11
again
: Sub1
v0 := 0
loop
if v0 key then return
v0 += 1
if v0 == 16 then return
again
: Sub2
i := D9
v1 := 0
v6 := 4
Sub3
Sub3
Sub3
Sub3
: Sub3
v0 := random 0b1
v0 += 1
v2 := random 0b11
v7 <<= v2
v3 := 6
v3 -= v7
v7 := random 0b1
v3 += v7
v3 += v0
save v3
v1 += 36
i += v6
return
: Sub4
Sub7
: Sub5
Sub7
: Sub6
Sub7
: Sub7
sprite v8 v9 5
vF := 5
i += vF
v8 += 8
return
: Sub8
Sub9
: Sub9
Sub10
: Sub10
vF := 60
: Sub11
buzzer := vF
loop
vF := delay
if vF != 0 then
again
return
: Sub12
i := D13
v8 := 0
v9 <<= vC
v9 <<= v9
v9 <<= v9
v9 -= vC
v9 += 187
sprite v8 v9 2
return
: Sub13
i := D7
v8 := 8
v9 := 16
sprite v8 v9 7
v8 := 16
v9 := 17
return
: Sub14
vA := 0
loop
i := D9
i += vA
load v4
i := D3
i += v1
sprite v2 v4 6
vA += 8
if vA != 40 then
again
return
: D1
0x1 0x1
: D2
0x81 0x7e 0x18 0x0 0x99 0x42 0xdb 0x0 0x0 0x0 0x81 0x81 0x0 0x0 0x0 0xc3 0x3c 0x66 0x18 0x42 0x42 0xc3 0x42 0x0 0xe7 0xe7 0x0 0x0 0x0 0xee 0x8e 0x8a 0x8a 0x8a 0xee 0xee 0x88 0xec 0x28 0xee
: D3
0x3 0x2 0x2 0xe 0xa 0xa 0x5 0x6 0x6 0x12 0x1e 0x5 0x5 0x6 0x6 0x12 0x1e 0x28 0x5 0x6 0x6 0x12 0x1e 0x10 0x5 0x6 0x6 0x12 0x1e 0x2 0x5 0x6 0x6 0x12 0x1e 0x5 0x0
: D4
0x3f 0x3f 0x3d 0x25 0x24 0x0 0x41 0x41 0x47 0x6e 0xa 0x0 0x41 0x41 0x47 0x6d 0x90 0x0 0x41 0x41 0x47 0x6f 0x0 0x0 0x41 0x41 0x47 0x6e 0x12 0x0 0x41 0x41 0x47 0x6d 0x90 0x0 0x3 0x6 0xe 0x14 0x26 0x0 0x5 0xa 0x22 0x20 0x40 0x3 0x0 0x2 0x68 0x36 0x18 0x6 0xf 0x1a 0x16 0x48 0x3 0x0 0x5 0xa 0x42 0xc 0x0 0x0 0x5 0xa 0x42 0x0 0x0 0x0 0xb 0x1e 0x3e 0x22 0x22 0x0 0x1d 0x22 0x42 0x66 0x5 0x0 0x1d 0x22 0x42 0x66 0x80 0x0 0x1d 0x22 0x42 0x66 0x10 0x0 0x1d 0x22 0x42 0x66 0x8 0x0 0x1d 0x22 0x42 0x66 0x1 0x0 0x2 0x13 0x1e 0x12 0x12 0x2 0x17 0x38 0x2e 0x6 0x24 0x4 0x24 0x2f 0x3a 0x56 0x11 0x0 0x6 0x35 0x22 0x36 0x28 0x0 0x6 0x35 0x22 0x36 0x0 0x2 0x17 0x38 0x2e 0x6 0x28 0x1
: D5
0xe9 0xad 0xeb 0xa9 0xa9 0x51 0x5b 0x55 0x51 0x51 0x74 0x54 0x74 0x54 0x57 0xf7 0x95 0xf7 0xa5 0x95 0x77 0x44 0x46 0x44 0x77 0xef 0xa8 0xae 0xe2 0xbe 0xf3 0x92 0x93 0x92 0x9f 0x17 0x15 0x17 0x11 0x11 0x77 0x15 0x17 0x15 0x17
: D6
0x2b 0x2a 0x12 0x12 0x13 0xa8 0xa8 0xa8 0xa8 0xb8 0xae 0xaa 0xee 0xaa 0xaa 0xae 0xa8 0xae 0xa8 0x4e
: D7
0x20 0x78 0xa0 0x70 0x28 0xf0 0x20
: D8
0x0 0x1 0x0
: D9
0x2 0x0 0x3 0x2 0x0 0x1e 0x18 0x0 0x1 0x24 0x3 0x1 0x6 0x42 0x12 0x0 0x1 0x48 0x0 0x8 0xd 0x66 0x18 0x0 0x2 0x68 0x3 0x3 0x13 0x8a 0x18 0x0 0x1 0x90 0x3 0x1 0x1a 0xae 0x18 0x0 0x1 0x8 0x38 0x6 0x0 0x18 0x18 0x1 0x1 0x4 0x31 0x0 0x5 0x18 0x18 0x1 0x7f 0x48 0x1c 0x1c 0xb 0x4c 0x18 0x0 0x3 0x2 0x2 0xe 0x5e 0x4 0x26 0x54 0x5 0x6 0x6 0xd2 0xa2 0x4c 0xe6 0xc1 0x5 0x6 0xc6 0xd2 0xe2 0xcc 0xb8 0x90 0x5 0x86 0x6 0x52 0x22 0x4c 0x5e 0x60 0x5 0x6 0x86 0xd2 0xa2 0x8c 0xc6 0xc1 0x5 0x6 0x86 0x92 0x22 0x8c 0x98 0x30 0x0 0x6 0x6 0x12 0x62 0xc 0x3e 0x10 0x0 0xee 0x63 0x1a 0x24 0xc0 0x0 0xee
: D10
0xf0 0x90 0xf7 0x90 0x90 0x78 0x40 0x70 0x40 0x78
: D11
0xab 0xa9 0xa9 0xa9 0x53 0xa2 0x32 0x2a 0x26 0xa2
: D12
0x8e 0x8a 0x8a 0x8a 0xee 0xee 0x88 0xec 0x28 0xee
: D13
0x0 0xc0
: D14
0x18 0x48 0x8 0x48 0x1c
: D15
0xe0 0x20 0x60 0x0 0x40
######################################################################
# INPUT: chip8/Chip-8 Games/Astro Dodge [Revival Studios, 2008].ch8
######################################################################
:proto L1 # 214
:proto L4 # 240
:proto L5 # 254
:proto Sub1 # 288
:proto Sub3 # 2B0
:proto Sub4 # 2E2
:proto Sub5 # 2E8
:proto L9 # 2F4
:proto L10 # 2FE
:proto L11 # 308
:proto L12 # 312
:proto Sub6 # 31A
:proto L13 # 328
:proto D1 # 33E
:proto D2 # 350
:proto D3 # 358
:proto D4 # 3D8
:proto Sub7 # 458
:proto Sub8 # 460
:proto Sub9 # 4B8
:proto Sub10 # 4EE
:proto Sub11 # 520
:proto Sub12 # 54A
:proto Sub13 # 552
:proto Sub15 # 582
:proto Sub16 # 58E
:proto D5 # 59A
:proto D6 # 59B
:proto D7 # 59C
:proto D8 # 59F
:proto D9 # 5CF
:proto D10 # 62F
: main
jump L1
0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x53 0x54 0x55 0x44 0x49 0x4f 0x53 0x32 0x30 0x30 0x38
: L1
clear
vD := 32
delay := vD
Sub7
Sub8
vD := 64
delay := vD
Sub7
Sub8
vD := 32
delay := vD
Sub7
: L2
clear
i := D4
Sub11
Sub9
vD := 4
vC := 0
loop
v0 := 5
if v0 -key then jump L4
jump L5
: L4
delay := vD
Sub7
vC += 1
if vC == 0 then Sub9
if vC == 4 then Sub9
if vC == 8 then vC := 0
again
: L5
i := D4
Sub11
clear
v8 := 16
v9 := 20
Sub4
Sub1
Sub12
v3 := 44
v4 := 0
Sub15
v3 := 44
v4 := 6
Sub16
vD := 0
vE := 8
loop
Sub3
Sub5
vD += 8
if vD == 128 then vD := 0
vE += 8
if vE == 128 then vE := 0
again
0x12 0x2c
: Sub1
vC := 0
loop
i := D1
i += vC
load v1
v1 := random 0b11
save v1
i := D3
sprite v0 v1 8
vC += 3
if vC != 9 then
again
return
: Sub2
Sub6
Sub13
Sub6
v0 := random 0b1111
v0 += v0
v0 += v0
v1 := 0
return
: Sub3
vC := 0
v5 := 0
loop
i := D1
i += vC
load v2
i := D3
i += vD
sprite v0 v1 8
v1 += v2
v3 := v1
v4 := 30
v3 -= v4
if vF == 1 then Sub2
i := D3
i += vE
sprite v0 v1 8
i := D1
i += vC
save v1
v5 += 24
vC += 3
if vC != 9 then
again
return
: Sub4
i := D2
sprite v8 v9 8
return
: Sub5
Sub4
v0 := 4
if v0 -key then jump L9
if v8 != 0 then v8 += -2
: L9
v0 := 6
if v0 -key then jump L10
if v8 != 56 then v8 += 2
: L10
v0 := 2
if v0 -key then jump L11
if v9 != 16 then v9 += -1
: L11
v0 := 8
if v0 -key then jump L12
if v9 != 24 then v9 += 1
: L12
Sub4
if vF == 1 then jump L13
return
: Sub6
v3 := 44
v4 := 0
Sub15
v3 := 44
v4 := 6
Sub16
return
: L13
clear
v0 := 0
v1 := 4
Sub10
v3 := 22
v4 := 22
Sub15
loop
v0 := 5
if v0 -key then
again
jump L2
: D1
0x0 0xe 0x1 0x18 0xb4 0x2 0x30 0xe3 0x3 0x40 0x75 0x1 0x40 0x60 0x2 0x40 0x36 0x3
: D2
0x18 0x18 0x34 0x24 0x7e 0xff 0xe7 0x99
: D3
0x0 0x40 0x38 0x14 0x2a 0x75 0x3a 0x14 0x0 0x0 0x28 0x70 0x3e 0x7 0x2a 0x0 0x0 0x40 0x8 0x5c 0x7a 0x75 0xa 0x4 0x0 0x50 0x28 0x54 0x3e 0x75 0x2e 0x1 0x20 0x70 0x78 0x7c 0x3c 0x75 0x6a 0x54 0x0 0x64 0x78 0x78 0x7e 0x7d 0xe8 0x50 0x8 0x44 0x2a 0x50 0x3a 0x5d 0xe8 0x40 0x8 0x54 0xa 0x11 0x2a 0x5c 0x68 0x40 0x0 0x4 0x2a 0x57 0x2a 0x16 0x28 0x50 0x0 0x0 0x2a 0x13 0x6a 0x56 0x8 0x0 0x0 0x0 0x8 0x71 0x2a 0x52 0x30 0x0 0x0 0x4 0xa 0x14 0x3a 0x60 0x68 0x0 0x0 0x4 0xa 0x1c 0x3e 0x70 0x68 0x50 0x20 0x50 0x2e 0x5f 0x2e 0x5c 0x28 0x50 0x20 0x5c 0x3a 0x57 0x3e 0x5e 0x28 0x50 0x0 0x58 0x38 0x77 0x2e 0x7f 0x3e 0x54
: D4
0x78 0x7e 0xf7 0xf1 0xbe 0x9e 0x38 0x66 0xf8 0xcd 0x73 0x9b 0xe3 0x36 0xcf 0xde 0x78 0x66 0xf7 0x1d 0xbe 0x9b 0x3a 0x36 0xf9 0xcd 0x73 0xb3 0xe3 0x6c 0xcf 0xd8 0xcd 0x33 0x83 0x78 0x33 0xd9 0x66 0x9c 0xcd 0xf8 0x9b 0xe3 0x36 0x87 0x6c 0x3c 0xfd 0x7e 0xf7 0x79 0xbf 0x9f 0x7c 0x66 0xfc 0xcd 0xfb 0x9b 0xf7 0x36 0xef 0xde 0xfd 0x66 0xf7 0x1d 0xbf 0x9b 0x7c 0x36 0xfc 0xcd 0xfb 0xb3 0xf7 0xec 0xef 0xd8 0xcd 0x0 0xc3 0x0 0x33 0x0 0x66 0x0 0xcd 0x0 0x9b 0x0 0x36 0x0 0xc 0x0 0x85 0x66 0x0 0x19 0x1 0x9b 0x46 0x66 0x5 0xcd 0x88 0x9b 0x14 0x6c 0x20 0xd8 0xcd 0x33 0x83 0x7c 0x33 0xd9 0x6e 0xbe 0xcd 0xfd 0xdb 0xf3 0x76 0xcf 0x6c 0xbc
: Sub7
loop
v0 := delay
if v0 != 0 then
again
return
: Sub8
vD := 4
v1 := 12
v0 := 28
v2 := 18
i := D10
i += v2
sprite v0 v1 6
delay := vD
Sub7
v0 := 20
v2 := 12
i := D10
i += v2
sprite v0 v1 6
v0 := 36
v2 := 24
i := D10
i += v2
sprite v0 v1 6
delay := vD
Sub7
v0 := 12
v2 := 6
i := D10
i += v2
sprite v0 v1 6
v0 := 44
v2 := 30
i := D10
i += v2
sprite v0 v1 6
delay := vD
Sub7
i := D10
v0 := 4
sprite v0 v1 6
v0 := 52
v2 := 36
i := D10
i += v2
sprite v0 v1 6
delay := vD
Sub7
return
: Sub9
v2 := 6
v0 := 0
v1 := 23
i := D8
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
v0 += 8
i += v2
sprite v0 v1 6
return
: Sub10
v2 := 12
i := D9
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
v0 += 8
i += v2
sprite v0 v1 12
return
: Sub11
v4 := 1
v5 := 7
v2 := 0
v3 := 0
: L15
v0 := 0
loop
v1 := v3
v1 += 3
sprite v0 v1 1
v1 += 8
i += v4
sprite v0 v1 1
i += v4
v0 += 8
if v0 != 64 then
again
v3 += 3
v3 &= v5
v2 += 1
if v2 != 8 then jump L15
return
: Sub12
v0 := 0
i := D5
save v0
return
: Sub13
i := D5
load v1
v0 += 1
v2 := v0
v2 -= v1
if vF == 1 then v1 := v0
save v1
return
: Sub14
i := D7
load v2
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
v3 += 5
v2 := 0
i := hex v2
sprite v3 v4 5
return
: Sub15
i := D5
load v0
i := D7
bcd v0
Sub14
return
: Sub16
i := D6
load v0
i := D7
bcd v0
Sub14
return
: D5
0x0
: D6
0x64
: D7
0x0 0x0 0x0
: D8
0x0 0x3c 0x36 0x3c 0x30 0x30 0x0 0xf3 0xdb 0xf3 0xdb 0xdb 0x0 0xe7 0xc 0xc7 0x1 0xef 0x0 0x9e 0x30 0x1c 0x86 0x3c 0x0 0x1e 0x30 0x1c 0x6 0x3c 0x0 0xf3 0x66 0x67 0x66 0x66 0x0 0x9e 0xdb 0xde 0xdb 0xdb 0x0 0x78 0x30 0x30 0x30 0x30
: D9
0x1 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x3 0x1 0xe7 0xd 0xd 0x6f 0x6d 0x6d 0x6d 0x6d 0x6d 0x6d 0x6d 0xed 0x3f 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0x3e 0xb0 0xb0 0xbc 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xbe 0x1c 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x1c 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0x7b 0x3b 0xef 0xd 0xd 0xcf 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xed 0x0 0x80 0x80 0x0 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D10
0x0 0x0 0xc 0x11 0x11 0x10 0x0 0x0 0x95 0x55 0x95 0xcd 0x0 0x0 0x53 0x55 0x55 0x33 0x40 0x40 0x44 0x42 0x41 0x46 0x0 0x40 0x6a 0x4a 0x4a 0x46 0x0 0x20 0x69 0xaa 0xaa 0x69 0x0 0x0 0x20 0x90 0x88 0x30
######################################################################
# INPUT: chip8/Chip-8 Games/Biorhythm [Jef Winsor].ch8
######################################################################
:proto L3 # 232
:proto L6 # 248
:proto L7 # 2B2
:proto L8 # 2B8
:proto L9 # 2D2
:proto L10 # 2EA
:proto L11 # 2FE
:proto L13 # 308
:proto L14 # 31C
:proto L15 # 32A
:proto L17 # 340
:proto L19 # 34E
:proto L20 # 370
:proto L21 # 37C
:proto L23 # 392
:proto L24 # 3A4
:proto L25 # 3D0
:proto D7 # 441
:proto D8 # 444
:proto Sub1 # 448
:proto Sub2 # 46A
:proto Sub3 # 49C
:proto L30 # 4A8
:proto Sub4 # 4B6
:proto Sub5 # 4C2
:proto Sub6 # 4DC
:proto Sub7 # 4F2
:proto Sub8 # 500
:proto L32 # 50E
:proto D9 # 513
:proto Sub9 # 518
:proto Sub10 # 53C
:proto Sub11 # 554
:proto D10 # 562
:proto D11 # 584
:proto D12 # 588
:proto D13 # 600
:proto D14 # 608
:proto D15 # 609
: main
i := D11
v1 := 0
v2 := 25
sprite v1 v2 5
i := D12
v2 := 13
sprite v1 v2 5
i := D7
v2 := 1
sprite v1 v2 5
i := D9
v1 := 49
v2 := 14
sprite v1 v2 4
i := D8
v2 := 9
: L1
v1 := -1
loop
v1 += 7
sprite v1 v2 2
if v1 != 34 then
again
if v2 != 9 then jump L3
v2 := 21
jump L1
: L3
v3 := 0
v5 := 0
v6 := 0
: L4
Sub8
Sub9
v0 := 0
loop
if v4 == 0 then jump L6
v0 += 10
v4 += -1
again
: L6
i := D14
save v0
Sub8
Sub9
i := D14
load v0
v0 += v4
i := D13
i += v3
save v0
v3 += 1
if v3 != 8 then jump L4
i := D13
load v7
if v0 == 0 then jump L7
if v1 == 0 then jump L7
if v4 == 0 then jump L7
if v5 == 0 then jump L7
v8 := 12
v8 -= v0
if vF == 0 then jump L7
v8 := 12
v8 -= v4
if vF == 0 then jump L7
v8 := v6
v8 -= v2
if vF == 0 then jump L7
if v6 != v2 then jump L8
v8 := v7
v8 -= v3
if vF == 0 then jump L7
if v7 != v3 then jump L8
v8 := v4
v8 -= v0
if vF == 0 then jump L7
if v4 != v0 then jump L8
v8 := v5
v8 -= v1
if vF != 0 then jump L8
: L7
buzzer := v5
clear
jump main
: L8
v8 := v0
v9 := v1
vA := v8
Sub10
if vB == 0 then jump L9
if vB != 41 then jump L7
v9 := v2
vA := v3
Sub11
if vB != 3 then jump L7
: L9
v9 := v5
vA := v4
Sub10
if vB == 0 then jump L10
if vB != 41 then jump L7
v9 := v6
vA := v7
Sub11
if vB != 3 then jump L7
: L10
vC := 0
vD := 0
vE := 0
Sub7
v0 := v5
if v9 != 170 then jump L11
v0 -= v1
Sub4
jump L15
: L11
Sub4
Sub6
v0 -= v1
jump L13
: L12
Sub6
: L13
Sub4
v8 += 1
if v8 != 13 then jump L14
v8 := 1
v3 += 1
if v3 != 100 then jump L14
v3 := 0
v2 += 1
: L14
Sub7
if v9 == 170 then jump L15
v0 := 3
v0 &= vE
buzzer := v0
jump L12
: L15
Sub2
loop
v8 := 11
if v8 key then jump L17
v8 := 15
if v8 key then jump L17
v8 := 0
if v8 key then jump L7
again
: L17
Sub2
: L18
loop
if v8 == 11 then jump L19
jump L24
0x1
: D1
0x0 0x7 0x14 0x1b 0xd4
: L19
Sub1
i := D13
load v7
v5 += -1
if v5 != 0 then jump L21
v4 += -1
if v4 != 0 then jump L20
v4 := 12
v7 += -1
if v7 != -1 then jump L20
v7 := 99
v6 += -1
if v6 == -1 then jump L23
: L20
v8 := v4
v1 := v5
v2 := v6
v3 := v7
Sub6
v5 := v0
: L21
vC += -1
if vC == -1 then vC := 22
vD += -1
if vD == -1 then vD := 27
vE += -1
if vE == -1 then vE := 32
: L22
i := D13
save v7
: L23
Sub1
v8 := 11
if v8 key then jump L18
v8 := 15
if v8 key then
again
jump L15
0x7f 0x0
: L24
Sub1
i := D13
load v7
v8 := v4
v2 := v6
v3 := v7
Sub6
if v0 == v5 then v5 := 0
v5 += 1
if v5 == 1 then v4 += 1
if v4 != 13 then jump L25
v4 := 1
v7 += 1
if v7 != 100 then jump L25
v7 := 0
v6 += 1
if v6 == 100 then jump L23
: L25
vC += 1
vD += 1
vE += 1
Sub5
jump L22
: D2
0x1 0x7 0xe 0xe 0x16 0x16 0x16 0xe 0xe 0x7 0x1 0x0 0x5 0xb 0xb 0x12 0x12 0x12 0x12 0xb 0xb 0x5 0x0 0xee
: D3
0x1 0x7 0xe 0xe 0x16 0x16 0x16 0x16 0x16 0x16 0xe 0xe 0x7 0x1 0x0 0x5 0xb 0xb 0x12 0x12 0x12 0x12 0x12 0x12 0xb 0xb 0x5 0x0 0xee
: D4
0x0 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x80 0x80 0x0 0x0 0x0 0x0 0x80 0x80 0x80 0x0 0x0 0x0 0x0 0x80 0x80 0x80 0x80 0x0 0x0 0x0
: D5
0x0 0x1f 0x1c 0x1f 0x1e 0x1f 0x1e 0x1f 0x1f 0x1e 0x1f 0x1e
: D6
0x1f 0x29 0x2e 0x37 0x3c 0x2b 0x30 0x35 0x3a
: D7
0xe0 0xa0 0xe0
: D8
0x80 0x80 0xd4 0xd4
: Sub1
v5 := 0
v6 := 2
v3 := 4
loop
i := D13
i += v3
load v0
i := D15
bcd v0
load v2
v4 := v1
Sub9
v4 := v2
Sub9
v3 += 1
if v3 != 8 then
again
return
: Sub2
v4 := 32
v5 := 6
v6 := 0
v7 := vC
loop
i := D2
Sub3
if v4 != 0 then
again
v4 := 32
v5 := 6
v6 := 12
v7 := vD
loop
i := D3
Sub3
if v4 != 0 then
again
v4 := 32
v5 := 6
v6 := 24
v7 := vE
loop
i := D10
Sub3
if v4 != 0 then
again
return
: Sub3
i += v7
load v0
if v0 != -18 then jump L30
v7 := 0
return
: L30
i := D4
i += v0
sprite v5 v6 8
v4 += -1
v5 += 1
v7 += 1
return
: Sub4
vC += v0
vD += v0
vE += v0
Sub5
Sub5
return
: Sub5
vB := 23
vC -= vB
if vF == 0 then vC += 23
vB := 28
vD -= vB
if vF == 0 then vD += 28
vB := 33
vE -= vB
if vF == 0 then vE += 33
return
: Sub6
i := D5
i += v8
load v0
if v8 != 2 then return
v9 := v2
vA := v3
Sub11
if vB == 3 then v0 += 1
return
: Sub7
v9 := 170
if v2 == v6 then if v3 != v7 then v9 := 0
if v8 != v4 then v9 := 0
return
: Sub8
v4 := 0
loop
if v4 key then jump L32
v4 += 1
if v4 != 10 then
again
jump Sub8
: L32
v4 := key
return
0x1
: D9
0xc 0x12 0x90 0x60 0xd4
: Sub9
i := D6
i += v5
load v1
i := D1
i += v6
load v0
i := hex v4
sprite v1 v0 5
if v5 == 3 then v6 += 1
if v5 == 7 then v6 += 1
v5 += 1
if v5 == 8 then v5 := 0
return
0x41 0x6a 0x7e 0x51
: Sub10
vB := 0
i := D5
i += vA
load v0
v0 -= v9
if vF == 1 then return
vB := 41
if v9 == 29 then if vA != 2 then vB := 57
return
: Sub11
if vA == 0 then vA := v9
vB := 3
vA &= vB
if vA != 0 then vB := 0
return
: D10
0x1 0x7 0x7 0xe 0xe 0x16 0x16 0x16 0x16 0x16 0x16 0xe 0xe 0x7 0x7 0x1 0x0 0x5 0x5 0xb 0xb 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xb 0xb 0x5 0x5 0x0 0xee
: D11
0xe0 0x40 0x40 0x40
: D12
0xe0 0x80 0xe0 0x80 0xe0 0xd4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D13 0 0 0 0 0 0 0 0
: D14 0
: D15
######################################################################
# INPUT: chip8/Chip-8 Games/Blinky [Hans Christian Egeberg, 1991].ch8
######################################################################
:proto L1 # 21A
:proto L6 # 27C
:proto L7 # 29A
:proto L8 # 2B2
:proto L9 # 2C8
:proto L10 # 2E0
:proto L11 # 2F8
:proto L12 # 310
:proto L17 # 3C6
:proto Sub1 # 3D0
:proto L21 # 432
:proto L22 # 44A
:proto L23 # 462
:proto L24 # 47A
:proto L25 # 492
:proto L26 # 49A
:proto L27 # 4B2
:proto L28 # 4D2
:proto L29 # 4E4
:proto L30 # 4EC
:proto Sub2 # 4F6
:proto L32 # 524
:proto L33 # 556
:proto L34 # 574
:proto L35 # 58C
:proto L36 # 5A4
:proto L37 # 5BC
:proto L38 # 5D4
:proto L40 # 5E4
:proto L41 # 5F2
:proto L42 # 5FE
:proto L43 # 60A
:proto L44 # 614
:proto Sub3 # 61E
:proto L46 # 64C
:proto L47 # 67E
:proto L48 # 69C
:proto L49 # 6B6
:proto L50 # 6D0
:proto L51 # 6EA
:proto L52 # 704
:proto L54 # 716
:proto L55 # 724
:proto L56 # 730
:proto L57 # 73C
:proto L58 # 746
:proto Sub4 # 750
:proto Sub5 # 772
:proto Sub6 # 794
:proto Sub7 # 7BA
:proto Sub8 # 7BE
:proto Sub9 # 7D6
:proto Sub10 # 7E6
:proto L63 # 80C
:proto L65 # 834
:proto L67 # 854
:proto L69 # 86E
:proto Sub11 # 87A
:proto Sub12 # 88A
:proto L70 # 8A2
:proto Sub13 # 8A8
:proto L72 # 8C4
:proto D1 # 8C8
:proto D2 # 8CA
:proto D3 # 8CC
:proto D4 # 8CD
:proto D5 # 8ED
:proto D6 # 8F1
:proto D7 # 8F5
:proto D8 # 8F9
:proto D9 # 919
:proto D10 # B19
:proto D11 # B22
:proto D12 # B2B
:proto D13 # B34
: main
jump L1
0x32 0x2e 0x30 0x30 0x20 0x43 0x2e 0x20 0x45 0x67 0x65 0x62 0x65 0x72 0x67 0x20 0x31 0x38 0x2f 0x38 0x2d 0x27 0x39 0x31
: L1
v0 ^= v0
v1 ^= v1
i := D1
save v1
v0 := 5
i := D3
save v0
v7 ^= v7
: L2
v6 ^= v6
Sub5
clear
Sub6
: L3
vE := 64
v7 &= vE
vE := 39
v7 |= vE
v8 := 26
v9 := 12
vA := 56
vB := 0
vC := 2
vD := 26
Sub4
i := D5
sprite vA vB 4
sprite vC vD 4
loop
Sub1
if vE != 0 then jump L6
: L5
i := D3
load v0
v5 := v0
v4 := random 0b11111111
v4 &= v5
Sub2
v4 := random 0b11111111
v4 &= v5
Sub3
v0 := 1
if v0 key then Sub9
if v6 != -9 then
again
vE := v6
Sub11
vE := 100
Sub11
Sub9
jump L2
: L6
v0 := delay
if v0 == 0 then jump L12
v0 := v8
v0 >>= v0
v1 := vA
v1 >>= v0
v0 -= v1
if v0 == 0 then jump L7
if v0 == 1 then jump L7
if v0 == -1 then jump L7
jump L9
: L7
v0 := v9
v0 >>= v0
v1 := vB
v1 >>= v0
v0 -= v1
if v0 == 0 then jump L8
if v0 == 1 then jump L8
if v0 == -1 then jump L8
jump L9
: L8
i := D5
sprite vA vB 4
vA := 56
vB := 0
sprite vA vB 4
vE := -13
v7 &= vE
vE := 4
v7 |= vE
vE := 50
Sub11
: L9
v0 := v8
v0 >>= v0
v1 := vC
v1 >>= v0
v0 -= v1
if v0 == 0 then jump L10
if v0 == 1 then jump L10
if v0 == -1 then jump L10
jump L5
: L10
v0 := v9
v0 >>= v0
v1 := vD
v1 >>= v0
v0 -= v1
if v0 == 0 then jump L11
if v0 == 1 then jump L11
if v0 == -1 then jump L11
jump L5
: L11
i := D5
sprite vC vD 4
vC := 2
vD := 26
sprite vC vD 4
vE := 207
v7 &= vE
vE := 32
v7 |= vE
vE := 25
Sub11
jump L5
: L12
v0 := 63
Sub13
Sub4
i := D5
sprite vA vB 4
sprite vC vD 4
vE := 64
v7 ^= vE
v0 := v7
v0 &= vE
if v0 != 0 then jump L3
vE := v6
Sub11
Sub12
clear
v6 := 17
v7 := 10
i := D2
Sub10
v6 := 17
v7 := 16
i := D1
Sub10
v4 := 0
v5 := 8
v6 := 0
v7 := 15
: L13
loop
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v0 := 3
Sub13
if vE != 0 then jump L17
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v4 += 2
v5 += 2
if v4 != 48 then
again
loop
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v0 := 3
Sub13
if vE != 0 then jump L17
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v6 += 2
if v6 != 22 then
again
loop
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v0 := 3
Sub13
if vE != 0 then jump L17
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v4 += -2
v5 += -2
if v4 != 0 then
again
loop
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v0 := 3
Sub13
if vE != 0 then jump L17
i := D10
sprite v4 v6 9
i := D11
sprite v5 v6 9
v6 += -2
if v6 != 0 then
again
jump L13
: L17
i := D11
sprite v5 v6 9
i := D12
sprite v5 v6 9
jump L1
: Sub1
v3 := v7
vE := 3
v3 &= vE
v4 := v8
v5 := v9
vE := 6
if vE key then jump L21
vE := 3
if vE key then jump L22
vE := 8
if vE key then jump L23
vE := 7
if vE key then jump L24
: L18
if v3 == 3 then v5 += 2
if v3 == 0 then v5 += -2
if v3 == 2 then v4 += 2
if v3 == 1 then v4 += -2
v0 := v4
v1 := v5
Sub7
v2 := v0
vE := 8
v0 &= vE
: L19
if v0 != 0 then jump L25
vE := 7
v0 := v2
v2 &= vE
if v2 == 5 then jump L26
if v2 == 6 then jump L27
if v2 == 7 then jump L30
: L20
Sub4
vE := -4
v7 &= vE
v7 |= v3
v8 := v4
v9 := v5
jump Sub4
: L21
v0 := v4
v1 := v5
v1 += 2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L18
v3 := 3
v5 += 2
jump L19
: L22
v0 := v4
v1 := v5
v1 += -2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L18
v3 := 0
v5 += -2
jump L19
: L23
v0 := v4
v1 := v5
v0 += 2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L18
v3 := 2
v4 += 2
jump L19
: L24
v0 := v4
v1 := v5
v0 += -2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L18
v3 := 1
v4 += -2
jump L19
: L25
Sub4
sprite v8 v9 4
vE := vF
return
: L26
vE := -16
v0 &= vE
v0 |= v3
save v0
i := D6
sprite v4 v5 4
v6 += 1
v1 := 5
v0 := delay
if v0 == 0 then buzzer := v1
jump L20
: L27
vE := -16
v0 &= vE
v0 |= v3
save v0
i := D7
sprite v4 v5 4
v6 += 4
v0 := vA
v1 := vB
Sub7
vE := -16
v0 &= vE
if v0 != 0 then jump L28
vE := 12
v7 ^= vE
: L28
v0 := vC
v1 := vD
Sub7
vE := -16
v0 &= vE
if v0 != 0 then jump L29
vE := 48
v7 ^= vE
: L29
v0 := -1
buzzer := v0
delay := v0
jump L20
: L30
if v3 == 1 then v4 := 58
if v3 == 2 then v4 := 0
jump L20
: Sub2
v2 := v7
v3 := v7
vE := 12
v2 &= vE
v0 := vA
v1 := vB
Sub7
i := D5
vE := -16
v0 &= vE
if v0 != 0 then jump L32
: L31
sprite vA vB 4
if v2 == 12 then vB += 2
if v2 == 0 then vB += -2
if v2 == 8 then vA += 2
if v2 == 4 then vA += -2
sprite vA vB 4
return
: L32
vE := 128
v1 := delay
if v1 != 0 then jump L38
if v4 != 0 then jump L38
v1 := v0
v3 <<= v0
if vF != 0 then jump L33
v3 := v9
v3 -= vB
if vF == 0 then jump L35
if v3 != 0 then jump L34
v7 ^= vE
v3 := v8
v3 -= vA
if vF == 0 then jump L37
if v3 != 0 then jump L36
v7 ^= vE
jump L38
: L33
v3 := v8
v3 -= vA
if vF == 0 then jump L37
if v3 != 0 then jump L36
v7 ^= vE
v3 := v9
v3 -= vB
if vF == 0 then jump L35
if v3 != 0 then jump L34
v7 ^= vE
jump L38
: L34
v3 := 64
v1 &= v3
if v1 == 0 then jump L38
sprite vA vB 4
vB += 2
sprite vA vB 4
vE := -13
v7 &= vE
v2 := 12
v7 |= v2
return
: L35
v3 := 16
v1 &= v3
if v1 == 0 then jump L38
sprite vA vB 4
vB += -2
sprite vA vB 4
vE := -13
v7 &= vE
v2 := 0
v7 |= v2
return
: L36
v3 := 32
v1 &= v3
if v1 == 0 then jump L38
sprite vA vB 4
vA += 2
sprite vA vB 4
vE := -13
v7 &= vE
v2 := 8
v7 |= v2
return
: L37
v3 := 128
v1 &= v3
if v1 == 0 then jump L38
sprite vA vB 4
vA += -2
sprite vA vB 4
vE := -13
v7 &= vE
v2 := 4
v7 |= v2
return
: L38
v1 := random 0b11110000
v0 &= v1
if v0 != 0 then jump L40
: L39
vE := 12
v7 ^= vE
v2 ^= vE
jump L31
: L40
sprite vA vB 4
v0 <<= v0
if vF == 0 then jump L41
v2 := 4
vA += -2
jump L44
: L41
v0 <<= v0
if vF == 0 then jump L42
v2 := 12
vB += 2
jump L44
: L42
v0 <<= v0
if vF == 0 then jump L43
v2 := 8
vA += 2
jump L44
: L43
v0 <<= v0
if vF == 0 then jump L39
v2 := 0
vB += -2
: L44
sprite vA vB 4
vE := -13
v7 &= vE
v7 |= v2
return
: Sub3
v2 := v7
v3 := v7
vE := 48
v2 &= vE
v0 := vC
v1 := vD
Sub7
i := D5
vE := -16
v0 &= vE
if v0 != 0 then jump L46
: L45
sprite vC vD 4
if v2 == 48 then vD += 2
if v2 == 0 then vD += -2
if v2 == 32 then vC += 2
if v2 == 16 then vC += -2
sprite vC vD 4
return
: L46
vE := 128
v1 := delay
if v1 != 0 then jump L52
if v4 != 0 then jump L52
v1 := v0
v3 <<= v0
if vF == 0 then jump L47
v3 := v9
v3 -= vD
if vF == 0 then jump L49
if v3 != 0 then jump L48
v7 ^= vE
v3 := v8
v3 -= vC
if vF == 0 then jump L51
if v3 != 0 then jump L50
v7 ^= vE
jump L52
: L47
v3 := v8
v3 -= vC
if vF == 0 then jump L51
if v3 != 0 then jump L50
v7 ^= vE
v3 := v9
v3 -= vD
if vF == 0 then jump L49
if v3 != 0 then jump L48
v7 ^= vE
jump L52
: L48
v3 := 64
v1 &= v3
if v1 == 0 then jump L52
sprite vC vD 4
vD += 2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 48
v7 |= v2
return
: L49
v3 := 16
v1 &= v3
if v1 == 0 then jump L52
sprite vC vD 4
vD += -2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 0
v7 |= v2
return
: L50
v3 := 32
v1 &= v3
if v1 == 0 then jump L52
sprite vC vD 4
vC += 2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 32
v7 |= v2
return
: L51
v3 := 128
v1 &= v3
if v1 == 0 then jump L52
sprite vC vD 4
vC += -2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 16
v7 |= v2
return
: L52
v1 := random 0b11110000
v0 &= v1
if v0 != 0 then jump L54
: L53
v7 ^= vE
vE := 48
v7 ^= vE
v2 ^= vE
jump L45
: L54
sprite vC vD 4
v0 <<= v0
if vF == 0 then jump L55
v2 := 144
vC += -2
jump L58
: L55
v0 <<= v0
if vF == 0 then jump L56
v2 := 48
vD += 2
jump L58
: L56
v0 <<= v0
if vF == 0 then jump L57
v2 := 160
vC += 2
jump L58
: L57
v0 <<= v0
if vF == 0 then jump L53
v2 := 0
vD += -2
: L58
sprite vC vD 4
vE := 79
v7 &= vE
v7 |= v2
return
: Sub4
v0 := v7
vE := 3
v0 &= vE
v0 <<= v0
v1 := v8
v1 += v9
vE := 2
v1 &= vE
if v1 == 0 then v0 += 1
v0 <<= v0
v0 <<= v0
i := D4
i += v0
sprite v8 v9 4
vE := vF
return
: Sub5
vE := 0
loop
i := D9
i += vE
i += vE
i += vE
i += vE
load v3
i := D13
i += vE
i += vE
i += vE
i += vE
save v3
vE += 1
if vE != 128 then
again
return
: Sub6
v2 ^= v2
v3 ^= v3
vE := 15
: L60
loop
v0 := v2
v1 := v3
Sub8
v0 &= vE
v0 <<= v0
i := D8
i += v0
sprite v2 v3 2
v2 += 2
if v2 != 64 then jump L60
v2 ^= v2
v3 += 2
if v3 == 32 then return
again
: Sub7
v0 += 2
v1 += 2
: Sub8
v0 >>= v0
v1 >>= v0
v1 <<= v0
v1 <<= v0
v1 <<= v0
v1 <<= v0
i := D13
i += v1
i += v1
i += v0
load v0
return
: Sub9
i := D3
load v0
v0 >>= v0
save v0
v0 := 1
loop
if v0 key then
again
return
: Sub10
load v1
vE := 1
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 16
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L63
v5 := 39
v2 -= v5
if vF == 0 then jump L63
v0 := v2
v1 := v3
v4 += vE
again
: L63
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := -24
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L65
v5 := 3
v2 -= v5
if vF == 0 then jump L65
v0 := v2
v1 := v3
v4 += vE
again
: L65
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 100
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L67
v0 := v2
v1 := v3
v4 += vE
again
: L67
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 10
v3 -= v5
if vF == 0 then jump L69
v1 := v3
v4 += vE
again
: L69
i := hex v4
sprite v6 v7 5
v6 += 6
i := hex v1
sprite v6 v7 5
return
: Sub11
i := D1
load v1
v1 += vE
if vF != 0 then v0 += 1
i := D1
save v1
return
: Sub12
i := D1
load v3
vE := v0
vE -= v2
if vF == 0 then return
if vE != 0 then jump L70
vE := v1
vE -= v3
if vF == 0 then return
: L70
i := D2
save v1
return
: Sub13
vE ^= vE
v2 := 15
v3 := -1
v1 := 16
: L71
loop
if v2 key then jump L72
v1 += v3
if v1 != 0 then jump L71
v1 := 16
v0 += v3
if v0 != 0 then
again
return
: L72
vE := 1
return
: D1
0x0 0x0
: D2
0x0 0x0
: D3
0x5
: D4
0x0 0x50 0x70 0x20 0x0 0x50 0x70 0x20 0x0 0x60 0x30 0x60 0x0 0x60 0x30 0x60 0x0 0x30 0x60 0x30 0x0 0x30 0x60 0x30 0x0 0x20 0x70 0x50 0x0 0x20 0x70 0x50
: D5
0x0 0x20 0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 0x5 0x5 0x5 0x95 0xa 0xa 0x35 0x5 0x5 0x95 0xa 0xa 0x35 0x5 0x5 0x5 0x5 0x5 0x5 0xb5 0x5 0x5 0x95 0xa 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xf 0x8 0x8 0x8 0x8 0x8 0xf 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xf
: D10
0x3c 0x42 0x99 0x99 0x42 0x3c 0x1 0x10 0xf
: D11
0x78 0x84 0x32 0x32 0x84 0x78 0x0 0x10 0xe0
: D12
0x78 0xfc 0xfe 0xfe 0x84 0x78 0x0 0x10 0xe0
: D13
######################################################################
# INPUT: chip8/Chip-8 Games/Blinky [Hans Christian Egeberg] (alt).ch8
######################################################################
:proto L1 # 21A
:proto L6 # 260
:proto L7 # 2A4
:proto L8 # 2E4
:proto L13 # 392
:proto Sub1 # 39C
:proto L17 # 3FE
:proto L18 # 416
:proto L19 # 42E
:proto L20 # 446
:proto L21 # 45E
:proto L22 # 466
:proto L23 # 47E
:proto L24 # 49E
:proto L25 # 4B0
:proto L26 # 4B8
:proto Sub2 # 4C2
:proto L28 # 4EE
:proto L30 # 4FE
:proto L31 # 50C
:proto L32 # 518
:proto L33 # 524
:proto L34 # 52E
:proto Sub3 # 538
:proto L36 # 566
:proto L37 # 594
:proto L38 # 5B2
:proto L39 # 5CC
:proto L40 # 5E6
:proto L41 # 600
:proto L42 # 61A
:proto L44 # 62C
:proto L45 # 63A
:proto L46 # 646
:proto L47 # 652
:proto L48 # 65C
:proto Sub4 # 666
:proto Sub5 # 67A
:proto Sub6 # 69C
:proto Sub7 # 6C2
:proto Sub8 # 6C6
:proto Sub9 # 6DE
:proto L52 # 704
:proto L54 # 72C
:proto L56 # 74C
:proto L58 # 766
:proto Sub10 # 772
:proto Sub11 # 782
:proto L59 # 79A
:proto Sub12 # 7A0
:proto L61 # 7BC
:proto D1 # 7C0
:proto D2 # 7C2
:proto D3 # 7C4
:proto D4 # 7D4
:proto D5 # 7D8
:proto D6 # 7DC
:proto D7 # 7E0
:proto D8 # 800
:proto D9 # A00
:proto D10 # A0A
:proto D11 # A14
:proto D12 # A1E
: main
clear
jump L1
0x43 0x68 0x72 0x2e 0x20 0x45 0x67 0x65 0x62 0x65 0x72 0x67 0x20 0x31 0x31 0x2f 0x31 0x31 0x2d 0x27 0x39 0x30
: L1
v0 ^= v0
v1 ^= v1
i := D1
save v1
: L2
v6 := 0
v7 := 0
Sub5
: L3
vE := 64
v7 &= vE
vE := 39
v7 |= vE
v8 := 26
v9 := 12
vA := 56
vB := 0
vC := 2
vD := 26
clear
Sub6
Sub4
i := D4
sprite vA vB 4
sprite vC vD 4
loop
Sub1
if vE != 0 then jump L6
: L5
Sub2
Sub3
if v6 != -9 then
again
vE := v6
Sub10
vE := 100
Sub10
jump L2
: L6
v0 := delay
if v0 == 0 then jump L8
v0 := v8
v0 >>= v5
v0 >>= v5
v0 >>= v5
v1 := vA
v1 >>= v5
v1 >>= v5
v1 >>= v5
if v0 != v1 then jump L7
v0 := v9
v0 >>= v5
v0 >>= v5
v0 >>= v5
v1 := vB
v1 >>= v5
v1 >>= v5
v1 >>= v5
if v0 != v1 then jump L7
i := D4
sprite vA vB 4
vA := 56
vB := 0
sprite vA vB 4
vE := -13
v7 &= vE
vE := 4
v7 |= vE
vE := 50
Sub10
: L7
v0 := v8
v0 >>= v5
v0 >>= v5
v0 >>= v5
v1 := vC
v1 >>= v5
v1 >>= v5
v1 >>= v5
if v0 != v1 then jump L5
v0 := v9
v0 >>= v5
v0 >>= v5
v0 >>= v5
v1 := vD
v1 >>= v5
v1 >>= v5
v1 >>= v5
if v0 != v1 then jump L5
i := D4
sprite vC vD 4
vC := 2
vD := 26
sprite vC vD 4
vE := 207
v7 &= vE
vE := 32
v7 |= vE
vE := 25
Sub10
jump L5
: L8
v0 := 64
Sub12
vE := 64
v7 ^= vE
v0 := v7
v0 &= vE
if v0 != 0 then jump L3
vE := v6
Sub10
Sub11
clear
v6 := 17
v7 := 10
i := D2
Sub9
v6 := 17
v7 := 16
i := D1
Sub9
v4 := 0
v5 := 8
v6 := 0
v7 := 15
: L9
loop
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v0 := 3
Sub12
if vE != 0 then jump L13
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v4 += 2
v5 += 2
if v4 != 48 then
again
loop
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v0 := 3
Sub12
if vE != 0 then jump L13
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v6 += 2
if v6 != 22 then
again
loop
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v0 := 3
Sub12
if vE != 0 then jump L13
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v4 += -2
v5 += -2
if v4 != 0 then
again
loop
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v0 := 3
Sub12
if vE != 0 then jump L13
i := D9
sprite v4 v6 9
i := D10
sprite v5 v6 9
v6 += -2
if v6 != 0 then
again
jump L9
: L13
i := D10
sprite v5 v6 9
i := D11
sprite v5 v6 9
jump L1
: Sub1
v3 := v7
vE := 3
v3 &= vE
v4 := v8
v5 := v9
vE := 8
if vE key then jump L17
vE := 2
if vE key then jump L18
vE := 6
if vE key then jump L19
vE := 4
if vE key then jump L20
: L14
if v3 == 3 then v5 += 2
if v3 == 0 then v5 += -2
if v3 == 2 then v4 += 2
if v3 == 1 then v4 += -2
v0 := v4
v1 := v5
Sub7
v2 := v0
vE := 8
v0 &= vE
: L15
if v0 != 0 then jump L21
vE := 7
v0 := v2
v2 &= vE
if v2 == 5 then jump L22
if v2 == 6 then jump L23
if v2 == 7 then jump L26
: L16
Sub4
vE := -4
v7 &= vE
v7 |= v3
v8 := v4
v9 := v5
jump Sub4
: L17
v0 := v4
v1 := v5
v1 += 2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L14
v3 := 3
v5 += 2
jump L15
: L18
v0 := v4
v1 := v5
v1 += -2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L14
v3 := 0
v5 += -2
jump L15
: L19
v0 := v4
v1 := v5
v0 += 2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L14
v3 := 2
v4 += 2
jump L15
: L20
v0 := v4
v1 := v5
v0 += -2
Sub7
v2 := v0
vE := 8
v0 &= vE
if v0 != 0 then jump L14
v3 := 1
v4 += -2
jump L15
: L21
Sub4
sprite v8 v9 4
vE := vF
return
: L22
vE := -16
v0 &= vE
v0 |= v3
save v0
i := D5
sprite v4 v5 4
v6 += 1
v1 := 5
v0 := delay
if v0 == 0 then buzzer := v1
jump L16
: L23
vE := -16
v0 &= vE
v0 |= v3
save v0
i := D6
sprite v4 v5 4
v6 += 4
v0 := vA
v1 := vB
Sub7
vE := -16
v0 &= vE
if v0 != 0 then jump L24
vE := 12
v7 ^= vE
: L24
v0 := vC
v1 := vD
Sub7
vE := -16
v0 &= vE
if v0 != 0 then jump L25
vE := 48
v7 ^= vE
: L25
v0 := -1
buzzer := v0
delay := v0
jump L16
: L26
if v3 == 1 then v4 := 58
if v3 == 2 then v4 := 0
jump L16
: Sub2
v2 := v7
vE := 12
v2 &= vE
v0 := vA
v1 := vB
Sub7
i := D4
vE := -16
v0 &= vE
if v0 != 0 then jump L28
: L27
sprite vA vB 4
if v2 == 12 then vB += 2
if v2 == 0 then vB += -2
if v2 == 8 then vA += 2
if v2 == 4 then vA += -2
sprite vA vB 4
return
: L28
v1 := random 0b11110000
v0 &= v1
if v0 != 0 then jump L30
: L29
vE := 12
v7 ^= vE
v2 ^= vE
jump L27
: L30
sprite vA vB 4
v0 <<= v5
if vF == 0 then jump L31
v2 := 4
vA += -2
jump L34
: L31
v0 <<= v5
if vF == 0 then jump L32
v2 := 12
vB += 2
jump L34
: L32
v0 <<= v5
if vF == 0 then jump L33
v2 := 8
vA += 2
jump L34
: L33
v0 <<= v5
if vF == 0 then jump L29
v2 := 0
vB += -2
: L34
sprite vA vB 4
vE := -13
v7 &= vE
v7 |= v2
return
: Sub3
v2 := v7
v3 := v7
vE := 48
v2 &= vE
v0 := vC
v1 := vD
Sub7
i := D4
vE := -16
v0 &= vE
if v0 != 0 then jump L36
: L35
sprite vC vD 4
if v2 == 48 then vD += 2
if v2 == 0 then vD += -2
if v2 == 32 then vC += 2
if v2 == 16 then vC += -2
sprite vC vD 4
return
: L36
vE := 128
v1 := delay
if v1 != 0 then jump L42
v1 := v0
v3 <<= v5
if vF == 0 then jump L37
v3 := v9
v3 -= vD
if vF == 0 then jump L39
if v3 != 0 then jump L38
v7 ^= vE
v3 := v8
v3 -= vC
if vF == 0 then jump L41
if v3 != 0 then jump L40
v7 ^= vE
jump L42
: L37
v3 := v8
v3 -= vC
if vF == 0 then jump L41
if v3 != 0 then jump L40
v7 ^= vE
v3 := v9
v3 -= vD
if vF == 0 then jump L39
if v3 != 0 then jump L38
v7 ^= vE
jump L42
: L38
v3 := 64
v1 &= v3
if v1 == 0 then jump L42
sprite vC vD 4
vD += 2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 48
v7 |= v2
return
: L39
v3 := 16
v1 &= v3
if v1 == 0 then jump L42
sprite vC vD 4
vD += -2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 0
v7 |= v2
return
: L40
v3 := 32
v1 &= v3
if v1 == 0 then jump L42
sprite vC vD 4
vC += 2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 32
v7 |= v2
return
: L41
v3 := 128
v1 &= v3
if v1 == 0 then jump L42
sprite vC vD 4
vC += -2
sprite vC vD 4
v7 ^= vE
vE := 207
v7 &= vE
v2 := 16
v7 |= v2
return
: L42
v1 := random 0b11110000
v0 &= v1
if v0 != 0 then jump L44
: L43
v7 ^= vE
vE := 48
v7 ^= vE
v2 ^= vE
jump L35
: L44
sprite vC vD 4
v0 <<= v5
if vF == 0 then jump L45
v2 := 144
vC += -2
jump L48
: L45
v0 <<= v5
if vF == 0 then jump L46
v2 := 48
vD += 2
jump L48
: L46
v0 <<= v5
if vF == 0 then jump L47
v2 := 160
vC += 2
jump L48
: L47
v0 <<= v5
if vF == 0 then jump L43
v2 := 0
vD += -2
: L48
sprite vC vD 4
vE := 79
v7 &= vE
v7 |= v2
return
: Sub4
v0 := v7
vE := 3
v0 &= vE
v0 <<= v5
v0 <<= v5
i := D3
i += v0
sprite v8 v9 4
vE := vF
return
: Sub5
vE := 0
loop
i := D8
i += vE
i += vE
i += vE
i += vE
load v3
i := D12
i += vE
i += vE
i += vE
i += vE
save v3
vE += 1
if vE != 128 then
again
return
: Sub6
v2 ^= v2
v3 ^= v3
vE := 15
: L50
loop
v0 := v2
v1 := v3
Sub8
v0 &= vE
v0 <<= v5
i := D7
i += v0
sprite v2 v3 2
v2 += 2
if v2 != 64 then jump L50
v2 ^= v2
v3 += 2
if v3 == 32 then return
again
: Sub7
v0 += 2
v1 += 2
: Sub8
v0 >>= v5
v1 >>= v5
v1 <<= v5
v1 <<= v5
v1 <<= v5
v1 <<= v5
i := D12
i += v1
i += v1
i += v0
load v0
return
: Sub9
load v1
vE := 1
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 16
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L52
v5 := 39
v2 -= v5
if vF == 0 then jump L52
v0 := v2
v1 := v3
v4 += vE
again
: L52
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := -24
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L54
v5 := 3
v2 -= v5
if vF == 0 then jump L54
v0 := v2
v1 := v3
v4 += vE
again
: L54
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 100
v3 -= v5
if vF == 0 then v2 -= vE
if vF == 0 then jump L56
v0 := v2
v1 := v3
v4 += vE
again
: L56
i := hex v4
sprite v6 v7 5
v6 += 6
v4 ^= v4
v2 := v0
v3 := v1
loop
v5 := 10
v3 -= v5
if vF == 0 then jump L58
v1 := v3
v4 += vE
again
: L58
i := hex v4
sprite v6 v7 5
v6 += 6
i := hex v1
sprite v6 v7 5
return
: Sub10
i := D1
load v1
v1 += vE
if vF != 0 then v0 += 1
i := D1
save v1
return
: Sub11
i := D1
load v3
vE := v0
vE -= v2
if vF == 0 then return
if vE != 0 then jump L59
vE := v1
vE -= v3
if vF == 0 then return
: L59
i := D2
save v1
return
: Sub12
vE ^= vE
v2 := 15
v3 := -1
v1 := 16
: L60
loop
if v2 key then jump L61
v1 += v3
if v1 != 0 then jump L60
v1 := 16
v0 += v3
if v0 != 0 then
again
return
: L61
vE := 1
return
: D1
0x0 0x0
: D2
0x0 0x0
: D3
0x0 0x50 0x70 0x20 0x0 0x60 0x30 0x60 0x0 0x30 0x60 0x30 0x0 0x20 0x70 0x50
: D4
0x0 0x20 0x70 0x70
: D5
0x0 0x0 0x20 0x0
: D6
0x0 0x0 0x0 0x0
: D7
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0xc0 0x0 0x0 0x0 0x80 0x80 0x0 0x0 0xc0 0x80 0x80 0x80 0xc0 0x0 0x80 0x0
: D8
0xc 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xd 0xc 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xd 0xa 0x65 0x5 0x5 0x5 0x5 0xe5 0x5 0x5 0xe5 0x5 0x5 0x5 0x5 0xc5 0xa 0xa 0x65 0x5 0x5 0x5 0x5 0xe5 0x5 0x5 0xe5 0x5 0x5 0x5 0x5 0xc5 0xa 0xa 0x5 0xc 0x8 0x8 0xf 0x5 0xc 0xd 0x5 0x8 0x8 0x8 0xd 0x5 0xe 0xf 0x5 0xc 0x8 0x8 0xf 0x5 0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 0x65 0x5 0x95 0xc 0x8 0x8 0x8 0xd 0x5 0xc 0x8 0x8 0xf 0x5 0xa 0xa 0x75 0x5 0x5 0xc5 0xa 0x5 0x8 0x8 0x8 0x8 0x8 0x8 0xf 0x5 0x8 0xf 0x5 0x8 0x8 0x8 0x8 0x8 0x8 0xf 0x5 0xa 0x65 0x5 0x5 0xd5 0xa 0xa 0x5 0xc 0xd 0x6 0xa 0x35 0x5 0x5 0x5 0x5 0xe5 0x5 0x5 0xf5 0x5 0x5 0xf5 0x5 0x5 0xe5 0x5 0x5 0x5 0x5 0x95 0xa 0x6 0xc 0xd 0x5 0xa 0xa 0x5 0x8 0xf 0x5 0x8 0x8 0x8 0x8 0x8 0xf 0x5 0xc 0xd 0x5 0x8 0xf 0x5 0xc 0xd 0x5 0x8 0x8 0x8 0x8 0x8 0xf 0x5 0x8 0xf 0x5 0xa 0xa 0x35 0x5 0x5 0xb5 0x5 0x5 0x5 0x5 0x5 0x5 0x95 0xa 0xa 0x35 0x5 0x5 0x95 0xa 0xa 0x35 0x5 0x5 0x5 0x5 0x5 0x5 0xb5 0x5 0x5 0x95 0xa 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xf 0x8 0x8 0x8 0x8 0x8 0xf 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0xf
: D9
0x3c 0x42 0x99 0x99 0x42 0x3c 0x1 0x10 0xf 0x0
: D10
0x78 0x84 0x32 0x32 0x84 0x78 0x0 0x10 0xe0 0x0
: D11
0x78 0xfc 0xfe 0xfe 0x84 0x78 0x0 0x10 0xe0 0x0
: D12
######################################################################
# INPUT: chip8/Chip-8 Games/Blitz [David Winter].ch8
######################################################################
:proto L1 # 217
:proto L5 # 249
:proto L8 # 281
:proto L9 # 287
:proto L11 # 2AB
:proto L12 # 2B9
:proto L13 # 2BB
:proto L14 # 2C1
:proto Sub1 # 2D9
:proto D1 # 307
:proto D2 # 31B
:proto D3 # 31E
:proto D4 # 320
:proto D5 # 341
:proto D6 # 387
: main
jump L1
0x42 0x4c 0x49 0x54 0x5a 0x20 0x42 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
i := D5
v0 := 4
v1 := 9
v2 := 14
v7 := 4
loop
sprite v0 v1 14
i += v2
v0 += 12
if v0 != 64 then
again
v0 := key
: L3
clear
Sub1
v0 := key
clear
vE := v7
i := D3
: L4
loop
vB := 31
vC := random 0b11111
vC += vC
sprite vC vB 2
if vF != 1 then jump L5
sprite vC vB 2
again
: L5
vA := random 0b111
vA += 1
loop
vB += -2
sprite vC vB 2
vA += -1
if vA != 0 then
again
vE += -1
if vE != 0 then jump L4
vB := 0
vC := v7
vD := 0
vE := 0
: L7
i := D2
sprite vD vE 3
if vF != 0 then jump L14
if vB != 0 then jump L8
v0 := 5
if v0 -key then jump L9
vB := 1
v8 := vD
v8 += 2
v9 := vE
v9 += 3
: L8
i := D3
sprite v8 v9 1
v1 := vF
: L9
v0 := 5
delay := v0
loop
v0 := delay
if v0 != 0 then
again
if vB != 1 then jump L11
i := D3
if v1 != 1 then sprite v8 v9 1
v9 += 1
if v9 != 32 then jump L11
vB := 0
if v1 != 0 then vC += -1
if vC == 0 then jump L13
: L11
i := D2
sprite vD vE 3
vD += 2
if vD != 64 then jump L12
vD := 0
vE += 1
: L12
jump L7
: L13
clear
v7 += 2
jump L3
: L14
i := D2
sprite vD vE 3
v0 := 20
v1 := 2
v2 := 11
i := D4
loop
sprite v0 v1 11
i += v2
v0 += 8
if v0 != 44 then
again
loop
again
: Sub1
v0 := 10
v1 := 13
v2 := 5
i := D1
loop
sprite v0 v1 5
i += v2
v0 += 8
if v0 != 42 then
again
v0 := v7
v0 += -2
v0 >>= v0
i := D6
bcd v0
load v2
v0 := 45
i := hex v1
v1 := 13
sprite v0 v1 5
v0 += 5
i := hex v2
sprite v0 v1 5
return
: D1
0x83 0x82 0x83 0x82 0xfb 0xe8 0x8 0x88 0x5 0xe2 0xbe 0xa0 0xb8 0x20 0x3e 0x80 0x80 0x80 0x80 0xf8
: D2
0x80 0xf8 0xfc
: D3
0xc0 0xc0
: D4
0xf9 0x81 0xdb 0xcb 0xfb 0x0 0xfa 0x8a 0x9a 0x99 0xf8 0xef 0x2a 0xe8 0x29 0x29 0x0 0x6f 0x68 0x2e 0x4c 0x8f 0xbe 0xa0 0xb8 0xb0 0xbe 0x0 0xbe 0x22 0x3e 0x34 0xb2
: D5
0xd8 0xd8 0x0 0xc3 0xc3 0x0 0xd8 0xd8 0x0 0xc3 0xc3 0x0 0xd8 0xd8 0xc0 0xc0 0x0 0xc0 0xc0 0x0 0xc0 0xc0 0x0 0xc0 0xc0 0x0 0xdb 0xdb 0xdb 0xdb 0x0 0x18 0x18 0x0 0x18 0x18 0x0 0x18 0x18 0x0 0xdb 0xdb 0xdb 0xdb 0x0 0x18 0x18 0x0 0x18 0x18 0x0 0x18 0x18 0x0 0x18 0x18 0xdb 0xdb 0x0 0x3 0x3 0x0 0x18 0x18 0x0 0xc0 0xc0 0x0 0xdb 0xdb
: D6
######################################################################
# INPUT: chip8/Chip-8 Games/Bowling [Gooitzen van der Wal].ch8
######################################################################
:proto L3 # 246
:proto L10 # 2EA
:proto L11 # 2F4
:proto L12 # 2FE
:proto L13 # 312
:proto L14 # 314
:proto L17 # 344
:proto L19 # 35A
:proto L21 # 36E
:proto Sub1 # 376
:proto L28 # 406
:proto L29 # 410
:proto L30 # 414
:proto L31 # 418
:proto L32 # 41C
:proto L33 # 41E
:proto L34 # 420
:proto L35 # 422
:proto L38 # 458
:proto L39 # 45C
:proto L40 # 466
:proto L43 # 47A
:proto L44 # 484
:proto L45 # 486
:proto L46 # 488
:proto Sub2 # 48E
:proto L49 # 49E
:proto D1 # 4A9
:proto L50 # 4AE
:proto L51 # 4CE
:proto L52 # 4F6
:proto L53 # 4F8
:proto L54 # 514
:proto L55 # 516
:proto L56 # 518
:proto L57 # 51A
:proto L58 # 51C
:proto L59 # 51E
:proto L60 # 520
:proto L61 # 522
:proto L63 # 530
:proto L64 # 53A
:proto L65 # 550
:proto Sub3 # 55E
:proto Sub4 # 57A
:proto Sub5 # 590
:proto Sub6 # 596
:proto Sub7 # 598
:proto L66 # 5AA
:proto L67 # 5AC
:proto L68 # 5B0
:proto Sub8 # 5B4
:proto Sub9 # 5B6
:proto Sub10 # 5BC
:proto Sub11 # 5C6
:proto Sub13 # 5DE
:proto Sub14 # 5E0
:proto Sub15 # 5EA
:proto Sub16 # 5EE
:proto L72 # 5F0
:proto Sub17 # 5F4
:proto Sub18 # 608
:proto Sub19 # 614
:proto Sub20 # 626
:proto D2 # 642
:proto D3 # 647
:proto D4 # 64A
:proto D5 # 64D
:proto D6 # 652
:proto D7 # 656
:proto D8 # 658
:proto D9 # 65A
:proto D10 # 65F
:proto D11 # 664
:proto D12 # 66B
:proto D13 # 66F
:proto D14 # 675
:proto D15 # 67C
:proto D16 # 684
:proto D17 # 685
:proto D18 # 68A
:proto D19 # 690
:proto D20 # 694
:proto D21 # 696
:proto D22 # 6A6
:proto D23 # 6A7
:proto D24 # 6A8
: main
v3 := 20
v4 := 0
Sub3
v0 := 5
Sub8
v3 := 12
loop
Sub10
v9 := 6
v9 -= vB
if vB != 0 then if vF == 0 then
again
i := hex vB
sprite v6 v4 5
vD := vB
vD += 9
v3 := 20
v4 := 12
Sub4
v0 := 5
Sub8
v3 := 12
loop
Sub10
v9 := 9
v9 -= vB
if vF == 0 then
again
i := hex vB
sprite v3 v4 5
if vB != 0 then jump L3
vB := 10
v3 := 7
v0 := 1
Sub8
: L3
v0 := vB
i := D22
save v0
vE := 0
v3 := 20
v4 := 24
v0 := 5
Sub8
i := D4
Sub9
v0 := 14
Sub8
Sub8
v0 := 13
Sub8
v3 := 12
loop
Sub10
v9 := 3
v9 -= vB
if vB != 0 then if vF == 0 then
again
i := hex vB
sprite v3 v4 5
v0 := 0
if vB == 2 then v0 := 4
if vB == 1 then v0 := 8
i := D1
save v0
Sub13
i := D20
v0 := 0
v1 := 0
loop
save v0
v1 += 1
if v1 != 18 then
again
: L6
vC := 10
vE += 1
loop
Sub18
vA := 0
Sub1
v3 := 0
v4 := 16
Sub3
Sub11
v0 := vC
Sub8
v3 := 2
v4 := 27
Sub4
Sub11
v0 := vE
Sub6
v3 := 48
v4 := 0
i := D15
sprite v3 v4 9
v3 += 8
sprite v3 v4 9
i := D21
i += vC
load v0
v4 := 1
if v0 != 1 then jump L10
v3 := 57
i := D13
sprite v3 v4 7
: L8
i := D23
load v0
v3 := 50
v4 := 2
Sub8
jump L11
: L9
v3 := 58
v4 := 2
i := hex vB
sprite v3 v4 5
jump L8
: L10
if v0 == 0 then jump L9
v3 := 49
i := D14
sprite v3 v4 7
: L11
Sub13
if vC == vD then jump L12
vC += 1
again
: L12
clear
v3 := 0
v4 := 0
Sub4
Sub11
v0 := vE
if v0 != 14 then jump L13
Sub8
jump L14
: L13
Sub6
: L14
vC := 10
: L15
v3 := 0
v4 += 9
loop
v0 := vC
Sub8
Sub11
i := D18
i += vC
load v0
v5 := v0
i := D19
i += vC
load v0
Sub7
Sub17
if vC == vD then jump L17
vC += 1
v9 := 36
v9 -= v3
if vF != 1 then jump L15
v3 := 37
again
: L17
v3 := 55
v4 := 0
if vE == 14 then loop
again
i := D22
load v0
if vE == v0 then jump L19
Sub6
v9 := key
jump L6
: L19
v9 := key
vE := 14
vC := 10
loop
Sub18
if v0 == 0 then jump L21
vA := 0
if v0 == 1 then vA := 1
Sub1
: L21
if vC == vD then jump L12
vC += 1
again
: Sub1
Sub13
clear
i := D16
v2 := 0
: L22
v1 := 0
loop
sprite v1 v2 1
v1 += 8
if v1 != 64 then
again
v2 += 31
if v2 == 31 then jump L22
i := D17
v1 := 0
v2 := 1
sprite v1 v2 15
v2 := 16
sprite v1 v2 15
: L24
i := D3
v1 := 39
v2 := 14
sprite v1 v2 4
v1 := 45
v2 := 10
Sub5
sprite v1 v2 4
v1 := 51
v2 := 6
Sub5
Sub5
sprite v1 v2 4
v1 := 57
v2 := 2
Sub5
Sub5
Sub5
sprite v1 v2 4
: L25
vB := 0
i := D2
v1 := 1
v2 := 14
: L26
v3 := 26
v4 := 1
: L27
loop
sprite v1 v2 5
v8 := 34
v9 := 2
v5 := 1
if v5 key then jump L29
v5 := 2
if v5 key then jump L30
v5 := 3
if v5 key then jump L31
v5 := 5
if v5 key then jump L32
v5 := 7
if v5 key then jump L35
v5 := 8
if v5 key then jump L34
v5 := 9
if v5 key then jump L33
sprite v1 v2 5
if v2 == v3 then jump L28
v2 += v4
jump L27
: L28
if v4 != 1 then jump L26
v3 := 1
v4 := -1
again
: L29
v9 += -4
jump L35
: L30
v9 += -4
jump L34
: L31
v9 += -4
jump L33
: L32
v9 += -2
: L33
v8 += 9
: L34
v8 += 9
: L35
Sub16
Sub2
i := D19
i += vC
load v0
v8 := v0
i := D21
i += vC
load v0
v9 := v0
if vA != 0 then jump L40
if v9 == 3 then jump L38
if v9 != 0 then jump L39
: L36
Sub20
if vB == 10 then jump L44
: L37
Sub19
i := D23
v0 := vB
save v0
vA += 1
if vB != 10 then jump L25
jump L24
: L38
Sub20
v9 += -1
: L39
Sub20
v9 += -1
if vE != 14 then jump L36
jump L37
: L40
if v9 == 1 then jump L43
: L41
Sub20
i := D23
load v0
v0 += vB
if v0 == 10 then jump L45
: L42
Sub13
jump L46
: L43
Sub20
v9 += -1
if vE != 14 then jump L41
jump L42
: L44
v9 += 1
: L45
v9 += 1
: L46
Sub19
clear
return
: Sub2
v3 := 0
vF := 0
loop
if vF != 0 then jump L50
sprite v1 v2 5
: L48
if v1 != v8 then jump L49
v3 := v9
: L49
v1 += 3
v2 += v3
if v1 == 61 then return
sprite v1 v2 5
0x60 : D1 0x0 # SMC: v0 := 0
Sub14
again
: L50
sprite v1 v2 5
v6 := 39
v7 := 2
v4 := 42
v4 -= v1
if vF != 0 then jump L53
v4 := 48
v4 -= v1
if vF != 0 then jump L51
v4 := 54
v4 -= v1
if vF != 0 then jump L52
v6 += 12
: L51
v6 += 6
if v2 == 0 then jump L54
v4 := 5
v4 -= v2
if vF != 0 then jump L61
v4 := 13
v4 -= v2
if vF != 0 then jump L59
v4 := 21
v4 -= v2
if vF != 0 then jump L57
v4 := 26
v4 -= v2
if vF != 0 then jump L55
jump L54
: L52
v6 += 12
: L53
if v2 == 0 then jump L54
v4 := 9
v4 -= v2
if vF != 0 then jump L60
v4 := 17
v4 -= v2
if vF != 0 then jump L58
v4 := 25
v4 -= v2
if vF != 0 then jump L56
: L54
jump Sub16
: L55
v7 += 4
: L56
v7 += 4
: L57
v7 += 4
: L58
v7 += 4
: L59
v7 += 4
: L60
v7 += 4
: L61
loop
i := D3
sprite v6 v7 4
if vF != 0 then jump L63
sprite v6 v7 4
: L62
i := D2
jump L48
: L63
vB += 1
Sub15
v0 := random 0b111
v0 += v0
jump0 L64
: L64
jump L65
0x15 0x4e 0x15 0x4a 0x15 0x48 0x15 0x50 0x15 0x4e 0x15 0x4a 0x77 0x10 0x77 0xf8 0x15 0x54 0x77 0x8
: L65
v7 += -4
v6 += 6
v4 := 27
v4 -= v7
if vF != 0 then
again
jump L62
: Sub3
i := D4
Sub9
i := D5
sprite v3 v4 5
v3 += 4
v0 := 10
Sub8
i := D6
sprite v3 v4 5
v3 += 4
v0 := 14
Sub8
i := D9
jump Sub9
: Sub4
v0 := 15
Sub8
i := D9
Sub9
v0 := 10
Sub8
i := D10
sprite v3 v4 5
v3 += 6
v0 := 14
jump Sub8
: Sub5
sprite v1 v2 4
v2 += 8
return
: Sub6
v5 := 0
: Sub7
i := D24
bcd v0
load v2
v0 := v5
if v0 != 0 then jump L66
if v1 != 0 then jump L67
jump L68
: L66
Sub8
: L67
v0 := v1
Sub8
: L68
v0 := v2
jump Sub8
: Sub8
i := hex v0
: Sub9
sprite v3 v4 5
v3 += 5
return
: Sub10
i := D11
sprite v3 v4 7
vB := key
sprite v3 v4 7
return
: Sub11
i := D12
sprite v3 v4 4
v3 += 2
return
: L69
i := D7
: L70
sprite v3 v4 2
v3 += 3
return
: Sub12
i := D8
jump L70
0x60 0x40 0x15 0xe0
: Sub13
v0 := 160
: Sub14
delay := v0
loop
v0 := delay
if v0 != 0 then
again
return
: Sub15
v0 := 1
jump L72
: Sub16
v0 := 8
: L72
buzzer := v0
return
: Sub17
i := D21
i += vC
load v0
if v0 == 0 then return
if v0 == 1 then jump L69
if v0 == 3 then Sub12
jump Sub12
: Sub18
clear
i := hex vC
v3 := 30
v4 := 13
Sub9
jump Sub17
: Sub19
i := D19
i += vC
v0 := v8
save v0
i := D21
i += vC
v0 := v9
save v0
return
: Sub20
v8 += vB
v0 := 99
v0 -= v8
if vF != 0 then return
i := D18
i += vC
load v0
v0 += 1
i := D18
i += vC
save v0
v8 += 156
return
: D2
0xf8 0xf8 0xf8 0xf8 0xf8
: D3
0xf0 0x90 0x90
: D4
0xf0 0x90 0xf0
: D5
0x80 0x80 0x80 0x80 0xe0
: D6
0xa0 0xa0 0xe0 0x40
: D7
0x40 0x80
: D8
0xc0 0xc0
: D9
0xf0 0x90 0xf0 0xa0 0x90
: D10
0xd8 0xa8 0x88 0x88 0x88
: D11
0xf0 0x90 0x10 0x70 0x40 0x0 0x70
: D12
0x0 0x80 0x0 0x80
: D13
0x0 0x4 0xc 0x1c 0x3c 0x7c
: D14
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc
: D15
0xff 0x81 0x81 0x81 0x81 0x81 0x81 0x81
: D16
0xff
: D17
0x80 0x80 0x80 0x80 0x80
: D18
0x80 0x80 0x80 0x80 0x80 0x80
: D19
0x80 0x80 0x80 0x80
: D20
0x0 0x0
: D21
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D22
0x0
: D23
0x0
: D24
0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Breakout (Brix hack) [David Winter, 1997].ch8
######################################################################
:proto L7 # 2AA
:proto L8 # 2AC
:proto L9 # 2CA
:proto L10 # 2DE
:proto L11 # 2E0
:proto L12 # 2E8
:proto L13 # 2EE
:proto Sub1 # 2F6
:proto D1 # 30C
:proto D2 # 30E
:proto D3 # 310
:proto D4 # 312
:proto D5 # 314
: main
vE := 5
v5 := 0
vB := 6
: L1
vA := 0
loop
i := D1
sprite vA vB 1
vA += 4
if vA != 64 then
again
vB += 2
if vB != 18 then jump L1
vC := 32
vD := 31
i := D3
sprite vC vD 1
Sub1
v0 := 0
v1 := 0
i := D4
sprite v0 v1 1
v0 += 8
i := D2
sprite v0 v1 1
: L3
v0 := 64
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v6 := random 0b1111
v7 := 30
v8 := 1
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D3
sprite vC vD 1
v0 := 4
if v0 key then vC += -2
v0 := 6
if v0 key then vC += 2
v0 := 63
vC &= v0
sprite vC vD 1
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v7 == 31 then jump L8
: L6
if v6 == 0 then v8 := 1
if v6 == 63 then v8 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
if vF != 1 then jump L7
if v7 == 31 then jump L7
v0 := 5
v0 -= v7
if vF != 0 then jump L7
v0 := 1
buzzer := v0
v0 := v6
v1 := -4
v0 &= v1
i := D1
sprite v0 v7 1
v0 := -2
v9 ^= v0
Sub1
v5 += 1
Sub1
if v5 == 96 then jump L10
: L7
again
: L8
v9 := -1
v0 := v6
v0 -= vC
if vF != 1 then jump L9
v1 := 2
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L13
v0 -= v1
if vF != 1 then jump L12
: L9
v0 := 32
buzzer := v0
i := D2
vE += -1
v0 := vE
v0 += v0
v1 := 0
sprite v0 v1 1
if vE != 0 then jump L3
: L10
loop
again
: L11
v8 += -1
if v8 == -2 then v8 := -1
jump L13
: L12
v8 += 1
if v8 == 2 then v8 := 1
: L13
v0 := 4
buzzer := v0
v9 := -1
jump L6
: Sub1
i := D5
bcd v5
load v2
i := hex v1
v3 := 55
v4 := 0
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
: D1
0xf0 0x0
: D2
0x80 0x0
: D3
0xfc 0x0
: D4
0xaa 0x0
: D5
0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Breakout [Carmelo Cortez, 1979].ch8
######################################################################
:proto L6 # 288
:proto L7 # 298
:proto L8 # 2A4
:proto L9 # 2AA
:proto D1 # 2CA
:proto D2 # 2CB
:proto D3 # 2CC
:proto D4 # 2CD
:proto L11 # 2CE
:proto D5 # 2DE
:proto D6 # 2E3
:proto D7 # 2F0
: main
i := D3
vA := 6
v1 := 3
: L1
vB := 8
v0 := 0
loop
sprite v0 v1 1
v0 += 8
vB += -1
if vB != 0 then
again
v1 += 2
vA += -1
if vA != 0 then jump L1
v6 := 0
v7 := 20
i := D4
v0 := 32
v1 := 30
sprite v0 v1 1
: L3
v3 := 29
v2 := 63
v2 &= v0
v7 += -1
if v7 == 0 then jump L9
vF := key
: L4
i := D2
sprite v2 v3 1
v5 := -1
v4 := random 0b1
if v4 != 1 then v4 := -1
: L5
loop
i := D4
vC := 0
vE := 4
if vE key then vC := -2
vE := 6
if vE key then vC := 2
sprite v0 v1 1
v0 += vC
sprite v0 v1 1
if vF == 1 then jump L7
if v2 == 0 then v4 := 1
if v2 == 63 then v4 := -1
if v3 == 0 then jump L11
if v3 == 31 then jump L8
i := D2
sprite v2 v3 1
v2 += v4
v3 += v5
sprite v2 v3 1
if vF != 1 then jump L5
if v3 == 30 then jump L7
vA := 2
buzzer := vA
v6 += 1
i := D1
jump L6
: L6
sprite v2 v3 1
v4 := random 0b1
if v4 != 1 then v4 := -1
v5 := random 0b1
if v5 != 1 then v5 := 1
again
: L7
vA := 3
buzzer := vA
i := D2
sprite v2 v3 1
v3 += -1
jump L4
: L8
i := D2
sprite v2 v3 1
jump L3
: L9
i := D4
sprite v0 v1 1
i := D7
bcd v6
load v2
v3 := 24
v4 := 27
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
loop
again
: D1
0xf0
: D2
0x80
: D3
0xff
: D4
0xff
: L11
i := D5
v3 := 21
v2 := 16
sprite v3 v2 5
i := D6
v3 := 29
sprite v3 v2 5
jump L9
: D5
0xee 0x8a 0xce 0x8c 0x8a
: D6
0xee 0x88 0xcc 0x88 0xee 0 0 0 0 0 0 0 0
: D7
######################################################################
# INPUT: chip8/Chip-8 Games/Brick (Brix hack, 1990).ch8
######################################################################
:proto L8 # 2AA
:proto L9 # 2AC
:proto L10 # 2CA
:proto L12 # 2E0
:proto L13 # 2E8
:proto L14 # 2EE
:proto Sub1 # 2F6
:proto D1 # 30C
:proto D2 # 30E
:proto D3 # 310
:proto D4 # 312
:proto D5 # 314
:proto L15 # 318
: main
vE := 5
v5 := 0
: L1
vB := 6
: L2
vA := 0
loop
i := D1
sprite vA vB 1
vA += 4
if vA != 64 then
again
vB += 1
if vB != 18 then jump L2
vC := 32
vD := 31
i := D3
sprite vC vD 1
Sub1
v0 := 0
v1 := 0
i := D4
sprite v0 v1 1
v0 += 8
i := D2
sprite v0 v1 1
: L4
v0 := 64
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v6 := random 0b1111
v7 := 30
v8 := 1
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D3
sprite vC vD 1
v0 := 4
if v0 key then vC += -2
v0 := 6
if v0 key then vC += 2
v0 := 63
vC &= v0
sprite vC vD 1
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v7 == 31 then jump L9
: L7
if v6 == 0 then v8 := 1
if v6 == 63 then v8 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
if vF != 1 then jump L8
if v7 == 31 then jump L8
v0 := 5
v0 -= v7
if vF != 0 then jump L8
v0 := 1
buzzer := v0
v0 := v6
v1 := -4
v0 &= v1
i := D1
sprite v0 v7 1
v0 := -2
v9 ^= v0
Sub1
v5 += 1
Sub1
if v5 == 192 then jump L15
: L8
again
: L9
v9 := -1
v0 := v6
v0 -= vC
if vF != 1 then jump L10
v1 := 2
v0 -= v1
if vF != 1 then jump L12
v0 -= v1
if vF != 1 then jump L14
v0 -= v1
if vF != 1 then jump L13
: L10
v0 := 32
buzzer := v0
i := D2
vE += -1
v0 := vE
v0 += v0
v1 := 0
sprite v0 v1 1
if vE != 0 then jump L4
loop
again
: L12
v8 += -1
if v8 == -2 then v8 := -1
jump L14
: L13
v8 += 1
if v8 == 2 then v8 := 1
: L14
v0 := 4
buzzer := v0
v9 := -1
jump L7
: Sub1
i := D5
bcd v5
load v2
i := hex v1
v3 := 55
v4 := 0
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
: D1
0xf0 0x0
: D2
0x80 0x0
: D3
0xfc 0x0
: D4
0xaa 0x0
: D5
0x0 0x0 0x0 0x0
: L15
vE := 5
clear
jump L1
######################################################################
# INPUT: chip8/Chip-8 Games/Brix [Andreas Gustafsson, 1990].ch8
######################################################################
:proto L7 # 2AA
:proto L8 # 2AC
:proto L9 # 2CA
:proto L10 # 2DE
:proto L11 # 2E0
:proto L12 # 2E8
:proto L13 # 2EE
:proto Sub1 # 2F6
:proto D1 # 30C
:proto D2 # 30E
:proto D3 # 310
:proto D4 # 312
:proto D5 # 314
: main
vE := 5
v5 := 0
vB := 6
: L1
vA := 0
loop
i := D1
sprite vA vB 1
vA += 4
if vA != 64 then
again
vB += 2
if vB != 18 then jump L1
vC := 32
vD := 31
i := D3
sprite vC vD 1
Sub1
v0 := 0
v1 := 0
i := D4
sprite v0 v1 1
v0 += 8
i := D2
sprite v0 v1 1
: L3
v0 := 64
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v6 := random 0b1111
v7 := 30
v8 := 1
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D3
sprite vC vD 1
v0 := 4
if v0 key then vC += -2
v0 := 6
if v0 key then vC += 2
v0 := 63
vC &= v0
sprite vC vD 1
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v7 == 31 then jump L8
: L6
if v6 == 0 then v8 := 1
if v6 == 63 then v8 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
if vF != 1 then jump L7
if v7 == 31 then jump L7
v0 := 5
v0 -= v7
if vF != 0 then jump L7
v0 := 1
buzzer := v0
v0 := v6
v1 := -4
v0 &= v1
i := D1
sprite v0 v7 1
v0 := -2
v9 ^= v0
Sub1
v5 += 1
Sub1
if v5 == 96 then jump L10
: L7
again
: L8
v9 := -1
v0 := v6
v0 -= vC
if vF != 1 then jump L9
v1 := 2
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L13
v0 -= v1
if vF != 1 then jump L12
: L9
v0 := 32
buzzer := v0
i := D2
vE += -1
v0 := vE
v0 += v0
v1 := 0
sprite v0 v1 1
if vE != 0 then jump L3
: L10
loop
again
: L11
v8 += -1
if v8 == -2 then v8 := -1
jump L13
: L12
v8 += 1
if v8 == 2 then v8 := 1
: L13
v0 := 4
buzzer := v0
v9 := -1
jump L6
: Sub1
i := D5
bcd v5
load v2
i := hex v1
v3 := 55
v4 := 0
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
: D1
0xe0 0x0
: D2
0x80 0x0
: D3
0xfc 0x0
: D4
0xaa 0x0
: D5
0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Cave.ch8
######################################################################
:proto D1 # 20A
:proto L1 # 20C
:proto L3 # 21A
:proto D2 # 21E
:proto L4 # 22C
:proto D3 # 23A
:proto L5 # 248
:proto D4 # 250
:proto L6 # 25E
:proto D5 # 266
:proto L7 # 274
:proto D7 # 281
:proto Sub1 # 29E
:proto L10 # 2A4
:proto L11 # 2A6
:proto L13 # 2AE
:proto Sub2 # 2D0
:proto D8 # 2FE
:proto L14 # 30A
:proto L15 # 318
:proto L17 # 35E
:proto L18 # 364
:proto L19 # 372
:proto Sub3 # 38A
:proto Sub4 # 3B8
:proto Sub5 # 3E0
:proto Sub6 # 418
:proto Sub7 # 478
:proto Sub8 # 4E6
:proto Sub9 # 510
:proto L21 # 53A
:proto D9 # 544
:proto L22 # 55C
: main
clear
v4 := 0
v5 := 0
i := D1
jump L1
: D1
0xcc 0x33
: L1
v6 := 30
loop
sprite v4 v5 2
sprite v4 v6 2
v4 += 8
if v4 == 64 then jump L3
again
: L3
i := D2
jump L4
: D2
0xff 0xff 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xff 0xff
: L4
v4 := 13
v5 := 9
sprite v4 v5 14
v4 += 10
i := D3
sprite v4 v5 14
jump L5
: D3
0xff 0xff 0xc3 0xc3 0xc3 0xc3 0xc3 0xff 0xff 0xc3 0xc3 0xc3 0xc3 0xc3
: L5
v4 += 10
i := D4
sprite v4 v5 14
jump L6
: D4
0xc3 0xc3 0xc3 0xc3 0xc3 0x66 0x66 0x66 0x66 0x66 0x3c 0x3c 0x18 0x18
: L6
v4 += 10
i := D5
sprite v4 v5 14
jump L7
: D5
0xff 0xff 0xc0 0xc0 0xc0 0xc0 0xff 0xff 0xc0 0xc0 0xc0 0xc0 0xff 0xff
: L7
vA := 1
vB := 4
vC := 14
vD := 0
i := D7
jump L11
: D6
0x80
: D7
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
: L8
clear
v4 := 0
v5 := 0
loop
sprite v4 v5 8
v4 += 8
if v4 == 64 then Sub1
if v5 == 32 then jump L10
again
: Sub1
v4 := 0
v5 += 8
return
: L10
jump L13
: L11
v0 := 15
loop
if v0 -key then
again
jump L8
: L13
if vA == 1 then Sub2
if vA == 2 then Sub3
if vA == 3 then Sub4
if vA == 4 then Sub5
if vA == 5 then Sub6
if vA == 6 then Sub7
if vA == 7 then Sub8
if vA == 8 then Sub9
jump L15
: Sub2
i := D7
v4 := 2
v5 := 2
sprite v4 v5 8
v5 := 10
sprite v4 v5 8
v5 := 18
sprite v4 v5 8
v4 := 10
v5 := 5
sprite v4 v5 3
v4 := 18
sprite v4 v5 3
v4 := 26
sprite v4 v5 3
v4 := 34
sprite v4 v5 3
v4 := 42
sprite v4 v5 3
v4 := 50
sprite v4 v5 3
i := D8
jump L14
: D8
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc
: L14
v5 += 3
v4 += 2
sprite v4 v5 12
v4 += 6
v5 += 9
sprite v4 v5 3
return
: L15
i := D6
sprite vB vC 1
if vF == 1 then jump L19
v0 := 2
if v0 key then vD := 2
v0 := 4
if v0 key then vD := 4
v0 := 6
if v0 key then vD := 6
v0 := 8
if v0 key then vD := 8
sprite vB vC 1
if vD == 2 then vC += -1
if vD == 4 then vB += -1
if vD == 6 then vB += 1
if vD == 8 then vC += 1
if vB == 64 then jump L17
if vB == -1 then jump L18
v0 := 2
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L15
: L17
vA += 1
if vA == 9 then jump L21
: L18
vB := 1
i := D7
jump L8
0x7a 0xff 0x6b 0x3e 0xa2 0x81 0x12 0x8a
: L19
v0 := 3
buzzer := v0
v0 := 15
loop
if v0 -key then
again
vA := 1
vB := 4
vC := 14
vD := 0
i := D7
clear
jump L8
: Sub3
v4 := 0
v5 := 17
i := D7
sprite v4 v5 3
v4 += 8
sprite v4 v5 3
v4 += 8
v5 += -1
sprite v4 v5 3
v4 += 8
v5 += -1
sprite v4 v5 3
v4 += 8
sprite v4 v5 3
v4 += 8
sprite v4 v5 3
v4 += 8
v5 += 1
sprite v4 v5 3
v4 += 8
v5 += 1
sprite v4 v5 3
return
: Sub4
v4 := 0
v5 := 17
i := D7
sprite v4 v5 3
v4 += 8
sprite v4 v5 3
v4 += 8
v5 += 2
sprite v4 v5 2
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
return
: Sub5
v4 := 0
v5 := 19
i := D7
sprite v4 v5 1
i := D6
v4 += 8
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 2
v4 += 8
v5 += -1
sprite v4 v5 3
v4 += 8
sprite v4 v5 4
v4 += 8
v5 += -1
sprite v4 v5 6
v4 += 8
v5 += -1
sprite v4 v5 8
return
: Sub6
v4 := 0
v5 := 18
i := D7
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
v4 += 8
sprite v4 v5 8
i := D6
v5 += -1
v4 += 32
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v5 += -1
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
return
: Sub7
v4 := 0
v5 := 9
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
i := D6
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
sprite v4 v5 1
v5 += 1
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
return
: Sub8
v4 := 0
v5 := 26
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
return
: Sub9
v4 := 0
v5 := 25
i := D7
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v5 += -1
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
v4 += 8
sprite v4 v5 1
return
: L21
clear
v7 := 3
v8 := 3
i := D9
jump L22
: D9
0xae 0xaa 0xea 0x4a 0x4e 0x0
: D10
0xa4 0xa4 0xa4 0xa5 0xe2 0x0
: D11
0x5d 0x55 0x55 0x55 0x9d 0x0
: D12
0xc8 0x48 0x48 0x40 0x48 0x0
: L22
sprite v7 v8 5
i := D10
v7 += 8
sprite v7 v8 5
v7 += 8
i := D11
sprite v7 v8 5
v7 += 8
i := D12
sprite v7 v8 5
loop
again
######################################################################
# INPUT: chip8/Chip-8 Games/Coin Flipping [Carmelo Cortez, 1978].ch8
######################################################################
:proto Sub1 # 242
:proto D1 # 262
:proto D2 # 267
:proto D3 # 2F0
: main
vE := 0
vD := 0
vC := 50
: L1
i := D1
v6 := 5
v7 := 0
sprite v6 v7 5
i := D2
v6 := 54
sprite v6 v7 5
i := D3
bcd vE
v3 := 0
Sub1
i := D3
bcd vD
v3 := 50
Sub1
vB := random 0b1
if vB == 0 then vE += 1
if vB == 1 then vD += 1
if vC == 0 then loop
again
vA := 16
delay := vA
loop
vA := delay
if vA != 0 then
again
vC += -1
clear
jump L1
: Sub1
v5 := 9
load v2
i := hex v0
sprite v3 v5 5
v3 += 5
i := hex v1
sprite v3 v5 5
v3 += 5
i := hex v2
sprite v3 v5 5
if vB == 0 then v8 := 1
if vB == 1 then v8 := 2
buzzer := v8
return
: D1
0x88 0x88 0xf8 0x88 0x88
: D2
0xf8 0x20 0x20 0x20 0x20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D3
######################################################################
# INPUT: chip8/Chip-8 Games/Connect 4 [David Winter].ch8
######################################################################
:proto L1 # 21A
:proto L4 # 26A
:proto L5 # 27A
:proto L6 # 27E
:proto L7 # 298
:proto D1 # 29E
:proto D2 # 29F
:proto D3 # 2A1
:proto D4 # 2A5
:proto D5 # 2B4
:proto D6 # 2BB
: main
jump L1
0x43 0x4f 0x4e 0x4e 0x45 0x43 0x54 0x34 0x20 0x62 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
i := D6
load v6
i := D5
save v6
v9 := 0
v8 := 1
vB := 0
vD := 15
vE := 31
i := D4
v0 := 13
v1 := 50
v2 := 0
loop
sprite v0 v2 15
sprite v1 v2 15
v2 += 15
if v2 != 30 then
again
sprite v0 v2 1
sprite v1 v2 1
v2 += 1
v0 := 10
i := D2
sprite v0 v2 1
sprite v1 v2 1
i := D2
sprite vD vE 1
: L3
loop
vC := key
sprite vD vE 1
if vC == 5 then jump L6
if vC != 4 then jump L4
vB += -1
vD += -5
if vD != 10 then jump L5
vB := 6
vD := 45
jump L5
: L4
if vC != 6 then jump L7
vB += 1
vD += 5
if vD != 50 then jump L5
vB := 0
vD := 15
: L5
sprite vD vE 1
jump L3
: L6
i := D5
i += vB
load v0
if v0 == -4 then jump L7
vA := v0
v0 += -5
save v0
v9 ^= v8
i := D1
if v9 != 0 then i := D3
sprite vD vA 4
: L7
i := D2
sprite vD vE 1
again
: D1
0x60
: D2
0xf0 0xf0
: D3
0x60 0x90 0x90 0x60
: D4
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D5
0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a
: D6
0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a
######################################################################
# INPUT: chip8/Chip-8 Games/Craps [Camerlo Cortez, 1978].ch8
######################################################################
:proto Sub1 # 258
:proto Sub2 # 260
:proto Sub3 # 27C
:proto L5 # 28C
:proto L7 # 29C
:proto D1 # 2AC
:proto D2 # 2B1
:proto D3 # 2B6
:proto D4 # 2BB
:proto D5 # 2F0
: main
v1 := 8
Sub1
v1 := 18
Sub1
vE := key
v1 := 9
Sub2
v7 := v0
v1 := 19
Sub2
v8 := v0
v9 := v8
v9 += v7
if v9 == 2 then jump L7
if v9 == 3 then jump L7
if v9 == 12 then jump L7
if v9 == 7 then jump L5
if v9 == 11 then jump L5
vA := v9
: L1
v0 := 64
delay := v0
loop
v0 := delay
if v0 != 0 then
again
Sub3
vE := key
v1 := 9
Sub2
v7 := v0
v1 := 19
Sub2
v8 := v0
v9 := v8
v9 += v7
if v9 == vA then jump L5
if v9 == 7 then jump L7
jump L1
: Sub1
i := D5
v2 := 8
sprite v1 v2 7
return
: Sub2
v6 := 1
v2 := 9
: L3
v0 := 1
loop
i := hex v0
sprite v1 v2 5
buzzer := v6
v3 := random 0b111
if v3 == 0 then return
v0 += 1
sprite v1 v2 5
if v0 != 7 then
again
jump L3
: Sub3
v2 := 9
v1 := 9
i := hex v7
sprite v1 v2 5
v1 := 19
i := hex v8
sprite v1 v2 5
return
: L5
i := D1
v0 := 0
v1 := 21
sprite v0 v1 5
i := D2
v0 := 8
sprite v0 v1 5
loop
again
: L7
i := D3
v0 := 0
v1 := 16
sprite v0 v1 5
i := D4
v0 := 8
sprite v0 v1 5
loop
again
: D1
0x8b 0x89 0x89 0xa9 0xdb
: D2
0xb2 0x32 0x2a 0x26 0xa6
: D3
0x8e 0x8a 0x8a 0x8a 0xee
: D4
0xee 0x88 0xec 0x28 0xee 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D5
######################################################################
# INPUT: chip8/Chip-8 Games/Deflection [John Fort].ch8
######################################################################
:proto L4 # 228
:proto L6 # 24E
:proto L8 # 282
:proto L11 # 29C
:proto L12 # 2C0
:proto L13 # 2C8
:proto L16 # 302
:proto L17 # 310
:proto L19 # 33E
:proto L20 # 34A
:proto L21 # 358
:proto L22 # 35E
:proto L23 # 362
:proto L24 # 364
:proto Sub1 # 400
:proto Sub2 # 42C
:proto Sub3 # 43E
:proto Sub4 # 448
:proto Sub5 # 47A
:proto Sub6 # 4A4
:proto L30 # 4B6
:proto Sub7 # 4C0
:proto L33 # 4EA
:proto Sub8 # 4F4
:proto D1 # 500
:proto D2 # 50C
:proto D3 # 518
:proto D4 # 524
:proto D5 # 530
:proto D6 # 537
:proto D7 # 53C
:proto D8 # 540
:proto D9 # 544
:proto D10 # 548
:proto D11 # 549
:proto D12 # 54C
:proto D13 # 54E
:proto D14 # 550
: main
vA := 0
vB := 0
v8 := 10
vC := 1
vD := 1
: L1
vE := 10
: L2
v7 := 80
v9 := 0
Sub1
v4 := 144
Sub3
clear
v0 := random 0b110111
v1 := random 0b10111
i := D12
save v1
i := D5
sprite v0 v1 7
jump L4
: L3
sprite v0 v1 1
: L4
v0 := random 0b111111
v1 := random 0b11111
i := D13
save v1
i := D10
sprite v0 v1 1
if vF != 0 then jump L3
i := D12
load v1
v0 += 1
v1 += 1
v4 := vC
if vE != 10 then v4 := vD
i := hex v4
sprite v0 v1 5
jump L6
: L5
sprite v0 v1 5
: L6
v0 := random 0b111000
v1 := random 0b11000
i := hex vE
sprite v0 v1 5
if vF != 0 then jump L5
v4 := 160
Sub3
sprite v0 v1 5
: L7
loop
v2 := key
if v2 == 0 then jump L13
if v9 == 50 then jump L7
i := D6
if v2 == 1 then jump L8
i := D7
if v2 == 2 then jump L8
i := D8
if v2 == 3 then jump L8
i := D9
if v2 != 4 then
again
: L8
v0 := 30
v1 := 14
: L9
sprite v0 v1 5
v4 := 5
Sub3
sprite v0 v1 5
v3 := 9
loop
if v3 key then jump L11
v3 += -1
if v3 != 0 then
again
jump L9
: L11
if v3 == 5 then jump L12
Sub4
if v0 == -1 then v0 := 0
if v1 == -1 then v1 := 0
v4 := 60
if v2 == 2 then v4 := 64
if v0 == v4 then v0 += -1
v4 := 28
if v2 == 1 then v4 := 32
if v1 == v4 then v1 += -1
jump L9
: L12
v3 := key
Sub5
v9 += 5
jump L7
: L13
v7 := 0
: L14
loop
v3 := key
if v3 == 0 then jump L14
if v3 == 5 then jump L14
v4 := 9
v4 -= v3
if vF != 1 then
again
i := D13
load v1
i := D10
: L15
loop
sprite v0 v1 1
Sub4
if v0 == -1 then jump L21
if v1 == -1 then jump L21
if v0 == 64 then jump L21
if v1 == 32 then jump L21
sprite v0 v1 1
if vF == 1 then jump L16
v4 := 5
Sub3
jump L15
: L16
sprite v0 v1 1
Sub6
if v2 == 0 then jump L17
Sub7
sprite v0 v1 1
again
: L17
if v7 == 0 then jump L21
i := D12
load v1
i := D5
v3 := 5
loop
v4 := 21
sprite v0 v1 7
buzzer := v4
sprite v0 v1 7
Sub3
v3 += -1
if v3 != 0 then
again
if vE != 10 then jump L19
v0 := vC
Sub8
vA += v1
if vF == 1 then jump L22
vC += 1
jump L20
: L19
v0 := vD
Sub8
vB += v1
if vF == 1 then jump L23
vD += 1
: L20
v8 += -1
if v8 == 0 then jump L24
if vE != 10 then jump L1
vE := 11
jump L2
: L21
v4 := 48
buzzer := v4
jump L20
: L22
vA := -1
jump L24
: L23
vB := -1
: L24
Sub1
i := D5
if vA == vB then loop
again
v0 := 13
v1 := 7
vB -= vA
if vF != 0 then v0 := 45
loop
v4 := 64
sprite v0 v1 7
Sub3
sprite v0 v1 7
v4 := 64
buzzer := v4
again
0x76 0xac 0x77 0x95 0xcc 0xdc 0xa0 0x81 0x10 0xc0 0x55 0x44 0xe4 0x2c 0x1 0xcc 0x9c 0xd3 0x4b 0xc8 0xee 0x6d 0xc 0x40 0xb8 0xdc 0x8a 0x5c 0xb4 0x21 0x34 0x63 0x33 0xb3 0x33 0x33 0x63 0xb8 0x73 0xb3 0xbb 0x36 0x31 0x35 0x32 0x33 0x32 0x7f 0x73 0x31 0x93 0x37 0x32 0x93 0xf3 0x32 0x3 0xb2 0x13 0x34 0x9b 0xff 0xf2 0xf7 0xbf 0x3f 0xbb 0xb2 0xb6 0xac 0x7f 0xfb 0xb3 0xbb 0xbf 0xdd 0xf3 0xff 0xb1 0x11 0x98 0xb5 0x7f 0x3f 0xbe 0xaf 0xbb 0xb9 0x83 0xad 0xea 0xfb 0xcc 0xce 0xcc 0xc8 0xec 0xec 0xda 0xcc 0xdc 0xfc 0xcd 0xca 0xcc 0x8c 0xc8 0xe8 0xce 0xec 0xa8 0xcd 0xca 0xcc 0xcc 0xc4 0xcc 0x6c 0xcc 0xcc 0x8d 0xec 0xd9 0xcd
: Sub1
clear
v5 := 8
v6 := 16
i := D11
bcd vA
load v2
Sub2
v5 := 40
i := D11
bcd vB
load v2
Sub2
v5 := 14
v6 := 8
v0 := 10
i := hex v0
sprite v5 v6 5
v5 := 46
v0 := 11
i := hex v0
sprite v5 v6 5
return
: Sub2
i := hex v0
sprite v5 v6 5
v5 += 6
i := hex v1
sprite v5 v6 5
v5 += 6
i := hex v2
sprite v5 v6 5
return
: Sub3
delay := v4
loop
v4 := delay
if v4 != 0 then
again
return
: Sub4
if v3 == 3 then v0 += 1
if v3 == 6 then v0 += 1
if v3 == 9 then v0 += 1
if v3 == 1 then v0 += -1
if v3 == 4 then v0 += -1
if v3 == 7 then v0 += -1
if v3 == 7 then v1 += 1
if v3 == 8 then v1 += 1
if v3 == 9 then v1 += 1
if v3 == 1 then v1 += -1
if v3 == 2 then v1 += -1
if v3 == 3 then v1 += -1
return
: Sub5
sprite v0 v1 5
i := D1
i += v7
if v2 == 1 then v3 := 6
if v2 == 2 then v3 := 8
if v2 == 3 then v3 := 9
if v2 == 4 then v3 := 7
if v2 == 4 then v0 += 4
v4 := 5
loop
save v2
Sub4
v4 += -1
if v4 != 0 then
again
v7 += 15
return
: Sub6
v5 := v0
v6 := v1
i := D14
v4 += 144
loop
load v2
if v0 != v5 then jump L30
if v1 == v6 then return
: L30
v4 += -1
if v4 != 0 then
again
v2 := 0
return
: Sub7
v5 := v0
v6 := v1
if v2 == 1 then i := D1
if v2 == 2 then i := D2
if v2 == 3 then i := D3
if v2 == 4 then i := D4
v2 := 6
loop
load v1
if v3 == v0 then jump L33
v2 += -1
if v2 != 0 then
again
: L32
v0 := v5
v1 := v6
i := D10
return
: L33
v3 := v1
v4 := 5
buzzer := v4
v7 += 1
jump L32
: Sub8
v1 := 0
loop
v1 += v0
v7 += -1
if v7 != 0 then
again
return
: D1
0x1 0x7 0x2 0x8 0x3 0x9 0x7 0x1 0x8 0x2 0x9 0x3
: D2
0x1 0x3 0x3 0x1 0x4 0x6 0x6 0x4 0x7 0x9 0x9 0x7
: D3
0x2 0x4 0x3 0x7 0x4 0x2 0x6 0x8 0x7 0x3 0x8 0x6
: D4
0x1 0x9 0x2 0x6 0x4 0x8 0x6 0x2 0x8 0x4 0x9 0x1
: D5
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc
: D6
0xf8 0x0 0x0 0x0 0x0
: D7
0x80 0x80 0x80 0x80
: D8
0x80 0x40 0x20 0x10
: D9
0x8 0x10 0x20 0x40
: D10
0x80
: D11
0x0 0x0 0x0
: D12
0x11 0x13
: D13
0x14 0x9
: D14
0x18 0x7 0x3 0x19 0x8 0x3 0x1a 0x9 0x3 0x1b 0xa 0x3 0x1c 0xb 0x3 0x24 0x7 0x4 0x23 0x8 0x4 0x22 0x9 0x4 0x21 0xa 0x4 0x20 0xb 0x4 0x20 0x0 0x3 0x21 0x1 0x3 0x22 0x2 0x3 0x23 0x3 0x3 0x24 0x4 0x3 0x13 0x0 0x4 0x12 0x1 0x4 0x11 0x2 0x4 0x10 0x3 0x4 0xf 0x4 0x4 0xf 0xf 0x1 0x10 0xf 0x1 0x11 0xf 0x1 0x12 0xf 0x1 0x13 0xf 0x1 0xc 0x4 0x4 0xb 0x5 0x4 0xa 0x6 0x4 0x9 0x7 0x4 0x8 0x8 0x4 0x19 0x4 0x3 0x1a 0x5 0x3 0x1b 0x6 0x3 0x1c 0x7 0x3 0x1d 0x8 0x3 0x9 0x10 0x3 0xa 0x11 0x3 0xb 0x12 0x3 0xc 0x13 0x3 0xd 0x14 0x3 0x2c 0x10 0x3 0x2d 0x11 0x3 0x2e 0x12 0x3 0x2f 0x13 0x3 0x30 0x14 0x3 0x2b 0x17 0x3 0x2c 0x18 0x3 0x2d 0x19 0x3 0x2e 0x1a 0x3 0x2f 0x1b 0x3 0xe6 0xed 0xcd 0xce 0x39 0xd5 0xa9 0x50 0x4d 0x10 0x6c 0x6e 0x27 0xe8 0x2 0xb3 0xa1 0x8d 0xb5 0xd0 0xcf 0xbe 0xdc 0xe6 0xd1 0x4f
######################################################################
# INPUT: chip8/Chip-8 Games/Figures.ch8
######################################################################
:proto L6 # 27E
:proto L8 # 29C
:proto Sub1 # 29E
:proto Sub2 # 2A6
:proto Sub3 # 2AE
:proto Sub4 # 2C8
:proto Sub5 # 2D0
:proto D1 # 308
:proto D2 # 310
:proto D3 # 31A
:proto D4 # 31C
:proto D5 # 320
: main
clear
v0 := 0
v1 := 0
v2 := 21
i := D2
loop
sprite v0 v1 10
sprite v2 v1 10
v1 += 10
if v1 != 30 then
again
i := D3
v1 := 29
v0 := 1
sprite v0 v1 1
v0 += 8
sprite v0 v1 1
v0 += 8
i := D4
sprite v0 v1 1
vE := 0
vD := 120
Sub5
v0 := 20
vA := random 0b1111
vB := 9
vC := 0
Sub4
buzzer := v0
v0 := 20
delay := v0
loop
v0 := delay
if v0 != 0 then
again
: L3
v0 := 5
buzzer := v0
Sub5
vD += -1
Sub5
if vD == 0 then jump L8
: L4
i := D1
Sub4
vC += 1
v0 := 4
if v0 key then Sub1
v0 := 6
if v0 key then Sub2
v0 := 2
if v0 key then Sub3
Sub4
if vF == 1 then jump L6
v0 := 1
buzzer := v0
v0 := 2
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L4
: L6
Sub5
vE += 1
Sub5
vA := random 0b1111
vB := 9
vC := 0
Sub4
if vF == 1 then jump L8
v0 := 10
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L3
: L8
loop
again
: Sub1
if vB == 1 then return
vB += -2
return
: Sub2
if vB == 17 then return
vB += 2
return
: Sub3
if vE == 0 then return
Sub5
vE += -1
Sub5
v0 := random 0b1000
v0 += 19
v1 := 2
i := D5
sprite v1 v0 8
v1 += 8
sprite v1 v0 8
return
: Sub4
i := D1
i := hex vA
sprite vB vC 5
return
: Sub5
i := D1
v3 := 50
v4 := 0
bcd vD
load v2
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
i := D1
v3 := 50
v4 := 6
bcd vE
load v2
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
i := D1
return
: D1
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D3
0xff 0x0
: D4
0xf0 0x0 0x80 0x0
: D5
0xaa 0x55
######################################################################
# INPUT: chip8/Chip-8 Games/Filter.ch8
######################################################################
:proto Sub1 # 234
:proto Sub2 # 248
:proto L3 # 25C
:proto Sub3 # 25E
:proto Sub4 # 266
:proto Sub5 # 26E
:proto Sub6 # 278
:proto Sub7 # 280
:proto Sub8 # 28A
:proto Sub9 # 28E
:proto Sub10 # 29E
:proto D1 # 2BC
:proto D2 # 2BD
:proto D3 # 2BE
:proto D4 # 2C0
: main
clear
vE := 0
vD := 7
vB := 29
vC := 28
Sub9
Sub10
Sub6
Sub5
: L1
v0 := 1
delay := v0
loop
v0 := delay
if v0 != 0 then
again
Sub7
if v9 == 31 then Sub1
v0 := 4
if v0 key then Sub3
v0 += 2
if v0 key then Sub4
if v6 == 1 then Sub2
jump L1
: Sub1
Sub8
v0 := 2
buzzer := v0
Sub10
vD += -1
Sub10
if vD == 0 then jump L3
Sub5
return
: Sub2
v0 := 5
buzzer := v0
Sub10
vE += 1
Sub10
if vE == 99 then jump L3
Sub8
Sub5
return
: L3
loop
again
: Sub3
Sub6
vB += -3
Sub6
return
: Sub4
Sub6
vB += 3
Sub6
return
: Sub5
v9 := 7
v8 := random 0b111101
v8 += 2
sprite v8 v9 1
return
: Sub6
i := D1
sprite vB vC 1
i := D2
return
: Sub7
Sub8
v9 += 1
Sub8
v6 := vF
return
: Sub8
sprite v8 v9 1
return
: Sub9
v3 := 6
v4 := 0
i := D3
loop
sprite v4 v3 1
v4 += 8
if v4 == 64 then return
again
: Sub10
i := D4
v3 := 55
v4 := 0
bcd vE
load v2
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
v3 := 0
i := hex vD
sprite v3 v4 5
i := D2
return
: D1
0xfc
: D2
0x80
: D3
0xff 0x75
: D4
0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Guess [David Winter] (alt).ch8
######################################################################
:proto L3 # 220
:proto Sub1 # 23E
:proto Sub2 # 254
:proto D1 # 262
:proto D2 # 294
: main
vE := 1
: L1
clear
vD := 1
vA := 1
vB := 1
loop
vC := vD
vC &= vE
if vC == 0 then jump L3
v8 := vD
Sub1
if vA != 64 then jump L3
vA := 1
vB += 6
if vC != 63 then : L3
vD += 1
if vD != 63 then
again
v0 := key
if v0 == 5 then v9 += vE
vE += vE
if vE != 64 then jump L1
vA := 28
vB := 13
v8 := v9
clear
Sub1
loop
again
: Sub1
i := D2
bcd v8
load v2
Sub2
sprite vA vB 5
vA += 4
v1 := v2
Sub2
sprite vA vB 5
vA += 5
return
: Sub2
v3 := v1
v3 += v3
v3 += v3
v3 += v1
i := D1
i += v3
return
: D1
0xe0 0xa0 0xa0 0xa0 0xe0 0x40 0x40 0x40 0x40 0x40 0xe0 0x20 0xe0 0x80 0xe0 0xe0 0x20 0xe0 0x20 0xe0 0xa0 0xa0 0xe0 0x20 0x20 0xe0 0x80 0xe0 0x20 0xe0 0xe0 0x80 0xe0 0xa0 0xe0 0xe0 0x20 0x20 0x20 0x20 0xe0 0xa0 0xe0 0xa0 0xe0 0xe0 0xa0 0xe0 0x20 0xe0
: D2
######################################################################
# INPUT: chip8/Chip-8 Games/Guess [David Winter].ch8
######################################################################
:proto L3 # 222
:proto Sub1 # 240
:proto Sub2 # 256
:proto D1 # 264
:proto D2 # 296
: main
v9 := 0
vE := 1
: L1
clear
vD := 1
vA := 1
vB := 1
loop
vC := vD
vC &= vE
if vC == 0 then jump L3
v8 := vD
Sub1
if vA != 64 then jump L3
vA := 1
vB += 6
if vC != 63 then : L3
vD += 1
if vD != 63 then
again
v0 := key
if v0 == 5 then v9 += vE
vE += vE
if vE != 64 then jump L1
vA := 28
vB := 13
v8 := v9
clear
Sub1
loop
again
: Sub1
i := D2
bcd v8
load v2
Sub2
sprite vA vB 5
vA += 4
v1 := v2
Sub2
sprite vA vB 5
vA += 5
return
: Sub2
v3 := v1
v3 += v3
v3 += v3
v3 += v1
i := D1
i += v3
return
: D1
0xe0 0xa0 0xa0 0xa0 0xe0 0x40 0x40 0x40 0x40 0x40 0xe0 0x20 0xe0 0x80 0xe0 0xe0 0x20 0xe0 0x20 0xe0 0xa0 0xa0 0xe0 0x20 0x20 0xe0 0x80 0xe0 0x20 0xe0 0xe0 0x80 0xe0 0xa0 0xe0 0xe0 0x20 0x20 0x20 0x20 0xe0 0xa0 0xe0 0xa0 0xe0 0xe0 0xa0 0xe0 0x20 0xe0
: D2
######################################################################
# INPUT: chip8/Chip-8 Games/Hidden [David Winter, 1996].ch8
######################################################################
:proto L1 # 21D
:proto L8 # 301
:proto L10 # 32B
:proto Sub1 # 35D
:proto L11 # 371
:proto L12 # 37D
:proto L13 # 389
:proto L14 # 395
:proto Sub2 # 3B9
:proto Sub3 # 3CD
:proto Sub4 # 3DB
:proto Sub5 # 3DF
:proto L16 # 3E1
:proto Sub6 # 3F3
:proto Sub7 # 401
:proto Sub8 # 40B
:proto D1 # 41F
:proto D2 # 42F
:proto D3 # 43F
:proto D4 # 441
:proto D5 # 471
:proto D6 # 477
:proto D7 # 47E
:proto D8 # 4C9
:proto D9 # 4D5
:proto D10 # 4F1
:proto D11 # 4F6
:proto D12 # 4FB
:proto D13 # 50A
:proto D14 # 519
: main
jump L1
0x48 0x49 0x44 0x44 0x45 0x4e 0x21 0x20 0x31 0x2e 0x30 0x20 0x42 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
i := D3
v0 := 0
v1 := 64
save v1
: L2
i := D3
v0 := 0
save v0
clear
i := D7
v0 := 12
v1 := 8
v2 := 15
loop
sprite v0 v1 15
v0 += 8
i += v2
if v0 != 52 then
again
v0 := key
clear
i := D8
v0 := 19
v1 := 13
v2 := 4
loop
sprite v0 v1 4
v0 += 8
i += v2
if v0 != 43 then
again
i := D1
load vF
i := D2
save vF
v3 := 64
v6 := 8
loop
v1 := random 0b1111
v2 := random 0b1111
i := D2
i += v1
load v0
v4 := v0
i := D2
i += v2
load v0
v5 := v0
v0 := v4
save v0
i := D2
i += v1
v0 := v5
save v0
v3 += -1
if v3 != 0 then
again
clear
v0 := 0
v1 := 0
i := D6
: L6
loop
sprite v0 v1 7
v0 += 8
if v0 != 32 then jump L6
v0 := 0
v1 += 8
if v1 != 32 then
again
vC := 0
vD := 0
vE := 0
: L7
loop
i := D3
load v0
v0 += 1
save v0
Sub2
vA := 16
Sub1
Sub3
vA := v9
v7 := vD
v8 := vE
Sub1
Sub3
Sub2
i := D2
i += v9
load v0
v1 := v0
i := D2
i += vA
load v0
if v0 != v1 then jump L10
Sub5
v0 := 32
Sub7
Sub5
v0 := 0
i := D2
i += v9
save v0
i := D2
i += vA
save v0
v6 += -1
if v6 != 0 then jump L7
i := D3
load v1
v2 := v0
v0 -= v1
if vF != 0 then jump L8
v0 := v2
v1 := v2
save v1
: L8
clear
i := D14
v0 := 16
v1 := 7
v2 := 14
loop
sprite v0 v1 15
v0 += 8
i += v2
if v0 != 48 then
again
i := D3
load v1
v4 := v1
v3 := v0
v6 := 9
Sub8
v6 := 15
v3 := v4
Sub8
v0 := key
jump L2
: L10
Sub4
v0 := 128
Sub7
Sub4
i := D2
i += vA
load v0
v0 += -1
Sub6
i := D4
i += v0
sprite v7 v8 7
i := D6
sprite v7 v8 7
i := D2
i += v9
load v0
v0 += -1
Sub6
i := D4
i += v0
sprite vD vE 7
i := D6
sprite vD vE 7
again
: Sub1
loop
i := D5
sprite vD vE 7
vB := key
sprite vD vE 7
if vB != 4 then jump L11
if vD == 0 then jump Sub1
vD += -8
vC += -1
: L11
if vB != 6 then jump L12
if vD == 24 then jump Sub1
vD += 8
vC += 1
: L12
if vB != 2 then jump L13
if vE == 0 then jump Sub1
vE += -8
vC += -4
: L13
if vB != 8 then jump L14
if vE == 24 then jump Sub1
vE += 8
vC += 4
: L14
if vB != 5 then jump Sub1
i := D2
i += vC
load v0
if v0 == 0 then jump Sub1
v9 := vC
if v9 == vA then
again
v0 += -1
i := D6
sprite vD vE 7
i := D4
Sub6
i += v0
sprite vD vE 7
return
: Sub2
i := D9
v0 := 36
v1 := 10
v2 := 11
loop
sprite v0 v1 11
v0 += 8
i += v2
if v0 != 60 then
again
return
: Sub3
v0 := 52
v1 := 16
i := D10
sprite v0 v1 5
i := D11
sprite v0 v1 5
return
: Sub4
i := D12
jump L16
: Sub5
i := D13
: L16
v0 := 36
v1 := 13
v2 := 5
loop
sprite v0 v1 5
v0 += 8
i += v2
if v0 != 60 then
again
return
: Sub6
v1 := v0
v1 += v1
v0 += v0
v0 += v0
v0 += v0
v0 -= v1
return
: Sub7
delay := v0
loop
v0 := delay
if v0 != 0 then
again
return
: Sub8
i := D2
bcd v3
load v2
v5 := 35
i := hex v1
sprite v5 v6 5
v5 := 40
i := hex v2
sprite v5 v6 5
return
: D1
0x1 0x2 0x3 0x4 0x8 0x7 0x6 0x5 0x5 0x6 0x7 0x8 0x4 0x3 0x2 0x1
: D2
0x1 0x2 0x3 0x4 0x8 0x7 0x6 0x5 0x5 0x6 0x7 0x8 0x4 0x3 0x2 0x1
: D3
0x0 0x0
: D4
0xfe 0xee 0xc6 0x82 0xc6 0xee 0xfe 0xfe 0xc6 0xc6 0xc6 0xfe 0xfe 0xc6 0xaa 0x82 0xaa 0xc6 0xfe 0xc6 0x82 0x82 0x82 0xc6 0xfe 0xba 0xd6 0xee 0xd6 0xba 0xfe 0xee 0xee 0x82 0xee 0xee 0xfe 0x82 0xfe 0x82 0xfe 0x82 0xfe 0xaa 0xaa 0xaa 0xaa 0xaa
: D5
0xfe 0xfe 0xfe 0xfe 0xfe 0xfe
: D6
0xfe 0xaa 0xd6 0xaa 0xd6 0xaa 0xfe
: D7
0x8b 0x88 0xf8 0x88 0x8b 0x0 0x0 0x0 0x0 0x0 0xf0 0x48 0x48 0x48 0xf2 0xef 0x84 0x84 0x84 0xef 0x0 0x8 0x8 0xa 0x0 0x8a 0x8a 0xaa 0xaa 0x52 0x3c 0x92 0x92 0x92 0x3c 0x0 0xe2 0xa3 0xe3 0x0 0x8b 0xc8 0xa8 0x98 0x88 0xfa 0x83 0xe2 0x82 0xfa 0x0 0x28 0xb8 0x90 0x0 0xef 0x88 0x8e 0x88 0x8f 0x21 0x21 0xa1 0x60 0x21 0x0 0x0 0x0 0x0 0x0 0xbc 0x22 0x3c 0x28 0xa4
: D8
0x89 0x8a 0xab 0x52 0x97 0x51 0xd1 0x51 0xc0 0x0 0x0 0x15
: D9
0x6a 0x8a 0x8e 0x8a 0x6a 0x0 0x64 0x8a 0x8e 0x8a 0x6a 0x44 0xaa 0xaa 0xaa 0x44 0x0 0xcc 0xaa 0xca 0xaa 0xac 0x6e 0x88 0x4c 0x28 0xce 0x0
: D10
0x4 0xc 0x4 0x4 0xe
: D11
0xc 0x12 0x4 0x8 0x1e
: D12
0x63 0x94 0x94 0x94 0x63 0x38 0xa5 0xb8 0xa0 0x21 0xe1 0x1 0xc1 0x20 0xc1
: D13
0x89 0x8a 0x52 0x22 0x21 0xcf 0x28 0x2f 0x28 0xc8 0x2 0x82 0x2 0x0 0x2
: D14
0xff 0x80 0x8f 0x90 0x8e 0x81 0x9e 0x80 0x91 0x91 0x9f 0x91 0x91 0x80 0xff 0x0 0x3c 0x40 0x40 0x40 0x3c 0x0 0x7c 0x10 0x10 0x10 0x7c 0x0 0xff 0x0 0x0 0x80 0x0 0x80 0x0 0x0 0x0 0x80 0x0 0x80 0x0 0x0 0xff 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0xff
######################################################################
# INPUT: chip8/Chip-8 Games/Hi-Lo [Jef Winsor, 1978].ch8
######################################################################
:proto L6 # 254
:proto L9 # 272
:proto L12 # 286
:proto L13 # 28E
:proto L14 # 292
:proto L15 # 29A
:proto D1 # 29F
:proto D2 # 2A4
:proto D3 # 2AA
: main
loop
vC := 9
vD := random 0b1111
vC -= vD
if vF == 0 then
again
v9 := vD
loop
vC := 9
vD := random 0b1111
vC -= vD
if vF == 0 then
again
vA := vD
vE := 0
: L2
i := D3
vE += 1
bcd vE
load v2
vB := 48
vC := 16
v8 := 15
: L3
i := hex v1
sprite vB vC 5
vB += 5
i := hex v2
sprite vB vC 5
if v8 == 0 then jump L6
loop
v6 := 10
v1 := key
v1 -= v6
if vF != 0 then
again
v1 += 10
loop
v6 := 10
v2 := key
v2 -= v6
if vF != 0 then
again
v2 += 10
vB := 16
v8 := 0
jump L3
: L6
v1 -= v9
if v1 != 0 then jump L9
v2 -= vA
if v2 != 0 then jump L12
: L7
vB := 32
v5 := 24
i := hex v9
sprite vB vC 5
vB += 5
i := hex vA
sprite vB vC 5
buzzer := vC
loop
again
: L9
v5 := -16
v1 &= v5
if v1 != 0 then jump L13
: L10
i := D1
: L11
vB := 16
vC := 24
sprite vB vC 5
v6 := key
jump L14
: L12
v5 := -16
v2 &= v5
if v2 == 0 then jump L10
: L13
i := D2
jump L11
: L14
if vE == 10 then jump L15
clear
jump L2
: L15
sprite vB vC 5
jump L7
0x1
: D1
0x97 0x92 0xf2 0x92 0x97
: D2
0x8f 0x89 0x89 0x89 0xef 0xd4
: D3
######################################################################
# INPUT: chip8/Chip-8 Games/Kaleidoscope [Joseph Weisbecker, 1978].ch8
######################################################################
:proto L2 # 21C
:proto Sub1 # 232
:proto D1 # 277
: main
v0 := 0
v3 := 128
v1 := 31
v2 := 15
loop
Sub1
i := main
i += v3
v0 := key
save v0
if v0 == 0 then jump L2
v3 += 1
if v3 != 0 then
again
: L2
v3 := 128
loop
i := main
i += v3
load v0
if v0 == 0 then jump L2
v3 += 1
if v3 == 0 then jump L2
Sub1
again
: Sub1
if v0 == 2 then v2 += -1
if v0 == 4 then v1 += -1
if v0 == 6 then v1 += 1
if v0 == 8 then v2 += 1
i := D1
vA := 224
vA &= v1
vB := 31
v1 &= vB
if vA != 0 then v2 += 1
vA := -16
vA &= v2
vB := 15
v2 &= vB
if vA != 0 then v1 += 1
vB := 31
v1 &= vB
sprite v1 v2 1
vA := v1
vB := 31
vB -= v2
sprite vA vB 1
vA := 63
vA -= v1
sprite vA vB 1
vB := v2
sprite vA vB 1
return
0x1
: D1
0x80 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Landing.ch8
######################################################################
:proto L2 # 212
:proto L4 # 250
:proto Sub1 # 290
:proto L8 # 29E
:proto Sub2 # 2BE
:proto Sub3 # 2D6
:proto L10 # 2EA
:proto L11 # 2FA
:proto D1 # 2FE
:proto D2 # 300
:proto D3 # 30A
:proto D4 # 30C
:proto D5 # 30E
: main
clear
i := D3
v0 := 0
v1 := 31
loop
sprite v0 v1 1
v0 += 8
if v0 == 64 then jump L2
again
: L2
i := D2
v4 := 9
loop
v4 += 1
if v4 == 54 then jump L4
v5 := random 0b1011
v6 := v5
v6 += 15
if v6 == 24 then sprite v4 v6 1
if v6 == 23 then sprite v4 v6 2
if v6 == 22 then sprite v4 v6 3
if v6 == 21 then sprite v4 v6 4
if v6 == 20 then sprite v4 v6 5
if v6 == 19 then sprite v4 v6 6
if v6 == 18 then sprite v4 v6 7
if v6 == 17 then sprite v4 v6 8
if v6 == 16 then sprite v4 v6 9
if v6 == 15 then sprite v4 v6 10
v6 := 25
sprite v4 v6 6
again
: L4
vA := 0
vB := 0
v9 := 2
i := D1
sprite vA vB 1
v0 := 20
buzzer := v0
v0 := 20
delay := v0
loop
v0 := delay
if v0 != 0 then
again
: L6
v0 := 1
buzzer := v0
sprite vA vB 1
vA += 1
if vA == 62 then Sub1
sprite vA vB 1
if vF == 1 then jump L8
v0 := 8
if v0 key then Sub2
if v8 == 1 then Sub3
v0 := 2
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L6
: Sub1
v9 += -1
if v9 != 0 then jump L11
vA := 0
vB += 1
v9 := 2
return
: L8
v0 := 10
buzzer := v0
i := D5
bcd v5
load v2
v3 := 25
v4 := 0
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
loop
again
: Sub2
if v8 == 1 then return
v8 := 1
v0 := 3
buzzer := v0
vD := vA
vE := vB
vD += 1
vE += 1
i := D4
sprite vD vE 1
return
: Sub3
i := D4
sprite vD vE 1
vE += 1
sprite vD vE 1
if vF == 1 then jump L10
v0 := 1
buzzer := v0
i := D1
return
: L10
v5 += 1
v0 := 5
buzzer := v0
v8 := 0
if vE == 31 then sprite vD vE 1
i := D1
return
: L11
vA := 0
return
: D1
0xe0 0x0
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D3
0xff 0x0
: D4
0x80 0x0
: D5
0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Lunar Lander (Udo Pernisz, 1979).ch8
######################################################################
:proto L1 # 202
:proto Sub2 # 258
:proto L7 # 2E6
:proto L9 # 308
:proto L10 # 30A
:proto D4 # 346
:proto D5 # 355
:proto Sub8 # 36E
:proto Sub10 # 394
:proto Sub11 # 3D2
:proto L15 # 3D6
:proto L16 # 3E6
:proto Sub12 # 3EA
:proto D7 # 414
:proto D8 # 438
:proto D9 # 456
:proto D14 # 4DB
:proto D15 # 4DE
:proto D16 # 4E1
:proto D17 # 4E2
:proto D18 # 4F1
:proto D19 # 500
:proto D20 # 51E
:proto D21 # 525
:proto Sub13 # 52E
:proto Sub14 # 542
:proto Sub16 # 568
:proto Sub17 # 56C
:proto D22 # 570
:proto D23 # 573
:proto D24 # 576
:proto Sub18 # 57C
:proto L20 # 59A
:proto D25 # 59E
:proto L21 # 5B6
:proto Sub21 # 5BE
:proto L23 # 612
:proto L25 # 63A
:proto L27 # 65E
:proto L28 # 680
:proto L29 # 68C
:proto Sub22 # 6A8
:proto L31 # 6D4
:proto Sub23 # 6DC
:proto L36 # 738
:proto Sub25 # 73A
:proto L37 # 740
:proto Sub26 # 748
:proto L38 # 756
:proto L39 # 762
:proto D38 # 76A
:proto D39 # 76C
:proto L40 # 772
:proto L41 # 798
:proto L44 # 7B0
:proto L47 # 7CE
:proto L48 # 7D8
:proto L50 # 7EA
:proto L51 # 7F4
:proto L52 # 7FC
:proto L54 # 816
:proto L55 # 832
:proto L56 # 836
:proto L57 # 842
:proto L58 # 854
:proto L60 # 892
:proto L61 # 8A0
:proto L62 # 8AA
:proto L63 # 8B2
: main
jump L1
: L1
v3 := 48
delay := v3
i := D7
v1 := 5
v2 := 0
Sub17
i := D8
v1 := 8
v2 := 18
Sub16
i := D9
v1 := 0
v2 := 26
Sub14
Sub14
jump L41
0x0 0x0 0x0 0x0
: L2
i := D16
v1 := 0
v2 := 0
loop
sprite v1 v2 1
v2 += 1
if v2 != 31 then
again
v1 := 46
v2 := 0
loop
sprite v1 v2 1
v2 += 1
if v2 != 31 then
again
jump L21
0xa4 0xd1 0x61 0x0 0x62 0x0 0xd1 0x25
: Sub1
i := D22
bcd vA
load v2
v3 := 49
v4 := 6
Sub2
return
: Sub2
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
0x0 0x0 0xa4 0xd6 0x61 0x18 0x62 0x0 0xd1 0x25
: Sub3
i := D23
bcd vB
load v2
v3 := 49
v4 := 19
Sub2
return
0x0 0x0 0xa4 0xcc 0x61 0x30 0x62 0x0 0xd1 0x25
: Sub4
i := D24
bcd vC
load v2
v3 := 49
v4 := 26
Sub2
return
0x0 0x0 0x6a 0xfa 0x6b 0xfa
: Sub5
i := D22
load v2
v3 := 49
v4 := 6
Sub2
return
: Sub6
i := D23
load v2
v3 := 49
v4 := 19
Sub2
return
: Sub7
i := D24
load v2
v3 := 49
v4 := 26
Sub2
return
0x0 0x0 0x0 0x0
: L5
v6 := 2
v7 := random 0b1111
0x68 : D1 0x0 # SMC: v8 := 0
v7 += 11
: L6
vE := 2
v3 := 2
if v3 key then Sub11
v3 := 4
if v3 key then Sub18
v3 := 6
if v3 key then Sub8
jump L7
: L7
vC += 1
vE := vC
loop
vB += -1
if vB == 0 then jump L27
if vB == 26 then Sub10
vE += -1
v8 += 1
Sub12
if vE != 0 then
again
v0 := random 0b1
if v0 != 0 then jump L9
v7 += 1
jump L10
: L9
v7 += -1
: L10
Sub5
Sub1
Sub6
Sub3
Sub12
Sub7
Sub4
jump L6
0x0 0x0
: L11
v3 := 2
if v3 key then jump Sub11
return
0x63 0x0
: L12
0x6a : D2 0x96 # SMC: vA := 150
0x6b : D3 0xfa # SMC: vB := -6
vC := 4
i := D4
v1 := 48
v2 := 0
Sub13
i := D5
v1 := 48
v2 := 13
Sub13
Sub1
Sub3
Sub4
jump L5
0x0 0x0
: D4
0xea 0x8a 0xea 0x8a 0x8e 0xe8 0x88 0xe8 0x88 0xee 0x0 0x0 0x0 0x0 0x0
: D5
0xee 0x88 0xee 0x88 0x8e 0xee 0x84 0xe4 0x84 0xe4 0x0 0x0 0x0 0x0 0x0
: L13
vA += -1
if vA != 0 then jump L15
jump L58
0x0 0x0
: Sub8
loop
buzzer := v6
v7 += 1
vA += -1
if vA == 0 then jump L58
Sub12
v3 := 6
if v3 key then
again
return
0x77 0xff
: D6
0xc0 0xf8 0xfe 0xff 0xe0 0x80
: Sub9
i := D6
v1 := 1
v2 := 12
sprite v1 v2 6
return
: Sub10
Sub21
i := D17
v1 := 0
v2 := 1
sprite v1 v2 15
i := D18
v2 += 15
sprite v1 v2 15
i := D19
v1 := 38
v2 := 1
sprite v1 v2 15
v2 += 15
sprite v1 v2 15
i := D20
v1 := 13
v2 := 24
sprite v1 v2 7
i := D21
v1 := 31
v2 := 24
sprite v1 v2 7
i := D15
v1 := 0
v2 := 31
loop
sprite v1 v2 1
v1 += 8
if v1 != 48 then
again
return
0x0 0x0
: Sub11
buzzer := v6
jump L13
: L15
if vC != 0 then vC += -1
if vB == -6 then jump L16
if vB == 26 then jump L16
vB += 1
v8 += -1
: L16
if vE != 0 then vE += -1
: Sub12
i := D14
sprite v7 v8 5
vF := 0
i := D16
v9 := v8
v9 += 5
vD := v7
sprite vD v9 1
if vF == 1 then jump L31
sprite vD v9 1
vF := 0
vD += 7
sprite vD v9 1
if vF == 1 then jump L51
sprite vD v9 1
i := D14
sprite v7 v8 5
jump L11
0x0 0x0
: D7
0x8a 0x8a 0x8a 0x8a 0xee 0x8b 0xca 0xab 0x9a 0x8a 0xbc 0xb4 0xbc 0xa8 0xac 0x47 0x45 0x47 0x45 0x75 0x45 0x64 0x54 0x4c 0x45 0xee 0xa8 0xae 0xa8 0xee 0xf0 0xd0 0xf0 0xa0 0xb0 0x0
: D8
0x97 0xa4 0xc7 0xa4 0x97 0x51 0x54 0x71 0x25 0x21 0xc3 0x41 0xd9 0x1 0xc1 0xab 0x2b 0x3b 0x2a 0x2a 0xd5 0x55 0xd5 0x94 0xdd 0xdc 0x8 0xc8 0x48 0xc8
: D9
0x97 0xa4 0xc7 0xa4 0x97 0x51 0x55 0x71 0x24 0x20 0x43 0x42 0xeb 0x42 0x43 0x83 0x2 0xbb 0x80 0x83 0xbb 0x12 0x93 0x92 0x92 0xbd 0x95 0x9d 0x95 0xbd 0x45 0x44 0x44 0x44 0x75 0xee 0x28 0x4e 0x88 0xee
: D10
0xef 0x8d 0x8f 0x8a 0xeb 0x77 0x54 0x77 0x51 0x57 0x55 0x55 0x75 0x50 0x55 0x0
: D11
0xee 0x8a 0x8e 0x8a 0xea 0xee 0xa4 0xe4 0x84 0x84 0xea 0xab 0xea 0xaa 0xaa 0x20 0x20 0xa0 0x60 0x20
: D12
0xee 0xa8 0xee 0xa2 0xae 0xef 0x4d 0x4f 0x4a 0x4b 0x74 0x56 0x55 0x54 0x74 0x5d 0x55 0x5d 0xd5 0x55 0x5c 0x48 0x48 0x48 0xc8 0x6
: D13
0xee 0xa4 0xe4 0x84 0x8e 0x8e 0x8a 0x8a 0x8a 0xee 0xe0 0x40 0x40 0x40 0x40 0x0 0xee 0x88 0xee 0x82 0x8e 0xe8 0x88 0xe8 0x88 0x8e 0xee 0x84 0xe4 0x84 0x84
: D14
0x18 0x3c 0xa5
: D15
0xff 0xbd 0x0
: D16
0x80
: D17
0x40 0x40 0x40 0x40 0x40 0x40 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x70 0x70
: D18
0x60 0x60 0x60 0x60 0x60 0x60 0x70 0x70 0x60 0x40 0x40 0x0 0x0 0x0 0x0
: D19
0x3 0x1 0xf 0xf 0x1 0x1 0x1 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x7 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x8f 0x8f 0x8f 0x8f
: D20
0x28 0xf8 0xfc 0x7c 0x78 0x7c 0x7c
: D21
0x10 0x30 0x30 0x78 0xf8 0xf0 0xf8 0x0 0x0
: Sub13
v3 := 0
v4 := 5
loop
sprite v1 v2 5
v3 += 1
i += v4
v1 += 8
if v3 != 3 then
again
return
0x0 0x0
: Sub14
v3 := 0
v4 := 5
loop
sprite v1 v2 5
v3 += 1
i += v4
v1 += 8
if v3 != 4 then
again
return
0x0 0x0
: Sub15
v3 := 0
v4 := 5
loop
sprite v1 v2 5
v3 += 1
i += v4
v1 += 8
if v3 != 5 then
again
return
: Sub16
Sub13
jump Sub13
: Sub17
Sub13
jump Sub14
: D22
0x1 0x4 0x9
: D23
0x0 0x4 0x7
: D24
0x0 0x2 0x1 0x0 0xb3 0xbf
: Sub18
loop
buzzer := v6
v7 += -1
vA += -1
if vA == 0 then jump L58
Sub12
v3 := 4
if v3 key then
again
return
0x58 0x48
: Sub19
i := D25
v1 := 38
v2 := 20
jump L20
: L20
sprite v1 v2 6
return
: D25
0x3 0xf 0xff 0x7f 0x7 0x1
: D26
0xff 0x0
: Sub20
i := D26
v1 := 9
v2 := 15
sprite v1 v2 1
0x61 : D27 0xb # SMC: v1 := 11
v2 := 16
sprite v1 v2 1
jump L40
: L21
Sub19
Sub9
Sub20
jump L12
: Sub21
Sub19
Sub9
Sub20
return
0x47 0x47
: D28
0x80
: D29
0xff 0xa8 0xab 0xa8 0xae 0x88 0xff
: D30
0xf0 0x80 0xa0 0x80 0xa0 0xa0 0xf0 0x0
: L22
Sub5
Sub1
Sub6
Sub3
Sub7
Sub4
i := D39
sprite v7 v8 6
if v7 == 1 then jump L25
if v7 == 2 then jump L25
if v7 == 3 then jump L25
if v7 == 4 then jump L25
if v7 == 5 then jump L25
if v7 == 6 then jump L25
if v7 == 36 then jump L23
if v7 == 37 then jump L23
if v7 == 38 then jump L23
vD := -1
jump L25
0x0 0x0
: L23
vE := 0
v7 += 2
i := D28
loop
sprite v7 v8 1
v8 += -1
vE += 1
if vE != 13 then
again
i := D29
v7 += -12
v8 += 1
sprite v7 v8 7
v7 += 8
i := D30
sprite v7 v8 7
jump L52
: D31
0xf8 0x88 0xa8 0x88 0xa8 0xa8 0xf8 0x0
: L25
vE := 0
v7 += 2
i := D28
loop
sprite v7 v8 1
v8 += -1
vE += 1
if vE != 13 then
again
i := D29
v7 += 1
v8 += 1
sprite v7 v8 7
v7 += 8
i := D31
sprite v7 v8 7
if vD != -1 then jump L52
jump L54
: L27
vF := 0
0x66 : D32 0x5 # SMC: v6 := 5
v6 -= vC
if vF != 1 then jump L28
jump L22
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D33
0xbd
: D34
0xff 0xa5 0x3c 0x18
: D35
0x38 0x10 0x78 0xd8 0xd8 0x78 0x10 0x38 0x0
: L28
i := D35
v7 += 2
v8 += -3
sprite v7 v8 8
Sub22
jump L29
: L29
i := D35
sprite v7 v8 8
i := D33
v7 += -2
v8 += 4
sprite v7 v8 5
loop
i := D10
v1 := 12
v2 := 0
Sub13
vD := 2
buzzer := vD
again
0x25 0xc4
: Sub22
Sub5
Sub1
Sub6
Sub3
Sub7
Sub4
return
0x41 0x4a 0xae 0x5d 0xbb 0xbd 0xbe 0xb0 0xb2 0xb4 0x4c 0x40 0x48 0x4d 0x47 0x41 0x43 0x42
: D36
0xb5 0x6a 0x29 0x2c 0xe3 0xc4 0xdf 0x2f 0x1f 0x2f
: D37
0x88 0x20
: L31
Sub26
: L32
vE := 2
Sub23
jump L37
: Sub23
i := D14
: L33
sprite v7 v8 6
: Sub24
i := D36
sprite v7 v8 6
v8 += -1
buzzer := vE
i := D10
v1 := 12
v2 := 0
Sub13
vD += 1
if vD != 10 then jump L33
vD := 0
return
: L34
i := D37
v7 += 2
v8 += 13
v5 := v7
v6 := v8
v0 := v7
v9 := v8
sprite v7 v8 1
sprite v7 v8 1
Sub25
loop
v8 += -1
v0 += 1
v5 += -1
v6 += -2
v9 += -2
sprite v7 v8 2
sprite v7 v8 2
sprite v0 v9 2
sprite v0 v9 2
sprite v5 v6 2
sprite v5 v6 2
vD += 1
Sub25
i := D10
v1 := 12
v2 := 0
Sub13
i := D37
if vD != 5 then
again
jump L36
: L36
jump L38
: Sub25
vE := 2
buzzer := vE
return
: L37
v8 += 10
Sub24
jump L34
0x17 0x42
: Sub26
vD := 0
buzzer := v8
Sub22
vA := v7
vB := v8
vB += 5
return
: L38
loop
i := D10
v1 := 12
v2 := 0
Sub13
i := D38
jump L39
: L39
sprite vA vB 2
vE := 2
buzzer := vE
again
: D38
0xc0 0xc0
: D39
0x18 0x3c 0xa5 0xff 0xbd 0x24
: L40
v1 := 31
v2 := 23
sprite v1 v2 1
return
: D40
0xee 0xaa 0xae 0xa8 0xe8 0xeb 0x4a 0x4a 0x4a 0x4b 0xa2 0xb2 0xaa 0xa6 0xa2 0x30 0x90 0x13 0x90 0x38 0x70 0x10 0x76 0x40 0x70 0xe0 0x20 0xe0 0x20 0xe0
: L41
jump L60
: L42
v1 := 9
v2 := 8
Sub16
loop
v0 := key
if v0 == 1 then jump L44
if v0 == 2 then jump L47
if v0 == 3 then jump L48
again
: L44
jump L61
: L45
v0 := 11
save v0
v0 := 150
: L46
i := D2
save v0
i := D3
v0 := -6
save v0
i := D1
v0 := 0
save v0
jump L50
0x17 0xec 0x0 0x0
: L47
i := D27
v0 := 14
save v0
i := D32
jump L62
: L48
jump L63
: L49
v0 := 100
save v0
i := D3
v0 := 32
save v0
i := D1
v0 := 26
save v0
: L50
loop
v3 := delay
if v3 != 0 then
again
clear
jump L2
: L51
Sub26
vA += 7
jump L32
0xbf 0xbb
: L52
vF := 0
v0 := 49
v0 -= vA
if vF != 0 then jump L55
: L53
if vC == 0 then jump L57
if vC == 1 then jump L57
if vC == 2 then jump L57
jump L56
0x0 0x0
: L54
vF := 0
v0 := 79
v0 -= vA
if vF != 0 then jump L55
jump L53
0x0 0x0
: Sub27
i := D12
v1 := 3
v2 := 0
Sub15
vE := 2
buzzer := vE
return
: L55
loop
Sub27
again
: L56
loop
Sub27
i := D13
v1 := 11
v2 := 6
Sub13
again
: L57
loop
Sub27
i := D11
v1 := 8
v2 := 6
Sub14
again
0x6a 0xa1 0xa4 0xdb 0xd7 0x85
: L58
i := D35
v7 += 2
v8 += -3
sprite v7 v8 8
Sub22
i := D35
sprite v7 v8 8
v7 += -2
v8 += 3
loop
i := D33
sprite v7 v8 5
sprite v7 v8 5
i := D4
v1 := 48
v2 := 0
Sub13
vE := 2
buzzer := vE
vB += -1
vC += 1
v8 += 1
if vB == 27 then Sub10
if vB != 0 then
again
Sub22
Sub26
vA += 3
vE := 2
Sub24
jump L37
: L60
i := D34
v1 := 27
v2 := 15
sprite v1 v2 1
i := D40
jump L42
0x0 0x0
: L61
i := D32
v0 := 5
save v0
i := D27
jump L45
: L62
v0 := 3
save v0
v0 := 200
jump L46
: L63
i := D32
v0 := 3
save v0
i := D2
jump L49
0x76 0xf6 0x32 0x7f 0x0 0x10 0x18 0x0 0xff 0x7e 0xc7 0xfd 0x80 0x50 0x35 0xc9 0xa4 0x2e 0x67 0x80 0x0 0x80 0x10 0x0 0x6f 0xff 0x7f 0x73 0x38 0x0 0xc9 0x17 0xb7 0x27 0xa3 0x3f 0x0 0x0 0x94 0xc8 0xff 0xef 0xff 0xed 0xc8 0x90 0xfe 0xfc 0xff 0x27 0x29 0x30 0x90 0x58 0x8c 0x12 0xff 0x7f 0x7f 0x77 0x91 0x80 0x1f 0xe9 0x62 0xd7 0x3b 0x2b
######################################################################
# INPUT: chip8/Chip-8 Games/Mastermind FourRow (Robert Lindley, 1978).ch8
######################################################################
:proto L6 # 24A
:proto L11 # 2C2
:proto D3 # 2FC
:proto Sub1 # 300
:proto Sub2 # 30E
:proto D4 # 3F4
:proto D5 # 3F8
:proto D6 # 3FC
: main
i := D3
vD := 0
: L1
vE := 0
loop
sprite vD vE 3
vE += 6
if vE != 24 then
again
vD += 6
if vD != 60 then jump L1
i := D4
Sub1
Sub1
Sub1
Sub1
vD := 0
vE := 0
vC := 0
: L3
i := D4
load v3
save v3
vB := 0
: L4
loop
v0 := key
if v0 != 15 then jump L6
loop
if vB == 0 then jump L4
vE += -6
i := D6
vB += -1
i += vB
load v0
i := hex v0
sprite vD vE 5
i := D3
sprite vD vE 3
again
: L6
vA := -7
vA += v0
if vF != 0 then jump L4
if v0 == 0 then jump L4
i := D3
sprite vD vE 3
i := D6
i += vB
save v0
i := hex v0
sprite vD vE 5
vE += 6
vB += 1
if vB != 4 then
again
v4 := 0
v8 := 0
vB := 0
loop
i := D6
i += vB
load v0
v2 := v0
i := D5
i += vB
load v0
v3 := v0
Sub2
i := D6
i += vB
v0 := v2
save v0
i := D5
i += vB
v0 := v3
save v0
vB += 1
if vB != 4 then
again
if v8 != 4 then jump L11
: L8
vE := 0
vD := 60
v9 := 0
loop
i := D4
i += v9
load v0
i := hex v0
sprite vD vE 5
vE += 6
v9 += 1
if v9 != 4 then
again
v0 := 32
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L8
: L11
v4 := 1
vA := 0
: L12
vB := 0
i := D6
i += vA
load v0
v2 := v0
loop
i := D5
i += vB
load v0
v3 := v0
Sub2
i := D5
i += vB
v0 := v3
save v0
vB += 1
if vB != 4 then
again
vA += 1
if vA != 4 then jump L12
vD += 6
vE := 0
vC += 1
if vC != 10 then jump L3
jump L8
: D1
0x90
: D2
0xf0
: D3
0x0 0x0 0x60 0x0
: Sub1
loop
v0 := random 0b111
if v0 == 0 then jump Sub1
if v0 == 7 then
again
save v0
return
: Sub2
if v2 != v3 then return
i := D1
if v4 != 0 then i := D2
sprite vD vE 1
vE += 2
v8 += 1
v2 := 14
v3 := 15
return
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D4 0 0 0 0
: D5 0 0 0 0
: D6
######################################################################
# INPUT: chip8/Chip-8 Games/Merlin [David Winter].ch8
######################################################################
:proto L1 # 219
:proto L5 # 279
:proto L6 # 283
:proto L7 # 28D
:proto L8 # 297
:proto L9 # 2B5
:proto Sub1 # 2C1
:proto Sub2 # 2CB
:proto Sub3 # 2DF
:proto Sub4 # 2F9
:proto D1 # 30F
:proto D2 # 317
:proto D3 # 31D
:proto D4 # 331
:proto D5 # 345
:proto D6 # 359
: main
jump L1
0x20 0x4d 0x45 0x52 0x4c 0x49 0x4e 0x20 0x42 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
Sub4
i := D3
v0 := 16
v1 := 0
Sub2
i := D4
v0 := 11
v1 := 27
Sub2
v4 := 4
: L2
Sub3
v5 := 0
v2 := 40
Sub1
loop
v2 := random 0b11
v0 := v2
i := D6
i += v5
save v0
v0 := 23
v1 := 8
v3 := 1
v3 &= v2
if v3 != 0 then v0 += 10
v3 := 2
v3 &= v2
if v3 != 0 then v1 += 10
i := D2
sprite v0 v1 6
v2 := 20
Sub1
sprite v0 v1 6
v2 := 5
Sub1
v5 += 1
if v4 != v5 then
again
v5 := 0
: L4
loop
v0 := 23
v1 := 8
i := D2
v3 := key
if v3 != 4 then jump L5
v3 := 0
jump L8
: L5
if v3 != 5 then jump L6
v0 += 10
v3 := 1
jump L8
: L6
if v3 != 7 then jump L7
v1 += 10
v3 := 2
jump L8
: L7
if v3 != 8 then jump L4
v0 += 10
v1 += 10
v3 := 3
: L8
sprite v0 v1 6
v2 := 20
Sub1
sprite v0 v1 6
i := D6
i += v5
load v0
v5 += 1
if v0 != v3 then jump L9
if v5 != v4 then
again
Sub3
v4 += 1
jump L2
: L9
Sub4
i := D5
v0 := 16
v1 := 14
Sub2
loop
again
: Sub1
delay := v2
loop
v2 := delay
if v2 != 0 then
again
return
: Sub2
v3 := v0
v2 := 5
loop
sprite v0 v1 5
i += v2
v0 += 8
v5 := v3
v5 += 32
if v0 != v5 then
again
return
: Sub3
i := D6
v3 := v4
v3 += -3
bcd v3
load v2
i := hex v1
v0 := 43
v3 := 27
sprite v0 v3 5
v0 += 5
i := hex v2
sprite v0 v3 5
return
: Sub4
i := D1
v0 := 23
v1 := 7
sprite v0 v1 8
v0 += 10
sprite v0 v1 8
v1 += 10
sprite v0 v1 8
v0 += -10
sprite v0 v1 8
return
: D1
0xff 0x81 0x81 0x81 0x81 0x81 0x81 0xff
: D2
0x7e 0x7e 0x7e 0x7e 0x7e 0x7e
: D3
0xdb 0xaa 0x8b 0xcb 0xcb 0xef 0x8 0x8f 0xd 0xec 0xa0 0xa0 0xb0 0x30 0xbe 0x5f 0x51 0x51 0xd9 0xd9
: D4
0x83 0x82 0x83 0x82 0xfb 0xe8 0x8 0x88 0x5 0xe2 0xbe 0xa0 0xb8 0x20 0x3e 0x80 0x80 0x80 0x80 0xf8
: D5
0xf7 0x85 0xb7 0x95 0xf5 0x76 0x54 0x56 0x54 0x56 0x3a 0x2a 0x2a 0x2a 0x39 0xb6 0xa5 0xb6 0xa5 0x35
: D6
######################################################################
# INPUT: chip8/Chip-8 Games/Missile [David Winter].ch8
######################################################################
:proto L1 # 219
:proto L4 # 249
:proto L5 # 24F
:proto L8 # 291
:proto L9 # 295
:proto L10 # 297
:proto D1 # 2AD
:proto D2 # 2B0
:proto D3 # 2B4
: main
jump L1
0x4d 0x49 0x53 0x53 0x49 0x4c 0x45 0x20 0x62 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
vC := 12
v0 := 0
v1 := 0
v5 := 8
v6 := 10
v7 := 0
vE := 1
i := D1
loop
sprite v0 v1 4
v0 += 8
if v0 != 64 then
again
v0 := 0
v1 := 28
i := D2
sprite v0 v1 4
: L3
i := D2
sprite v0 v1 4
if vE != 1 then jump L4
v0 += 4
if v0 == 56 then vE := 0
jump L5
: L4
v0 += -4
if v0 == 0 then vE := 1
: L5
sprite v0 v1 4
delay := vC
loop
vB := delay
if vB != 0 then
again
v2 := 8
if v2 -key then jump L9
if vC != 0 then vC += -2
v3 := 27
v2 := v0
i := D2
sprite v2 v3 1
v4 := 0
loop
sprite v2 v3 1
v3 += -1
sprite v2 v3 1
if vF != 0 then v4 := 1
if v3 != 3 then
again
sprite v2 v3 1
if v4 != 1 then jump L8
v7 += 5
v5 += -1
v2 := v0
v3 := 0
i := D1
sprite v2 v3 4
if v5 == 0 then jump L10
: L8
v6 += -1
if v6 != 0 then : L9
jump L3
: L10
i := D3
bcd v7
load v2
v3 := 27
v4 := 13
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
loop
again
: D1
0x10 0x38 0x38
: D2
0x10 0x38 0x7c 0xfe
: D3
######################################################################
# INPUT: chip8/Chip-8 Games/Most Dangerous Game [Peter Maruhnic].ch8
######################################################################
:proto L5 # 26A
:proto L8 # 288
:proto L9 # 28C
:proto Sub1 # 2A6
:proto Sub2 # 2D6
:proto Sub3 # 2EC
:proto L13 # 308
:proto Sub4 # 310
:proto Sub5 # 31A
:proto Sub6 # 332
:proto L15 # 342
:proto L16 # 364
:proto Sub7 # 372
:proto L18 # 380
:proto L19 # 390
:proto L20 # 39C
:proto Sub8 # 3A0
:proto L22 # 3F6
:proto L23 # 404
:proto L24 # 412
:proto Sub9 # 41A
:proto Sub10 # 424
:proto Sub11 # 430
:proto L27 # 440
:proto L29 # 464
:proto D1 # 4A0
:proto Sub14 # 4AE
:proto L30 # 4E0
:proto L31 # 4F4
:proto L33 # 508
:proto L34 # 516
:proto L35 # 51E
:proto L37 # 52C
:proto L38 # 53A
:proto L39 # 542
:proto L40 # 556
:proto L41 # 564
:proto L42 # 572
:proto L44 # 596
:proto L45 # 5AA
:proto L46 # 5BE
:proto D2 # 5C8
:proto D3 # 5CD
:proto D4 # 5D2
:proto D5 # 5D7
:proto D6 # 5DC
:proto D7 # 5E3
:proto D8 # 5EA
:proto D9 # 5EC
:proto D10 # 5EF
:proto D11 # 5F0
:proto D12 # 5F1
:proto D13 # 671
:proto D14 # 678
:proto D15 # 67F
:proto D16 # 682
:proto D17 # 684
:proto D18 # 68E
: main
v0 := 1
i := D11
save v0
v0 := -1
v1 := 0
loop
save v0
v1 += 1
if v1 != 128 then
again
clear
v0 := 15
v1 := 6
v2 := 3
v3 := 0
v4 := 46
v5 := 30
v6 := 1
i := D13
save v6
i := D10
sprite v4 v5 1
v2 := 5
v4 := 18
v5 := 2
sprite v4 v5 1
i := D14
save v6
i := D10
v2 := 4
: L2
v1 := 20
loop
sprite v1 v2 1
v1 += 4
if v1 != 48 then
again
v2 += 4
if v2 != 32 then jump L2
vE := 1
loop
i := D13
Sub2
Sub4
Sub7
if vF != 0 then jump L5
Sub4
Sub5
Sub6
if vF != 0 then jump L8
Sub5
i := D16
Sub2
again
: L5
if vF != 1 then jump L9
: L6
clear
v0 := 5
loop
Sub1
Sub4
Sub10
Sub4
Sub1
Sub1
Sub4
v0 += -1
if v0 != 0 then
again
jump main
: L8
if vF != 1 then jump L6
: L9
clear
v0 := 5
loop
Sub1
Sub5
Sub10
Sub5
Sub1
Sub1
Sub5
v0 += -1
if v0 != 0 then
again
jump main
: Sub1
vA := 16
vB := 16
i := D2
sprite vA vB 5
vA += 8
i := D3
sprite vA vB 5
vA += 8
i := D4
sprite vA vB 5
vA += 8
i := D5
sprite vA vB 5
return
0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xd4
: Sub2
load v1
i := D16
save v1
v3 := v1
vA := 1
vB := 4
Sub3
v0 := v3
vA := 51
Sub3
return
: Sub3
i := D15
bcd v0
load v2
if v0 == 0 then jump L13
i := hex v0
sprite vA vB 5
vA += 5
: L11
i := hex v1
sprite vA vB 5
: L12
vA += 5
i := hex v2
sprite vA vB 5
return
: L13
if v1 == 0 then jump L12
vA += 2
jump L11
: Sub4
vA := 3
vB := 23
i := D6
sprite vA vB 7
return
: Sub5
vA := 55
vB := 23
i := D7
sprite vA vB 7
return
0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xd4
: Sub6
i := D13
load v6
loop
Sub8
if vF != 3 then jump L15
v2 += -1
if v2 != 0 then
again
: L15
i := D13
load v2
i := D13
save v6
if vF == 1 then return
if vF != 2 then if v1 == 0 then jump L16
v6 := 4
v3 := 1
Sub8
if vF == 0 then jump L16
v1 += -1
if vF == 1 then return
: L16
v0 += -1
vF := 0
if v0 == 0 then vF := -1
i := D13
save v1
return
: Sub7
i := D14
load v6
loop
if v4 == 46 then if v5 != 30 then jump L18
vF := 1
return
: L18
Sub8
if vF == 1 then jump L20
if vF != 3 then jump L19
v2 += -1
if v2 != 0 then
again
: L19
vF := 0
i := D14
load v2
i := D14
save v6
return
: L20
vF := -1
return
: Sub8
i := D17
save v9
i := D10
Sub11
vF := 0
if v0 == 0 then jump L22
if v3 == 1 then sprite v4 v5 1
vC := 0
vD := 0
if v0 == 2 then vC := -1
if v0 == 4 then vD := -1
if v0 == 6 then vD := 1
if v0 == 8 then vC := 1
vA := v4
vB := v5
loop
Sub9
Sub10
Sub9
Sub14
i := D10
if v0 == 0 then jump L23
Sub9
Sub10
Sub9
if vF == 1 then jump L24
v4 := vA
v5 := vB
v6 += -1
if v6 != 0 then
again
vD := 2
buzzer := vD
if v3 == 1 then sprite vA vB 1
vF := 3
: L22
i := D17
vA := v4
vB := v5
load v9
v4 := vA
v5 := vB
return
: L23
vD := 16
buzzer := vD
sprite vA vB 1
if v3 == 0 then sprite v4 v5 1
vF := 2
jump L22
: L24
vD := 32
buzzer := vD
vF := 1
jump L22
: Sub9
sprite vA vB 1
vA += vD
vB += vC
sprite vA vB 1
return
: Sub10
v8 := 8
delay := v8
loop
v8 := delay
if v8 != 0 then
again
return
: Sub11
v0 := 0
sprite v4 v5 1
loop
if v0 key then jump L27
v0 += 2
if v0 != 10 then
again
jump Sub11
: L27
vD := 8
buzzer := vD
if vF != 0 then sprite v4 v5 1
loop
if v0 key then
again
return
: Sub12
v4 <<= v1
v4 <<= v4
v5 <<= v2
v3 >>= v2
if vF != 1 then jump L29
v4 += 16
v5 += -1
i := D9
sprite v4 v5 3
return
: L29
v4 += 17
i := D8
sprite v4 v5 1
return
0x1 0x0 0x0 0xd4
: Sub13
i := D1
v1 <<= v0
v0 += v1
i += v0
load v2
i := D12
v0 += v8
i += v0
load v0
i += v1
v1 := v0
load v0
i += v2
v2 := v1
v2 -= v0
if vF != 0 then v1 := v0
load v0
v2 := v0
v2 -= v1
if vF != 0 then v0 := v1
return
0x1 0x0
: D1
0x7 0x0 0x7 0xf0 0x6 0x0 0xf9 0x7 0x7 0xf8 0x6 0x8 0x0 0xd4
: Sub14
v0 := 0
if vA != 16 then if vA == 48 then return
if vB != 0 then if vB == 32 then return
v1 >>= vA
v1 >>= v1
v1 += -4
v2 >>= vB
i := D18
save vF
v8 <<= v2
v8 <<= v8
v8 <<= v8
v8 += v1
i := D12
i += v8
load v0
if v0 == -1 then jump L30
if v0 == -2 then jump L46
jump L45
: L30
v3 := random 0b11111111
v6 := 112
v3 += v6
if vF == 1 then jump L31
v0 := -2
i := D12
i += v8
save v0
jump L46
: L31
v3 >>= v2
if vF != 1 then jump L35
if v2 != 1 then jump L33
vA := 0
: L32
v0 := 0
Sub13
vB := v0
jump L39
: L33
if v2 != 15 then jump L34
vB := 0
v0 := 1
Sub13
vA := v0
jump L39
: L34
v0 := 1
Sub13
vA := v0
jump L32
: L35
if v1 != 0 then jump L37
vA := 0
: L36
v0 := 2
Sub13
vB := v0
jump L39
: L37
if v1 != 7 then jump L38
vB := 0
v0 := 3
Sub13
vA := v0
jump L39
: L38
v0 := 3
Sub13
vA := v0
jump L36
: L39
if vA != vB then jump L41
if vA != -2 then if vA == -1 then jump L40
i := D12
i += v8
v0 := -2
save v0
jump L46
: L40
i := D11
load v0
v0 += 1
i := D11
save v0
vA := v0
jump L44
: L41
v3 := vA
v3 -= vB
if vF == 0 then jump L42
v3 := vA
vA := vB
vB := v3
: L42
if vA == -2 then jump L40
if vB != -2 then if vB == -1 then jump L44
v3 := -1
i := D12
: L43
loop
if v3 == 128 then jump L44
load v0
v3 += 1
if vB != v0 then jump L43
i := D12
i += v3
v0 := vA
save v0
again
: L44
i := D12
i += v8
v0 := vA
save v0
if vE == 0 then jump L45
i := D18
load v2
Sub12
jump L45
: L45
i := D18
load vF
Sub12
vD := 30
buzzer := vD
Sub12
i := D18
load v5
v0 := 0
return
: L46
i := D18
load vF
v0 := 1
return
0x1 0x0
: D2
0x8a 0x8a 0xaa 0xda 0x8a
: D3
0x8a 0xcb 0xaa 0x9a 0x8a
: D4
0x2f 0x28 0xae 0x68 0x2f
: D5
0x7b 0x4b 0x7b 0x50 0x4b
: D6
0x10 0x20 0x40 0xbf 0x40 0x20 0x10
: D7
0x8 0x4 0x2 0xfd 0x2 0x4 0x8
: D8
0xe0 0x0
: D9
0x80 0x80 0x80
: D10
0x80
: D11
0x0
: D12
0xd4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D13 0 0 0 0 0 0 0
: D14 0 0 0 0 0 0 0
: D15 0 0 0
: D16 0 0
: D17 0 0 0 0 0 0 0 0 0 0
: D18
######################################################################
# INPUT: chip8/Chip-8 Games/Nim [Carmelo Cortez, 1978].ch8
######################################################################
:proto L2 # 218
:proto L4 # 226
:proto L6 # 250
:proto L7 # 25A
:proto Sub1 # 262
:proto L8 # 282
:proto L10 # 292
:proto D1 # 2A2
:proto D2 # 2A7
:proto D3 # 2AC
:proto D4 # 2B1
:proto D5 # 350
: main
vE := 35
vD := 2
Sub1
vC := key
if vC == 15 then jump L2
: L1
vA := 1
vE -= vA
Sub1
vD -= vA
if vE == 0 then jump L8
: L2
v8 := 1
loop
if v8 key then jump L4
v8 += 1
if v8 != 4 then
again
jump L2
: L4
v5 := vE
v5 -= v8
if vF != 1 then jump L2
vE -= v8
Sub1
if vE == 0 then jump L10
v9 := 112
delay := v9
loop
v9 := delay
if v9 != 0 then
again
if v8 == vD then jump L6
v7 := v8
v6 := vD
v7 -= v6
if vF == 0 then jump L6
vD += 4
: L6
vD -= v8
if vD != 0 then jump L7
vD := 4
jump L1
: L7
vE -= vD
Sub1
vD := 4
jump L2
: Sub1
buzzer := vA
clear
i := D5
bcd vE
v3 := 16
vB := 0
load v2
i := hex v0
sprite v3 vB 5
v3 += 5
i := hex v1
sprite v3 vB 5
v3 += 5
i := hex v2
sprite v3 vB 5
return
: L8
i := D1
v0 := 0
v1 := 21
sprite v0 v1 5
i := D2
v0 := 8
sprite v0 v1 5
loop
again
: L10
i := D3
v0 := 0
v1 := 16
sprite v0 v1 5
i := D4
v0 := 8
sprite v0 v1 5
loop
again
: D1
0x8b 0x89 0x89 0xa9 0xdb
: D2
0xb2 0x32 0x2a 0x26 0xa6
: D3
0x8e 0x8a 0x8a 0x8a 0xee
: D4
0xee 0x88 0xec 0x28 0xee 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D5
######################################################################
# INPUT: chip8/Chip-8 Games/Paddles.ch8
######################################################################
:proto L3 # 266
:proto L4 # 280
:proto Sub1 # 29A
:proto Sub2 # 2B0
:proto Sub3 # 2B8
:proto Sub4 # 2C0
:proto Sub5 # 2DA
:proto Sub6 # 2E2
:proto Sub7 # 2EA
:proto Sub8 # 2F2
:proto L5 # 2FA
:proto L6 # 30A
:proto L7 # 31C
:proto L8 # 320
:proto L9 # 324
:proto L10 # 328
:proto L11 # 32C
:proto L12 # 336
:proto Sub9 # 340
:proto Sub10 # 346
:proto Sub11 # 34C
:proto Sub12 # 352
:proto Sub13 # 358
:proto L13 # 362
:proto L14 # 36C
:proto L15 # 370
:proto L16 # 374
:proto L17 # 37E
:proto L18 # 382
:proto Sub14 # 386
:proto Sub15 # 3A0
:proto Sub16 # 3AC
:proto Sub17 # 3B2
:proto Sub18 # 3C8
:proto Sub19 # 3D0
:proto Sub20 # 3D8
:proto Sub21 # 3E2
:proto Sub22 # 3FA
:proto Sub23 # 40A
:proto L20 # 41C
:proto D1 # 41E
:proto D2 # 426
:proto D3 # 427
:proto D4 # 428
:proto D5 # 42E
: main
clear
v8 := 0
v9 := 0
vA := 32
vB := 32
vC := 9
vD := 3
vE := 3
Sub14
Sub17
Sub15
Sub21
v7 := 0
loop
v0 := 15
if v0 key then v7 := 1
v0 := 14
if v0 key then v7 := 2
if v7 == 0 then
again
clear
Sub14
Sub17
Sub15
Sub21
Sub16
: L2
loop
Sub16
Sub15
if vE == 1 then Sub9
if vE == 2 then Sub10
if vE == 3 then Sub11
if vE == 4 then Sub12
Sub13
if v7 == 1 then Sub1
if v7 == 2 then Sub4
Sub15
Sub16
if vF == 1 then jump L5
if vD == 0 then jump L3
if vD == 31 then jump L4
jump L2
: L3
Sub16
Sub21
v9 += 1
Sub21
v0 := 15
buzzer := v0
if v9 == 9 then jump L20
vC := 9
vD := 2
vE := 2
Sub16
jump L2
: L4
Sub16
Sub21
v8 += 1
Sub21
v0 := 15
buzzer := v0
if v8 == 9 then jump L20
vC := 9
vD := 28
vE := 1
Sub16
jump L2
: Sub1
v0 := 4
if v0 key then Sub2
v0 := 6
if v0 key then Sub3
v3 := random 0b11
if v3 == 0 then return
vA := vC
return
: Sub2
if vB == 8 then return
vB += -2
return
: Sub3
if vB == 56 then return
vB += 2
return
: Sub4
v0 := 4
if v0 key then Sub5
v0 := 6
if v0 key then Sub6
v0 := 7
if v0 key then Sub7
v0 := 9
if v0 key then Sub8
return
: Sub5
if vA == 8 then return
vA += -2
return
: Sub6
if vA == 56 then return
vA += 2
return
: Sub7
if vB == 8 then return
vB += -2
return
: Sub8
if vB == 56 then return
vB += 2
return
: L5
v0 := 5
buzzer := v0
if vD == 1 then jump L11
if vD == 30 then jump L12
if vD == 16 then jump L6
: L6
if vE == 1 then jump L7
if vE == 2 then jump L8
if vE == 3 then jump L9
if vE == 4 then jump L10
jump L2
: L7
vE := 2
jump L2
: L8
vE := 1
jump L2
: L9
vE := 4
jump L2
: L10
vE := 3
jump L2
: L11
v0 := random 0b1
vE := 2
if v0 == 1 then vE := 3
jump L2
: L12
v0 := random 0b1
vE := 1
if v0 == 1 then vE := 4
again
: Sub9
vC += 1
vD += -1
return
: Sub10
vC += 1
vD += 1
return
: Sub11
vC += -1
vD += 1
return
: Sub12
vC += -1
vD += -1
return
: Sub13
if vC == 63 then jump L13
if vC == 8 then jump L16
return
: L13
if vE == 1 then jump L14
if vE == 2 then jump L15
return
: L14
vE := 4
return
: L15
vE := 3
return
: L16
if vE == 3 then jump L17
if vE == 4 then jump L18
return
: L17
vE := 2
return
: L18
vE := 1
return
: Sub14
v3 := 0
v4 := 15
i := D5
sprite v3 v4 2
i := D1
v4 := 0
v3 := 7
loop
sprite v3 v4 8
v4 += 8
if v4 == 32 then return
again
0x0 0xee
: Sub15
i := D2
v3 := 1
sprite vA v3 1
v3 := 30
sprite vB v3 1
return
: Sub16
i := D3
sprite vC vD 1
return
: Sub17
v5 := random 0b10
v3 := 8
v4 := 16
i := D2
if v5 == 0 then Sub18
if v5 == 1 then Sub19
if v5 == 2 then Sub20
return
: Sub18
sprite v3 v4 1
v3 := 56
sprite v3 v4 1
return
: Sub19
sprite v3 v4 1
v3 += 8
sprite v3 v4 1
return
: Sub20
v3 := 56
sprite v3 v4 1
v3 += -8
sprite v3 v4 1
return
: Sub21
v3 := 1
v4 := 1
i := hex v8
sprite v3 v4 5
v4 += 25
i := hex v9
sprite v3 v4 5
if v7 == 1 then Sub22
if v7 == 2 then Sub23
return
: Sub22
v4 := 9
v0 := 12
i := hex v0
sprite v3 v4 5
v4 := 18
i := D4
sprite v3 v4 5
return
: Sub23
v4 := 9
v0 := 10
i := hex v0
sprite v3 v4 5
v4 := 18
v0 += 1
i := hex v0
sprite v3 v4 5
return
: L20
loop
again
: D1
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D2
0xff
: D3
0x80
: D4
0xf0 0x90 0xf0 0x90 0x90 0x0
: D5
0xfe 0xfe
######################################################################
# INPUT: chip8/Chip-8 Games/Pong (1 player).ch8
######################################################################
:proto L5 # 278
:proto L6 # 282
:proto L7 # 28A
:proto L8 # 2A2
:proto L9 # 2BA
:proto L10 # 2C2
:proto L11 # 2C8
:proto Sub1 # 2D4
:proto D1 # 2EA
:proto D2 # 2F0
:proto D3 # 2F2
: main
vA := 2
vB := 12
vC := 63
vD := 12
i := D1
sprite vA vB 6
sprite vC vD 6
vE := 0
Sub1
v6 := 3
v8 := 2
: L1
v0 := 96
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v7 := random 0b10111
v7 += 8
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D1
sprite vA vB 6
sprite vC vD 6
v0 := 1
if v0 key then vB += -2
v0 := 4
if v0 key then vB += 2
v0 := 31
vB &= v0
sprite vA vB 6
vD := v7
v0 := random 0b1010
vD += -2
if v0 == 0 then vD += 2
v0 := 0
v0 := 31
vD &= v0
sprite vC vD 6
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v6 == 2 then jump L5
if v6 == 63 then jump L6
: L4
if v7 == 31 then v9 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
again
: L5
v8 := 2
v3 := 1
v0 := v7
v0 -= vB
jump L7
: L6
v8 := -2
v3 := 10
v0 := v7
v0 -= vD
: L7
if vF != 1 then jump L8
v1 := 2
v0 -= v1
if vF != 1 then jump L9
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L10
: L8
v0 := 32
buzzer := v0
Sub1
vE += v3
Sub1
v6 := 62
if v3 != 1 then v6 := 3
v8 := -2
if v3 != 1 then v8 := 2
jump L1
: L9
v9 += -1
if v9 == -2 then v9 := -1
jump L11
: L10
v9 += 1
if v9 == 2 then v9 := 1
: L11
v0 := 4
buzzer := v0
v6 += 1
if v6 == 64 then v6 += -2
jump L4
: Sub1
i := D3
bcd vE
load v2
i := hex v1
v4 := 20
v5 := 0
sprite v4 v5 5
v4 += 21
i := hex v2
sprite v4 v5 5
return
: D1
0x80 0x80 0x80 0x80 0x80 0x80
: D2
0x80 0x0
: D3
0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Pong 2 (Pong hack) [David Winter, 1997].ch8
######################################################################
:proto L5 # 278
:proto L6 # 282
:proto L7 # 28A
:proto L8 # 2A2
:proto L9 # 2BA
:proto L10 # 2C2
:proto L11 # 2C8
:proto Sub1 # 2D4
:proto D1 # 2EA
:proto D2 # 2F0
:proto D3 # 2F2
:proto Sub2 # 2FC
: main
Sub2
vB := 12
vC := 63
vD := 12
i := D1
sprite vA vB 6
sprite vC vD 6
vE := 0
Sub1
v6 := 3
v8 := 2
: L1
v0 := 96
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v7 := random 0b10111
v7 += 8
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D1
sprite vA vB 6
sprite vC vD 6
v0 := 1
if v0 key then vB += -2
v0 := 4
if v0 key then vB += 2
v0 := 31
vB &= v0
sprite vA vB 6
v0 := 12
if v0 key then vD += -2
v0 := 13
if v0 key then vD += 2
v0 := 31
vD &= v0
sprite vC vD 6
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v6 == 0 then jump L5
if v6 == 63 then jump L6
: L4
if v7 == 31 then v9 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
again
: L5
v8 := 2
v3 := 1
v0 := v7
v0 -= vB
jump L7
: L6
v8 := -2
v3 := 10
v0 := v7
v0 -= vD
: L7
if vF != 1 then jump L8
v1 := 2
v0 -= v1
if vF != 1 then jump L9
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L10
: L8
v0 := 32
buzzer := v0
Sub1
vE += v3
Sub1
v6 := 62
if v3 != 1 then v6 := 3
v8 := -2
if v3 != 1 then v8 := 2
jump L1
: L9
v9 += -1
if v9 == -2 then v9 := -1
jump L11
: L10
v9 += 1
if v9 == 2 then v9 := 1
: L11
v0 := 4
buzzer := v0
v6 += 1
if v6 == 64 then v6 += -2
jump L4
: Sub1
i := D3
bcd vE
load v2
i := hex v1
v4 := 20
v5 := 2
sprite v4 v5 5
v4 += 21
i := hex v2
sprite v4 v5 5
return
: D1
0x80 0x80 0x80 0x80 0x80 0x80
: D2
0x80 0x0
: D3
0x0 0x0 0x0 0x0
: D4
0xc0 0xc0 0xc0 0x0
: D5
0xff 0x0
: Sub2
vB := 32
vC := 0
i := D4
loop
sprite vB vC 4
vC += 4
if vC != 32 then
again
vA := 0
vB := 0
vC := 31
i := D5
loop
sprite vA vB 1
sprite vA vC 1
vA += 8
if vA != 64 then
again
i := D4
vA := 0
vB := 32
sprite vB vA 1
return
######################################################################
# INPUT: chip8/Chip-8 Games/Pong (alt).ch8
######################################################################
:proto L5 # 278
:proto L6 # 282
:proto L7 # 28A
:proto L8 # 2A2
:proto L9 # 2BA
:proto L10 # 2C2
:proto L11 # 2C8
:proto Sub1 # 2D4
:proto D1 # 2EA
:proto D2 # 2F0
:proto D3 # 2F2
:proto Sub2 # 2F6
: main
Sub2
vB := 12
vC := 63
vD := 12
i := D1
sprite vA vB 6
sprite vC vD 6
vE := 0
Sub1
v6 := 3
v8 := 2
: L1
v0 := 96
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v7 := random 0b10111
v7 += 8
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D1
sprite vA vB 6
sprite vC vD 6
v0 := 1
if v0 key then vB += -2
v0 := 4
if v0 key then vB += 2
v0 := 31
vB &= v0
sprite vA vB 6
v0 := 12
if v0 key then vD += -2
v0 := 13
if v0 key then vD += 2
v0 := 31
vD &= v0
sprite vC vD 6
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v6 == 0 then jump L5
if v6 == 63 then jump L6
: L4
if v7 == 31 then v9 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
again
: L5
v8 := 2
v3 := 1
v0 := v7
v0 -= vB
jump L7
: L6
v8 := -2
v3 := 10
v0 := v7
v0 -= vD
: L7
if vF != 1 then jump L8
v1 := 2
v0 -= v1
if vF != 1 then jump L9
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L10
: L8
v0 := 32
buzzer := v0
Sub1
vE += v3
Sub1
v6 := 62
if v3 != 1 then v6 := 3
v8 := -2
if v3 != 1 then v8 := 2
jump L1
: L9
v9 += -1
if v9 == -2 then v9 := -1
jump L11
: L10
v9 += 1
if v9 == 2 then v9 := 1
: L11
v0 := 4
buzzer := v0
v6 += 1
if v6 == 64 then v6 += -2
jump L4
: Sub1
i := D3
bcd vE
load v2
i := hex v1
v4 := 20
v5 := 0
sprite v4 v5 5
v4 += 21
i := hex v2
sprite v4 v5 5
return
: D1
0x80 0x80 0x80 0x80 0x80 0x80
: D2
0x80 0x0
: D3
0x0 0x0 0x0 0x0
: Sub2
vB := 32
vC := 0
i := D1
loop
sprite vB vC 1
vC += 1
if vC != 32 then
again
vA := 0
return
######################################################################
# INPUT: chip8/Chip-8 Games/Pong [Paul Vervalin, 1990].ch8
######################################################################
:proto L5 # 278
:proto L6 # 282
:proto L7 # 28A
:proto L8 # 2A2
:proto L9 # 2BA
:proto L10 # 2C2
:proto L11 # 2C8
:proto Sub1 # 2D4
:proto D1 # 2EA
:proto D2 # 2F0
:proto D3 # 2F2
: main
vA := 2
vB := 12
vC := 63
vD := 12
i := D1
sprite vA vB 6
sprite vC vD 6
vE := 0
Sub1
v6 := 3
v8 := 2
: L1
v0 := 96
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v7 := random 0b10111
v7 += 8
v9 := -1
i := D2
sprite v6 v7 1
loop
i := D1
sprite vA vB 6
sprite vC vD 6
v0 := 1
if v0 key then vB += -2
v0 := 4
if v0 key then vB += 2
v0 := 31
vB &= v0
sprite vA vB 6
v0 := 12
if v0 key then vD += -2
v0 := 13
if v0 key then vD += 2
v0 := 31
vD &= v0
sprite vC vD 6
i := D2
sprite v6 v7 1
v6 += v8
v7 += v9
v0 := 63
v6 &= v0
v1 := 31
v7 &= v1
if v6 == 2 then jump L5
if v6 == 63 then jump L6
: L4
if v7 == 31 then v9 := -1
if v7 == 0 then v9 := 1
sprite v6 v7 1
again
: L5
v8 := 2
v3 := 1
v0 := v7
v0 -= vB
jump L7
: L6
v8 := -2
v3 := 10
v0 := v7
v0 -= vD
: L7
if vF != 1 then jump L8
v1 := 2
v0 -= v1
if vF != 1 then jump L9
v0 -= v1
if vF != 1 then jump L11
v0 -= v1
if vF != 1 then jump L10
: L8
v0 := 32
buzzer := v0
Sub1
vE += v3
Sub1
v6 := 62
if v3 != 1 then v6 := 3
v8 := -2
if v3 != 1 then v8 := 2
jump L1
: L9
v9 += -1
if v9 == -2 then v9 := -1
jump L11
: L10
v9 += 1
if v9 == 2 then v9 := 1
: L11
v0 := 4
buzzer := v0
v6 += 1
if v6 == 64 then v6 += -2
jump L4
: Sub1
i := D3
bcd vE
load v2
i := hex v1
v4 := 20
v5 := 0
sprite v4 v5 5
v4 += 21
i := hex v2
sprite v4 v5 5
return
: D1
0x80 0x80 0x80 0x80 0x80 0x80
: D2
0x80 0x0
: D3
0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Programmable Spacefighters [Jef Winsor].ch8
######################################################################
:proto L9 # 2A6
:proto L12 # 2D0
:proto L17 # 31A
:proto L18 # 326
:proto L19 # 32E
:proto L20 # 33C
:proto L21 # 356
:proto L23 # 362
:proto L26 # 384
:proto L28 # 3BA
:proto L30 # 3D6
:proto L31 # 3DE
:proto L32 # 3E4
:proto L33 # 3E8
:proto L34 # 3FC
:proto L35 # 400
:proto L36 # 406
:proto L37 # 412
:proto L40 # 464
:proto L41 # 470
:proto Sub1 # 478
:proto Sub2 # 482
:proto Sub3 # 48E
:proto L42 # 4A8
:proto L43 # 4B0
:proto L45 # 4B8
:proto Sub4 # 4C0
:proto Sub5 # 4D2
:proto Sub6 # 4D4
:proto Sub7 # 4D8
:proto Sub8 # 4DE
:proto Sub9 # 4E4
:proto Sub10 # 4FC
:proto Sub11 # 506
:proto L47 # 514
:proto Sub12 # 518
:proto Sub13 # 52C
:proto Sub14 # 52E
:proto Sub15 # 538
:proto Sub16 # 540
:proto Sub18 # 55E
:proto Sub19 # 564
:proto Sub20 # 570
:proto Sub21 # 592
:proto Sub22 # 59E
:proto L51 # 5A0
:proto D1 # 5A4
:proto D2 # 5A5
:proto D3 # 5BD
:proto D4 # 5C8
:proto D5 # 5D5
:proto D6 # 5DF
:proto D7 # 5E2
:proto D8 # 5E5
:proto D9 # 5E8
:proto D10 # 5EB
:proto D11 # 5F0
:proto D12 # 5F1
:proto D13 # 5F5
:proto D14 # 5FA
:proto D15 # 5FB
:proto D16 # 5FC
:proto D17 # 5FD
:proto D18 # 5FE
:proto D19 # 600
:proto D20 # 628
:proto D21 # 630
: main
v1 := 30
v2 := 14
i := D5
sprite v1 v2 3
v5 := 0
loop
Sub20
v5 += 1
if v5 != 6 then
again
i := D15
load v5
if v4 == 0 then v4 := 1
if v2 == 0 then v2 := 1
if v1 == 0 then v1 := 1
if v0 == 0 then v0 := 1
v6 := 8
v6 &= v0
if v6 != 0 then v0 := 8
v6 := v1
v1 := v5
i := D15
save v4
v3 := v6
v4 := 0
clear
vE := 0
loop
vB := vE
vA := 3
i := D2
Sub18
load v2
vA := 5
i := D19
Sub18
save v4
Sub19
vE += 1
i := D15
load v0
if v0 != vE then
again
i := D3
v5 := 62
v6 := 1
sprite v5 v6 13
v6 := 16
sprite v5 v6 13
v6 := 31
loop
v5 += -9
sprite v5 v6 1
if v5 != 17 then
again
v5 := 0
v1 := 0
v2 := 8
loop
Sub21
v5 += 1
v2 += 6
if v5 != 3 then
again
i := D18
load v0
jump L41
: L5
Sub21
: L6
v1 := 4
v2 += 1
i := D5
loop
sprite v1 v2 3
v2 += -6
if v2 != 3 then
again
v0 := 0
jump L9
: L8
Sub15
load v0
Sub16
i := D1
load v0
: L9
v0 += 1
if v0 == 100 then v0 := 0
Sub15
save v0
Sub16
: L10
vE := key
if vE == 0 then jump L12
vE += -1
v6 := 8
v6 &= vE
if v6 != 0 then vE := 7
Sub13
Sub12
loop
Sub11
if v7 == 16 then
again
Sub12
jump L10
: L12
loop
i := D13
load v9
Sub13
if v3 == -16 then jump L23
vA := key
Sub12
: L13
i := D17
load v0
vD := v0
Sub10
v8 := 0
v0 := 14
loop
save v0
v8 += 1
if v8 != 15 then
again
Sub8
: L15
vD += -1
Sub9
loop
Sub13
Sub11
if v7 != 16 then v7 := key
i := D18
load v0
if v0 == 0 then jump L17
v8 := delay
if v8 != 0 then jump L17
Sub9
v9 += -1
Sub8
if v9 == 0 then jump L20
Sub9
: L17
if v7 == 16 then
again
if v7 != 11 then jump L18
Sub9
jump L13
: L18
if v7 != 14 then jump L19
Sub9
jump L20
: L19
Sub10
i += vD
v0 := v7
save v0
Sub9
if vD != 0 then jump L15
: L20
Sub13
Sub12
i := D16
load v0
v6 := v0
i := D14
load v5
Sub13
if v6 == 0 then jump L21
v5 += v4
if vF == 1 then v5 := -1
: L21
v4 := v5
vA := 5
i := D19
Sub7
loop
if vA -key then
again
: L23
i := D15
load v0
vE += 1
if v0 != vE then
again
i := D11
load vD
: L24
vD += -1
vE := 0
loop
Sub13
if v3 == -16 then jump L26
Sub10
i += vD
load v0
if v0 == 5 then jump L37
: L26
vE += 1
i := D15
load v0
if v0 != vE then
again
vE := 0
v9 := 0
: L27
Sub13
if v3 == 0 then jump L36
if v3 == -16 then jump L28
Sub10
i += vD
load v0
if v0 != 14 then v9 := -1
if v0 == 2 then jump L32
if v0 == 1 then jump L30
if v0 == 3 then jump L30
if v0 == 4 then jump L31
if v0 == 6 then jump L31
: L28
vE += 1
i := D15
load v0
vC := 0
delay := vC
loop
vC := delay
if vC != 0 then
again
if vE != v0 then jump L27
if v9 != 0 then if vD == 0 then jump L8
jump L24
: L30
v0 += 3
v5 := v0
Sub4
jump L33
: L31
v5 := v0
Sub4
jump L34
: L32
Sub13
Sub19
: L33
v6 := v0
Sub3
i := D4
vF := 0
sprite v1 v2 2
if vF == 1 then jump L35
v0 := v6
sprite v1 v2 2
Sub5
: L34
Sub19
jump L28
: L35
sprite v1 v2 2
Sub13
jump L34
: L36
v3 := -16
Sub5
Sub1
Sub19
Sub1
jump L28
: L37
Sub13
if v4 == 0 then jump L26
v4 += -1
Sub5
v7 := v0
loop
Sub3
if vF == -1 then jump L26
v6 := 3
vB := v7
vB &= v6
vA := 3
i := D6
Sub18
vF := 2
buzzer := vF
sprite v1 v2 3
vC := vF
sprite v1 v2 3
v0 := v7
if vC != 1 then
again
v5 := v1
v6 := v2
vB := 0
loop
if vB == vE then jump L40
Sub14
if v3 == -16 then jump L40
if v1 != v5 then jump L40
if v2 != v6 then jump L40
if v3 != 0 then v3 += -1
Sub6
Sub2
Sub2
jump L26
: L40
vB += 1
i := D15
load v0
if v0 != vB then
again
jump L26
: L41
if v0 != 0 then jump L5
v2 += -6
jump L6
: Sub1
vF := 3
i := D6
sprite v1 v2 3
i := D7
sprite v1 v2 3
: Sub2
buzzer := vF
i := D9
sprite v1 v2 3
i := D8
sprite v1 v2 3
return
: Sub3
i := D12
i += v0
load v0
v2 += v0
v0 := 1
i += v0
load v0
v1 += v0
vF := 0
if v1 != 14 then jump L42
v1 := 59
vF := -1
: L42
if v1 != 62 then jump L43
v1 := 17
vF := -1
: L43
if v2 != -3 then jump L45
v2 := 27
: L44
vF := -1
: L45
if v2 != 30 then return
v2 := 0
jump L44
: Sub4
Sub13
v6 := v0
Sub19
v0 := v6
if v5 == 4 then v0 += -2
v0 += 1
v6 := 7
v0 &= v6
: Sub5
vB := vE
: Sub6
vA := 5
i := D19
: Sub7
Sub18
save v4
return
: Sub8
v8 := -16
delay := v8
return
: Sub9
v5 := 7
v6 := 20
i := hex vD
sprite v5 v6 5
i := D18
load v0
if v0 == 0 then return
v6 := 26
i := hex v9
sprite v5 v6 5
return
: Sub10
vB := vE
vA := 15
i := D20
Sub18
return
: Sub11
Sub19
v7 := 0
loop
if v7 key then jump L47
v7 += 1
if v7 != 16 then
again
: L47
Sub19
return
: Sub12
vE += 1
v5 := 7
v6 := 8
i := hex vE
sprite v5 v6 5
v6 := 14
i := hex v3
sprite v5 v6 5
vE += -1
return
: Sub13
vB := vE
: Sub14
vA := 5
i := D19
Sub18
load v4
return
: Sub15
i := D1
v5 := 0
v6 := 1
return
: Sub16
i := D21
bcd v0
load v2
i := hex v1
sprite v5 v6 5
i := hex v2
v5 += 5
sprite v5 v6 5
return
: Sub17
vC := 0
loop
if vA == 0 then return
vC += vB
vA += -1
again
: Sub18
Sub17
i += vC
return
: Sub19
vA := 3
vB := v0
i := D4
Sub18
sprite v1 v2 3
return
: Sub20
v2 := 13
v1 := 26
Sub21
v1 := 33
Sub22
i := D15
i += v5
save v0
v6 := 120
delay := v6
loop
v6 := delay
if v6 != 0 then
again
v1 := 26
Sub21
v1 := 33
jump L51
: Sub21
i := D10
i += v5
load v0
: L50
i := hex v0
sprite v1 v2 5
return
: Sub22
v3 := key
: L51
v0 := v3
jump L50
: D1
0x1
: D2
0x6 0x3b 0xf 0x2 0x11 0xc 0x0 0x29 0x1b 0x4 0x23 0x0 0x0 0x1d 0x1b 0x4 0x2f 0x0 0x0 0x35 0x1b 0x4 0x17 0x0
: D3
0x49 0x0 0x0 0x40 0x0 0x0 0x40 0x0 0x0 0x40 0x0
: D4
0x0 0x40 0xa0 0x0 0xc0 0x40 0x80 0x40 0x80 0x40 0xc0 0x0 0xa0
: D5
0x40 0x0 0x40 0x60 0x0 0x20 0x40 0x20 0x0 0x60
: D6
0x40 0x40 0x40
: D7
0x20 0x40 0x80
: D8
0x0 0xe0 0x0
: D9
0x80 0x40 0x20
: D10
0x5 0xd 0xe 0xc 0xf
: D11
0xa
: D12
0xfd 0xfd 0x0 0x3
: D13
0x3 0x3 0x0 0xfd 0xfd
: D14
0xfd
: D15
0xd4
: D16 0
: D17 0
: D18 0 0
: D19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D20 0 0 0 0 0 0 0 0
: D21
######################################################################
# INPUT: chip8/Chip-8 Games/Puzzle.ch8
######################################################################
:proto L2 # 224
:proto Sub1 # 252
:proto L5 # 264
:proto L6 # 270
:proto L7 # 27C
:proto L8 # 288
:proto D1 # 2B0
:proto D2 # 300
: main
vA := 18
vB := 1
v1 := 16
v2 := 0
v0 := 0
loop
i := D1
sprite v1 v2 7
i := hex v0
if v0 != 0 then sprite vA vB 5
v1 += 8
vA += 8
if v1 != 48 then jump L2
v1 := 16
v2 += 8
vA := 18
vB += 8
: L2
i := D2
i += v0
save v0
v0 += 1
if v0 != 16 then
again
vA := 18
vB := 1
vC := 0
v2 := -1
loop
v0 := random 0b110
v0 += 2
Sub1
v2 += -1
if v2 != 0 then
again
vE := 0
vE := 0
loop
v0 := key
Sub1
vE += 1
vE += 1
again
: Sub1
v4 := vA
v5 := vB
v6 := vC
if v0 != 2 then jump L5
if v5 == 1 then jump L5
v5 += -8
v6 += -4
: L5
if v0 != 8 then jump L6
if v5 == 25 then jump L6
v5 += 8
v6 += 4
: L6
if v0 != 6 then jump L7
if v4 == 18 then jump L7
v4 += -8
v6 += -1
: L7
if v0 != 4 then jump L8
if v4 == 42 then jump L8
v4 += 8
v6 += 1
: L8
i := D2
i += v6
load v0
v1 := v0
v0 := 0
i := D2
i += v6
save v0
i := D2
i += vC
v0 := v1
save v0
i := hex v1
sprite v4 v5 5
sprite vA vB 5
vA := v4
vB := v5
vC := v6
return
0xee 0x5e
: D1
0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0xfe 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D2
######################################################################
# INPUT: chip8/Chip-8 Games/Reversi [Philip Baltzer].ch8
######################################################################
:proto L3 # 21A
:proto L4 # 21E
:proto L7 # 272
:proto L10 # 28C
:proto L11 # 2B0
:proto L12 # 2B8
:proto L13 # 2BA
:proto D1 # 2D7
:proto D2 # 2DA
:proto Sub1 # 2DE
:proto Sub2 # 2EC
:proto L16 # 306
:proto Sub3 # 30C
:proto L18 # 332
:proto L19 # 336
:proto L20 # 342
:proto L21 # 34E
:proto L22 # 356
:proto L23 # 35E
:proto L25 # 366
:proto L26 # 372
:proto Sub4 # 37E
:proto Sub5 # 388
:proto Sub6 # 394
:proto Sub7 # 39E
:proto Sub9 # 3A8
:proto L30 # 3C4
:proto L31 # 3C8
:proto L32 # 3CC
:proto Sub10 # 3D0
:proto L34 # 3F2
:proto Sub11 # 3FA
:proto L36 # 41A
:proto L37 # 426
:proto L38 # 42A
:proto Sub12 # 42E
:proto D3 # 440
: main
vD := 2
vE := 2
vC := 0
i := D1
vB := 0
: L1
vA := 17
loop
sprite vA vB 3
if vA != 45 then jump L3
if vB == 28 then jump L4
vB += 4
jump L1
: L3
vA += 4
again
: L4
vA := 29
vB := 12
sprite vA vB 3
vA += 4
vB += 4
sprite vA vB 3
i := D2
sprite vA vB 3
vA += -4
sprite vA vB 3
vB += -4
sprite vA vB 3
vA += 4
sprite vA vB 3
v0 := 2
Sub1
v0 := 52
Sub1
i := D1
v0 := 52
Sub1
Sub6
v9 := 1
Sub3
v8 := 0
: L5
Sub4
v9 := 0
loop
if v9 == 9 then jump L7
v9 += 1
if v9 -key then
again
if v9 == 5 then jump L10
if v8 != 0 then Sub7
Sub3
if v8 != 0 then Sub7
v1 := 2
buzzer := v1
jump L5
: L7
v9 := 15
if v9 -key then jump L5
: L8
if v8 != 0 then Sub2
vC += 128
if v8 != 0 then Sub2
v1 := 24
buzzer := v1
loop
if v9 key then
again
jump L5
: L10
if v8 != 0 then Sub4
Sub9
if v1 != 0 then jump L5
v3 := vA
v4 := vB
v9 := 0
Sub10
if v2 == 0 then jump L5
Sub6
i := D2
sprite v3 v4 3
if vC != 0 then jump L11
i := D1
sprite v3 v4 3
: L11
if vC != 0 then jump L12
vD += 1
jump L13
: L12
vE += 1
: L13
loop
Sub11
Sub10
if v2 != 0 then
again
Sub6
v1 := vD
v1 += vE
if v1 != 64 then jump L8
loop
Sub12
Sub12
Sub5
Sub12
again
0x1
: D1
0x0 0x40 0x0
: D2
0xe0 0xa0 0xe0 0xd4
: Sub1
v1 := 11
sprite v0 v1 3
v0 += 4
sprite v0 v7 3
v0 += 4
sprite v0 v1 3
return
: Sub2
i := D3
if vC != 0 then jump L16
v5 := 2
bcd vD
: L15
v6 := 4
load v2
i := hex v1
sprite v5 v6 5
v5 += 7
i := hex v2
sprite v5 v6 5
return
: L16
v5 := 52
bcd vE
jump L15
: Sub3
v7 := 0
if v9 == 9 then jump L26
if v9 == 8 then jump L23
if v9 == 7 then jump L25
if v9 == 6 then jump L22
if v9 == 4 then jump L21
if v9 == 3 then jump L20
if v9 == 1 then jump L19
if vB == 0 then jump L18
: L17
vB += -4
return
: L18
v7 := -1
return
: L19
if vB == 0 then jump L18
if vA == 17 then jump L18
vA += -4
jump L17
: L20
if vB == 0 then jump L18
if vA == 45 then jump L18
vA += 4
jump L17
: L21
if vA == 17 then jump L18
vA += -4
return
: L22
if vA == 45 then jump L18
vA += 4
return
: L23
if vB == 28 then jump L18
: L24
vB += 4
return
: L25
if vB == 28 then jump L18
if vA == 17 then jump L18
vA += -4
jump L24
: L26
if vB == 28 then jump L18
if vA == 45 then jump L18
vA += 4
jump L24
: Sub4
Sub5
Sub2
Sub7
v8 += 128
return
: Sub5
v1 := 16
delay := v1
loop
v1 := delay
if v1 != 0 then
again
return
: Sub6
Sub2
vC += 128
Sub2
vC += 128
return
: Sub7
i := D1
: L28
sprite vA vB 3
return
: Sub8
i := D2
jump L28
: Sub9
Sub8
v1 := vF
Sub8
if v1 == 0 then jump L32
Sub7
v1 := vF
Sub7
if v1 != 0 then jump L30
if vC != 0 then jump L31
: L29
v1 := 128
return
: L30
if vC != 0 then jump L29
: L31
v1 := -1
return
: L32
v1 := 0
return
: Sub10
vA := v3
vB := v4
v9 += 1
if v9 == 5 then v9 += 1
v2 := 0
if v9 == 10 then return
loop
Sub3
Sub9
if v1 == 0 then jump Sub10
if v1 != 128 then jump L34
if v2 != 0 then return
jump Sub10
: L34
if v7 == -1 then jump Sub10
v2 += 1
again
: Sub11
v1 := v9
v9 := 10
v9 -= v1
loop
Sub3
v1 := vA
v1 -= v3
if v1 != 0 then jump L36
v1 := vB
v1 -= v4
if v1 != 0 then jump L36
v1 := v9
v9 := 10
v9 -= v1
return
: L36
Sub7
if vC != 0 then jump L37
vD += 1
vE += -1
jump L38
: L37
vD += -1
vE += 1
: L38
Sub12
again
: Sub12
v1 := 4
buzzer := v1
Sub5
return
0x14 0x24 0x4a 0x2d 0x14 0x24 0x7a 0x4 0x14 0x20
: D3
0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Rocket [Joseph Weisbecker, 1978].ch8
######################################################################
:proto L5 # 262
:proto Sub1 # 26A
:proto D1 # 278
:proto D2 # 27E
:proto D3 # 2A0
:proto D4 # 2A2
: main
v1 := 0
v2 := 0
v3 := 56
v4 := 27
v5 := 0
v6 := 8
i := D2
sprite v5 v6 3
: L1
Sub1
if v2 == 9 then loop
again
v2 += 1
v8 := 26
vA := 0
v7 := random 0b11111
v7 += 15
v9 := 0
i := D1
sprite v7 v8 6
: L3
loop
i := D2
sprite v5 v6 3
v0 := random 0b11
v5 += v0
sprite v5 v6 3
if vF != 0 then jump L5
v0 := 15
if v0 key then v9 := 1
if v9 != 1 then jump L3
v0 := delay
if v0 != 0 then jump L3
i := D1
sprite v7 v8 6
v8 += -1
sprite v7 v8 6
if vF != 0 then jump L5
v0 := 3
delay := v0
if v8 != 0 then
again
: L4
Sub1
i := D1
sprite v7 v8 6
v1 += vA
jump L1
: L5
vA := 1
v0 := 3
buzzer := v0
jump L4
: Sub1
i := D3
bcd v1
i := D4
load v0
i := hex v0
sprite v3 v4 5
return
: D1
0x20 0x70 0x70 0xf8 0xd8 0x88
: D2
0x7c 0xd6 0x7c 0x0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D3 0 0
: D4
######################################################################
# INPUT: chip8/Chip-8 Games/Rocket Launcher.ch8
######################################################################
:proto Sub1 # 258
:proto D1 # 25E
:proto D2 # 260
:proto D3 # 268
: main
clear
i := D2
v0 := 7
v1 := 56
v2 := 25
sprite v0 v2 7
sprite v1 v2 7
i := D1
v0 := 0
v1 := 24
loop
sprite v0 v1 1
v0 += 8
if v0 != 64 then
again
v8 := 30
v9 := 17
Sub1
v0 := 15
loop
if v0 -key then
again
v0 := 8
buzzer := v0
: L3
Sub1
: L4
v9 += -1
Sub1
v0 := 2
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v0 := 1
buzzer := v0
if v9 != 0 then jump L3
clear
v4 := 12
loop
v5 := random 0b100000
v6 := random 0b1000000
sprite v6 v5 1
v4 += -1
if v4 != 0 then
again
v9 := 26
jump L4
: Sub1
i := D3
sprite v8 v9 7
return
: D1
0xff 0x0
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x0
: D3
0x20 0x70 0x70 0x70 0x70 0xf8 0x50 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Rocket Launch [Jonas Lindstedt].ch8
######################################################################
:proto L1 # 212
:proto L4 # 274
:proto L6 # 28C
:proto L7 # 2B8
:proto L8 # 2C4
:proto L9 # 2D4
:proto L11 # 324
:proto L15 # 39C
:proto D7 # E00
:proto D8 # F00
:proto D9 # FA0
: main
jump L1
0x4a 0x6f 0x6e 0x61 0x73 0x21
: D1
0xff 0xff
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: L1
clear
v0 := 1
v1 := 1
v2 := 62
i := D1
loop
sprite v0 v1 1
sprite v0 v2 1
v0 += 8
if v0 != 65 then
again
i := D2
v0 := 2
v1 := 1
v2 := 63
loop
sprite v1 v0 7
sprite v2 v0 7
v0 += 7
if v0 != 30 then
again
jump L4
: D3
0xc4 0xaa 0xca 0xaa 0xa4 0x0 0x84 0x8a 0x8e 0x8a 0xea 0x0 0x6a 0x8a 0x8c 0x8a 0x6a 0x0 0xaa 0xae 0xae 0xaa 0x4a 0x0 0xee 0x84 0xc4 0x84 0xe4 0x0 0x6a 0x8a 0x8e 0x8a 0x6a 0x0
: Sub1
i := D3
v2 := 12
sprite v0 v1 11
v0 += 8
i += v2
sprite v0 v1 11
v0 += 8
i += v2
sprite v0 v1 11
v0 += -16
return
: L4
v0 := random 0b11111
v1 := random 0b1111
v0 += 6
v1 += 3
Sub1
v2 := 30
delay := v2
loop
v2 := delay
if v2 != 0 then jump L6
Sub1
jump L4
: L6
v2 := 11
if v2 -key then
again
Sub1
jump L9
: D4
0xf8 0x70 0x70 0x70 0x70 0x20
: D5
0x20 0x3
: Sub2
i := D4
sprite v0 v1 6
return
: Sub3
i := D9
save v2
i := D5
load v1
v2 := 6
if v2 -key then jump L7
Sub2
v0 += 1
Sub2
: L7
v2 := 4
if v2 -key then jump L8
Sub2
v0 += -1
Sub2
: L8
if vF != 0 then jump L15
i := D5
save v1
i := D9
load v2
return
0x19 0x19
: L9
i := D8
v0 := 29
v1 := v0
v2 := v0
v3 := v0
v4 := v0
save v4
i := D5
v0 := 32
v1 := 3
save v1
vD := 13
vE := 0
jump L11
: Sub4
v2 := 2
v3 := 0
loop
i := D8
i += v3
load v1
i := D2
sprite v0 v2 7
sprite v1 v2 7
if vF != 0 then jump L15
v0 += vD
sprite v0 v2 7
v0 := v1
v1 += vD
sprite v1 v2 7
if vF != 0 then jump L15
i := D8
i += v3
save v0
Sub3
v2 += 7
v3 += 1
if v3 != 4 then
again
return
: L11
v1 := 2
v2 := 0
loop
i := D8
i += v2
load v0
i := D2
sprite v0 v1 7
v0 += vD
sprite v0 v1 7
v1 += 7
v2 += 1
if v2 != 4 then
again
i := D5
load v1
i := D4
sprite v0 v1 6
: L13
loop
Sub4
i := D8
v0 := 4
i += v0
load v0
v1 := random 0b10
v1 += -1
v0 += v1
if v0 == 2 then v0 := 3
if v0 == 46 then v0 := 45
save v0
vE += 1
v0 := 31
v1 := vE
v1 &= v0
if v1 != 31 then
again
v1 := 2
v2 := 0
loop
i := D8
i += v2
load v0
v0 += vD
i := D2
sprite v0 v1 7
v0 += -1
sprite v0 v1 7
v1 += 7
v2 += 1
if v2 != 4 then
again
vD += -1
jump L13
: D6
0x66 0x88 0x48 0x28 0xc6 0x4c 0xaa 0xac 0xaa 0x4a 0xe0 0x88 0xc0 0x88 0xe0 0x0
: L15
v0 := 30
buzzer := v0
v0 <<= v0
delay := v0
loop
v0 := delay
if v0 != 0 then
again
clear
i := D7
bcd vE
: L17
vB := 13
vA := 13
vC := 5
i := D6
sprite vA vB 5
vA += 8
i += vC
sprite vA vB 5
vA += 8
i += vC
sprite vA vB 5
i := D7
load v2
i := hex v0
vA += 8
sprite vA vB 5
i := hex v1
vA += 5
sprite vA vB 5
i := hex v2
vA += 5
sprite vA vB 5
vC := 20
delay := vC
loop
vC := delay
if vC != 0 then
again
vC := 11
if vC -key then jump L17
jump main
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D9
######################################################################
# INPUT: chip8/Chip-8 Games/Rush Hour [Hap, 2006] (alt).ch8
######################################################################
:proto L1 # 224
:proto L8 # 2C2
:proto L11 # 306
:proto L12 # 314
:proto L13 # 324
:proto L14 # 330
:proto L15 # 336
:proto L16 # 338
:proto Sub1 # 341
:proto Sub2 # 349
:proto L17 # 361
:proto Sub3 # 36F
:proto L18 # 381
:proto L19 # 385
:proto L20 # 38B
:proto L21 # 399
:proto L22 # 3B1
:proto L28 # 425
:proto L29 # 42F
:proto L30 # 43D
:proto L31 # 455
:proto Sub4 # 46B
:proto Sub5 # 47D
:proto L33 # 49F
:proto Sub6 # 4A7
:proto Sub7 # 4AF
:proto Sub8 # 4B1
:proto Sub9 # 4B3
:proto L35 # 4D7
:proto L36 # 4E7
:proto L38 # 541
:proto L41 # 593
:proto Sub10 # 597
:proto L42 # 5C1
:proto D9 # 69C
:proto D11 # 6A2
:proto Sub11 # 6A6
:proto L43 # 6C2
:proto L44 # 6DC
:proto Sub12 # 702
:proto L45 # 722
:proto L46 # 73C
:proto D12 # 78E
:proto D13 # 78F
:proto D14 # 795
:proto D15 # 796
:proto D16 # 79A
:proto D17 # 79E
:proto D18 # 7AC
:proto D19 # 7E0
:proto D20 # 7E4
:proto D21 # 7ED
:proto D22 # 7F1
:proto D23 # 7F7
:proto D24 # 7FB
:proto D25 # 7FC
:proto D26 # 7FF
:proto D27 # 803
:proto D29 # 813
:proto D30 # 817
:proto D31 # 829
:proto D32 # 858
:proto D34 # 869
:proto D35 # 875
:proto D36 # 889
:proto D37 # 892
:proto D38 # 896
:proto D39 # 897
:proto D40 # 8A1
:proto Sub13 # D47
:proto Sub14 # D55
:proto Sub15 # DBD
:proto L49 # DF3
:proto D43 # DF7
:proto D44 # EF0
:proto Sub17 # F0E
:proto L51 # F2C
:proto L53 # F48
:proto L54 # F54
:proto L55 # F60
:proto L59 # FAC
:proto L60 # FD6
:proto L61 # FDE
:proto L62 # FE6
:proto L63 # FEE
:proto D45 # FF5
: main
Sub13
if v0 != v1 then Sub17
jump L1
: D1
0x5b 0x62 0x79
: D2
0x20
: D3
0x68 0x61 0x70 0x5d 0x9a 0x0 0x88 0x0
: D4
0x84 0x35 0x88 0x0 0x88 0x6a 0x80 0x27 0x84 0x35 0x80 0x27 0x88 0x6a 0x84 0x19
: L1
clear
i := D38
load vA
loop
delay := v3
i := D39
i += v2
load v1
i := D35
i += v0
Sub9
sprite v4 vA 7
i += v1
sprite v9 vA 7
buzzer := vA
v4 += 8
v9 += -8
v2 += 2
if v2 != 8 then
again
v0 := 10
Sub8
v8 := 72
Sub15
Sub13
if v0 != v1 then jump L51
Sub7
v8 := 93
Sub15
v0 := key
: L3
0x0 : D5 0xe0 # SMC: clear
v0 := 15
Sub8
i := D37
load v1
i := L28
save v1
i := D23
load v5
i := D31
loop
sprite v5 v4 6
v5 += 8
if v5 != 64 then
again
loop
sprite v4 v0 13
sprite v4 v1 12
v4 += 8
if v4 != 40 then
again
: L6
v2 += 6
v1 := 8
i := D16
if v2 == 32 then i := D15
sprite v2 v1 5
i := D27
i += v3
v3 += 1
load v0
i := D25
if v0 != 0 then sprite v2 v1 4
if v2 == 32 then jump L8
v1 := 7
i := D27
i += v3
load v0
: L7
loop
v1 += 6
if v1 == 31 then jump L6
i := D14
sprite v2 v1 6
if v0 == 0 then jump L7
i := D24
sprite v2 v1 5
v0 += -1
again
: L8
v8 := 54
Sub15
i := D36
load vE
v7 := 10
: L9
Sub1
loop
i := D13
sprite v7 vB 1
Sub9
v9 := key
sprite v7 vB 1
if v9 == 1 then jump L20
if v9 == 10 then jump L21
v0 := 6
delay := v0
Sub2
v6 := 0
if v9 == 5 then jump L11
if v9 == 8 then jump L12
if v9 == 9 then jump L13
if v9 != 7 then jump L9
if v7 == 10 then jump L9
vC += -1
v7 += -6
v6 := -1
v5 := 116
jump L15
: L11
if vB == 10 then jump L9
vD += -1
vB += -6
v6 := -1
v5 := 186
jump L16
: L12
if vB == 28 then jump L9
if v7 == 34 then jump L9
vD += 1
vB += 6
v5 := 70
jump L16
: L13
if v7 == 34 then jump L9
if v7 != 28 then jump L14
if vB != 10 then jump L9
: L14
vC += 1
v7 += 6
v5 := 140
: L15
Sub3
: L16
Sub3
jump L9
: D6
0x36 0x3b 0x8 0x2c 0x31
: Sub1
v0 := vC
v1 := vD
i := D21
save v1
: Sub2
i := D6
load v4
if vE == 0 then jump L17
i := D5
sprite v0 v2 1
v2 += -2
v0 := vE
if v0 == 10 then v0 := 15
i := hex v0
sprite v1 v2 5
: L17
i := D21
load v1
i := hex v1
sprite v4 v2 5
i := hex v0
sprite v3 v2 5
return
: Sub3
i := L28
load v1
v2 := v6
v1 += v5
if vF == 1 then jump L18
if v6 == -1 then v0 += -1
jump L19
: L18
if v6 == 0 then v0 += 1
: L19
i := L28
save v1
return
: L20
Sub14
buzzer := v9
v8 := 47
Sub15
v0 := 45
Sub8
jump L1
: L21
if vF == 1 then jump L22
Sub14
buzzer := v9
v8 := 40
Sub15
v0 := 45
Sub8
v8 := 40
Sub15
Sub14
again
: L22
Sub14
Sub6
vE += 1
: L23
clear
Sub14
v8 := 0
Sub15
Sub2
v8 := vE
v8 += -1
v0 <<= v0
v8 += v0
v8 &= v2
v8 <<= v8
i := D3
load v7
i := D4
i += v8
load v3
v5 := v1
v7 := v3
i := D3
save v7
i := D19
load vC
i := D9
save v1
i := D11
save v1
i := D32
Sub4
v2 := 15
i := D34
Sub4
i := hex vC
loop
sprite v3 v5 5
v3 += 5
if v3 != 64 then
again
i := D18
sprite v4 vC 10
sprite v4 v6 10
sprite v4 v5 12
sprite vC vC 10
sprite vC v6 10
sprite vC v5 12
i := D31
loop
sprite v7 vA 15
sprite v7 v8 15
v7 += 8
if v7 != 36 then
again
i := D12
sprite v4 v6 7
: L26
v8 := -1
loop
if vB != 0 then jump L29
vB := 8
: L28
i := D40
i += vC
load v0
vD := v0
vC += 1
: L29
vB += -1
vD >>= vD
if vF == 0 then jump L30
v8 += 1
if v8 != 3 then
again
: L30
if v8 == -1 then jump L31
if vA == 11 then v8 += 4
Sub5
v8 >>= v8
if vF == 1 then jump L31
v9 += -3
v8 >>= v8
if vF == 1 then v9 += 5
: L31
v9 += 5
if v9 != 35 then jump L26
v9 := 5
vA += 5
if vA != 31 then jump L26
i := D20
load vD
Sub15
jump L36
: Sub4
v0 := 41
loop
sprite v0 v2 4
v0 += 8
if v0 == 65 then return
i += v7
again
: D7
0x2d 0x1f 0x1b 0x24
: Sub5
i := D2
i += v8
load v1
v0 := v8
v0 >>= v0
if vF == 1 then jump L33
i := D7
i += v0
load v0
i := D17
i += v1
sprite v9 vA 5
i += v0
v9 += 8
sprite v9 vA 5
return
: L33
i := D17
i += v1
sprite v9 vA 15
return
: Sub6
v0 := 1
buzzer := v0
v8 := 35
Sub15
: Sub7
v0 := 33
: Sub8
delay := v0
: Sub9
loop
v0 := delay
if v0 != 0 then
again
return
: L34
loop
if v5 key then
again
i := D26
sprite vB vC 5
Sub14
v8 := 18
Sub15
v9 := key
v8 := 18
Sub15
if v9 != 10 then jump L35
Sub6
jump L23
: L35
Sub15
v9 := key
v8 := 27
Sub15
if v9 != 10 then jump L36
Sub6
jump L3
: L36
Sub14
jump L38
0x25 0xc5 0x15 0x41 0x25 0x97 0x26 0x21 0x14 0xff 0x25 0xf1
: L37
Sub10
jump L38
0x25 0xc5 0x26 0x21 0x3b 0xff 0x15 0x41 0x66 0x0 0x65 0x7 0x23 0x6f 0x3e 0xa 0x13 0xb5 0x0 0xe0 0x68 0x6b 0x2d 0xbd 0xa7 0xec 0xf2 0x65 0x41 0x5 0x15 0x3b 0xa8 0x3 0xf1 0x1e 0xf0 0x65 0x40 0x3 0x15 0x3b 0x72 0xf6 0x50 0x20 0x15 0x3b 0x70 0x1 0xa8 0x3 0xf1 0x1e 0xf0 0x55 0x2d 0xbd 0x2d 0x47 0x50 0x10 0x2e 0xce 0x12 0x58 0x25 0xc5 0x25 0xf1
: L38
i := D26
sprite vB vC 5
: L39
loop
i := D22
load v6
if v5 key then jump L34
if v2 key then v0 += 2
if v1 key then v0 += 4
if v3 key then v0 += 8
if v6 key then v0 += 16
if v0 == 0 then jump L41
vA := delay
if vA != 0 then jump L39
delay := v4
if v4 key then v5 := 2
i := D26
sprite vB vC 5
v5 |= vF
: L40
jump0 L40
jump L37
0x14 0xfd 0x14 0xef 0x14 0xeb 0x14 0xf7 0x14 0xfb 0x14 0xef 0x15 0x3f 0x14 0xf5 0x14 0xfd 0x14 0xef 0x15 0x3d 0x14 0xf5 0x14 0xfb 0x14 0xef
: L41
delay := v0
again
: Sub10
if vB == 35 then return
if vC == 1 then return
if v5 != 3 then jump L42
Sub12
if vA == v9 then return
v0 := vA
v0 += -1
i := D30
sprite vB v0 1
sprite vB v0 1
if vF == 1 then return
v9 := vB
Sub5
vA += -5
Sub5
Sub11
: L42
vC += -5
return
0x4b 0x23 0x0 0xee 0x4c 0x1a 0x0 0xee 0x35 0x3 0x15 0xed 0x27 0x2 0x9a 0x90 0x0 0xee 0x79 0x5 0xa8 0x17 0xdb 0x91 0xdb 0x91 0x4f 0x1 0x0 0xee 0x89 0xb0 0x24 0x7d 0x7a 0x5 0x24 0x7d 0x26 0xa6 0x7c 0x5 0x0 0xee 0x4b 0x5 0x0 0xee 0x35 0x3 0x16 0x17 0x27 0x46 0x99 0x60 0x0 0xee 0x80 0x90 0x70 0xff 0xa8 0x18 0xd0 0xc3 0xd0 0xc3 0x4f 0x1 0x0 0xee 0x8a 0xc0 0x24 0x7d 0x79 0xf3 0x24 0x7d 0x26 0xa6 0x7b 0xfb 0x0 0xee 0x4c 0xb 0x16 0x29 0x0 0xee 0x4b 0x1e 0x16 0x1b 0x4b 0x23 0x0 0xee 0x35 0x3 0x16 0x4d 0x27 0x46 0x99 0x60 0x0 0xee 0x76 0x5 0xa8 0x18 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x0 0xee 0x8a 0xc0 0x24 0x7d 0x79 0xfd 0x24 0x7d 0x26 0xa6 0x46 0x23 0x16 0x51 0x7b 0x5 0x0 0xee 0x7b 0x5 0x86 0xb0 0x8b 0x90 0x7b 0xf3 0xa8 0x17 0xdb 0xc1 0xdb 0xc1 0x4f 0x0 0x16 0x6d 0xa8 0x13 0xdb 0xc5 0xdb 0xc5 0x4f 0x1 0x16 0x83 0x4b 0x5 0x16 0x75 0x7b 0xfb 0x16 0x59 0x87 0x80 0x2d 0x55 0x68 0xa 0x2d 0xbd 0x6a 0xb 0x88 0x70 0x66 0xff 0x63 0x0 0x8b 0x60 0x62 0xb 0xf2 0x18 0xf2 0x15 0x79 0xf8 0x24 0x7d 0x73 0x1 0x24 0xb3 0x33 0xb 0x16 0x8b 0x0 0xee
: D8
0x0
: D9
0x0 0x0 0x36 0x3b 0x14
: D10
0x0
: D11
0x0 0x0 0x2c 0x31
: Sub11
i := D9
load v4
buzzer := v5
vD += 1
i := D8
bcd vD
if v1 == 9 then jump L43
i := hex v1
sprite v3 v4 5
v1 += 1
i := hex v1
sprite v3 v4 5
return
: L43
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
i := D9
load v1
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
if vD == 100 then jump L44
return
: L44
i := D11
load v3
vD := 0
v7 += 1
if v7 == 100 then v7 := 0
i := D10
bcd v7
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
i := D11
load v1
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
return
: Sub12
v8 := 1
vA := vC
v9 := vC
i := D29
sprite vB v9 5
sprite vB v9 5
if vF == 1 then jump L45
v9 += 5
sprite vB v9 5
sprite vB v9 5
if vF == 1 then jump L45
v9 += 5
v8 += 2
return
: L45
i := D30
sprite vB vA 1
sprite vB vA 1
if vF == 1 then jump L46
vA += -5
sprite vB vA 1
sprite vB vA 1
if vF == 1 then jump L46
vA += -5
v8 += 2
return
: L46
v0 := v9
v0 -= vA
if v0 == 10 then v8 += 2
return
0x68 0x0 0x4c 0xb 0x78 0x4 0x89 0xb0 0x86 0xb0 0xa8 0x1b 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x17 0x6a 0x76 0x5 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x17 0x6a 0x76 0x5 0x78 0x2 0x0 0xee 0xa8 0x18 0xd9 0xc3 0xd9 0xc3 0x4f 0x1 0x17 0x84 0x79 0xfb 0xd9 0xc3 0xd9 0xc3 0x4f 0x1 0x17 0x84 0x79 0xfb 0x78 0x2 0x0 0xee 0x80 0x60 0x80 0x95 0x40 0xa 0x78 0x2 0x0 0xee
: D12
0xd0
: D13
0x80 0x80 0x80 0x80 0x80 0xd0
: D14
0x20
: D15
0xf8 0x88 0x88 0x88
: D16
0xf8 0x88 0x8c 0x88
: D17
0xf8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8
: D18
0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0x88 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0x88 0xf8 0x88 0xc8 0xa8 0x98 0x88 0xc8 0xa8 0x98 0x88 0xc8 0xa8 0x98 0x88 0xf8 0x88 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0x88 0xf8 0x0 0x0 0x0
: D19
0x0 0x0 0x1 0x2c
: D20
0x23 0x14 0xa 0x4 0x10 0x5 0x1 0x0 0x0
: D21
0x0 0x0 0x5 0x1
: D22
0x0 0x9 0x5 0x8 0xa 0x1
: D23
0x7 0x14 0x2 0x0
: D24
0x0
: D25
0x0 0x70 0x70
: D26
0x70 0xf8 0xf8 0xf8
: D27
0x70
: D28
0x0 0x0 0x0 0x0 0xf8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xf8 0x0
: D29
0x0 0x0 0x0 0x0
: D30
0x20 0x0 0x0 0x80 0x0 0x0 0x8 0xff 0x88 0x91 0xa2 0xff 0x80 0xb3 0x80 0xff 0xff 0x80
: D31
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xfd 0xfc 0x80 0xfc 0xfd 0xfe 0x8a 0x12 0x22 0xfe 0x2 0x9a 0x2 0xfe 0xfe 0x2 0xfe 0xfe 0xee 0xe6 0x2 0xe6 0xee 0xc0 0x40 0x40 0x40 0xc0 0xc0 0x40 0xc0 0xc0
: D32
0x83 0xe4 0x94 0xe3 0x33 0x8a 0xaa 0x1a 0x8 0x38 0x48
: D33
0x38 0x38 0x38 0x38 0x38 0x38
: D34
0xf1 0xaa 0xaa 0xa9 0x94 0x55 0x49 0x88 0x8c 0x50 0x4 0xd8
: D35
0xfc 0xe6 0xe6 0xe4 0xf8 0xec 0xe6 0xe6 0xe6 0xfe 0xe6 0xe6 0xe6 0xe6 0xe6 0xe6 0x7c 0xe6 0xe0 0x7c
: D36
0x6 0xe6 0x7c 0xe6 0xe6 0xe6 0xe6 0xe6 0x7c
: D37
0xa8 0xa1 0xa 0x1
: D38
0xa
: D39
0x0 0x0 0xa 0x0 0x10 0x6 0x6 0x0 0x39 0x1
: D40
0xe1 0x9f 0x47 0x0 0x86 0x38 0x0 0xe3 0x30 0x1f 0x73 0x60 0x4a 0x0 0x0 0xa0 0x47 0xbc 0x1 0x1 0x0 0xcf 0x3 0x8 0xec 0xc0 0x38 0x0 0x79 0x7b 0x3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de 0x60 0x7a 0x62 0xc1 0x5
: Sub13
i := D44
load v0
v0 += 1
v1 := v0
i := D44
load v0
return
: Sub14
v2 := 59
v1 := 26
i := D18
loop
v0 := 2
delay := v0
sprite v2 v1 6
Sub9
v2 += -5
if v2 != 39 then
again
i := D33
sprite v2 v1 6
return
: D42
0x82 0x2 0x2 0x3 0x0 0x40 0x84 0xc4 0xa4 0xa0 0xa0 0x64 0xa0 0x2 0x43 0x0 0x40 0x82 0x82 0x0 0x80 0x85 0xe5 0x90 0xe0 0x84 0xa0 0xc0 0xa4 0xa4 0x40 0x40 0xa4 0xa0 0x40 0x80 0x44 0xa0 0x20 0xc3 0x83 0x80 0x80 0x43 0x83 0xc0 0x80 0x44 0xa0 0x80 0x64 0x80 0x80 0x65 0x90 0x90 0x64 0x80 0x20 0xc4 0x20 0xa0 0x60 0xe4 0x20 0x80 0xe0 0x15 0x75 0x90 0x70 0x10 0xf6 0xa8 0xae 0xa8 0x50 0x50
: Sub15
i := L49
i += v8
load v5
: Sub16
v8 += 2
vA := -8
loop
v6 := 2
delay := v6
i := D43
i += v8
v8 += 1
load v0
if v0 == -1 then return
i := D42
i += v0
load v3
v6 := v0
v0 &= vA
v1 &= vA
v2 &= vA
v3 &= vA
i := D1
save v3
i := D1
sprite v4 v5 4
v4 += v6
v4 -= v0
: L49
Sub9
again
: D43
0x2a 0x1b 0x4a 0x3b 0x12 0x2c 0x2 0x2 0x2 0xff 0x2d 0x1b 0x7 0x12 0x32 0x2f 0x11 0xff 0x2a 0x1b 0x27 0x2f 0x2c 0x27 0x20 0xb 0xff 0x2a 0x1b 0x44 0x8 0x12 0x2c 0xb 0xff 0x30 0x1b 0x35 0x19 0xff 0x2d 0x1b 0x28 0x35 0x32 0x19 0xff 0x2c 0x1b 0x15 0x3b 0x32 0x19 0xff 0x2 0x1 0x32 0x6 0x35 0x35 0x38 0x2f 0x1 0x15 0x35 0x3b 0x27 0x43 0x38 0x2f 0x2c 0xff 0x1 0xa 0x2c 0x27 0x3b 0x2b 0x2b 0x12 0x32 0x1 0xe 0x3b 0x48 0x1 0x16 0x8 0x3f 0x3f 0x28 0x2f 0xff 0xc 0x18 0x16 0x27 0x2f 0x38 0x38 0x1 0x3b 0x1 0x19 0x2f 0x20 0xff 0xd 0x3 0x4a 0x2f 0x28 0x28 0x1 0x43 0x35 0x7 0x2f 0x11 0xff 0x1 0xa 0x8 0x7 0x28 0x35 0x32 0x19 0x2f 0x43 0x1 0x7 0x2f 0x1d 0x2c 0x1 0x38 0x2f 0x2c 0xff 0x2 0x11 0x16 0x3b 0x38 0x38 0x4a 0x35 0x27 0x43 0xd 0xff 0x30 0x1b 0x7 0x35 0xff 0x18 0x12 0x16 0x28 0x3b 0x20 0xff 0x14 0x18 0x8 0x7 0x28 0x35 0x32 0x19 0xff 0x1 0xa 0x35 0x27 0x12 0x24 0xd 0x1 0x7 0x35 0x15 0x3 0x2c 0x6 0x12 0x7 0x19 0x2b 0x8 0x7 0xff 0x2 0x11 0x2b 0x35 0x27 0x1 0x0 0x32 0x6 0x12 0x16 0x0 0x1 0x15 0x20 0x1 0x6 0x3b 0x16 0x2 0xff 0x60 0x13 0x24 0xb1 0x2d 0xbd 0xa8 0x4 0xf3 0x65 0x80 0xe 0x80 0xe 0x80 0x11 0x83 0x3e 0x83 0x3e 0x83 0x21 0x61 0xa 0x62 0x5 0x82 0x3 0x81 0x33 0xa2 0x8 0xf3 0x55
: D44
0x63 0x2b 0x61 0x10 0x62 0x0 0xa2 0x8 0xf2 0x1e 0xf0 0x65 0xf0 0x29 0x60 0x11 0x24 0xb1 0xd3 0x15 0x73 0x5 0x72 0x1 0x32 0x4 0x1e 0xf6 0x0 0xee
: Sub17
clear
v8 := 173
Sub15
Sub7
Sub15
v0 := 110
Sub8
return
: Sub18
i := D31
v0 := 16
loop
sprite v0 v1 6
v0 += 8
if v0 != 48 then
again
return
: L51
Sub7
v8 := 157
Sub15
Sub15
v1 := 17
Sub18
: L52
loop
v3 := key
if v3 == 5 then jump L53
if v3 == 8 then jump L54
if v3 == 10 then jump L55
jump L52
: L53
if v1 == 17 then jump L52
Sub18
v1 := 17
Sub18
jump L52
: L54
if v1 == 23 then jump L52
Sub18
v1 := 23
Sub18
again
: L55
v0 := 1
buzzer := v0
v2 := 5
loop
delay := v2
Sub18
v3 += -1
Sub9
if v3 != 0 then
again
if v1 == 17 then jump L3
clear
v4 := 2
v5 := 14
v8 := 140
Sub16
i := D45
load v8
i := D41
sprite v1 v3 1
: L57
v0 := key
i := D1
i += v7
v7 += 1
save v0
i := D41
sprite v1 v3 1
i := hex v0
sprite v1 v2 5
buzzer := v6
if v7 == 4 then jump L59
v1 += 5
i := D41
sprite v1 v3 1
loop
if v0 key then
again
jump L57
: L59
Sub14
i := D1
load v3
v1 ^= v4
v2 ^= v5
if v2 != v0 then jump L63
if v1 != v3 then jump L63
v1 := v0
v2 := v3
v0 >>= v0
v0 >>= v0
v3 >>= v3
v3 >>= v3
v1 &= v6
v2 &= v6
if v1 == 0 then jump L60
if v0 == 0 then jump L63
: L60
if v2 == 0 then jump L61
if v1 == 0 then jump L63
: L61
if v3 == 0 then jump L62
if v2 == 0 then jump L63
: L62
i := D28
save v3
Sub6
jump L3
: L63
buzzer := v4
Sub15
Sub7
0x12 : D45 0x24 # SMC: jump L1
0x2b 0xd 0x11 0xa 0x5 0x3 0x0 0x98
######################################################################
# INPUT: chip8/Chip-8 Games/Rush Hour [Hap, 2006].ch8
######################################################################
:proto L2 # 27A
:proto D5 # 2B7
:proto L4 # 2B8
:proto Sub1 # 2BC
:proto L5 # 2E6
:proto L6 # 3DC
:proto L7 # 3F8
:proto L8 # 408
:proto D6 # 40B
:proto Sub6 # 429
:proto L9 # 445
:proto L10 # 45F
:proto Sub7 # 485
:proto L11 # 4A5
:proto L12 # 4BF
:proto L15 # 51D
:proto L17 # 559
:proto L22 # 5BB
:proto L25 # 5FF
:proto L26 # 60D
:proto L27 # 61D
:proto L28 # 629
:proto L29 # 62F
:proto L30 # 631
:proto Sub8 # 635
:proto Sub9 # 63D
:proto L31 # 655
:proto Sub10 # 663
:proto L32 # 675
:proto L33 # 679
:proto L34 # 67F
:proto L35 # 697
:proto L36 # 69D
:proto L41 # 70B
:proto L42 # 715
:proto L43 # 723
:proto L44 # 73B
:proto Sub11 # 751
:proto Sub12 # 763
:proto L46 # 785
:proto D14 # 78D
:proto D15 # 78E
:proto D16 # 794
:proto D17 # 795
:proto D18 # 799
:proto D19 # 79D
:proto D20 # 7AB
:proto D21 # 7DF
:proto D22 # 7E3
:proto D23 # 7EC
:proto D24 # 7F0
:proto D25 # 7F6
:proto D26 # 7FA
:proto D27 # 7FB
:proto D28 # 7FE
:proto D29 # 802
:proto D31 # 812
:proto D32 # 816
:proto D33 # 828
:proto D34 # 857
:proto D36 # 868
:proto D37 # 874
:proto D38 # 888
:proto D39 # 891
:proto D40 # 895
:proto D41 # 896
:proto D42 # 8A0
:proto Sub13 # D46
:proto Sub14 # D54
:proto Sub15 # DBC
:proto L49 # DFA
:proto D45 # DFE
:proto L50 # ED0
:proto D46 # EF0
:proto L52 # F2C
:proto L54 # F48
:proto L55 # F54
:proto L56 # F60
:proto L60 # FAC
:proto L61 # FD6
:proto L62 # FDE
:proto L63 # FE6
:proto L64 # FEE
:proto D47 # FF5
: main
Sub13
if v0 == v1 then jump L15
jump L50
: D1
0x5b 0x62 0x79
: D2
0x20
: D3
0x68 0x61 0x70 0x5d 0x9a 0x0 0x88 0x0
: D4
0x84 0x35 0x88 0x0 0x88 0x6a 0x80 0x27 0x84 0x35 0x80 0x27 0x88 0x6a 0x84 0x19 0x22 0xea 0x12 0x7a 0x22 0xbc 0x23 0x46 0x12 0x38 0x23 0x16
: L1
Sub1
jump L2
0x22 0xea 0x23 0x46 0x3b 0xff 0x12 0x7a 0x66 0x0 0x65 0x7 0x26 0x63 0x3e 0xa 0x16 0x9b 0x0 0xe0 0x68 0x6e 0x2d 0xbc 0xa7 0xeb 0xf2 0x65 0x41 0x5 0x12 0x74 0xa8 0x2 0xf1 0x1e 0xf0 0x65 0x40 0x3 0x12 0x74 0x72 0xf6 0x50 0x20 0x12 0x74 0x70 0x1 0xa8 0x2 0xf1 0x1e 0xf0 0x55 0x2d 0xbc 0x2d 0x46 0x50 0x10 0x2e 0xde 0x15 0x51 0x22 0xea 0x23 0x16
: L2
i := D28
sprite vB vC 5
: L3
loop
i := D24
load v6
if v5 key then jump L6
if v2 key then v0 += 1
if v1 key then v0 += 2
if v3 key then v0 += 4
if v6 key then v0 += 8
if v0 == 0 then jump L4
vA := delay
if vA != 0 then jump L3
delay := v4
if v4 key then v5 := 2
i := D28
sprite vB vC 5
v5 |= vF
i := D6
i += v0
load v0
i := D5
save v0
0x12 : D5 0x30 # SMC: jump L1
: L4
delay := v0
again
: Sub1
if vB == 35 then return
if vC == 1 then return
if v5 != 3 then jump L5
Sub7
if vA == v9 then return
v0 := vA
v0 += -1
i := D32
sprite vB v0 1
sprite vB v0 1
if vF == 1 then return
v9 := vB
Sub12
vA += -5
Sub12
Sub6
: L5
vC += -5
return
0x4b 0x23 0x0 0xee 0x4c 0x1a 0x0 0xee 0x35 0x3 0x13 0x12 0x24 0x85 0x9a 0x90 0x0 0xee 0x79 0x5 0xa8 0x16 0xdb 0x91 0xdb 0x91 0x4f 0x1 0x0 0xee 0x89 0xb0 0x27 0x63 0x7a 0x5 0x27 0x63 0x24 0x29 0x7c 0x5 0x0 0xee 0x4b 0x5 0x0 0xee 0x35 0x3 0x13 0x3c 0x24 0xc9 0x99 0x60 0x0 0xee 0x80 0x90 0x70 0xff 0xa8 0x17 0xd0 0xc3 0xd0 0xc3 0x4f 0x1 0x0 0xee 0x8a 0xc0 0x27 0x63 0x79 0xf3 0x27 0x63 0x24 0x29 0x7b 0xfb 0x0 0xee 0x4c 0xb 0x13 0x4e 0x0 0xee 0x4b 0x1e 0x13 0x40 0x4b 0x23 0x0 0xee 0x35 0x3 0x13 0x72 0x24 0xc9 0x99 0x60 0x0 0xee 0x76 0x5 0xa8 0x17 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x0 0xee 0x8a 0xc0 0x27 0x63 0x79 0xfd 0x27 0x63 0x24 0x29 0x46 0x23 0x13 0x76 0x7b 0x5 0x0 0xee 0x7b 0x5 0x86 0xb0 0x8b 0x90 0x7b 0xf3 0xa8 0x16 0xdb 0xc1 0xdb 0xc1 0x4f 0x0 0x13 0x92 0xa8 0x12 0xdb 0xc5 0xdb 0xc5 0x4f 0x1 0x13 0xb0 0x4b 0x5 0x13 0x9a 0x7b 0xfb 0x13 0x7e 0x8b 0x80 0x2d 0x54 0x68 0x9 0x37 0x0 0x68 0x16 0x47 0x1 0x68 0x10 0x2d 0xbc 0x6a 0xb 0x88 0xb0 0x66 0xff 0x63 0x0 0x8b 0x60 0x62 0xb 0xf2 0x18 0xf2 0x15 0x79 0xf8 0x27 0x63 0x73 0x1 0x23 0xd4 0x33 0xb 0x13 0xb8 0x0 0xee
: Sub2
v0 := 1
buzzer := v0
v8 := 44
Sub15
: Sub3
v0 := 33
: Sub4
delay := v0
: Sub5
loop
v0 := delay
if v0 != 0 then
again
return
: L6
loop
if v5 key then
again
i := D28
sprite vB vC 5
Sub14
v8 := 29
Sub15
v9 := key
v8 := 29
Sub15
if v9 != 10 then jump L7
Sub2
jump L36
: L7
Sub15
v9 := key
v8 := 37
Sub15
if v9 != 10 then jump L8
Sub2
jump L17
: L8
Sub14
0x12 : D6 0x7a # SMC: jump L2
0x30 0x36 0x28 0x24 0x30 0x34 0x28 0x78 0x2e 0x36 0x28 0x76 0x2e 0x34 0x28
: D7
0x0
: D8
0x0 0x0
: D9
0x36 0x3b 0x14 0x2c 0x31 0x8
: D10
0x0
: D11
0x0 0x0 0x2c 0x31
: Sub6
i := D8
load v4
buzzer := v5
vD += 1
i := D7
bcd vD
if v1 == 9 then jump L9
i := hex v1
sprite v3 v4 5
v1 += 1
i := hex v1
sprite v3 v4 5
return
: L9
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
i := D8
load v1
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
if vD == 100 then jump L10
return
: L10
i := D11
load v3
vD := 0
v7 += 1
if v7 == 100 then v7 := 0
i := D10
bcd v7
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
i := D11
load v1
i := hex v0
sprite v2 v4 5
i := hex v1
sprite v3 v4 5
return
: Sub7
v8 := 1
vA := vC
v9 := vC
i := D31
sprite vB v9 5
sprite vB v9 5
if vF == 1 then jump L11
v9 += 5
sprite vB v9 5
sprite vB v9 5
if vF == 1 then jump L11
v9 += 5
v8 += 2
return
: L11
i := D32
sprite vB vA 1
sprite vB vA 1
if vF == 1 then jump L12
vA += -5
sprite vB vA 1
sprite vB vA 1
if vF == 1 then jump L12
vA += -5
v8 += 2
return
: L12
v0 := v9
v0 -= vA
if v0 == 10 then v8 += 2
return
0x68 0x0 0x4c 0xb 0x78 0x4 0x89 0xb0 0x86 0xb0 0xa8 0x1a 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x14 0xed 0x76 0x5 0xd6 0xc3 0xd6 0xc3 0x4f 0x1 0x14 0xed 0x76 0x5 0x78 0x2 0x0 0xee 0xa8 0x17 0xd9 0xc3 0xd9 0xc3 0x4f 0x1 0x15 0x7 0x79 0xfb 0xd9 0xc3 0xd9 0xc3 0x4f 0x1 0x15 0x7 0x79 0xfb 0x78 0x2 0x0 0xee 0x80 0x60 0x80 0x95 0x40 0xa 0x78 0x2 0x0 0xee
: L13
Sub14
buzzer := v9
v8 := 54
Sub15
v0 := 45
: L14
Sub4
: L15
clear
i := D40
load vA
loop
delay := v3
i := D41
i += v2
load v1
i := D37
i += v0
Sub5
sprite v4 vA 7
i += v1
sprite v9 vA 7
buzzer := vA
v4 += 8
v9 += -8
v2 += 2
if v2 != 8 then
again
v0 := 10
Sub4
v8 := 77
Sub15
Sub13
if v0 != v1 then jump L52
Sub3
v8 := 97
Sub15
v0 := key
: L17
0x0 : D12 0xe0 # SMC: clear
v0 := 15
Sub4
i := D39
load v1
i := L41
save v1
i := D25
load v5
i := D33
loop
sprite v5 v4 6
v5 += 8
if v5 != 64 then
again
loop
sprite v4 v0 13
sprite v4 v1 12
v4 += 8
if v4 != 40 then
again
: L20
v2 += 6
v1 := 8
i := D18
if v2 == 32 then i := D17
sprite v2 v1 5
i := D29
i += v3
v3 += 1
load v0
i := D27
if v0 != 0 then sprite v2 v1 4
if v2 == 32 then jump L22
v1 := 7
i := D29
i += v3
load v0
: L21
loop
v1 += 6
if v1 == 31 then jump L20
i := D16
sprite v2 v1 6
if v0 == 0 then jump L21
i := D26
sprite v2 v1 5
v0 += -1
again
: L22
v8 := 60
Sub15
i := D38
load vE
v7 := 10
: L23
Sub8
loop
i := D15
sprite v7 vB 1
Sub5
v9 := key
sprite v7 vB 1
if v9 == 1 then jump L13
if v9 == 10 then jump L34
v0 := 6
delay := v0
Sub9
v6 := 0
if v9 == 5 then jump L25
if v9 == 8 then jump L26
if v9 == 9 then jump L27
if v9 != 7 then jump L23
if v7 == 10 then jump L23
vC += -1
v7 += -6
v6 := -1
v5 := 116
jump L29
: L25
if vB == 10 then jump L23
vD += -1
vB += -6
v6 := -1
v5 := 186
jump L30
: L26
if vB == 28 then jump L23
if v7 == 34 then jump L23
vD += 1
vB += 6
v5 := 70
jump L30
: L27
if v7 == 34 then jump L23
if v7 != 28 then jump L28
if vB != 10 then jump L23
: L28
vC += 1
v7 += 6
v5 := 140
: L29
Sub10
: L30
Sub10
jump L23
: Sub8
v0 := vC
v1 := vD
i := D23
save v1
: Sub9
i := D9
load v5
if vE == 0 then jump L31
i := D12
sprite v0 v5 1
v5 += -2
v0 := vE
if v0 == 10 then v0 := 15
i := hex v0
sprite v1 v5 5
: L31
i := D23
load v1
i := hex v1
sprite v4 v5 5
i := hex v0
sprite v3 v5 5
return
: Sub10
i := L41
load v1
v2 := v6
v1 += v5
if vF == 1 then jump L32
if v6 == -1 then v0 += -1
jump L33
: L32
if v6 == 0 then v0 += 1
: L33
i := L41
save v1
return
: L34
if vF == 1 then jump L35
Sub14
buzzer := v9
v8 := 48
Sub15
v0 := 45
Sub4
v8 := 48
Sub15
Sub14
again
: L35
Sub14
Sub2
vE += 1
: L36
clear
Sub14
v8 := 0
Sub15
Sub9
v8 := vE
v8 += -1
v0 <<= v0
v8 += v0
v8 &= v5
v8 <<= v8
i := D3
load v7
i := D4
i += v8
load v3
v5 := v1
v7 := v3
i := D3
save v7
i := D21
load vC
i := D8
save v1
i := D11
save v1
i := D34
Sub11
v2 := 15
i := D36
Sub11
i := hex vC
loop
sprite v3 v5 5
v3 += 5
if v3 != 64 then
again
i := D20
sprite v4 vC 10
sprite v4 v6 10
sprite v4 v5 12
sprite vC vC 10
sprite vC v6 10
sprite vC v5 12
i := D33
loop
sprite v7 vA 15
sprite v7 v8 15
v7 += 8
if v7 != 36 then
again
i := D14
sprite v4 v6 7
: L39
v8 := -1
loop
if vB != 0 then jump L42
vB := 8
: L41
i := D42
i += vC
load v0
vD := v0
vC += 1
: L42
vB += -1
vD >>= vD
if vF == 0 then jump L43
v8 += 1
if v8 != 3 then
again
: L43
if v8 == -1 then jump L44
if vA == 11 then v8 += 4
Sub12
v8 >>= v8
if vF == 1 then jump L44
v9 += -3
v8 >>= v8
if vF == 1 then v9 += 5
: L44
v9 += 5
if v9 != 35 then jump L39
v9 := 5
vA += 5
if vA != 31 then jump L39
i := D22
load vD
Sub15
jump L8
: Sub11
v0 := 41
loop
sprite v0 v2 4
v0 += 8
if v0 == 65 then return
i += v7
again
: D13
0x2d 0x1f 0x1b 0x24
: Sub12
i := D2
i += v8
load v1
v0 := v8
v0 >>= v0
if vF == 1 then jump L46
i := D13
i += v0
load v0
i := D19
i += v1
sprite v9 vA 5
i += v0
v9 += 8
sprite v9 vA 5
return
: L46
i := D19
i += v1
sprite v9 vA 15
return
: D14
0xd0
: D15
0x80 0x80 0x80 0x80 0x80 0xd0
: D16
0x20
: D17
0xf8 0x88 0x88 0x88
: D18
0xf8 0x88 0x8c 0x88
: D19
0xf8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8
: D20
0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0xf8 0x88 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0x88 0xf8 0x88 0xc8 0xa8 0x98 0x88 0xc8 0xa8 0x98 0x88 0xc8 0xa8 0x98 0x88 0xf8 0x88 0xa8 0xa8 0x88 0x88 0xa8 0xa8 0x88 0xf8 0x0 0x0 0x0
: D21
0x0 0x0 0x1 0x2c
: D22
0x23 0x14 0xa 0x4 0x10 0x5 0x1 0x0 0x0
: D23
0x0 0x0 0x5 0x1
: D24
0x0 0x9 0x5 0x8 0xa 0x1
: D25
0x7 0x14 0x2 0x0
: D26
0x0
: D27
0x0 0x70 0x70
: D28
0x70 0xf8 0xf8 0xf8
: D29
0x70
: D30
0x0 0x0 0x0 0x0 0xf8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xf8 0x0
: D31
0x0 0x0 0x0 0x0
: D32
0x20 0x0 0x0 0x80 0x0 0x0 0x8 0xff 0x88 0x91 0xa2 0xff 0x80 0xb3 0x80 0xff 0xff 0x80
: D33
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xfd 0xfc 0x80 0xfc 0xfd 0xfe 0x8a 0x12 0x22 0xfe 0x2 0x9a 0x2 0xfe 0xfe 0x2 0xfe 0xfe 0xee 0xe6 0x2 0xe6 0xee 0xc0 0x40 0x40 0x40 0xc0 0xc0 0x40 0xc0 0xc0
: D34
0x83 0xe4 0x94 0xe3 0x33 0x8a 0xaa 0x1a 0x8 0x38 0x48
: D35
0x38 0x38 0x38 0x38 0x38 0x38
: D36
0xf1 0xaa 0xaa 0xa9 0x94 0x55 0x49 0x88 0x8c 0x50 0x4 0xd8
: D37
0xfc 0xe6 0xe6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b 0xf1 0x7c 0x80 0x60 0x1d 0x0 0x4d 0xf1 0x5e 0x38 0xc3 0x88 0x0 0x3c 0x80
: D43
0xf0 0x7 0x4 0x7 0x0 0xbd 0x7 0x4 0x80 0x5 0x0 0x0 0xc7 0x33 0x24 0xef 0x1 0xe0 0x0 0xdf 0x7 0x26 0x34 0x86 0x1c 0x0 0x73 0x90 0xdb 0x34 0x1e 0x39 0x0 0xeb 0x87 0x21 0x8c 0x8f 0x61 0x8 0xb5 0x27 0xf8 0x60 0x6c 0x44 0x1 0xbf 0xf5 0x80 0x36 0xd 0xb8 0xe 0xfe 0x36 0x3c 0xf2 0xd 0x8 0x7 0x37 0xde 0x60 0x7a 0x62 0xc1 0x5
: Sub13
i := D46
load v0
v0 += 1
v1 := v0
i := D46
load v0
return
: Sub14
v2 := 59
v1 := 26
i := D20
loop
v0 := 2
delay := v0
sprite v2 v1 6
Sub5
v2 += -5
if v2 != 39 then
again
i := D35
sprite v2 v1 6
return
: D44
0x82 0x2 0x2 0x3 0x0 0x40 0x84 0xc4 0xa4 0xa0 0xa0 0x64 0xa0 0x2 0x43 0x0 0x40 0x82 0x82 0x0 0x80 0x85 0xe5 0x90 0xe0 0x84 0xa0 0xc0 0xa4 0xa4 0x40 0x40 0xa4 0xa0 0x40 0x80 0x44 0xa0 0x20 0xc3 0x83 0x80 0x80 0x43 0x83 0xc0 0x80 0x44 0xa0 0x80 0x64 0x80 0x80 0x65 0x90 0x90 0x64 0x80 0x20 0xc4 0x20 0xa0 0x60 0xe4 0x20 0x80 0xe0 0x15 0x75 0x90 0x70 0x10 0xf6 0xa8 0xae 0xa8 0x50 0x50
: Sub15
i := L49
i += v8
load v5
: Sub16
v8 += 2
vA := -8
loop
v6 := 3
delay := v6
i := D45
i += v8
v8 += 1
load v0
v0 <<= v0
v6 := vF
v0 >>= v0
i := D44
i += v0
load v3
if v6 == 0 then v6 := v0
v0 &= vA
v1 &= vA
v2 &= vA
v3 &= vA
i := D1
save v3
i := D1
sprite v4 v5 4
if v6 == 1 then return
v4 += v6
v4 -= v0
: L49
Sub5
again
: D45
0x2a 0x1b 0x4a 0x3b 0x12 0x2c 0x2 0x2 0x82 0x2d 0x1b 0x7 0x12 0x32 0x2f 0x91 0x2d 0x1b 0x32 0x35 0x35 0xa8 0x2d 0x1b 0x16 0x2b 0x2b 0x2c 0x91 0x2a 0x1b 0x27 0x2f 0x2c 0x27 0x20 0x8b 0x2a 0x1b 0x44 0x8 0x12 0x2c 0x8b 0x30 0x1b 0x35 0x99 0x2d 0x1b 0x28 0x35 0x32 0x99 0x2c 0x1b 0x15 0x3b 0x32 0x99 0x2 0x1 0x32 0x6 0x35 0x35 0x38 0x2f 0x1 0x15 0x35 0x3b 0x27 0x43 0x38 0x2f 0xac 0x1 0xa 0x2c 0x27 0x3b 0x2b 0x2b 0x12 0x32 0x1 0xe 0x3b 0x48 0x1 0x16 0x8 0x3f 0x3f 0x28 0xaf 0xc 0x18 0x16 0x27 0x2f 0x38 0x38 0x1 0x3b 0x1 0x19 0x2f 0xa0 0xd 0x3 0x4a 0x2f 0x28 0x28 0x1 0x43 0x35 0x7 0x2f 0x91 0x1 0xa 0x8 0x7 0x28 0x35 0x32 0x19 0x2f 0x43 0x1 0x7 0x2f 0x1d 0x2c 0x1 0x38 0x2f 0xac 0x2 0x11 0x16 0x3b 0x38 0x38 0x4a 0x35 0x27 0x43 0x8d 0x30 0x1b 0x7 0xb5 0x18 0x12 0x16 0x28 0x3b 0xa0 0x14 0x18 0x8 0x7 0x28 0x35 0x32 0x99 0x1 0xa 0x35 0x27 0x12 0x24 0xd 0x1 0x7 0x35 0x15 0x3 0x2c 0x6 0x12 0x7 0x19 0x2b 0x8 0x87 0x2 0x11 0x2b 0x35 0x27 0x1 0x0 0x32 0x6 0x12 0x16 0x0 0x1 0x15 0x20 0x1 0x6 0x3b 0x16 0x82
: L50
clear
v8 := 170
Sub15
Sub3
Sub15
v0 := 110
jump L14
0x60 0x13 0x23 0xd2 0x2d 0xbc 0xa8 0x3 0xf3 0x65 0x80 0xe 0x80 0xe 0x80 0x11 0x83 0x3e
: D46
0x83 0x3e 0x83 0x21 0x61 0xa 0x62 0x5 0x82 0x3 0x81 0x33 0xa2 0x8 0xf3 0x55 0x63 0x2b 0x61 0x10 0x62 0x0 0xa2 0x8 0xf2 0x1e 0xf0 0x65 0xf0 0x29 0x60 0x11 0x23 0xd2 0xd3 0x15 0x73 0x5 0x72 0x1 0x32 0x4 0x1f 0x6 0x0 0xee
: Sub17
i := D33
v0 := 16
loop
sprite v0 v1 6
v0 += 8
if v0 != 48 then
again
return
: L52
Sub3
v8 := 156
Sub15
Sub15
v1 := 17
Sub17
: L53
loop
v3 := key
if v3 == 5 then jump L54
if v3 == 8 then jump L55
if v3 == 10 then jump L56
jump L53
: L54
if v1 == 17 then jump L53
Sub17
v1 := 17
Sub17
jump L53
: L55
if v1 == 23 then jump L53
Sub17
v1 := 23
Sub17
again
: L56
v0 := 1
buzzer := v0
v2 := 5
loop
delay := v2
Sub17
v3 += -1
Sub5
if v3 != 0 then
again
if v1 == 17 then jump L17
clear
v4 := 2
v5 := 14
v8 := 141
Sub16
i := D47
load v8
i := D43
sprite v1 v3 1
: L58
v0 := key
i := D1
i += v7
v7 += 1
save v0
i := D43
sprite v1 v3 1
i := hex v0
sprite v1 v2 5
buzzer := v6
if v7 == 4 then jump L60
v1 += 5
i := D43
sprite v1 v3 1
loop
if v0 key then
again
jump L58
: L60
Sub14
i := D1
load v3
v1 ^= v4
v2 ^= v5
if v2 != v0 then jump L64
if v1 != v3 then jump L64
v1 := v0
v2 := v3
v0 >>= v0
v0 >>= v0
v3 >>= v3
v3 >>= v3
v1 &= v6
v2 &= v6
if v1 == 0 then jump L61
if v0 == 0 then jump L64
: L61
if v2 == 0 then jump L62
if v1 == 0 then jump L64
: L62
if v3 == 0 then jump L63
if v2 == 0 then jump L64
: L63
i := D30
save v3
Sub2
jump L17
: L64
buzzer := v4
Sub15
Sub3
0x15 : D47 0x1d # SMC: jump L15
0x2b 0xd 0x11 0xa 0x5 0x3 0x0 0x98
######################################################################
# INPUT: chip8/Chip-8 Games/Russian Roulette [Carmelo Cortez, 1978].ch8
######################################################################
:proto L3 # 232
:proto L5 # 246
:proto D1 # 25A
:proto D2 # 25F
:proto D3 # 264
:proto D4 # 269
:proto D5 # 26E
:proto D6 # 273
:proto D7 # 278
:proto D8 # 27D
:proto D9 # 282
:proto Sub1 # 288
:proto D10 # 292
: main
v5 := 10
: L1
Sub1
v2 := key
v3 := random 0b101
if v3 == 4 then jump L3
i := D1
v1 := 16
sprite v1 v3 5
i := D2
v1 := 24
sprite v1 v3 5
i := D3
v1 := 32
sprite v1 v3 5
v4 := 48
delay := v4
loop
v4 := delay
if v4 != 0 then
again
clear
v5 += -1
if v5 == 0 then jump L5
jump L1
: L3
i := D4
v1 := 16
sprite v1 v3 5
i := D5
v1 := 24
sprite v1 v3 5
i := D6
v1 := 32
sprite v1 v3 5
loop
again
: L5
i := D7
v1 := 16
sprite v1 v3 5
i := D8
v1 := 24
sprite v1 v3 5
i := D9
v1 := 32
sprite v1 v3 5
loop
again
: D1
0xe8 0x88 0x88 0x88 0xee
: D2
0xee 0x48 0x48 0x48 0xee
: D3
0xaa 0xca 0xca 0xc0 0xaa
: D4
0xf7 0x55 0x77 0x55 0xf5
: D5
0x65 0x65 0x55 0x4d 0x4d
: D6
0xd5 0x15 0x15 0x40 0xd5
: D7
0x8b 0x89 0x89 0xa9 0xdb
: D8
0xb2 0x32 0x2a 0x26 0xa2
: D9
0xaa 0xaa 0xaa 0x0 0xaa 0x20
: Sub1
i := D10
v6 := 24
v7 := 16
sprite v6 v7 7
return
: D10
0x8 0x2a 0x7f 0x63 0x6b 0x63 0x7f 0x7f 0x63 0x7f
######################################################################
# INPUT: chip8/Chip-8 Games/Sequence Shoot [Joyce Weisbecker].ch8
######################################################################
:proto L3 # 25A
:proto Sub1 # 270
:proto Sub2 # 2AC
:proto L8 # 2BE
:proto L9 # 2D2
:proto L11 # 2F0
:proto Sub3 # 2F6
:proto Sub4 # 312
:proto Sub5 # 318
:proto D1 # 321
:proto D2 # 322
:proto D3 # 326
:proto D4 # 332
:proto D5 # 33B
:proto L12 # 340
:proto D6 # 380
:proto D7 # 400
: main
clear
vE := 0
vD := 0
i := D3
v8 := 8
v9 := 11
sprite v8 v9 12
i := D4
v9 := 23
sprite v8 v9 9
i := D5
v8 := 16
v9 := 19
sprite v8 v9 2
v8 := 50
v9 := 2
Sub4
v9 := 10
Sub4
v9 := 18
Sub4
v9 := 26
Sub4
Sub3
v1 := -1
: L1
Sub5
vC := 0
vD += 1
vA := vD
loop
Sub1
vA += -1
if vA != 0 then
again
v0 := 0
i := D7
i += vC
save v0
Sub2
if vA != 0 then jump L3
Sub3
vE += vD
Sub3
if vE != 22 then jump L1
: L3
v2 := 18
: L4
buzzer := v2
v1 := 26
delay := v1
loop
v1 := delay
if v1 != 0 then
again
v2 += -2
if v2 != 0 then jump L4
loop
again
: Sub1
vB := random 0b11
vB += 12
v0 := vB
i := D7
i += vC
save v0
vC += 1
v1 := -1
Sub5
v8 := 50
v9 := 26
if vB == 12 then v9 := 2
if vB == 13 then v9 := 10
if vB == 14 then v9 := 18
Sub4
v1 := 96
Sub5
Sub4
v1 := 15
Sub5
Sub4
v1 := 15
Sub5
Sub4
v1 := 15
Sub5
return
: Sub2
vA := 0
: L7
i := D7
i += vA
vA += 1
load v0
if v0 != 0 then jump L8
vA := 0
return
: L8
vB := key
v1 := 2
buzzer := v2
vB -= v0
if vB == 0 then jump L9
v1 := -1
Sub5
vA := 1
return
: L9
v0 += -14
v8 := 19
v9 := 19
i := D1
loop
sprite v8 v9 1
v1 := 8
Sub5
if vF == 1 then jump L11
sprite v8 v9 1
v1 := 8
Sub5
v8 += 4
v9 += v0
again
: L11
v1 := 2
buzzer := v1
jump L12
: Sub3
i := D6
bcd vE
load v2
i := hex v0
v8 := 16
v9 := 2
sprite v8 v9 5
i := hex v1
v8 += 6
sprite v8 v9 5
i := hex v2
v8 += 6
sprite v8 v9 5
return
: Sub4
i := D2
sprite v8 v9 4
return
: Sub5
loop
v1 += -1
if v1 != 0 then
again
return
0x1
: D1
0x80
: D2
0xf0 0xf0 0xf0 0xf0
: D3
0x7c 0x7c 0xfe 0x7c 0x7c 0x70 0x7c 0x38 0x7f 0x7f 0x7c 0x7c
: D4
0x7c 0x7c 0x7c 0x38 0x38 0x38 0x38 0x38 0x3e
: D5
0xe0 0x80 0x0 0xd4 0xd4
: L12
sprite v8 v9 1
jump L7
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D7
######################################################################
# INPUT: chip8/Chip-8 Games/Shooting Stars [Philip Baltzer, 1978].ch8
######################################################################
:proto L5 # 240
:proto L6 # 244
:proto L7 # 248
:proto L8 # 24C
:proto L9 # 24E
:proto L10 # 25C
:proto D1 # 270
:proto L11 # 272
:proto L12 # 294
:proto D2 # 2A0
:proto L15 # 2B0
:proto L17 # 2BE
:proto D3 # 2C5
: main
v0 := 0
: L1
vE := 0
v1 := 24
v2 := 14
i := D3
sprite v1 v2 6
v3 := random 0b110000
v4 := random 0b11010
loop
i := D3
sprite v3 v4 3
if vF != 0 then jump L12
if vE != 0 then jump L9
v1 := random 0b111111
v2 := random 0b11111
v9 := random 0b11
v9 += 1
vA := random 0b11
vA += -4
vB := v9
vC := random 0b1
if vC != 0 then jump L6
: L3
vC := random 0b1
if vC != 0 then jump L7
: L4
vC := random 0b1
if vC != 0 then jump L5
v1 := 0
jump L8
: L5
v2 := 0
jump L8
: L6
v9 := vA
jump L3
: L7
vA := vB
jump L4
: L8
vE := -1
: L9
v1 += v9
v2 += vA
vD := 8
vB += vD
if vF == 0 then jump L10
vE := 0
: L10
i := D1
sprite v1 v2 1
if vF == 0 then jump L11
v0 += -1
i := D3
sprite v3 v4 3
i := D2
sprite v3 v4 5
jump L17
: D1
0x2 0x0
: L11
i := D3
sprite v3 v4 3
v5 := 2
v6 := 4
v7 := 6
v8 := 8
if v5 key then v4 += -1
if v6 key then v3 += -1
if v7 key then v3 += 1
if v8 key then v4 += 1
i := D1
sprite v1 v2 1
again
: L12
i := D2
sprite v1 v2 5
v0 += 1
: L13
i := hex v0
sprite v8 v6 5
jump L15
: D2
0x88 0x50 0x0 0x50 0x88 0x0 0x0 0x0
: L14
if v5 != v0 then jump L13
v0 := 0
jump L13
: L15
v5 := 64
delay := v5
loop
v5 := delay
if v5 != 0 then
again
clear
jump L1
: L17
v5 := -1
jump L14
0x0 0x0 0x0
: D3
0x3c 0x7e 0xff 0xff 0x7e 0x3c 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Slide [Joyce Weisbecker].ch8
######################################################################
:proto Sub1 # 258
:proto L7 # 292
:proto L11 # 2D4
:proto L12 # 2D6
:proto L14 # 2F8
:proto Sub2 # 30E
:proto Sub3 # 328
:proto L17 # 338
:proto Sub4 # 34C
:proto D1 # 357
:proto D2 # 359
:proto D3 # 35C
:proto D4 # 360
:proto D5 # 361
:proto L19 # 366
:proto L21 # 374
:proto Sub5 # 37A
: main
clear
i := D4
v8 := 0
v9 := 0
v2 := 1
Sub2
v2 := -1
Sub2
vA := 0
vB := 0
v4 := 6
vC := 0
Sub3
vC := 1
Sub3
i := D2
vD := 40
vE := 18
sprite vD vE 3
vD := 48
vE := 14
sprite vD vE 3
vE := 22
sprite vD vE 3
vD := 56
vE := 10
sprite vD vE 3
vE := 26
sprite vD vE 3
loop
vC := 0
vD := 3
Sub1
vC := 1
vD := 59
Sub1
v4 += -1
if v4 != 0 then
again
v2 := 15
: L2
buzzer := v2
v1 := 24
delay := v1
jump L19
0x12 0x56
: Sub1
v2 := 4
Sub4
i := D1
vE := 3
sprite vD vE 2
v5 := 3
: L3
v6 := 0
vE := 112
i := D3
v8 := 5
v9 := 9
sprite v8 v9 4
: L4
vD := 1
: L5
v1 := 17
loop
v2 := random 0b11000
v2 += 8
Sub4
sprite v8 v9 4
v9 += vD
sprite v8 v9 4
v1 += -1
if v0 key then jump L7
if v1 != 0 then
again
if vD == -1 then jump L4
vD := -1
jump L5
: L7
v2 := 2
buzzer := v2
: L8
loop
v2 := 16
Sub4
if vE != 0 then vE += -2
if v0 key then jump L8
v2 := 16
Sub4
if v0 key then
again
v2 := 4
Sub4
: L9
loop
v3 := vE
v3 += vE
v2 := v3
Sub4
vE += 2
sprite v8 v9 4
v8 += 1
sprite v8 v9 4
if vF == 1 then jump L14
if vE != 112 then jump L9
: L10
v2 := 128
Sub5
Sub3
if vC != 0 then jump L11
vA += v6
jump L12
: L11
vB += v6
: L12
Sub3
: L13
i := D3
sprite v8 v9 4
v2 := 32
buzzer := v2
v5 += -1
if v5 != 0 then jump L3
i := D1
vE := 3
vD := 3
if vC != 0 then vD := 59
sprite vD vE 2
v2 := 4
Sub4
return
: L14
v2 := 2
buzzer := v2
if v8 == 60 then jump L13
if v8 == 37 then v6 += 2
if v8 == 45 then v6 += 4
if v8 == 53 then v6 += 8
jump L21
: Sub2
v1 := 63
loop
sprite v8 v9 1
v1 += -1
v8 += v2
if v1 != 0 then
again
v1 := 31
loop
sprite v8 v9 1
v1 += -1
v9 += v2
if v1 != 0 then
again
return
: Sub3
i := D5
vE := 2
vD := 8
bcd vA
if vC == 0 then jump L17
vD := 40
bcd vB
: L17
load v2
i := hex v0
sprite vD vE 5
vD += 6
i := hex v1
sprite vD vE 5
vD += 6
i := hex v2
sprite vD vE 5
return
: Sub4
v2 += 2
loop
v2 += -1
if v2 != 0 then
again
return
0x1
: D1
0xc0 0xc0
: D2
0xe0 0xa0 0xe0
: D3
0xf0 0xf0 0xf0 0xf0
: D4
0x80
: D5
0x0 0x0 0x4 0x0 0xd4
: L19
loop
v1 := delay
if v1 != 0 then
again
v2 += -1
if v2 != 0 then jump L2
loop
again
: L21
if vE != 112 then
again
jump L10
: Sub5
delay := v2
loop
v2 := delay
if v2 != 0 then
again
return
######################################################################
# INPUT: chip8/Chip-8 Games/Soccer.ch8
######################################################################
:proto L2 # 226
:proto L4 # 25C
:proto L6 # 280
:proto Sub1 # 2A4
:proto Sub2 # 2B0
:proto Sub3 # 2BC
:proto Sub4 # 2C8
:proto Sub5 # 2D4
:proto Sub6 # 2E4
:proto L8 # 2F6
:proto L9 # 304
:proto Sub7 # 308
:proto Sub8 # 30C
:proto L10 # 31A
:proto L11 # 31E
:proto Sub9 # 322
:proto Sub10 # 334
:proto Sub11 # 33E
:proto D1 # 348
: main
clear
vA := 12
vB := 12
v8 := 0
v9 := 0
v6 := 0
v7 := 0
v5 := 0
v4 := 0
i := D1
Sub9
Sub10
Sub11
v0 := 96
delay := v0
loop
v0 := delay
if v0 == 0 then jump L2
again
: L2
v4 := 2
v6 := 2
v7 := 16
Sub7
Sub5
: L3
loop
Sub7
Sub8
if v6 == 64 then jump L4
if v6 == -2 then jump L6
Sub7
if vF == 1 then Sub6
v0 := 1
if v0 key then Sub1
v0 := 4
if v0 key then Sub2
v0 := 12
if v0 key then Sub3
v0 := 13
if v0 key then Sub4
again
: L4
Sub9
v8 += 1
if v8 == 10 then v8 := 0
Sub9
v0 := 20
buzzer := v0
v6 := 2
v7 := 16
v4 := 2
Sub5
Sub7
v0 := 96
delay := v0
loop
v0 := delay
if v0 == 0 then jump L3
again
: L6
Sub9
v9 += 1
if v9 == 10 then v9 := 0
Sub9
v0 := 20
buzzer := v0
v6 := 58
v7 := 16
v4 := -2
Sub5
Sub7
v0 := 96
delay := v0
loop
v0 := delay
if v0 == 0 then jump L3
again
: Sub1
if vA == 0 then return
Sub10
vA += -2
Sub10
return
: Sub2
if vA == 26 then return
Sub10
vA += 2
Sub10
return
: Sub3
if vB == 0 then return
Sub11
vB += -2
Sub11
return
: Sub4
if vB == 26 then return
Sub11
vB += 2
Sub11
return
: Sub5
v0 := random 0b11
if v0 == 0 then v5 := -1
if v0 == 1 then v5 := 0
if v0 == 2 then v5 := 1
return
: Sub6
if v6 == 0 then jump L8
if v6 == 20 then jump L8
if v6 == 40 then jump L8
if v6 == 60 then jump L8
return
: L8
Sub5
v0 := 4
buzzer := v0
if v4 == -2 then jump L9
v4 := -2
return
: L9
v4 := 2
return
: Sub7
sprite v6 v7 1
return
: Sub8
v6 += v4
v7 += v5
if v7 == 0 then jump L10
if v7 == 31 then jump L11
return
: L10
v5 := 1
return
: L11
v5 := -1
return
: Sub9
v1 := 21
v0 := 0
i := hex v8
sprite v1 v0 5
v1 += 20
i := hex v9
sprite v1 v0 5
i := D1
return
: Sub10
v1 := 0
sprite v1 vA 6
v1 += 40
sprite v1 vA 6
return
: Sub11
v1 := 20
sprite v1 vB 6
v1 += 40
sprite v1 vB 6
return
: D1
0x80 0x80 0x80 0x80 0x80 0x80
######################################################################
# INPUT: chip8/Chip-8 Games/Space Flight.ch8
######################################################################
:proto L2 # 216
:proto L4 # 22A
:proto L6 # 26C
:proto Sub1 # 284
:proto L10 # 29A
:proto L12 # 2AE
:proto L13 # 30E
:proto Sub2 # 31C
:proto L16 # 358
:proto L19 # 37E
:proto L20 # 396
:proto L22 # 3A2
:proto L23 # 3B4
:proto L25 # 3CA
:proto L27 # 3DE
:proto D1 # 408
:proto D2 # 409
:proto D3 # 413
:proto D4 # 41A
:proto D5 # 421
:proto D6 # 428
:proto D7 # 42F
:proto D8 # 436
:proto D9 # 43D
:proto D10 # 444
:proto D11 # 44B
:proto D12 # 452
:proto D13 # 459
:proto D14 # 460
:proto D15 # 467
:proto D16 # 46E
:proto D17 # 475
:proto D18 # 47C
:proto D19 # 483
:proto D20 # 48A
:proto D21 # 491
:proto D22 # 498
:proto D23 # 49A
:proto D24 # 49C
:proto D25 # 49E
:proto D26 # 4A0
:proto D27 # 4A2
:proto D28 # 4A9
:proto D29 # 4B0
:proto D30 # 4B7
:proto D31 # 4BE
:proto D32 # 4C5
: main
clear
i := D1
v3 := 0
v4 := 0
v5 := 31
loop
sprite v3 v4 1
sprite v3 v5 1
v3 += 8
if v3 == 64 then jump L2
again
: L2
v3 := 0
v4 := 1
v5 := 63
i := D2
loop
sprite v3 v4 10
sprite v5 v4 10
v4 += 10
if v4 == 31 then jump L4
again
: L4
i := D3
v3 := 17
v4 := 6
sprite v3 v4 7
i := D4
v3 += 8
sprite v3 v4 7
i := D5
v3 += 8
sprite v3 v4 7
i := D6
v3 += 8
sprite v3 v4 7
i := D7
v3 := 14
v4 := 20
sprite v3 v4 7
i := D8
v3 += 8
sprite v3 v4 7
i := D9
v3 += 8
sprite v3 v4 7
i := D10
v3 += 8
sprite v3 v4 7
i := D11
v3 += 8
sprite v3 v4 7
v0 := 15
loop
if v0 key then jump L6
again
: L6
v9 := 3
vA := 4
vB := 1
vC := 0
vD := 15
: L7
if vB == 11 then vB := 10
Sub1
v0 := 14
: L8
loop
if v0 key then jump L13
again
: Sub1
clear
i := D1
v3 := 0
v4 := 0
v5 := 31
loop
sprite v3 v4 1
sprite v3 v5 1
v3 += 8
if v3 == 64 then jump L10
again
: L10
v3 := 0
v4 := 1
v5 := 63
i := D2
loop
sprite v3 v4 10
sprite v5 v4 10
v4 += 10
if v4 == 31 then jump L12
again
: L12
i := D7
v3 := 10
v4 := 12
sprite v3 v4 7
i := D8
v3 += 8
sprite v3 v4 7
i := D9
v3 += 8
sprite v3 v4 7
i := D10
v3 += 8
sprite v3 v4 7
i := D11
v3 += 8
sprite v3 v4 7
if vB == 1 then i := D12
if vB == 2 then i := D13
if vB == 3 then i := D14
if vB == 4 then i := D15
if vB == 5 then i := D16
if vB == 6 then i := D17
if vB == 7 then i := D18
if vB == 8 then i := D19
if vB == 9 then i := D20
if vB == 10 then i := D21
v3 += 5
sprite v3 v4 7
if v9 == 3 then i := D24
if v9 == 2 then i := D25
if v9 == 1 then i := D26
v0 := 2
v1 := 2
sprite v0 v1 2
return
: L13
Sub2
i := D23
sprite vC vD 2
v0 := 15
loop
if v0 -key then
again
jump L16
: Sub2
clear
i := D22
if vB == 1 then v3 := 30
if vB == 2 then v3 := 40
if vB == 3 then v3 := 50
if vB == 4 then v3 := 55
if vB == 5 then v3 := 60
if vB == 6 then v3 := 65
if vB == 7 then v3 := 70
if vB == 8 then v3 := 75
if vB == 9 then v3 := 80
if vB == 10 then v3 := 85
loop
v4 := random 0b110100
v4 += 10
v6 := random 0b11111
sprite v4 v6 1
v3 += -1
if v3 == -1 then return
again
: L16
sprite vC vD 2
loop
v0 := 1
if v0 key then vD += -1
v0 := 4
if v0 key then vD += 1
vC += 2
sprite vC vD 2
if vF == 1 then jump L20
if vC == 62 then jump L19
v0 := 5
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L16
: L19
sprite vC vD 2
vC := 0
v0 := 5
buzzer := v0
vA += -1
if vA != 0 then
again
vA := 4
vC := 0
vD := 15
vB += 1
jump L7
: L20
v0 := 8
buzzer := v0
v0 := 15
loop
if v0 key then jump L22
again
: L22
v9 += -1
vC := 0
vD := 15
vA := 4
if v9 == 0 then jump L23
Sub1
v0 := 14
jump L8
: L23
clear
i := D1
v3 := 0
v4 := 0
v5 := 31
loop
sprite v3 v4 1
sprite v3 v5 1
v3 += 8
if v3 == 64 then jump L25
again
: L25
v3 := 0
v4 := 1
v5 := 63
i := D2
loop
sprite v3 v4 10
sprite v5 v4 10
v4 += 10
if v4 == 31 then jump L27
again
: L27
i := D27
v4 := 8
v3 := 20
sprite v3 v4 7
v3 += 8
i := D28
sprite v3 v4 7
v3 += 8
i := D29
sprite v3 v4 7
v3 := 20
v4 := 17
i := D30
sprite v3 v4 7
v3 += 8
i := D31
sprite v3 v4 7
i := D32
v3 += 8
sprite v3 v4 7
loop
again
: D1
0xff
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D3
0xfb 0x82 0x82 0xfb 0xa 0xa 0xfa
: D4
0xef 0x28 0x28 0xef 0x8 0x8 0x8
: D5
0xbe 0xa0 0xa0 0xa0 0xa0 0xa0 0xbe
: D6
0xf8 0x80 0x80 0xf8 0x80 0x80 0xf8
: D7
0xfa 0x82 0x82 0xfa 0x82 0x82 0x83
: D8
0xf 0x2 0x2 0x2 0x2 0x2 0xef
: D9
0xbe 0x20 0x20 0x26 0x22 0x22 0xbe
: D10
0x8b 0x88 0x88 0xf8 0x88 0x88 0x88
: D11
0xe0 0x80 0x80 0x80 0x80 0x80 0x80
: D12
0x8 0x8 0x8 0x8 0x8 0x8 0x8
: D13
0x3e 0x2 0x2 0x3e 0x20 0x20 0x3e
: D14
0x3e 0x2 0x2 0x3e 0x2 0x2 0x3e
: D15
0x22 0x22 0x22 0x3e 0x2 0x2 0x2
: D16
0x3e 0x20 0x20 0x3e 0x2 0x2 0x3e
: D17
0x3e 0x20 0x20 0x3e 0x22 0x22 0x3e
: D18
0x3e 0x2 0x4 0x8 0x10 0x10 0x10
: D19
0x3e 0x22 0x22 0x3e 0x22 0x22 0x3e
: D20
0x3e 0x22 0x22 0x3e 0x2 0x2 0x3e
: D21
0x2f 0x29 0x29 0x29 0x29 0x29 0x2f
: D22
0x80 0x0
: D23
0xe0 0xe0
: D24
0xdb 0xdb
: D25
0xd8 0xd8
: D26
0xc0 0xc0
: D27
0xfb 0x82 0x82 0x83 0x8a 0x8a 0xfa
: D28
0xed 0x2a 0x28 0xe8 0x28 0x28 0x28
: D29
0xbe 0xa0 0xa0 0xbe 0xa0 0xa0 0xbe
: D30
0xfa 0x8a 0x8a 0x8a 0x8a 0x89 0xf8
: D31
0x2f 0x28 0x28 0x2f 0x28 0x48 0x8f
: D32
0xbe 0x22 0x22 0xbe 0x28 0x24 0xa2
######################################################################
# INPUT: chip8/Chip-8 Games/Space Intercept [Joseph Weisbecker, 1978].ch8
######################################################################
:proto L1 # 20A
:proto L2 # 20C
:proto L6 # 252
:proto L7 # 274
:proto L8 # 280
:proto Sub1 # 286
:proto Sub2 # 290
:proto Sub3 # 29A
:proto D1 # 2B1
:proto D2 # 2B4
:proto D3 # 2BA
:proto D4 # 2C0
:proto D5 # 2C3
: main
v0 := key
if v0 != 2 then jump L1
i := D3
jump L2
: L1
i := D2
: L2
load v5
i := D4
save v3
i := D4
v6 := 0
sprite v6 v3 3
i := 6
v7 := 29
v8 := 31
sprite v7 v8 1
v9 := 0
vA := 15
Sub1
: L3
Sub2
if vA == 0 then loop
again
v7 := 30
v8 := 28
i := D1
sprite v7 v8 3
vE := 0
: L5
vB := 128
vD := 4
if vD key then vB := -1
vD := 5
if vD key then vB := 0
vD := 6
if vD key then vB := 1
if vB == 128 then jump L6
vE := 1
buzzer := vD
: L6
loop
i := D4
sprite v6 v3 3
v6 += v4
sprite v6 v3 3
if vF != 0 then jump L7
if vE == 0 then jump L5
i := D1
sprite v7 v8 3
if v8 == 0 then jump L8
v8 += -1
v7 += vB
sprite v7 v8 3
if vF != 1 then
again
: L7
buzzer := vD
Sub1
v9 += v5
Sub1
i := D1
sprite v7 v8 3
: L8
Sub2
vA += -1
jump L3
: Sub1
i := D5
bcd v9
vC := 0
Sub3
return
: Sub2
i := D5
bcd vA
vC := 50
Sub3
return
: Sub3
vD := 27
load v2
i := hex v0
sprite vC vD 5
vC += 5
i := hex v1
sprite vC vD 5
vC += 5
i := hex v2
sprite vC vD 5
return
0x1
: D1
0x40 0xe0 0xa0
: D2
0x7c 0xfe 0x7c 0x8 0x1 0x5
: D3
0x60 0xf0 0x60 0x3 0x1 0xf
: D4 0 0 0
: D5
######################################################################
# INPUT: chip8/Chip-8 Games/Space Invaders [David Winter] (alt).ch8
######################################################################
:proto L1 # 225
:proto L7 # 27D
:proto L8 # 28B
:proto L9 # 29F
:proto L10 # 2AD
:proto L11 # 2C9
:proto L12 # 2D3
:proto L13 # 2D5
:proto L14 # 2DD
:proto L15 # 2E7
:proto L16 # 2E9
:proto L17 # 307
:proto L18 # 31B
:proto L19 # 323
:proto Sub1 # 347
:proto Sub2 # 35F
:proto Sub3 # 36B
:proto Sub4 # 373
:proto Sub5 # 387
:proto L23 # 3A5
:proto D1 # 3B7
:proto D2 # 3CF
:proto D3 # 3D3
:proto D4 # 4D3
:proto D5 # 500
:proto D6 # 602
:proto D7 # 6F4
: main
jump L1
0x53 0x50 0x41 0x43 0x45 0x20 0x49 0x4e 0x56 0x41 0x44 0x45 0x52 0x53 0x20 0x76 0x30 0x2e 0x39 0x20 0x42 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
v0 := 0
v1 := 0
v2 := 8
i := D3
: L2
loop
sprite v0 v1 8
v1 += 8
i += v2
if v1 != 32 then jump L2
v0 += 8
v1 := 0
if v0 != 64 then
again
v9 := 5
vC := 21
vE := 0
: L3
Sub5
v0 := 10
delay := v0
loop
v0 := delay
if v0 != 0 then
again
Sub5
vE += 1
jump L3
: L5
v6 := 0
v8 := 28
v9 := 0
vA := 4
vB := 10
vC := 4
vD := 60
vE := 15
clear
Sub3
Sub1
delay := vD
: L6
loop
v0 := 4
if v0 -key then jump L7
Sub3
if v8 != 0 then v8 += -1
Sub3
: L7
v0 := 6
if v0 -key then jump L8
Sub3
if v8 != 57 then v8 += 1
Sub3
: L8
if v6 != 0 then jump L9
v0 := 5
if v0 -key then jump L16
v6 := 1
v5 := 27
v4 := v8
i := D2
sprite v4 v5 1
: L9
i := D2
sprite v4 v5 1
v5 += -1
if v5 != -1 then jump L10
v6 := 0
jump L16
: L10
sprite v4 v5 1
if vF != 1 then jump L16
sprite v4 v5 1
v6 := 0
v3 := v4
v3 += 3
v3 -= vB
v2 := -8
v3 &= v2
v2 := 8
if v3 != 0 then jump L11
Sub4
: L11
v2 >>= v0
if v3 == 8 then jump L12
if v3 != 16 then jump L13
: L12
Sub4
: L13
v2 >>= v0
if v3 != 24 then jump L14
Sub4
: L14
v2 >>= v0
if v3 == 32 then jump L15
if v3 != 40 then jump L16
: L15
Sub4
: L16
if vE != 0 then jump L17
v9 += 6
if v9 == 24 then v9 := 0
vA := 4
vB := 10
vC := 4
vD += -12
vE := 15
clear
Sub1
Sub3
delay := vD
jump L6
: L17
v7 := delay
if v7 != 0 then jump L6
delay := vD
Sub1
vB += vA
if vB != 18 then jump L18
vC += 2
vA := -4
: L18
if vB != 2 then jump L19
vC += 2
vA := 4
: L19
Sub1
if vC != 24 then
again
clear
i := D4
v0 := 20
v1 := 8
v2 := 15
loop
sprite v0 v1 15
v0 += 8
i += v2
if v0 != 44 then
again
v0 := key
clear
i := D7
load vE
jump L1
: Sub1
i := D1
i += v9
v1 := 8
Sub2
v1 >>= v0
Sub2
v1 >>= v0
Sub2
v1 >>= v0
Sub2
vB += 208
return
: Sub2
v0 := vE
v0 &= v1
if v0 != 0 then sprite vB vC 6
vB += 12
return
: Sub3
i := D2
v0 := 28
sprite v8 v0 4
return
: Sub4
Sub1
vE ^= v2
Sub1
v0 := 5
buzzer := v0
delay := v0
loop
v0 := delay
if v0 != 0 then
again
return
: Sub5
vA := 0
vD := vE
vB := 4
: L22
loop
if v9 key then jump L5
i := D6
i += vD
load v0
if v0 != -1 then jump L23
vA := 0
vB := 4
vD := 1
vE := 1
jump L22
: L23
i := D5
i += v0
sprite vB vC 6
vB += 8
vD += 1
vA += 1
if vA != 7 then
again
return
: D1
0x3c 0x7e 0xff 0xff 0x99 0x99 0x7e 0xff 0xff 0x24 0x24 0xe7 0x7e 0xff 0x3c 0x3c 0x7e 0xdb 0x81 0x42 0x3c 0x7e 0xff 0xdb
: D2
0x10 0x38 0x7c 0xfe
: D3
0x0 0x0 0x7f 0x0 0x3f 0x0 0x7f 0x0 0x0 0x0 0x1 0x1 0x1 0x3 0x3 0x3 0x3 0x0 0x0 0x3f 0x20 0x20 0x20 0x20 0x20 0x20 0x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0x9a 0x9a 0x9b 0x99 0xf8 0xe6 0x25 0x25 0xf4 0x34 0x34 0x34 0x0 0x17 0x14 0x34 0x37 0x36 0x26 0xc7 0xdf 0x50 0x50 0x5c 0xd8 0xd8 0xdf 0x0 0xdf 0x11 0x1f 0x12 0x1b 0x19 0xd9
: D5
0x7c 0x44 0xfe 0x86 0x86 0x86 0xfc 0x84 0xfe 0x82 0x82 0xfe 0xfe 0x80 0xc0 0xc0 0xc0 0xfe 0xfc 0x82 0xc2 0xc2 0xc2 0xfc 0xfe 0x80 0xf8 0xc0 0xc0 0xfe 0xfe 0x80 0xf0 0xc0 0xc0 0xc0 0xfe 0x80 0xbe 0x86 0x86 0xfe 0x86 0x86 0xfe 0x86 0x86 0x86 0x10 0x10 0x10 0x10 0x10 0x10 0x18 0x18 0x18 0x48 0x48 0x78 0x9c 0x90 0xb0 0xc0 0xb0 0x9c 0x80 0x80 0xc0 0xc0 0xc0 0xfe 0xee 0x92 0x92 0x86 0x86 0x86 0xfe 0x82 0x86 0x86 0x86 0x86 0x7c 0x82 0x86 0x86 0x86 0x7c 0xfe 0x82 0xfe 0xc0 0xc0 0xc0 0x7c 0x82 0xc2 0xca 0xc4 0x7a 0xfe 0x86 0xfe 0x90 0x9c 0x84 0xfe 0xc0 0xfe 0x2 0x2 0xfe 0xfe 0x10 0x30 0x30 0x30 0x30 0x82 0x82 0xc2 0xc2 0xc2 0xfe 0x82 0x82 0x82 0xee 0x38 0x10 0x86 0x86 0x96 0x92 0x92 0xee 0x82 0x44 0x38 0x38 0x44 0x82 0x82 0x82 0xfe 0x30 0x30 0x30 0xfe 0x2 0x1e 0xf0 0x80 0xfe 0x0 0x0 0x0 0x0 0x6 0x6 0x0 0x0 0x0 0x60 0x60 0xc0 0x0 0x0 0x0 0x0 0x0 0x0 0x18 0x18 0x18 0x18 0x0 0x18 0x7c 0xc6 0xc 0x18 0x0 0x18 0x0 0x0 0xfe 0xfe 0x0 0x0 0xfe 0x82 0x86 0x86 0x86 0xf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xa8 0xc 0x54 0x48 0x5a 0x78 0x72 0x18 0x66 0xa8 0x72 0x18 0x42 0x42 0x6c 0xa8 0x72 0x2a 0x0 0x72 0xa8 0x72 0x2a 0x18 0xa8 0x30 0x4e 0x7e 0x0 0x12 0x18 0x66 0x6c 0xa8 0x30 0x4e 0xc 0x66 0x18 0x0 0x6c 0x18 0xa8 0x72 0x2a 0x18 0x30 0x66 0xa8 0x1e 0x54 0x66 0xc 0x18 0x9c 0xa8 0x24 0x54 0x54 0x12 0xa8 0x42 0x78 0xc 0x3c 0xa8 0xae 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xff
: D7
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Space Invaders [David Winter].ch8
######################################################################
:proto L1 # 225
:proto L7 # 27D
:proto L8 # 28B
:proto L9 # 29F
:proto L10 # 2AD
:proto L11 # 2C9
:proto L12 # 2D3
:proto L13 # 2D5
:proto L14 # 2DD
:proto L15 # 2E7
:proto L16 # 2E9
:proto L17 # 307
:proto L18 # 31B
:proto L19 # 323
:proto Sub1 # 351
:proto Sub2 # 369
:proto Sub3 # 375
:proto Sub4 # 37D
:proto Sub5 # 391
:proto L24 # 3AF
:proto D1 # 3C1
:proto D2 # 3D9
:proto D3 # 3DD
:proto D4 # 4DD
:proto D5 # 50A
:proto D6 # 60C
:proto D7 # 706
: main
jump L1
0x53 0x50 0x41 0x43 0x45 0x20 0x49 0x4e 0x56 0x41 0x44 0x45 0x52 0x53 0x20 0x30 0x2e 0x39 0x31 0x20 0x42 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
v0 := 0
v1 := 0
v2 := 8
i := D3
: L2
loop
sprite v0 v1 8
v1 += 8
i += v2
if v1 != 32 then jump L2
v0 += 8
v1 := 0
if v0 != 64 then
again
v9 := 5
vC := 21
vE := 0
: L3
Sub5
v0 := 10
delay := v0
loop
v0 := delay
if v0 != 0 then
again
Sub5
vE += 1
jump L3
: L5
v6 := 0
v8 := 28
v9 := 0
vA := 4
vB := 10
vC := 4
vD := 60
vE := 15
clear
Sub3
Sub1
delay := vD
: L6
loop
v0 := 4
if v0 -key then jump L7
Sub3
if v8 != 0 then v8 += -1
Sub3
: L7
v0 := 6
if v0 -key then jump L8
Sub3
if v8 != 57 then v8 += 1
Sub3
: L8
if v6 != 0 then jump L9
v0 := 5
if v0 -key then jump L16
v6 := 1
v5 := 27
v4 := v8
i := D2
sprite v4 v5 1
: L9
i := D2
sprite v4 v5 1
v5 += -1
if v5 != -1 then jump L10
v6 := 0
jump L16
: L10
sprite v4 v5 1
if vF != 1 then jump L16
sprite v4 v5 1
v6 := 0
v3 := v4
v3 += 3
v3 -= vB
v2 := -8
v3 &= v2
v2 := 8
if v3 != 0 then jump L11
Sub4
: L11
v2 >>= v0
if v3 == 8 then jump L12
if v3 != 16 then jump L13
: L12
Sub4
: L13
v2 >>= v0
if v3 != 24 then jump L14
Sub4
: L14
v2 >>= v0
if v3 == 32 then jump L15
if v3 != 40 then jump L16
: L15
Sub4
: L16
if vE != 0 then jump L17
v9 += 6
if v9 == 24 then v9 := 0
vA := 4
vB := 10
vC := 4
vD += -12
vE := 15
clear
Sub1
Sub3
delay := vD
jump L6
: L17
v7 := delay
if v7 != 0 then jump L6
delay := vD
Sub1
vB += vA
if vB != 18 then jump L18
vC += 2
vA := -4
: L18
if vB != 2 then jump L19
vC += 2
vA := 4
: L19
Sub1
if vC != 24 then
again
clear
i := D4
v0 := 20
v1 := 8
v2 := 15
loop
sprite v0 v1 15
v0 += 8
i += v2
if v0 != 44 then
again
v0 := -1
delay := v0
loop
v0 := delay
if v0 != 0 then
again
v0 := key
clear
i := D7
load vE
jump L1
: Sub1
i := D1
i += v9
v1 := 8
Sub2
v1 >>= v0
Sub2
v1 >>= v0
Sub2
v1 >>= v0
Sub2
vB += 208
return
: Sub2
v0 := vE
v0 &= v1
if v0 != 0 then sprite vB vC 6
vB += 12
return
: Sub3
i := D2
v0 := 28
sprite v8 v0 4
return
: Sub4
Sub1
vE ^= v2
Sub1
v0 := 5
buzzer := v0
delay := v0
loop
v0 := delay
if v0 != 0 then
again
return
: Sub5
vA := 0
vD := vE
vB := 4
: L23
loop
if v9 key then jump L5
i := D6
i += vD
load v0
if v0 != -1 then jump L24
vA := 0
vB := 4
vD := 1
vE := 1
jump L23
: L24
i := D5
i += v0
sprite vB vC 6
vB += 8
vD += 1
vA += 1
if vA != 7 then
again
return
: D1
0x3c 0x7e 0xff 0xff 0x99 0x99 0x7e 0xff 0xff 0x24 0x24 0xe7 0x7e 0xff 0x3c 0x3c 0x7e 0xdb 0x81 0x42 0x3c 0x7e 0xff 0xdb
: D2
0x10 0x38 0x7c 0xfe
: D3
0x0 0x0 0x7f 0x0 0x3f 0x0 0x7f 0x0 0x0 0x0 0x1 0x1 0x1 0x3 0x3 0x3 0x3 0x0 0x0 0x3f 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x3f 0x8 0x8 0xff 0x0 0x0 0xfe 0x0 0xfc 0x0 0xfe 0x0 0x0 0x0 0x7e 0x42 0x42 0x62 0x62 0x62 0x62 0x0 0x0 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0x0 0x0 0xff 0x0 0x7d 0x0 0x41 0x7d 0x5 0x7d 0x7d 0x0 0x0 0xc2 0xc2 0xc6 0x44 0x6c 0x28 0x38 0x0 0x0 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0x0 0x0 0xff 0x0 0xf7 0x10 0x14 0xf7 0xf7 0x4 0x4 0x0 0x0 0x7c 0x44 0xfe 0xc2 0xc2 0xc2 0xc2 0x0 0x0 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0x0 0x0 0xff 0x0 0xef 0x20 0x28 0xe8 0xe8 0x2f 0x2f 0x0 0x0 0xf9 0x85 0xc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 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0x90 0x54 0x78 0xa8 0x48 0x78 0x6c 0x72 0xa8 0x12 0x18 0x6c 0x72 0x66 0x54 0x90 0xa8 0x72 0x2a 0x18 0xa8 0x30 0x4e 0x7e 0x0 0x12 0x18 0x66 0x6c 0xa8 0x72 0x54 0xa8 0x5a 0x66 0x18 0x7e 0x18 0x4e 0x72 0xa8 0x72 0x2a 0x18 0x30 0x66 0xa8 0x30 0x4e 0x7e 0x0 0x6c 0x30 0x54 0x4e 0x9c 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0x48 0x54 0x7e 0x18 0xa8 0x90 0x54 0x78 0x66 0xa8 0x6c 0x2a 0x30 0x5a 0xa8 0x84 0x30 0x72 0x2a 0xa8 0xd8 0xa8 0x0 0x4e 0x12 0xa8 0xe4 0xa2 0xa8 0x0 0x4e 0x12 0xa8 0x6c 0x2a 0x54 0x54 0x72 0xa8 0x84 0x30 0x72 0x2a 0xa8 0xde 0x9c 0xa8 0x72 0x2a 0x18 0xa8 0xc 0x54 0x48 0x5a 0x78 0x72 0x18 0x66 0xa8 0x66 0x18 0x5a 0x54 0x66 0x72 0x6c 0xa8 0x72 0x2a 0x0 0x72 0xa8 0x72 0x2a 0x18 0xa8 0x30 0x4e 0x7e 0x0 0x12 0x18 0x66 0x6c 0xa8 0x0 0x66 0x18 0xa8 0x30 0x4e 0xc 0x66 0x18 0x0 0x6c 0x30 0x4e 0x24 0xa8 0x72 0x2a 0x18 0x30 0x66 0xa8 0x1e 0x54 0x66 0xc 0x18 0x9c 0xa8 0x24 0x54 0x54 0x12 0xa8 0x42 0x78 0xc 0x3c 0xa8 0xae 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xff
: D7
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Spooky Spot [Joseph Weisbecker, 1978].ch8
######################################################################
:proto L3 # 236
:proto L4 # 240
:proto Sub1 # 242
:proto Sub2 # 254
:proto Sub3 # 25A
:proto Sub4 # 26A
:proto D1 # 270
:proto D2 # 280
:proto D3 # 290
: main
clear
Sub1
Sub2
vA := key
i := D3
v1 := 0
v2 := 16
: L1
sprite v1 v2 1
if vF != 0 then jump L3
vA := 4
buzzer := vA
vA := 10
delay := vA
loop
vA := delay
if vA != 0 then
again
v1 += 1
vA := random 0b1
if vA != 1 then vA := -1
v2 += vA
if v2 == 7 then v2 += 1
if v2 == 24 then v2 += -1
jump L1
: L3
vA := 16
vA &= v2
if vA != 0 then jump L4
Sub3
: L4
Sub4
: Sub1
i := D1
v4 := 8
: L5
v3 := 48
sprite v3 v4 8
vA := 8
i += vA
v3 += 8
sprite v3 v4 8
return
: Sub2
i := D2
v4 := 16
jump L5
: Sub3
v4 := 8
: L6
v3 := 49
i := D3
loop
sprite v3 v4 8
v3 += 1
if v3 != 64 then
again
loop
again
: Sub4
v4 := 16
jump L6
0x1 0x1
: D1
0x7f 0x7f 0x6a 0x6a 0x62 0x76 0x76 0x7f 0xff 0xff 0x23 0xef 0x63 0xfb 0x23 0xff
: D2
0x7f 0x76 0x72 0x70 0x74 0x76 0x7f 0x7f 0xff 0x87 0xb7 0xb7 0xb7 0x87 0xff 0xff
: D3
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0xd4
######################################################################
# INPUT: chip8/Chip-8 Games/Squash [David Winter].ch8
######################################################################
:proto L4 # 25C
:proto L5 # 26A
:proto Sub1 # 2AE
:proto Sub2 # 2B8
:proto D1 # 2C8
:proto D2 # 2CD
:proto D3 # 2D2
:proto D4 # 2D3
: main
i := D3
v0 := 0
v1 := 0
v2 := 30
loop
sprite v0 v1 1
sprite v0 v2 1
v0 += 8
if v0 != 64 then
again
i := D2
v0 := 62
v1 := 1
loop
sprite v0 v1 5
v1 += 5
if v1 != 26 then
again
sprite v0 v1 4
v3 := 0
v4 := random 0b1111
v4 += 8
v5 := 1
v4 |= v5
v5 := 3
v6 := 2
v7 := 1
v8 := v4
v8 += 2
v9 := 1
vA := 4
vB := 5
Sub2
i := D1
sprite v3 v4 5
sprite v7 v8 1
: L3
loop
vC := 1
Sub1
i := D1
vC := v7
vD := v8
if v9 -key then jump L4
if v4 == 1 then jump L4
sprite v3 v4 5
v4 += -1
sprite v3 v4 5
: L4
if vA -key then jump L5
if v4 == 25 then jump L5
sprite v3 v4 5
v4 += 1
sprite v3 v4 5
: L5
v7 += v5
v8 += v6
if v7 == 1 then v5 := 3
if v7 == 61 then v5 := -3
if v8 == 1 then v6 := 2
if v8 == 29 then v6 := -2
sprite vC vD 1
sprite v7 v8 1
if v7 != 1 then
again
vC := v8
vC -= v4
vD := 0
loop
if vC == vD then jump L3
vD += 1
if vD != 5 then
again
vC := key
Sub2
vB += -1
Sub2
if vB != -1 then jump L3
Sub2
vB := 0
loop
Sub2
vC := 30
Sub1
again
: Sub1
delay := vC
loop
vC := delay
if vC != 0 then
again
return
: Sub2
i := D4
bcd vB
load v2
i := hex v2
v0 := 57
v1 := 2
sprite v0 v1 5
return
: D1
0x80 0x80 0x80 0x80 0x80
: D2
0xe0 0xe0 0xe0 0xe0 0xe0
: D3
0xff
: D4
######################################################################
# INPUT: chip8/Chip-8 Games/Submarine [Carmelo Cortez, 1978].ch8
######################################################################
:proto L3 # 23C
:proto L4 # 242
:proto L5 # 286
:proto L6 # 28C
:proto L7 # 292
:proto L8 # 296
:proto Sub1 # 2A2
:proto Sub2 # 2AC
:proto Sub3 # 2B6
:proto D1 # 2CD
:proto D2 # 2D0
:proto D3 # 2D4
:proto D4 # 2D7
:proto L9 # 2D8
:proto D5 # 2F8
:proto D6 # 300
:proto D7 # 305
:proto D8 # 30A
:proto D9 # 30F
: main
i := D1
v9 := 56
vA := 30
sprite v9 vA 2
i := D2
vB := 0
vC := 26
sprite vB vC 2
i := D3
v4 := 60
v6 := 6
sprite v4 v6 3
v7 := 0
v8 := 25
Sub1
: L1
Sub2
if v8 == 0 then jump L9
v5 := 9
i := D4
v3 := 0
: L2
vD := 5
if vD key then v3 := 1
vE := v4
if vD key then sprite vE v5 1
jump L3
0xed 0xa1 0x22 0xd8
: L3
loop
i := D3
sprite v4 v6 3
jump L4
: L4
v4 += -1
sprite v4 v6 3
i := D2
sprite vB vC 2
vD := random 0b100
vB += vD
sprite vB vC 2
if vF != 0 then jump L7
i := D1
sprite v9 vA 2
vD := random 0b111
if vD == 0 then v9 += 3
v9 += -3
sprite v9 vA 2
if vF != 0 then jump L6
if v3 == 0 then jump L2
i := D4
sprite vE v5 1
if v5 == 31 then jump L5
v5 += 2
buzzer := v3
sprite vE v5 1
if vF != 1 then
again
vD := 31
vD &= v5
if vD == 31 then jump L6
jump L7
: L5
Sub2
v8 += -1
jump L1
: L6
Sub1
v7 += 5
jump L8
: L7
Sub1
v7 += 10
: L8
Sub1
vD := 3
buzzer := vD
i := D4
sprite vE v5 1
jump L5
: Sub1
i := D5
bcd v7
v3 := 0
Sub3
return
: Sub2
i := D5
bcd v8
v3 := 50
Sub3
return
: Sub3
vD := 0
load v2
i := hex v0
sprite v3 vD 5
v3 += 5
i := hex v1
sprite v3 vD 5
v3 += 5
i := hex v2
sprite v3 vD 5
return
0x1
: D1
0x8 0x7f 0x7c
: D2
0x8 0x3e 0x60 0x8
: D3
0x18 0x3c 0xff
: D4
0x8
: L9
i := D6
v3 := 17
vD := 11
sprite v3 vD 5
i := D7
v3 := 25
sprite v3 vD 5
i := D8
v3 := 35
sprite v3 vD 5
i := D9
v3 := 43
sprite v3 vD 5
v3 := 0
loop
again
0x6d 0xb
: D5
0x0 0x1 0x4 0x0 0x0 0xee 0x0 0x1
: D6
0xee 0x8a 0x8a 0xaa 0xee
: D7
0xef 0xa5 0xa5 0xa5 0xef
: D8
0x7a 0x2a 0x3b 0x29 0x79
: D9
0xba 0xa2 0xb2 0x20 0x3a 0x34 0x3a 0x3c 0xd6 0x54 0x1c 0xc 0x40 0x9e 0x25 0x68 0xc
######################################################################
# INPUT: chip8/Chip-8 Games/Sum Fun [Joyce Weisbecker].ch8
######################################################################
:proto L3 # 22C
:proto L4 # 24A
:proto Sub1 # 25A
:proto Sub2 # 262
:proto Sub3 # 270
:proto Sub4 # 282
:proto Sub5 # 28A
:proto Sub6 # 294
:proto Sub7 # 29A
:proto L8 # 2A4
:proto D1 # 2B0
: main
clear
vA := 0
Sub2
v3 := 128
Sub5
v5 := 20
loop
v0 := random 0b11
v1 := random 0b11
v2 := random 0b11
v4 := 0
v4 += v0
v4 += v1
v4 += v2
Sub1
jump L8
: L2
loop
v3 := 144
Sub4
if v4 key then jump L3
if v6 != 0 then v6 += -1
again
: L3
Sub6
v3 := 16
Sub4
Sub7
v3 := 128
Sub5
clear
vA += v6
Sub2
v5 += -1
if v5 == 0 then jump L4
v3 := 96
Sub5
again
: L4
v4 := 18
loop
buzzer := v4
v3 := 26
Sub5
v4 += -2
if v4 != 0 then
again
loop
again
: Sub1
v8 := 16
v9 := 19
Sub3
return
: Sub2
v8 := 48
v9 := 0
i := D1
bcd vA
load v2
Sub3
return
: Sub3
i := hex v0
sprite v8 v9 5
v8 += 6
i := hex v1
sprite v8 v9 5
v8 += 6
i := hex v2
sprite v8 v9 5
return
: Sub4
loop
v3 += -1
if v3 != 0 then
again
return
: Sub5
delay := v3
loop
v3 := delay
if v3 != 0 then
again
return
: Sub6
v3 := 2
buzzer := v3
return
: Sub7
v8 := 22
v9 := 10
i := hex v4
sprite v8 v9 5
return
: L8
v6 := 10
v3 := 128
Sub4
if v4 key then jump L3
jump L2
: D1
######################################################################
# INPUT: chip8/Chip-8 Games/Syzygy [Roy Trevino, 1990].ch8
######################################################################
:proto L1 # 212
:proto L3 # 224
:proto L4 # 228
:proto L5 # 22C
:proto L7 # 28C
:proto L8 # 294
:proto L9 # 29C
:proto L11 # 324
:proto L12 # 33E
:proto L14 # 358
:proto L15 # 388
:proto L18 # 3AA
:proto L19 # 3DE
:proto L20 # 424
:proto L21 # 432
:proto L22 # 43A
:proto L23 # 444
:proto L25 # 47C
:proto L26 # 482
:proto L27 # 490
:proto L28 # 496
:proto Sub1 # 49A
:proto Sub2 # 4B6
:proto Sub3 # 4DA
:proto Sub4 # 522
:proto D1 # 54C
:proto D2 # 54E
:proto D3 # 550
:proto D4 # 552
:proto D5 # 562
:proto D6 # 56C
:proto D7 # 576
:proto D8 # 580
:proto D9 # 58A
:proto D10 # 58E
:proto D11 # 592
:proto D12 # 598
:proto D13 # 59E
:proto D14 # 5A4
:proto D15 # 5AA
:proto D16 # 5AE
:proto D17 # 800
: main
jump L1
0x8d 0x8d 0x20 0xa9 0x31 0x39 0x39 0x30 0x20 0x52 0x54 0x54 0x20 0x8e 0x8e 0x0
: L1
Sub2
Sub3
loop
v0 := 15
if v0 key then jump L3
v0 := 14
if v0 key then jump L4
again
: L3
Sub3
jump L5
: L4
clear
jump L5
: L5
v1 := random 0b11111
v1 += 16
v2 := random 0b1111
v2 += 8
v3 := random 0b11
v5 := v3
v6 := v1
v7 := v2
v8 := v3
if v8 == 0 then v7 += 1
if v8 == 1 then v7 += -1
if v8 == 2 then v6 += 1
if v8 == 3 then v6 += -1
i := D1
sprite v1 v2 1
sprite v6 v7 1
v4 := -16
v9 := -15
i := D17
i += v4
v0 := v3
save v0
v4 += 1
i := D17
i += v4
v0 := 1
save v0
Sub4
vA := 0
vA += 0
: L6
loop
v0 := delay
if v0 != 0 then jump L9
if vD != 0 then jump L8
v0 := 0
i := hex v0
sprite vB vC 5
if vF != 1 then jump L7
sprite vB vC 5
Sub4
delay := v0
jump L9
: L7
delay := vE
vD := 1
vE := 0
jump L9
: L8
v0 := vE
i := hex v0
sprite vB vC 5
Sub4
: L9
v0 := 3
if v0 key then v3 := 0
v0 := 6
if v0 key then v3 := 1
v0 := 7
if v0 key then v3 := 2
v0 := 8
if v0 key then v3 := 3
if v3 == 0 then v2 += -1
if v3 == 1 then v2 += 1
if v3 == 2 then v1 += -1
if v3 == 3 then v1 += 1
i := D1
sprite v1 v2 1
if vF != 1 then jump L11
if vD != 1 then jump L15
v0 := 63
v1 &= v0
v0 := 31
v2 &= v0
v0 := vB
v0 =- v1
if vF != 1 then jump L15
v0 := vB
v0 += 3
v0 -= v1
if vF != 1 then jump L15
v0 := vC
v0 =- v2
if vF != 1 then jump L15
v0 := vC
v0 += 4
v0 -= v2
if vF != 1 then jump L15
v0 := 4
buzzer := v0
vE := random 0b111
vE += 2
vA += vE
i := D1
sprite v1 v2 1
v0 := 0
i := hex v0
sprite vB vC 5
v0 := vE
i := hex v0
sprite vB vC 5
v0 := 48
delay := v0
loop
v0 := delay
if v0 != 0 then
again
i := D1
sprite v1 v2 1
: L11
if v3 == v5 then jump L12
v4 += 1
i := D17
i += v4
v0 := v3
save v0
v4 += 1
i := D17
i += v4
v0 := 0
save v0
v5 := v3
: L12
i := D17
i += v4
load v0
v0 += 1
save v0
if vA == 0 then jump L14
v0 := 12
loop
v0 += -1
if v0 != 0 then
again
vA += -1
jump L6
: L14
i := D1
sprite v6 v7 1
if v8 == 0 then v7 += -1
if v8 == 1 then v7 += 1
if v8 == 2 then v6 += -1
if v8 == 3 then v6 += 1
i := D17
i += v9
load v0
v0 += -1
save v0
if v0 != 0 then jump L6
v9 += 1
i := D17
i += v9
load v0
v8 := v0
v9 += 1
again
: L15
v0 := 13
buzzer := v0
v0 := 11
loop
if v0 -key then
again
vB := 1
vC := 0
vD := 0
: L17
loop
vB += 1
if vB != 10 then jump L18
vB := 0
vC += 1
if vC != 10 then jump L18
vC := 0
vD += 1
: L18
i := D1
sprite v6 v7 1
if v8 == 0 then v7 += -1
if v8 == 1 then v7 += 1
if v8 == 2 then v6 += -1
if v8 == 3 then v6 += 1
i := D17
i += v9
load v0
v0 += -1
save v0
if v0 != 0 then jump L17
if v9 == v4 then jump L19
v9 += 1
i := D17
i += v9
load v0
v8 := v0
v9 += 1
again
: L19
clear
v6 := 17
v7 := 9
v8 := 47
v9 := 23
i := D4
sprite v6 v7 14
sprite v8 v7 14
v7 += -1
i := D2
sprite v6 v7 1
sprite v6 v9 1
v6 += 8
sprite v6 v7 1
sprite v6 v9 1
v6 += 8
sprite v6 v7 1
sprite v6 v9 1
v6 += 8
i := D3
sprite v6 v7 1
sprite v6 v9 1
i := D13
v6 := 19
v7 := 17
Sub1
i := D16
load v3
if v3 == vD then jump L20
v0 := v3
v0 -= vD
if vF != 1 then jump L22
jump L23
: L20
if v2 == vC then jump L21
v0 := v2
v0 -= vC
if vF != 1 then jump L22
jump L23
: L21
v0 := v1
v0 -= vB
if vF != 0 then jump L23
: L22
i := D16
v3 := vD
v2 := vC
v1 := vB
save v3
: L23
i := D16
load v3
v6 := 19
v7 += -7
vD := v3
vC := v2
vB := v1
i := D14
Sub1
loop
v1 := random 0b111111
v2 := random 0b11111
v0 := 13
v0 -= v1
if vF != 0 then jump L25
v0 := 48
v0 =- v1
if vF != 0 then jump L25
v0 := 3
v0 -= v2
if vF != 0 then jump L25
v0 := 24
v0 =- v2
if vF != 0 then jump L25
jump L26
: L25
v3 := random 0b1111
i := hex v3
sprite v1 v2 5
: L26
v0 := 15
if v0 key then jump L27
v0 := 14
if v0 key then jump L28
again
: L27
clear
Sub2
jump L5
: L28
clear
jump L5
: Sub1
sprite v6 v7 5
i := D15
v6 += 2
sprite v6 v7 4
i := hex vD
v6 += 10
sprite v6 v7 5
i := hex vC
v6 += 5
sprite v6 v7 5
i := hex vB
v6 += 5
sprite v6 v7 5
return
: Sub2
i := D2
v1 := 0
v2 := 0
v6 := 31
loop
sprite v1 v2 1
sprite v1 v6 1
v1 += 8
if v1 != 64 then
again
i := D4
v2 := 1
v5 := 63
sprite v1 v2 15
sprite v5 v2 15
v2 += 15
sprite v1 v2 15
sprite v5 v2 15
return
: Sub3
v1 := 12
v2 := 7
i := D5
sprite v1 v2 10
i := D6
v1 += 6
sprite v1 v2 10
i := D7
v1 += 6
sprite v1 v2 10
i := D6
v1 += 6
sprite v1 v2 10
i := D8
v1 += 6
sprite v1 v2 10
i := D6
v1 += 6
sprite v1 v2 10
v1 := 14
v2 := 24
i := D9
sprite v1 v2 3
i := D10
v1 += 8
v2 += -1
sprite v1 v2 4
v1 += 9
v2 += -2
i := D11
sprite v1 v2 6
v1 += 6
v2 += 1
i := D12
sprite v1 v2 5
return
: Sub4
vD := 197
loop
vB := random 0b111111
vE := vB
vE += vD
if vF == 1 then
again
vB += 1
vD := -26
loop
vC := random 0b11111
vE := vC
vE += vD
if vF == 1 then
again
vC += 1
vD := 0
vE := random 0b111111
vE += 64
delay := vE
vE := random 0b111111
vE += 64
return
: D1
0x80 0x0
: D2
0xff 0x0
: D3
0xfe 0x0
: D4
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D5
0x1f 0x10 0x10 0x10 0x1f 0x1 0x1 0x1 0x1 0x1f
: D6
0x11 0x11 0x11 0x11 0x1f 0x4 0x4 0x4 0x4 0x4
: D7
0x1f 0x1 0x2 0x2 0x4 0x4 0x8 0x8 0x10 0x1f
: D8
0x1f 0x11 0x10 0x10 0x10 0x13 0x11 0x11 0x11 0x1f
: D9
0x5 0x5 0x2 0x0
: D10
0x71 0x51 0x51 0x75
: D11
0xc 0x12 0x1e 0x14 0x12 0x9
: D12
0x14 0x3e 0x15 0x15 0x2a 0x0
: D13
0x77 0x44 0x24 0x14 0x77 0x0
: D14
0x57 0x52 0x72 0x52 0x57 0x0
: D15
0x0 0x1 0x0 0x1
: D16
0x0 0x0 0x0 0x0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D17
######################################################################
# INPUT: chip8/Chip-8 Games/Tank.ch8
######################################################################
:proto L2 # 230
:proto Sub1 # 27C
:proto L6 # 288
:proto Sub2 # 2AE
:proto Sub3 # 2C6
:proto Sub4 # 2EC
:proto Sub5 # 30A
:proto Sub6 # 314
:proto L8 # 332
:proto L10 # 344
:proto Sub7 # 362
:proto L11 # 366
:proto L12 # 382
:proto L13 # 384
:proto L14 # 38C
:proto Sub8 # 39A
:proto Sub9 # 3AC
:proto Sub10 # 3BE
:proto L16 # 3CE
:proto Sub11 # 3D4
:proto Sub12 # 3EC
:proto Sub13 # 3F2
:proto D7 # 3FF
:proto D8 # 419
:proto D9 # 41A
:proto D10 # 41F
:proto D11 # 427
: main
jump L2
: L1
v6 += -5
v0 := 32
v0 -= v6
if vF == 0 then v6 := 0
jump L13
0x0 0xff 0x0 0x0
: D1
0x0 0x1 0x0 0xc 0xa
: D2
0x0 0x19
: D3
0x2 0x4 0x6 0x8
: D4
0x2 0x2 0x3 0x2c 0x0 0xf
: D5
0x0 0x2 0x5 0x2e 0x8 0x0
: D6
0x0 0x2 0x5 0x0 0x0 0x0 0x0
: L2
vE := 0
vD := 160
vA := 8
v9 := 6
v8 := 4
v7 := 2
v6 := 25
v4 := 16
v3 := 12
v2 := 0
v1 := 6
i := D1
save vA
: L3
Sub11
v0 := 64
delay := v0
loop
v0 := delay
if v0 != 0 then
again
Sub11
Sub5
Sub7
i := D1
load v5
Sub2
loop
Sub3
Sub4
if vF != 1 then Sub6
if vF != 1 then Sub4
if vF != 1 then Sub4
if vF != 1 then Sub1
if vF == 1 then jump L11
again
: Sub1
i := D1
load v5
if v6 == 0 then if v5 != 0 then jump L6
jump L14
: L6
if v7 key then v2 := 9
if v8 key then v2 := 4
if v9 key then v2 := 6
if vA key then v2 := 1
if v2 == 0 then return
Sub2
v1 := v2
Sub8
Sub9
vC := 1
v2 := 0
vF := 0
i := D1
save v5
: Sub2
i := D7
if v1 == 1 then v0 := 0
if v1 == 4 then v0 := 19
if v1 == 6 then v0 := 13
if v1 == 9 then v0 := 6
i += v0
sprite v3 v4 7
return
: Sub3
v0 := 5
if v0 -key then return
if v5 == 15 then return
v5 := 15
v6 += -1
i := D1
save v5
v4 += 3
v3 += 3
Sub8
Sub8
Sub8
i := D5
save v5
i := D8
sprite v3 v4 1
return
: Sub4
i := D5
load v5
if v5 == 0 then return
i := D8
sprite v3 v4 1
Sub8
vC := 2
Sub10
if vB == 187 then jump Sub5
sprite v3 v4 1
: L7
i := D5
save v5
return
: Sub5
v5 := 0
v0 := 0
i := D2
save v0
jump L7
: Sub6
i := D4
load v5
if v5 != 15 then jump L10
i := D9
sprite v3 v4 5
if v2 != 0 then jump L8
v1 := random 0b11
i := D3
i += v1
load v0
v1 := v0
v2 := random 0b1111
v2 += 1
: L8
Sub8
i := D9
vC := 3
v2 += -1
vF := 0
sprite v3 v4 5
: L9
i := D4
save v5
return
: L10
v4 := random 0b111
i := D10
i += v4
load v0
v3 := v0
i := D11
i += v4
load v0
v4 := v0
i := D9
sprite v3 v4 5
v0 := 32
buzzer := v0
v5 := 15
jump L9
: Sub7
v5 := 0
jump L9
: L11
if vC == 1 then jump L1
if vC == 2 then jump L12
i := D5
load v5
if v5 == 0 then jump L1
i := D8
sprite v3 v4 1
vF := 0
sprite v3 v4 1
if vF != 1 then jump L1
: L12
vE += 10
: L13
v0 := 64
buzzer := v0
clear
jump L3
: L14
clear
Sub11
v0 := 96
buzzer := v0
loop
again
0x6e 0x0 0x13 0x84
: Sub8
if v1 == 1 then v4 += -1
if v1 == 4 then v3 += -1
if v1 == 6 then v3 += 1
if v1 == 9 then v4 += 1
return
: Sub9
if v4 == 0 then v4 += 1
if v3 == 0 then v3 += 1
if v3 == 56 then v3 += -1
if v4 == 24 then v4 += -1
return
: Sub10
vB := 0
if v4 == 0 then jump L16
if v3 == 0 then jump L16
if v3 == 63 then jump L16
if v4 == 31 then : L16
vB := 187
vF := 0
return
: Sub11
v3 := 8
v4 := 8
i := D6
bcd vE
load v2
Sub12
v3 := 40
i := D6
bcd v6
load v2
Sub13
return
: Sub12
i := hex v0
sprite v3 v4 5
v3 += 6
: Sub13
i := hex v1
sprite v3 v4 5
v3 += 6
i := hex v2
sprite v3 v4 5
return
0x1
: D7
0x10 0x54 0x7c 0x6c 0x7c 0x7c 0x44 0x7c 0x7c 0x6c 0x7c 0x54 0x10 0x0 0xfc 0x78 0x6e 0x78 0xfc 0x0 0x3f 0x1e 0x76 0x1e 0x3f 0x0
: D8
0x80
: D9
0xa8 0x70 0xf8 0x70 0xa8
: D10
0xb 0x1b 0x28 0x38 0x30 0x20 0x10 0x0
: D11
0x0 0x0 0x0 0x8 0x1b 0x1b 0x1b 0x18 0x4
######################################################################
# INPUT: chip8/Chip-8 Games/Tapeworm [JDR, 1999].ch8
######################################################################
:proto D1 # 206
:proto L1 # 238
:proto L3 # 24A
:proto D9 # 25E
:proto L5 # 268
:proto D10 # 292
:proto L6 # 2AA
:proto L8 # 2CA
:proto L12 # 30E
: main
clear
i := D1
jump L1
: D1
0xff
: D2
0x80
: D3
0xfb 0x22 0x22 0x23 0x22 0x22 0x22 0x0
: D4
0xef 0x28 0x28 0xef 0x28 0x28 0x28 0x0
: D5
0xbd 0xa1 0xa1 0xb9 0x21 0x20 0x3c 0x0
: D6
0xb 0xa 0xa 0xa 0xa 0xaa 0x53 0x0
: D7
0xef 0x28 0x28 0x2f 0x2a 0x29 0xe8 0x0
: D8
0xb6 0xaa 0xa2 0xa2 0x22 0x22 0xa2 0x0
: L1
v4 := 0
v5 := 0
v6 := 31
loop
sprite v4 v5 1
sprite v4 v6 1
v4 += 8
if v4 == 64 then jump L3
again
: L3
i := D9
v4 := 0
v5 := 63
v6 := 1
loop
sprite v4 v6 10
sprite v5 v6 10
v6 += 10
if v6 == 31 then jump L5
again
: D9
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: L5
v4 := 8
v5 := 8
i := D3
sprite v4 v5 7
v4 += 8
i := D4
sprite v4 v5 7
v4 += 8
i := D5
sprite v4 v5 7
v4 += 8
i := D6
sprite v4 v5 7
v4 += 8
i := D7
sprite v4 v5 7
i := D8
v4 += 8
sprite v4 v5 7
i := D10
jump L6
: D10
0xf7 0x14 0x14 0x94 0xf7 0x0
: D11
0x38 0xa8 0xb8 0xb1 0x2a 0x0
: D12
0x4e 0xca 0x4e 0x42 0xee 0x0
: D13
0xee 0xaa 0xee 0x22 0xee 0x0
: L6
v4 := 17
v5 := 19
sprite v4 v5 5
v4 += 8
i := D11
sprite v4 v5 5
v4 += 9
i := D12
sprite v4 v5 5
v4 += 8
i := D13
sprite v4 v5 5
v0 := 15
loop
if v0 key then jump L8
again
: L8
clear
: L9
v5 := 31
v6 := 15
i := D2
v7 := 6
v8 := 2
: L10
sprite v5 v6 1
if vF == 1 then jump L12
delay := v8
loop
v0 := delay
if v0 != 0 then
again
v0 := 2
if v0 key then v7 := 2
v0 := 4
if v0 key then v7 := 4
v0 := 6
if v0 key then v7 := 6
v0 := 8
if v0 key then v7 := 8
if v7 == 2 then v6 += -1
if v7 == 8 then v6 += 1
if v7 == 4 then v5 += -1
if v7 == 6 then v5 += 1
jump L10
: L12
v0 := 6
buzzer := v0
v0 := 15
loop
if v0 -key then
again
clear
jump L9
######################################################################
# INPUT: chip8/Chip-8 Games/Tetris [Fran Dachille, 1991].ch8
######################################################################
:proto L5 # 23C
:proto L6 # 250
:proto Sub1 # 25C
:proto Sub2 # 272
:proto Sub3 # 284
:proto Sub4 # 296
:proto D1 # 2B4
:proto Sub5 # 2B6
:proto D2 # 2C4
:proto Sub6 # 334
:proto Sub7 # 340
:proto Sub8 # 35E
:proto Sub9 # 372
:proto L13 # 390
:proto L14 # 394
:proto L15 # 3A6
:proto Sub10 # 3C0
:proto Sub11 # 3E6
:proto D3 # 700
:proto D4 # 804
: main
i := D1
Sub11
Sub5
loop
v0 += 1
sprite v0 v1 1
if v0 != 37 then
again
loop
v1 += -1
sprite v0 v1 1
v0 := 26
sprite v0 v1 1
v0 := 37
if v1 != 0 then
again
: L3
loop
v4 := random 0b1110000
if v4 == 112 then
again
v3 := random 0b11
v0 := 30
v1 := 3
Sub1
: L4
delay := v5
sprite v0 v1 4
if vF != 1 then jump L5
sprite v0 v1 4
v1 += -1
sprite v0 v1 4
Sub7
jump L3
: L5
loop
if v7 key then Sub2
if v8 key then Sub3
if v9 key then Sub4
if v2 -key then jump L6
v6 := 0
delay := v6
: L6
v6 := delay
if v6 != 0 then
again
sprite v0 v1 4
v1 += 1
jump L4
: Sub1
i := D2
i += v4
v6 := 0
if v3 == 1 then v6 := 4
if v3 == 2 then v6 := 8
if v3 == 3 then v6 := 12
i += v6
return
: Sub2
sprite v0 v1 4
v0 += -1
Sub6
if vF != 1 then return
sprite v0 v1 4
v0 += 1
Sub6
return
: Sub3
sprite v0 v1 4
v0 += 1
Sub6
if vF != 1 then return
sprite v0 v1 4
v0 += -1
Sub6
return
: Sub4
sprite v0 v1 4
v3 += 1
if v3 == 4 then v3 := 0
Sub1
Sub6
if vF != 1 then return
sprite v0 v1 4
v3 += -1
if v3 == -1 then v3 := 3
Sub1
Sub6
return
: D1
0x80 0x0
: Sub5
v7 := 5
v8 := 6
v9 := 4
v1 := 31
v5 := 16
v2 := 7
return
: D2
0x40 0xe0 0x0 0x0 0x40 0xc0 0x40 0x0 0x0 0xe0 0x40 0x0 0x40 0x60 0x40 0x0 0x40 0x40 0x60 0x0 0x20 0xe0 0x0 0x0 0xc0 0x40 0x40 0x0 0x0 0xe0 0x80 0x0 0x40 0x40 0xc0 0x0 0x0 0xe0 0x20 0x0 0x60 0x40 0x40 0x0 0x80 0xe0 0x0 0x0 0x40 0xc0 0x80 0x0 0xc0 0x60 0x0 0x0 0x40 0xc0 0x80 0x0 0xc0 0x60 0x0 0x0 0x80 0xc0 0x40 0x0 0x0 0x60 0xc0 0x0 0x80 0xc0 0x40 0x0 0x0 0x60 0xc0 0x0 0xc0 0xc0 0x0 0x0 0xc0 0xc0 0x0 0x0 0xc0 0xc0 0x0 0x0 0xc0 0xc0 0x0 0x0 0x40 0x40 0x40 0x40 0x0 0xf0 0x0 0x0 0x40 0x40 0x40 0x40 0x0 0xf0 0x0 0x0
: Sub6
sprite v0 v1 4
v6 := 53
loop
v6 += -1
if v6 != 0 then
again
return
: Sub7
i := D1
vC := v1
if vC != 30 then vC += 1
if vC != 30 then vC += 1
if vC != 30 then vC += 1
loop
Sub8
if vB == 10 then Sub9
if v1 == vC then return
v1 += 1
again
: Sub8
v0 := 27
vB := 0
loop
sprite v0 v1 1
if vF != 0 then vB += 1
sprite v0 v1 1
v0 += 1
if v0 != 37 then
again
return
: Sub9
v0 := 27
loop
sprite v0 v1 1
v0 += 1
if v0 != 37 then
again
vE := v1
vD := vE
vE += -1
: L11
v0 := 27
vB := 0
loop
sprite v0 vE 1
if vF != 0 then jump L13
sprite v0 vE 1
jump L14
: L13
sprite v0 vD 1
vB += 1
: L14
v0 += 1
if v0 != 37 then
again
if vB == 0 then jump L15
vD += -1
vE += -1
if vD != 1 then jump L11
: L15
Sub10
if vF != 1 then Sub10
vA += 1
Sub10
v0 := vA
vD := 7
v0 &= vD
if v0 == 4 then v5 += -2
if v5 == 2 then v5 := 4
return
: Sub10
i := D3
save v2
i := D4
bcd vA
load v2
i := hex v0
vD := 50
vE := 0
sprite vD vE 5
vD += 5
i := hex v1
sprite vD vE 5
vD += 5
i := hex v2
sprite vD vE 5
i := D3
load v2
i := D1
return
: Sub11
vA := 0
v0 := 25
return
0x37 0x23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D4
######################################################################
# INPUT: chip8/Chip-8 Games/Tic-Tac-Toe [David Winter].ch8
######################################################################
:proto L1 # 218
:proto Sub1 # 27C
:proto L8 # 28A
:proto Sub2 # 2C8
:proto Sub3 # 344
:proto Sub4 # 34A
:proto L10 # 354
:proto L11 # 35A
:proto L12 # 35E
:proto Sub5 # 366
:proto Sub6 # 388
:proto Sub7 # 394
:proto D1 # 39A
:proto D2 # 39B
:proto D3 # 3AA
:proto D4 # 3AF
:proto D5 # 3B4
:proto D6 # 3C4
:proto D7 # 3D4
:proto D8 # 3E6
: main
jump L1
0x54 0x49 0x43 0x54 0x41 0x43 0x20 0x62 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52
: L1
vB := 0
vC := 0
: L2
v0 := vB
v1 := vC
i := D8
save v1
i := D6
load vF
i := D5
save vF
i := D8
load v1
vB := v0
vC := v1
clear
vE := 1
v0 := 19
v1 := 3
i := D1
: L3
loop
sprite v0 v1 1
v0 += 8
if v0 != 43 then jump L3
v0 := 19
v1 += 8
if v1 != 35 then
again
v0 := 19
v1 := 3
i := D2
loop
sprite v0 v1 15
v0 += 8
if v0 != 51 then
again
v0 := 19
v1 += 15
loop
sprite v0 v1 10
v0 += 8
if v0 != 51 then
again
Sub5
: L6
loop
v0 := key
v1 := v0
i := D5
i += v0
load v0
if v0 == 0 then jump L8
Sub1
again
: Sub1
v0 := 16
buzzer := v0
delay := v0
loop
v0 := delay
if v0 != 0 then
again
return
: L8
v0 := 2
vE ^= v0
v0 := vE
save v0
i := D7
v0 := v1
v0 += -1
v0 += v0
i += v0
load v1
i := D3
if vE != 3 then i := D4
sprite v0 v1 5
Sub2
if vA != 0 then jump L2
i := D5
v1 := 0
v2 := 0
v3 := 1
loop
load v0
if v0 != 0 then v1 += 1
i += v3
v2 += 1
if v2 != 16 then
again
if v1 != 16 then jump L6
jump L2
: Sub2
vA := 0
i := D5
v0 := 1
i += v0
load v8
v9 := 0
v9 += v0
Sub3
v9 += v1
Sub3
v9 += v2
Sub4
v9 := 0
v9 += v3
Sub3
v9 += v4
Sub3
v9 += v5
Sub4
v9 := 0
v9 += v6
Sub3
v9 += v7
Sub3
v9 += v8
Sub4
v9 := 0
v9 += v6
Sub3
v9 += v3
Sub3
v9 += v0
Sub4
v9 := 0
v9 += v7
Sub3
v9 += v4
Sub3
v9 += v1
Sub4
v9 := 0
v9 += v8
Sub3
v9 += v5
Sub3
v9 += v2
Sub4
v9 := 0
v9 += v8
Sub3
v9 += v4
Sub3
v9 += v0
Sub4
v9 := 0
v9 += v6
Sub3
v9 += v4
Sub3
v9 += v2
Sub4
return
: Sub3
v9 <<= v0
v9 <<= v0
return
: Sub4
if v9 == 21 then jump L10
if v9 == 63 then jump L11
return
: L10
Sub5
vB += 1
jump L12
: L11
Sub5
vC += 1
: L12
Sub5
vA := 1
v0 := key
return
: Sub5
v3 := 5
v4 := 10
i := D4
sprite v3 v4 5
v3 := 2
v4 += 6
i := D8
bcd vB
Sub6
v3 := 50
v4 := 10
i := D3
sprite v3 v4 5
v3 := 47
v4 += 6
i := D8
bcd vC
: Sub6
load v2
i := hex v0
Sub7
i := hex v1
Sub7
i := hex v2
: Sub7
sprite v3 v4 5
v3 += 5
return
: D1
0x7f
: D2
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D3
0x1c 0x22 0x22 0x22 0x1c
: D4
0x22 0x14 0x8 0x14 0x22
: D5
0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x1 0x1 0x1 0x1 0x1
: D6
0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x1 0x1 0x1 0x1 0x1
: D7
0x13 0x5 0x1b 0x5 0x23 0x5 0x13 0xd 0x1b 0xd 0x23 0xd 0x13 0x15 0x1b 0x15 0x23 0x15
: D8
######################################################################
# INPUT: chip8/Chip-8 Games/Timebomb.ch8
######################################################################
:proto L2 # 21A
:proto L3 # 22A
:proto Sub1 # 23A
:proto L4 # 256
:proto L6 # 274
:proto D1 # 28A
: main
clear
vA := 5
Sub1
: L1
loop
v0 := 2
if v0 key then jump L2
v0 := 8
if v0 key then jump L3
v0 := 5
if v0 key then jump L4
jump L1
: L2
if vA == -16 then jump L1
Sub1
vA += 1
Sub1
v0 := 2
buzzer := v0
jump L1
: L3
if vA == 5 then jump L1
Sub1
vA += -1
Sub1
v0 := 2
buzzer := v0
again
: Sub1
i := D1
bcd vA
load v2
v3 := 25
v4 := 14
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
: L4
v0 := 60
delay := v0
: L5
loop
v0 := delay
if v0 != 0 then jump L5
Sub1
vA += -1
Sub1
v0 := 5
buzzer := v0
if vA == 0 then jump L6
v0 := 60
delay := v0
again
: L6
clear
v0 := 50
buzzer := v0
v0 := 20
delay := v0
loop
v0 := delay
if v0 != 0 then
again
vA := 5
Sub1
jump L1
: D1
0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/Tron.ch8
######################################################################
:proto L2 # 22E
:proto L3 # 234
:proto L5 # 24C
:proto L7 # 260
:proto L11 # 2D0
:proto L12 # 2DA
:proto L13 # 2E2
:proto Sub1 # 2FC
:proto Sub2 # 306
:proto Sub3 # 310
:proto Sub4 # 31A
:proto Sub5 # 324
:proto Sub6 # 32E
:proto Sub7 # 338
:proto Sub8 # 342
:proto D1 # 34C
:proto D2 # 355
:proto D3 # 35E
:proto D4 # 367
:proto D5 # 370
:proto D6 # 37A
: main
clear
i := D1
v3 := 18
v4 := 11
sprite v3 v4 9
v3 += 8
i := D2
sprite v3 v4 9
v3 += 8
i := D3
sprite v3 v4 9
v3 += 8
i := D4
sprite v3 v4 9
v3 := 0
v4 := 0
: L1
loop
v0 := 15
if v0 key then jump L2
v0 := 11
if v0 key then jump L3
again
: L2
v5 := 1
clear
jump L7
: L3
v5 := 2
clear
v0 := 0
v1 := 0
v2 := 31
i := D1
loop
sprite v0 v1 1
sprite v0 v2 1
v0 += 8
if v0 == 64 then jump L5
again
: L5
v0 := 1
v1 := 0
v2 := 63
i := D5
loop
sprite v1 v0 10
sprite v2 v0 10
v0 += 10
if v0 == 31 then jump L7
again
: L7
i := D5
vC := 32
vB := 15
vA := 31
vD := 15
v6 := -1
v7 := 0
v8 := 1
v9 := 0
sprite vA vB 1
sprite vC vD 1
v0 := 0
loop
if v0 -key then
again
v0 := 10
buzzer := v0
: L9
v0 := 1
if v0 key then Sub1
v0 += 3
if v0 key then Sub2
v0 += 3
if v0 key then Sub3
v0 += 3
if v0 key then Sub4
v0 := 3
if v0 key then Sub5
v0 += 9
if v0 key then Sub6
v0 += -3
if v0 key then Sub7
v0 += 5
if v0 key then Sub8
vA += v6
vC += v8
vB += v7
vD += v9
sprite vA vB 1
if vF == 1 then jump L11
sprite vC vD 1
if vF == 1 then jump L12
v0 := 2
delay := v0
loop
v0 := delay
if v0 != 0 then
again
jump L9
: L11
clear
v4 += 1
if v4 == 10 then v4 := 0
jump L13
: L12
clear
v3 += 1
if v3 == 10 then v3 := 0
: L13
v0 := 10
buzzer := v0
i := hex v3
v0 := 25
v1 := 13
sprite v0 v1 5
i := D6
v0 += 6
sprite v0 v1 4
i := hex v4
v0 += 5
sprite v0 v1 5
jump L1
: Sub1
if v7 == 1 then return
v6 := 0
v7 := -1
return
: Sub2
if v7 == -1 then return
v6 := 0
v7 := 1
return
: Sub3
if v9 == 1 then return
v8 := 0
v9 := -1
return
: Sub4
if v9 == -1 then return
v8 := 0
v9 := 1
return
: Sub5
if v6 == 1 then return
v6 := -1
v7 := 0
return
: Sub6
if v6 == -1 then return
v6 := 1
v7 := 0
return
: Sub7
if v8 == 1 then return
v8 := -1
v9 := 0
return
: Sub8
if v8 == -1 then return
v8 := 1
v9 := 0
return
: D1
0xff 0x80 0xbe 0x88 0x88 0x88 0x88 0x80 0xff
: D2
0xff 0x0 0xfb 0x8a 0xfa 0x92 0x8b 0x0 0xff
: D3
0xff 0x0 0xe8 0x2c 0x2a 0x29 0xe8 0x0 0xff
: D4
0xe0 0x20 0xa0 0xa0 0xa0 0xa0 0xa0 0x20 0xe0
: D5
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D6
0x0 0x40 0x0 0x40
######################################################################
# INPUT: chip8/Chip-8 Games/UFO [Lutz V, 1992].ch8
######################################################################
:proto L5 # 286
:proto L6 # 28C
:proto L7 # 292
:proto L8 # 296
:proto Sub1 # 2A2
:proto Sub2 # 2AC
:proto Sub3 # 2B6
:proto D1 # 2CD
:proto D2 # 2D0
:proto D3 # 2D3
:proto D4 # 2D6
:proto Sub4 # 2D8
:proto D5 # 2F8
: main
i := D1
v9 := 56
vA := 8
sprite v9 vA 3
i := D2
vB := 0
vC := 3
sprite vB vC 3
i := D4
v4 := 29
v5 := 31
sprite v4 v5 1
v7 := 0
v8 := 15
Sub1
: L1
Sub2
if v8 == 0 then loop
again
v4 := 30
v5 := 28
i := D3
sprite v4 v5 3
vE := 0
: L3
v6 := 128
vD := 4
if vD key then v6 := -1
vD := 5
if vD key then v6 := 0
vD := 6
if vD key then v6 := 1
if v6 != 128 then Sub4
loop
i := D2
sprite vB vC 3
vD := random 0b1
vB += vD
sprite vB vC 3
if vF != 0 then jump L7
i := D1
sprite v9 vA 3
vD := random 0b1
if vD != 0 then vD := -1
v9 += -2
sprite v9 vA 3
if vF != 0 then jump L6
if vE == 0 then jump L3
i := D3
sprite v4 v5 3
if v5 == 0 then jump L5
v5 += -1
v4 += v6
sprite v4 v5 3
if vF != 1 then
again
vD := 8
vD &= v5
if vD == 8 then jump L6
jump L7
: L5
Sub2
v8 += -1
jump L1
: L6
Sub1
v7 += 5
jump L8
: L7
Sub1
v7 += 15
: L8
Sub1
vD := 3
buzzer := vD
i := D3
sprite v4 v5 3
jump L5
: Sub1
i := D5
bcd v7
v3 := 0
Sub3
return
: Sub2
i := D5
bcd v8
v3 := 50
Sub3
return
: Sub3
vD := 27
load v2
i := hex v0
sprite v3 vD 5
v3 += 5
i := hex v1
sprite v3 vD 5
v3 += 5
i := hex v2
sprite v3 vD 5
return
0x1
: D1
0x7c 0xfe 0x7c
: D2
0x60 0xf0 0x60
: D3
0x40 0xe0 0xa0
: D4
0xf8 0xd4
: Sub4
vE := 1
vD := 16
buzzer := vD
return
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D5
######################################################################
# INPUT: chip8/Chip-8 Games/Vers [JMN, 1991].ch8
######################################################################
:proto L1 # 21A
:proto L6 # 2B4
:proto L7 # 2B8
:proto L8 # 2BA
:proto L11 # 2E4
: main
jump L1
0x4a 0x4d 0x4e 0x20 0x31 0x39 0x39 0x31 0x20 0x53 0x4f 0x46 0x54 0x57 0x41 0x52 0x45 0x53 0x20
: D1
0x80 0x80
: D2
0xff 0x0 0x0
: L1
v3 := 0
v7 := 0
: L2
clear
i := D2
v0 := 0
v1 := 0
loop
sprite v0 v1 1
v1 += -1
sprite v0 v1 1
v1 += 1
v0 += 8
if v0 != 64 then
again
v1 += 1
i := D1
loop
sprite v0 v1 2
v0 += -1
sprite v0 v1 2
v0 += 1
v1 += 2
if v1 != 31 then
again
v0 := 8
v1 := 16
v2 := 4
v4 := 55
v5 := 15
v6 := 2
sprite v0 v1 1
sprite v4 v5 1
loop
v8 := 1
if v8 key then v2 := 2
v8 := 2
if v8 key then v2 := 4
v8 := 7
if v8 key then v2 := 1
v8 := 10
if v8 key then v2 := 3
v8 := 11
if v8 key then v6 := 2
v8 := 15
if v8 key then v6 := 4
v8 := 12
if v8 key then v6 := 1
v8 := 13
if v8 key then v6 := 3
if v2 == 1 then v1 += -1
if v2 == 2 then v0 += -1
if v2 == 3 then v1 += 1
if v2 == 4 then v0 += 1
if v6 == 1 then v5 += -1
if v6 == 2 then v4 += -1
if v6 == 3 then v5 += 1
if v6 == 4 then v4 += 1
sprite v0 v1 1
if vF != 0 then jump L6
sprite v4 v5 1
if vF != 0 then jump L7
again
: L6
v7 += 1
jump L8
: L7
v3 += 1
: L8
v8 := 0
loop
v8 += 1
if v8 != 0 then
again
clear
v0 := 8
v1 := 4
i := hex v3
sprite v0 v1 5
v0 := 52
i := hex v7
sprite v0 v1 5
v8 := 0
loop
v8 += 1
if v8 != 0 then
again
if v3 == 8 then jump L11
if v7 == 8 then jump L11
jump L2
: L11
loop
again
######################################################################
# INPUT: chip8/Chip-8 Games/Vertical Brix [Paul Robson, 1996].ch8
######################################################################
:proto Sub1 # 24A
:proto D1 # 254
:proto Sub2 # 25A
:proto L6 # 268
:proto L7 # 272
:proto L8 # 27C
:proto Sub3 # 288
:proto D2 # 2BA
:proto Sub4 # 2C0
:proto Sub5 # 2D0
:proto Sub6 # 346
:proto D3 # 364
:proto Sub7 # 366
:proto D4 # 386
:proto Sub8 # 38A
:proto D5 # 3A6
:proto Sub9 # 3AC
:proto Sub10 # 3B6
:proto D6 # 3CE
: main
clear
Sub10
loop
v0 := 7
if v0 -key then
again
: L2
v8 := 0
v7 := 3
Sub6
Sub1
Sub4
Sub7
Sub8
Sub9
v0 := key
: L3
loop
Sub2
Sub2
Sub5
Sub3
if vA != 0 then
again
vC := 1
Sub9
v7 += -1
Sub9
v0 := 120
delay := v0
loop
v0 := delay
if v0 != 0 then
again
if v7 != 0 then jump L3
Sub9
v0 := 7
loop
if v0 -key then
again
jump L2
0x0 0xfd
: Sub1
v9 := 16
v0 := 2
i := D1
sprite v0 v9 5
return
: D1
0x80 0x80 0x80 0x80 0x80 0x0
: Sub2
v0 := 1
if v0 key then jump L6
v0 := 4
if v0 key then jump L7
return
: L6
v0 := v9
v0 += -1
if v0 == 0 then return
jump L8
: L7
v0 := v9
v0 += 1
if v0 == 27 then return
jump L8
: L8
v1 := 2
i := D1
sprite v1 v9 5
sprite v1 v0 5
v9 := v0
return
: Sub3
v0 := vA
v0 += -2
if v0 != 0 then return
v0 := vB
v0 -= v9
if vF == 0 then return
v1 := v0
v2 := 5
v1 -= v2
if vF != 0 then return
i := D2
i += v0
load v0
vD := v0
if vB == 1 then vD := 1
if vB == 30 then vD := -1
vC := 1
v0 := 10
buzzer := v0
return
: D2
0xff 0xff 0x0 0x1 0x1 0x0
: Sub4
vB := random 0b100000
vB += 1
vA := 4
vC := 1
vD := 1
i := D3
sprite vA vB 1
return
: Sub5
v0 := vA
v1 := vB
vA += vC
vB += vD
i := D3
if vB == 1 then vD := 1
if vB == 30 then vD := -1
if vA == 62 then vC := -1
if vA == 0 then vC := 1
sprite v0 v1 1
sprite vA vB 1
if vF == 0 then return
v0 := vA
v1 := 33
v0 -= v1
if vF == 0 then return
v0 := vA
v1 := vB
v0 += 222
v1 += -1
v2 := -1
v3 := -1
v4 := 3
loop
v2 += 1
v0 -= v4
if vF != 0 then
again
loop
v3 += 1
v1 -= v4
if vF != 0 then
again
v0 := v2
v1 := v3
v0 += v2
v0 += v2
v1 += v3
v1 += v3
v0 += 34
v1 += 1
i := D4
sprite v0 v1 3
vE += -1
v0 := 0
vC =- v0
v0 := 2
buzzer := v0
Sub8
v8 += 1
Sub8
if vE != 0 then return
Sub7
return
: Sub6
clear
v0 := 0
v1 := 0
v2 := 31
i := D3
loop
sprite v0 v1 1
sprite v0 v2 1
v0 += 1
if v0 != 63 then
again
loop
sprite v0 v1 1
v1 += 1
if v1 != 32 then
again
return
: D3
0x80 0x0
: Sub7
v1 := 1
v3 := 10
i := D4
: L13
v0 := 34
v2 := 7
loop
sprite v0 v1 3
v0 += 3
v2 += -1
if v2 != 0 then
again
v1 += 3
v3 += -1
if v3 != 0 then jump L13
vE := 70
return
: D4
0xe0 0xa0 0xe0 0x0
: Sub8
i := D5
bcd v8
load v2
v3 := 3
v4 := 2
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
return
: D5
0x0 0x0 0x0 0x0 0x0 0x0
: Sub9
v0 := 20
v1 := 2
i := hex v7
sprite v0 v1 5
return
: Sub10
v0 := 10
v1 := 12
v2 := 9
v3 := 5
i := D6
loop
sprite v0 v1 5
i += v3
v0 += 5
v2 += -1
if v2 != 0 then
again
return
: D6
0x90 0x90 0x90 0x90 0x60 0xe0 0x90 0xe0 0x90 0xe0 0xe0 0x90 0xe0 0x90 0x90 0x20 0x20 0x20 0x20 0x20 0x90 0x90 0x60 0x90 0x90 0x0 0x0 0x60 0x0 0x0 0xf0 0x90 0xf0 0x80 0x80 0xf0 0x80 0xf0 0x10 0xf0 0xe0 0x90 0xe0 0x90 0x90
######################################################################
# INPUT: chip8/Chip-8 Games/Wall [David Winter].ch8
######################################################################
:proto L1 # 218
:proto L7 # 27C
:proto L8 # 28A
:proto L10 # 2BE
:proto Sub1 # 2C4
:proto D1 # 2DA
:proto D2 # 2DF
:proto D3 # 2E4
:proto D4 # 2E5
: main
jump L1
0x20 0x57 0x41 0x4c 0x4c 0x20 0x62 0x79 0x20 0x44 0x61 0x76 0x69 0x64 0x20 0x57 0x49 0x4e 0x54 0x45 0x52 0x20
: L1
i := D3
v0 := 0
v1 := 0
v2 := 30
loop
sprite v0 v1 1
sprite v0 v2 1
v0 += 8
if v0 != 64 then
again
i := D2
v0 := 62
v1 := 1
loop
sprite v0 v1 5
v1 += 5
if v1 != 26 then
again
sprite v0 v1 4
v3 := 0
v4 := random 0b1111
v4 += 8
v5 := 1
v4 |= v5
v5 := 3
v6 := 2
v7 := 1
v8 := v4
v8 += 2
v9 := 1
vA := 4
vB := 0
i := D1
sprite v3 v4 5
sprite v7 v8 1
vC := key
: L4
Sub1
: L5
vC := 1
delay := vC
loop
vC := delay
if vC != 0 then
again
i := D1
vC := v7
vD := v8
if v9 -key then jump L7
if v4 == 1 then jump L7
sprite v3 v4 5
v4 += -2
sprite v3 v4 5
: L7
if vA -key then jump L8
if v4 == 25 then jump L8
sprite v3 v4 5
v4 += 2
sprite v3 v4 5
: L8
v7 += v5
v8 += v6
if v7 == 1 then v5 := 3
if v7 == 61 then v5 := -3
if v8 == 1 then v6 := 2
if v8 == 29 then v6 := -2
sprite vC vD 1
sprite v7 v8 1
if v7 != 1 then jump L5
vC := v8
vC -= v4
vD := 0
loop
if vC == vD then jump L10
vD += 1
if vD != 5 then
again
vC := key
Sub1
vB := 0
jump L4
: L10
Sub1
vB += 1
jump L4
: Sub1
i := D4
bcd vB
vC := 52
vD := 2
load v2
i := hex v1
sprite vC vD 5
vC += 5
i := hex v2
sprite vC vD 5
return
: D1
0x80 0x80 0x80 0x80 0x80
: D2
0xe0 0xe0 0xe0 0xe0 0xe0
: D3
0xff
: D4
######################################################################
# INPUT: chip8/Chip-8 Games/Wipe Off [Joseph Weisbecker].ch8
######################################################################
:proto L6 # 298
:proto L7 # 2A4
:proto L8 # 2AA
:proto D1 # 2CB
:proto D2 # 2CC
:proto D3 # 2CD
:proto D4 # 2F0
: main
i := D2
vA := 7
v1 := 0
: L1
vB := 8
v0 := 0
loop
sprite v0 v1 1
v0 += 8
vB += -1
if vB != 0 then
again
v1 += 4
vA += -1
if vA != 0 then jump L1
v6 := 0
v7 := 16
i := D3
v0 := 32
v1 := 30
sprite v0 v1 1
: L3
v3 := 29
v2 := 63
v2 &= v0
v7 += -1
if v7 == 0 then jump L8
vF := key
: L4
i := D1
sprite v2 v3 1
v5 := -1
v4 := random 0b1
if v4 != 1 then v4 := -1
: L5
loop
i := D3
vC := 0
vE := 4
if vE key then vC := -1
vE := 6
if vE key then vC := 1
sprite v0 v1 1
v0 += vC
sprite v0 v1 1
if vF == 1 then jump L6
if v2 == 0 then v4 := 1
if v2 == 63 then v4 := -1
if v3 == 0 then v5 := 1
if v3 == 31 then jump L7
i := D1
sprite v2 v3 1
v2 += v4
v3 += v5
sprite v2 v3 1
if vF != 1 then jump L5
if v3 == 30 then jump L6
vA := 2
buzzer := vA
v6 += 1
if v6 == 112 then jump L8
sprite v2 v3 1
v4 := random 0b1
if v4 != 1 then v4 := -1
v5 := random 0b1
if v5 != 1 then v5 := -1
again
: L6
vA := 3
buzzer := vA
i := D1
sprite v2 v3 1
v3 += -1
jump L4
: L7
i := D1
sprite v2 v3 1
jump L3
: L8
i := D3
sprite v0 v1 1
i := D4
bcd v6
load v2
v3 := 24
v4 := 27
i := hex v0
sprite v3 v4 5
v3 += 5
i := hex v1
sprite v3 v4 5
v3 += 5
i := hex v2
sprite v3 v4 5
loop
again
0x1
: D1
0x80
: D2
0x44
: D3
0xff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
: D4
######################################################################
# INPUT: chip8/Chip-8 Games/Worm V4 [RB-Revival Studios, 2007].ch8
######################################################################
:proto L1 # 25C
:proto Sub2 # 322
:proto L9 # 33C
:proto L10 # 352
:proto Sub3 # 370
:proto Sub4 # 374
:proto Sub5 # 380
:proto D4 # 386
:proto D5 # 38E
:proto D6 # 38F
:proto D7 # 392
:proto D8 # 395
:proto D9 # 397
:proto D10 # 39B
:proto D11 # 39C
:proto D12 # 3A5
:proto D13 # 4A5
: main
jump L1
: D1
0x57 0x6f 0x72 0x6d 0x20 0x76 0x2e 0x34 0x2c 0x20 0x62 0x79 0x3a 0x20 0x52 0x42 0x2c 0x20 0x43 0x68 0x69 0x70 0x2d 0x38 0x20 0x76 0x65 0x72 0x73 0x69 0x6f 0x6e 0x20 0x62 0x79 0x3a 0x20 0x4d 0x61 0x72 0x74 0x69 0x6a 0x6e 0x20 0x57 0x65 0x6e 0x74 0x69 0x6e 0x67 0x20 0x2f 0x20 0x52 0x65 0x76 0x69 0x76 0x61 0x6c 0x20 0x53 0x74 0x75 0x64 0x69 0x6f 0x73
: D2
0x0 0x52 0x42 0x39 0x32
: D3
0x0 0x0 0x0 0x1f 0x0 0x0 0x13 0x7c 0x0 0x0 0x6 0xe 0x1 0x0 0x4
: L1
clear
i := D3
load vE
i := D12
loop
save v0
i += vC
v1 += 1
if v1 != 0 then
again
i := D6
sprite vA vB 3
i := D5
loop
sprite v4 v2 1
sprite v4 v3 1
v4 += 2
if v4 != 58 then
again
i := D11
v3 := 0
loop
sprite v3 v2 1
sprite v4 v2 1
v2 += 1
if v2 != 31 then
again
i := D2
load v0
i := D1
bcd v0
i := D1
bcd v5
Sub2
Sub4
loop
i := D10
sprite v7 v6 1
v6 += 2
if v6 != 33 then
again
: L6
v3 := 6
delay := v3
i := D12
i += v8
load v0
v4 := v0
v0 := vA
i := D12
i += v8
save v0
i := D13
i += v8
load v0
v1 := v0
v0 := vB
i := D13
i += v8
save v0
i := D7
if v4 != 0 then sprite v4 v1 3
i := D4
i += v9
load v1
i := D8
sprite vA vB 2
vA += v0
vB += v1
i := D6
sprite vA vB 3
if vF != 0 then jump L9
v0 := random 0b1111
if v0 == 0 then Sub3
: L7
v8 += 1
if v8 == vE then v8 := 0
v3 := 6
delay := v3
loop
v6 := -1
v1 := 6
if v1 key then v6 := 0
v1 := 2
if v1 key then v6 := 2
v1 := 4
if v1 key then v6 := 4
v1 := 8
if v1 key then v6 := 6
if v6 != -1 then v9 := v6
v3 := delay
if v3 != 0 then
again
jump L6
: Sub1
Sub2
i := D1
bcd v5
: Sub2
v3 := 0
v4 := 60
i := D1
load v2
i := hex v0
sprite v4 v3 5
v3 += 6
i := hex v1
sprite v4 v3 5
v3 += 6
i := hex v2
sprite v4 v3 5
return
: L9
Sub5
i := D6
sprite vA vB 3
sprite vA vB 3
if vF != 0 then jump L10
v4 := 2
buzzer := v4
v5 += 1
Sub1
jump L7
: L10
v4 := 10
buzzer := v4
sprite vA vB 3
vA -= v0
vB -= v1
i := D8
sprite vA vB 2
i := D2
load v0
i := D2
v0 -= v5
v0 := v5
if vF == 0 then save v0
loop
again
: Sub3
vE += 1
return
: Sub4
i := D9
: L12
vC := random 0b111111
vD := random 0b11111
sprite vC vD 4
if vF == 0 then return
: Sub5
i := D9
sprite vC vD 4
jump L12
: D4
0x4 0x0 0x0 0xfc 0xfc 0x0 0x0 0x4
: D5
0xc0
: D6
0xe0 0xe0 0xe0
: D7
0xe0 0xa0 0xe0
: D8
0x0 0x40
: D9
0x30 0x58 0x78 0x30
: D10
0xf0
: D11
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D12
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D13
######################################################################
# INPUT: chip8/Chip-8 Games/X-Mirror.ch8
######################################################################
:proto Sub1 # 22E
:proto Sub2 # 238
:proto Sub3 # 244
:proto Sub4 # 250
:proto Sub5 # 25C
:proto D1 # 268
: main
v6 := 30
v7 := 15
v8 := 31
v9 := 15
vA := 30
vB := 16
vC := 31
vD := 16
i := D1
Sub1
loop
v0 := 2
if v0 key then Sub3
v0 := 8
if v0 key then Sub2
v0 := 4
if v0 key then Sub4
v0 := 6
if v0 key then Sub5
again
: Sub1
sprite v6 v7 1
sprite v8 v9 1
sprite vA vB 1
sprite vC vD 1
return
: Sub2
v7 += -1
v9 += -1
vB += 1
vD += 1
Sub1
return
: Sub3
v7 += 1
v9 += 1
vB += -1
vD += -1
Sub1
return
: Sub4
v6 += -1
v8 += 1
vA += -1
vC += 1
Sub1
return
: Sub5
v6 += 1
v8 += -1
vA += 1
vC += -1
Sub1
return
: D1
0x80 0x0
######################################################################
# INPUT: chip8/Chip-8 Games/ZeroPong [zeroZshadow, 2007].ch8
######################################################################
:proto L2 # 216
:proto L3 # 222
:proto L4 # 230
:proto L5 # 23C
:proto L7 # 26A
:proto L8 # 272
:proto L9 # 27A
:proto L10 # 288
:proto L11 # 28A
:proto L12 # 294
:proto L13 # 296
:proto L15 # 2AA
:proto D1 # 2B0
:proto D2 # 2B6
: main
jump L8
: L1
v0 := 3
delay := v0
i := D1
v0 := 10
if v0 -key then jump L2
sprite v7 v8 6
v8 += 1
sprite v7 v8 6
jump L3
: L2
v0 := 11
if v0 -key then jump L3
sprite v7 v8 6
v8 += -1
sprite v7 v8 6
: L3
v0 := 8
if v0 -key then jump L4
sprite v9 vA 6
vA += 1
sprite v9 vA 6
jump L5
: L4
v0 := 2
if v0 -key then jump L5
sprite v9 vA 6
vA += -1
sprite v9 vA 6
: L5
i := D2
sprite v3 v4 1
loop
v3 += v5
v4 += v6
if v3 == 0 then jump L9
if v3 == 63 then jump L9
if v4 == 0 then v6 := 1
if v4 == 31 then v6 := -1
sprite v3 v4 1
if vF != 1 then jump L7
if v3 == 2 then v5 := 1
if v3 == 62 then v5 := -1
sprite v3 v4 1
v0 := 200
buzzer := v0
again
: L7
v0 := 15
if v0 key then jump L8
jump L1
: L8
v7 := 2
v8 := 10
v9 := 62
vA := 10
: L9
v3 := 32
v4 := 16
v5 := random 0b1
if v5 == 0 then jump L10
v5 := -1
jump L11
: L10
v5 := 1
: L11
v6 := random 0b1
if v6 == 0 then jump L12
v6 := -1
jump L13
: L12
v6 := 1
: L13
clear
i := D1
sprite v7 v8 6
sprite v9 vA 6
i := D2
sprite v3 v4 1
loop
v0 := 15
if v0 key then jump L15
again
: L15
loop
if v0 -key then jump L1
again
: D1
0x80 0x80 0x80 0x80 0x80 0x80
: D2
0x80 0x0
######################################################################
# INPUT: chip8/Chip-8 Hires/Astro Dodge Hires [Revival Studios, 2008].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x12 0xd4 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x53 0x54 0x55 0x44 0x49 0x4f 0x53 0x32 0x30 0x30 0x38 0x2 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e 0x13 0xc4 0x38 0x38 0x78 0x2 0x60 0x2 0xe0 0x9e 0x13 0xce 0x39 0x10 0x79 0xff 0x60 0x8 0xe0 0x9e 0x13 0xd8 0x39 0x18 0x79 0x1 0x23 0xa8 0x4f 0x1 0x13 0xee 0x0 0xee 0x63 0x2c 0x64 0x0 0x25 0x42 0x63 0x2c 0x64 0x6 0x25 0x7e 0x0 0xee 0x6d 0x1 0xfd 0x18 0x6d 0x4 0xfd 0x15 0x24 0x26 0x6d 0x1 0xfd 0x18 0x6d 0x4 0xfd 0x15 0x24 0x26 0x6d 0x1 0xfd 0x18 0x6d 0x4 0xfd 0x15 0x24 0x26 0x6d 0x1 0xfd 0x18 0x2 0x30 0x60 0x0 0x61 0x10 0x24 0xbc 0x63 0x16 0x64 0x2a 0x25 0xe0 0x60 0x5 0xe0 0x9e 0x14 0x1e 0x12 0xec 0xf0 0x7 0x30 0x0 0x14 0x26 0x0 0xee 0x6d 0x4 0x61 0x1d 0x60 0x1c 0x62 0x12 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x26 0x60 0x14 0x62 0xc 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0x60 0x24 0x62 0x18 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x26 0x60 0xc 0x62 0x6 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0x60 0x2c 0x62 0x1e 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x26 0xa6 0x9c 0x60 0x4 0xd0 0x16 0x60 0x34 0x62 0x24 0xa6 0x9c 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x26 0x0 0xee 0x62 0x6 0x60 0x0 0x61 0x30 0xa6 0xc 0xd0 0x16 0x70 0x8 0xf2 0x1e 0xd0 0x16 0x70 0x8 0xf2 0x1e 0xd0 0x16 0x70 0x8 0xf2 0x1e 0xd0 0x16 0x70 0x8 0xf2 0x1e 0xd0 0x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a 0x57 0x3e 0x5e 0x28 0x50 0x0 0x58 0x38 0x77 0x2e 0x7f 0x3e 0x54 0x78 0x7e 0xf7 0xf1 0xbe 0x9e 0x38 0x66 0xf8 0xcd 0x73 0x9b 0xe3 0x36 0xcf 0xde 0x78 0x66 0xf7 0x1d 0xbe 0x9b 0x3a 0x36 0xf9 0xcd 0x73 0xb3 0xe3 0x6c 0xcf 0xd8 0xcd 0x33 0x83 0x78 0x33 0xd9 0x66 0x9c 0xcd 0xf8 0x9b 0xe3 0x36 0x87 0x6c 0x3c 0xfd 0x7e 0xf7 0x79 0xbf 0x9f 0x7c 0x66 0xfc 0xcd 0xfb 0x9b 0xf7 0x36 0xef 0xde 0xfd 0x66 0xf7 0x1d 0xbf 0x9b 0x7c 0x36 0xfc 0xcd 0xfb 0xb3 0xf7 0xec 0xef 0xd8 0xcd 0x0 0xc3 0x0 0x33 0x0 0x66 0x0 0xcd 0x0 0x9b 0x0 0x36 0x0 0xc 0x0 0x85 0x66 0x0 0x19 0x1 0x9b 0x46 0x66 0x5 0xcd 0x88 0x9b 0x14 0x6c 0x20 0xd8 0xcd 0x33 0x83 0x7c 0x33 0xd9 0x6e 0xbe 0xcd 0xfd 0xdb 0xf3 0x76 0xcf 0x6c 0xbc
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Maze [David Winter, 199x].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x60 0x0 0x61 0x0 0xa2 0xe2 0xc2 0x1 0x32 0x1 0xa2 0xde 0xd0 0x14 0x70 0x4 0x30 0x40 0x12 0xc4 0x60 0x0 0x71 0x4 0x31 0x40 0x12 0xc4 0x12 0xdc 0x80 0x40 0x20 0x10 0x20 0x40 0x80 0x10
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Particle Demo [zeroZshadow, 2008].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0xa3 0xe1 0x60 0x0 0x61 0x4 0x62 0x8 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0xf2 0x1e 0x80 0x24 0xd0 0x15 0x66 0x5 0x67 0x2 0x6a 0x0 0x13 0x78 0x6b 0x0 0x6c 0x0 0xa3 0x98 0xfb 0x1e 0xf3 0x65 0x23 0x8e 0x23 0x1c 0x13 0x22 0x23 0x8e 0x23 0x1c 0x7b 0x4 0x7c 0x1 0x5c 0x60 0x13 0x0 0x12 0xfc 0x12 0xc0 0xa3 0xe0 0xde 0xd1 0x0 0xee 0xa3 0x98 0xfb 0x1e 0xf3 0x65 0x80 0x24 0x81 0x34 0x8e 0x0 0x8d 0x10 0x8e 0xe6 0x8d 0xd6 0x84 0xe0 0x65 0xc2 0x84 0x54 0x4f 0x1 0x13 0x52 0x4d 0x0 0x63 0x1 0x84 0xd0 0x65 0xe1 0x84 0x54 0x4f 0x1 0x13 0x52 0x33 0x2 0x73 0x1 0x13 0x54 0x23 0x5c 0xa3 0x98 0xfb 0x1e 0xf3 0x55 0x13 0xc 0xa3 0xc0 0xfa 0x1e 0xf0 0x65 0x82 0x0 0x7a 0x1 0x64 0x1f 0x8a 0x42 0x60 0x20 0x61 0x1e 0x80 0xe 0x81 0x1e 0xc3 0x3 0x73 0xf8 0x0 0xee 0x6b 0x0 0x6c 0x0 0x23 0x5c 0xa3 0x98 0xfb 0x1e 0xf3 0x55 0x7b 0x4 0x7c 0x1 0x5c 0x60 0x13 0x7c 0x12 0xfc 0x8e 0x0 0x8d 0x10 0x8e 0xe6 0x0 0xee 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0xfa 0xf9 0xfe 0xfb 0xfc 0xfd 0xff 0x2 0x1 0x3 0x5 0x4 0x6 0x7 0x8 0x6 0x7 0x4 0x5 0x3 0x1 0x2 0xfe 0xff 0xfc 0xfb 0xfd 0xfa 0xf9 0xf8 0xfa 0x80 0xf7 0x6 0x77 0x6 0x36 0x0 0x0 0x0 0xc7 0x6c 0xcf 0xc 0xc 0x0 0x0 0x0 0x9f 0xd9 0xdf 0xd9 0xd9 0x0 0x0 0x0 0x3f 0x8c 0xc 0x8c 0x8c 0x0 0x0 0x0 0x67 0x6c 0x6c 0x6c 0x67 0x0 0x0 0x0 0xb0 0x30 0x30 0x30 0xbe 0x0 0x0 0x0 0xf9 0xc3 0xf1 0xc0 0xfb 0x0 0x0 0x0 0xef 0x0 0xce 0x60 0xcc 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Sierpinski [Sergey Naydenov, 2010].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x12 0xc6 0x43 0x38 0x50 0x48 0x60 0x0 0x85 0x0 0x60 0x1 0x81 0x50 0xa4 0xb2 0xf1 0x1e 0xf0 0x55 0x60 0x1f 0x8a 0x0 0x60 0x10 0x8b 0x0 0xa4 0x8e 0xf0 0x65 0xda 0xb1 0x60 0x1 0xa4 0x8f 0xf0 0x55 0x60 0x1f 0xa4 0xd2 0xf0 0x55 0x60 0x1 0xa4 0x90 0xf0 0x55 0xa4 0x8f 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x0 0x80 0x50 0x80 0x14 0xa4 0xd3 0xf0 0x55 0xa4 0x90 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x0 0x80 0x50 0x80 0x15 0xa4 0x91 0xf0 0x55 0xa4 0x90 0xf0 0x65 0x85 0x0 0xa4 0x91 0xf0 0x65 0xa4 0xb2 0xf0 0x1e 0xf0 0x65 0x86 0x0 0xa4 0x90 0xf0 0x65 0x87 0x0 0x60 0x1 0x81 0x0 0x80 0x70 0x80 0x14 0xa4 0xb2 0xf0 0x1e 0xf0 0x65 0x81 0x0 0x80 0x60 0x80 0x13 0x81 0x50 0xa4 0x92 0xf1 0x1e 0xf0 0x55 0xa4 0x91 0xf0 0x65 0x85 0x0 0xa4 0x91 0xf0 0x65 0xa4 0x92 0xf0 0x1e 0xf0 0x65 0x81 0x50 0xa4 0xb2 0xf1 0x1e 0xf0 0x55 0xa4 0x90 0xf0 0x65 0xa4 0x92 0xf0 0x1e 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x50 0x50 0x10 0x6f 0x1 0x3f 0x0 0x13 0xc8 0xa4 0x90 0xf0 0x65 0x85 0x0 0x60 0x1f 0x81 0x0 0x80 0x50 0x80 0x14 0x8a 0x0 0xa4 0x8f 0xf0 0x65 0x85 0x0 0x60 0x10 0x81 0x0 0x80 0x50 0x80 0x14 0x8b 0x0 0xa4 0x8e 0xf0 0x65 0xda 0xb1 0x60 0x1f 0x85 0x0 0xa4 0x90 0xf0 0x65 0x81 0x0 0x80 0x50 0x80 0x15 0x8a 0x0 0xa4 0x8f 0xf0 0x65 0x85 0x0 0x60 0x10 0x81 0x0 0x80 0x50 0x80 0x14 0x8b 0x0 0xa4 0x8e 0xf0 0x65 0xda 0xb1 0xa4 0x90 0xf0 0x65 0x85 0x0 0xa4 0xd3 0xf0 0x65 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x90 0x10 0x6f 0x0 0x3f 0x1 0x13 0xee 0xa4 0x90 0xf0 0x65 0x70 0x1 0xf0 0x55 0x13 0x6 0xa4 0x8f 0xf0 0x65 0x85 0x0 0xa4 0xd2 0xf0 0x65 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x90 0x10 0x6f 0x0 0x3f 0x1 0x14 0x14 0xa4 0x8f 0xf0 0x65 0x70 0x1 0xf0 0x55 0x12 0xee 0x14 0x14 0x81 0x0 0xa4 0xd4 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x14 0x28 0x80 0x30 0x0 0xee 0xa4 0xd4 0xfe 0x1e 0xf6 0x55 0x66 0x0 0x82 0x0 0x82 0x15 0x3f 0x1 0x14 0x60 0x83 0x0 0x83 0x6 0x84 0x10 0x65 0x1 0x82 0x30 0x82 0x45 0x3f 0x1 0x14 0x5a 0x84 0xe 0x85 0xe 0x14 0x4c 0x80 0x45 0x86 0x54 0x14 0x3c 0xf5 0x65 0x80 0x60 0x0 0xee 0x82 0x0 0x80 0x15 0x3f 0x0 0x14 0x66 0x80 0x20 0x0 0xee 0xa4 0x8a 0xf0 0x33 0xf2 0x65 0xf0 0x29 0xd3 0x45 0x73 0x6 0xf1 0x29 0xd3 0x45 0x73 0x6 0xf2 0x29 0xd3 0x45 0x0 0xee 0x0 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Stars [Sergey Naydenov, 2010].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x12 0xc6 0x43 0x38 0x50 0x48 0x60 0x0 0x85 0x0 0xc0 0x38 0x81 0x50 0xa6 0x72 0xf1 0x1e 0xf0 0x55 0x60 0x0 0x85 0x0 0xc0 0x38 0x81 0x50 0xa6 0x7a 0xf1 0x1e 0xf0 0x55 0x60 0x0 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x8a 0x0 0x60 0x0 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x8b 0x0 0x60 0x0 0xa6 0x42 0xf0 0x1e 0xda 0xb8 0x60 0x1 0xa6 0x84 0xf0 0x55 0x60 0x7 0xa6 0x86 0xf0 0x55 0xa6 0x84 0xf0 0x65 0x85 0x0 0xc0 0x38 0x81 0x50 0xa6 0x72 0xf1 0x1e 0xf0 0x55 0x60 0x0 0xa6 0x83 0xf0 0x55 0xa6 0x84 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x0 0x80 0x50 0x80 0x15 0xa6 0x88 0xf0 0x55 0xa6 0x84 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x85 0x0 0xa6 0x83 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x86 0x0 0x60 0x8 0x81 0x0 0x80 0x60 0x80 0x14 0x81 0x0 0x80 0x50 0x82 0x0 0x80 0x15 0x80 0x20 0x3f 0x0 0x13 0x9c 0xa6 0x84 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x85 0x0 0xa6 0x83 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x86 0x0 0x60 0x8 0x81 0x0 0x80 0x60 0x80 0x15 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x3f 0x0 0x13 0x96 0x60 0x1 0xa6 0x85 0xf0 0x55 0x13 0x9c 0x60 0x0 0xa6 0x85 0xf0 0x55 0xa6 0x83 0xf0 0x65 0x85 0x0 0xa6 0x88 0xf0 0x65 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x90 0x10 0x6f 0x0 0x3f 0x1 0x13 0xc2 0xa6 0x83 0xf0 0x65 0x70 0x1 0xf0 0x55 0x13 0x32 0xa6 0x85 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x50 0x50 0x10 0x6f 0x1 0x3f 0x0 0x13 0xe4 0xa6 0x84 0xf0 0x65 0x85 0x0 0xc0 0x78 0x81 0x50 0xa6 0x72 0xf1 0x1e 0xf0 0x55 0xa6 0x85 0xf0 0x65 0x85 0x0 0x60 0x0 0x81 0x50 0x50 0x10 0x6f 0x1 0x90 0x10 0x6f 0x0 0x3f 0x0 0x13 0x1a 0xa6 0x84 0xf0 0x65 0x85 0x0 0xc0 0x38 0x81 0x50 0xa6 0x7a 0xf1 0x1e 0xf0 0x55 0x60 0x0 0xa6 0x83 0xf0 0x55 0xa6 0x84 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x0 0x80 0x50 0x80 0x15 0xa6 0x88 0xf0 0x55 0xa6 0x84 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x85 0x0 0xa6 0x83 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x86 0x0 0x60 0x8 0x81 0x0 0x80 0x60 0x80 0x14 0x81 0x0 0x80 0x50 0x82 0x0 0x80 0x15 0x80 0x20 0x3f 0x0 0x14 0x8c 0xa6 0x84 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x85 0x0 0xa6 0x83 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x86 0x0 0x60 0x8 0x81 0x0 0x80 0x60 0x80 0x15 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x3f 0x0 0x14 0x86 0x60 0x1 0xa6 0x85 0xf0 0x55 0x14 0x8c 0x60 0x0 0xa6 0x85 0xf0 0x55 0xa6 0x83 0xf0 0x65 0x85 0x0 0xa6 0x88 0xf0 0x65 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x90 0x10 0x6f 0x0 0x3f 0x1 0x14 0xb2 0xa6 0x83 0xf0 0x65 0x70 0x1 0xf0 0x55 0x14 0x22 0xa6 0x85 0xf0 0x65 0x85 0x0 0x60 0x1 0x81 0x50 0x50 0x10 0x6f 0x1 0x3f 0x0 0x14 0xd4 0xa6 0x84 0xf0 0x65 0x85 0x0 0xc0 0x18 0x81 0x50 0xa6 0x7a 0xf1 0x1e 0xf0 0x55 0xa6 0x85 0xf0 0x65 0x85 0x0 0x60 0x0 0x81 0x50 0x50 0x10 0x6f 0x1 0x90 0x10 0x6f 0x0 0x3f 0x0 0x14 0xa 0xa6 0x84 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x8a 0x0 0xa6 0x84 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x8b 0x0 0x60 0x0 0xa6 0x42 0xf0 0x1e 0xda 0xb8 0xa6 0x84 0xf0 0x65 0x85 0x0 0xa6 0x86 0xf0 0x65 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x90 0x10 0x6f 0x0 0x3f 0x1 0x15 0x30 0xa6 0x84 0xf0 0x65 0x70 0x1 0xf0 0x55 0x13 0xa 0xc0 0x7 0xa6 0x82 0xf0 0x55 0xa6 0x82 0xf0 0x65 0xa6 0x72 0xf0 0x1e 0xf0 0x65 0x8a 0x0 0xa6 0x82 0xf0 0x65 0xa6 0x7a 0xf0 0x1e 0xf0 0x65 0x8b 0x0 0xa6 0x82 0xf0 0x65 0xa6 0x6a 0xf0 0x1e 0xf0 0x65 0xa6 0x42 0xf0 0x1e 0xf0 0x65 0xda 0xb8 0x60 0xa 0xf0 0x15 0xa6 0x82 0xf0 0x65 0x85 0x0 0xa6 0x82 0xf0 0x65 0xa6 0x6a 0xf0 0x1e 0xf0 0x65 0x86 0x0 0x60 0x8 0x81 0x0 0x80 0x60 0x80 0x14 0x81 0x50 0xa6 0x6a 0xf1 0x1e 0xf0 0x55 0xa6 0x82 0xf0 0x65 0xa6 0x6a 0xf0 0x1e 0xf0 0x65 0x85 0x0 0x60 0x20 0x81 0x0 0x80 0x50 0x82 0x10 0x81 0x5 0x81 0x20 0x3f 0x0 0x15 0xb2 0xa6 0x82 0xf0 0x65 0x85 0x0 0x60 0x0 0x81 0x50 0xa6 0x6a 0xf1 0x1e 0xf0 0x55 0xa6 0x82 0xf0 0x65 0x85 0x0 0x60 0x32 0x81 0x50 0x50 0x10 0x6f 0x1 0x90 0x10 0x6f 0x0 0x3f 0x0 0x15 0x30 0x15 0xc8 0x81 0x0 0xa6 0x89 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x15 0xdc 0x80 0x30 0x0 0xee 0xa6 0x89 0xfe 0x1e 0xf6 0x55 0x66 0x0 0x82 0x0 0x82 0x15 0x3f 0x1 0x16 0x14 0x83 0x0 0x83 0x6 0x84 0x10 0x65 0x1 0x82 0x30 0x82 0x45 0x3f 0x1 0x16 0xe 0x84 0xe 0x85 0xe 0x16 0x0 0x80 0x45 0x86 0x54 0x15 0xf0 0xf5 0x65 0x80 0x60 0x0 0xee 0x82 0x0 0x80 0x15 0x3f 0x0 0x16 0x1a 0x80 0x20 0x0 0xee 0xa6 0x3e 0xf0 0x33 0xf2 0x65 0xf0 0x29 0xd3 0x45 0x73 0x6 0xf1 0x29 0xd3 0x45 0x73 0x6 0xf2 0x29 0xd3 0x45 0x0 0xee 0x0 0x0 0xff 0xff 0x0 0x0 0x0 0x10 0x0 0x0 0x0 0x0 0x0 0x0 0x38 0x28 0x38 0x0 0x0 0x0 0x0 0x54 0x0 0x44 0x0 0x54 0x0 0x0 0x92 0x0 0x0 0x82 0x0 0x0 0x92 0x0 0x92 0x54 0x38 0xfe 0x38 0x54 0x92 0x0 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Test [Tom Swan, 1979].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x2 0x30 0x60 0x0 0x61 0x0 0xa2 0xd2 0xd0 0x14 0x70 0x4 0x71 0x4 0x31 0x40 0x12 0xc6 0x12 0xd0 0xf0 0xf0 0xf0 0xd4
######################################################################
# INPUT: chip8/Chip-8 Hires/Hires Worm V4 [RB-Revival Studios, 2007].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x13 0xc 0x57 0x6f 0x72 0x6d 0x20 0x76 0x2e 0xf4 0x2c 0xe0 0x62 0x79 0x3a 0x20 0x52 0x42 0x2c 0xe0 0x43 0x68 0x69 0x70 0x2d 0xf8 0x20 0x76 0x65 0x72 0x73 0x69 0x6f 0x6e 0x20 0x62 0x79 0x3a 0x20 0x4d 0x61 0x72 0x74 0x69 0x6a 0x6e 0x20 0x57 0x65 0x6e 0x74 0x69 0x6e 0x67 0x20 0x2f 0x20 0x52 0x65 0x76 0x69 0x76 0x61 0x6c 0x20 0x53 0x74 0x75 0x64 0x69 0x6f 0x73 0x52 0x42 0x39 0x32 0x2 0x30 0x60 0x0 0x61 0x0 0x62 0x0 0x63 0x3e 0x64 0x0 0x65 0x0 0x66 0x14 0x67 0x7c 0x68 0x0 0x69 0x0 0x6a 0x6 0x6b 0xe 0x6c 0x1 0x6d 0x0 0x6e 0x4 0xa4 0x71 0xf0 0x55 0xfc 0x1e 0x71 0x1 0x31 0x0 0x13 0x2e 0xa4 0x5b 0xda 0xb3 0xa4 0x5a 0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x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Hires/Trip8 Hires Demo (2008) [Revival Studios].ch8
######################################################################
# InvalidOpcode('02AC',)
:proto L1 # 260
: main
jump L1
0x1 0x7a 0x42 0x70 0x22 0x78 0x22 0x52 0xc4 0x19 0xf8 0x0 0xa0 0x9b 0xfa 0xe 0xb0 0xe2 0xe2 0x80 0xe2 0x20 0xa0 0xe2 0x3c 0x15 0x80 0xe2 0x20 0xa0 0x34 0x1c 0x98 0x32 0x29 0xab 0x2b 0x8b 0xb8 0x88 0x32 0x3 0x7b 0x28 0x30 0x4 0xf8 0x2 0xae 0x9b 0xbf 0xf8 0x0 0xaf 0xf8 0x0 0x5f 0x1f 0x8f 0x3a 0x38 0x2e 0x8e 0x3a 0x38 0xd4 0x1 0x9b 0xff 0x1 0xbb 0xd4
: D1
0x9b 0x7c 0x0 0xbc 0x30 0x86 0x9c 0x7c 0x0 0xbc 0xfb 0x10 0x30 0xfc
: D2
0x3a 0xb3
: D3
0x30 0xd9 0x2 0x45 0x2 0x30
: L1
v0 := 18
v1 := 190
i := main
save v1
i := D1
load vD
i := 224
save vD
i := D2
load v3
i := 252
save v3
i := 126
v0 := 63
save v0
i := 132
v0 := 48
v1 := 224
save v1
i := 215
v1 := -26
save v1
i := D3
load v3
i := 506
save v3
v0 := -6
i := 24
save v0
v0 := 6
i := 13
save v0
v0 := 2
i := 10
save v0
i := 3
save v0
0x2 0xac 0xf8 0x0 0xb0 0xa0 0x9b 0xb1 0xd0 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x32 0x30 0x31 0x31 0x2 0x30 0x12 0xd4 0x52 0x45 0x56 0x49 0x56 0x41 0x4c 0x53 0x54 0x55 0x44 0x49 0x4f 0x53 0x32 0x30 0x30 0x38 0x2 0x30 0x6d 0x20 0xfd 0x15 0x24 0x86 0x24 0x8e 0x6d 0x40 0xfd 0x15 0x24 0x86 0x24 0x8e 0x6d 0x20 0xfd 0x15 0x24 0x86 0xa5 0x54 0x24 0xe6 0x6d 0x80 0xfd 0x15 0x24 0x86 0xa5 0x54 0x24 0xe6 0x6d 0x0 0x6b 0x0 0x23 0x82 0x4b 0x0 0x23 0xa0 0x4b 0x1 0x24 0x52 0x4b 0x2 0x23 0xa8 0x4b 0x3 0x24 0x52 0x4b 0x4 0x23 0xb0 0x4b 0x5 0x24 0x52 0x60 0x1 0xf0 0x15 0x24 0x86 0x7d 0x1 0x60 0x3f 0x8c 0xd0 0x8c 0x2 0x4c 0x0 0x23 0x2c 0x13 0x0 0x4b 0x0 0x23 0x4c 0x4b 0x1 0x23 0x88 0x4b 0x2 0x23 0x5e 0x4b 0x3 0x23 0x90 0x4b 0x4 0x23 0x70 0x4b 0x5 0x23 0x98 0x7b 0x1 0x4b 0x6 0x6b 0x0 0x0 0xee 0x23 0xc4 0xc9 0x3 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x24 0x2e 0x0 0xee 0x23 0xb8 0xc9 0x3 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x24 0x2e 0x0 0xee 0x23 0xd4 0xc9 0x3 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x89 0x94 0x24 0x2e 0x0 0xee 0x6e 0x0 0x23 0xc4 0x0 0xee 0x24 0x2e 0x6e 0x0 0x23 0xb8 0x0 0xee 0x24 0x2e 0x6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 0xfa 0x1e 0xf1 0x65 0x80 0x4 0x81 0x14 0xa5 0x50 0xd0 0x15 0x0 0xee 0xf0 0x7 0x30 0x0 0x14 0x86 0x0 0xee 0x6d 0x4 0x61 0x1d 0x60 0x1c 0x62 0x12 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x86 0x60 0x14 0x62 0xc 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0x60 0x24 0x62 0x18 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x86 0x60 0xc 0x62 0x6 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0x60 0x2c 0x62 0x1e 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x86 0xa5 0x1e 0x60 0x4 0xd0 0x16 0x60 0x34 0x62 0x24 0xa5 0x1e 0xf2 0x1e 0xd0 0x16 0xfd 0x15 0x24 0x86 0x0 0xee 0x64 0x1 0x65 0x7 0x62 0x0 0x63 0x0 0x60 0x0 0x81 0x30 0x71 0x10 0xd0 0x11 0x71 0x8 0xf4 0x1e 0xd0 0x11 0x71 0x8 0xf4 0x1e 0xd0 0x11 0x71 0x8 0xf4 0x1e 0xd0 0x11 0xf4 0x1e 0x70 0x8 0x30 0x40 0x14 0xf0 0x73 0x3 0x83 0x52 0x72 0x1 0x32 0x8 0x14 0xee 0x0 0xee 0xff 0xff 0x0 0x0 0xc 0x11 0x11 0x10 0x0 0x0 0x95 0x55 0x95 0xcd 0x0 0x0 0x53 0x55 0x55 0x33 0x40 0x40 0x44 0x42 0x41 0x46 0x0 0x40 0x6a 0x4a 0x4a 0x46 0x0 0x20 0x69 0xaa 0xaa 0x69 0x0 0x0 0x20 0x90 0x88 0x30 0x38 0x44 0xb2 0xa2 0x82 0x82 0x44 0x38 0x20 0xf8 0x50 0x88 0x0 0x0 0x0 0x0 0x0 0x0 0x39 0x0 0x0 0x0 0x6b 0x0 0x0 0x0 0x5b 0x0 0x0 0x0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17 0x9 0x9 0x16 0x12 0x1a 0x10 0x5 0x15 0xb 0x8 0x13 0x13 0x17 0x15 0xe 0x8 0x3 0x12 0x1a 0xb 0x13 0x18 0x11 0x9 0x2 0xf 0x1b 0xd 0x12 0xb 0xe 0x19 0x2 0xc 0x1c 0xf 0x11 0xd 0x9 0x18 0x4 0x9 0x1b 0x13 0x10 0x10 0xc 0x14 0x7 0x17 0x4 0x1a 0x3 0x1c 0x3 0x1d 0x5 0x1d 0x8 0x1b 0xc 0x19 0x10 0x16 0x14 0x13 0x17 0x10 0x1a 0xd 0x1b 0xa 0x1b 0x8 0x19 0x6 0x17 0x5 0x13 0x6 0x10 0x7 0xd 0x8 0xa 0xb 0x7 0xe 0x6 0x10 0x6 0x12 0x8 0x15 0xa 0x17 0xd 0x18 0x10 0x19 0x13 0x19 0x16 0x18 0x18 0x17 0x19 0x14 0x10 0x19 0xf 0x17 0xd 0x17 0xa 0x19 0x6 0x1a 0x6 0x16 0x9 0x13 0x9 0x11 0x7 0x10 0x3 0xe 0x3 0xb 0x8 0xb 0xb 0xb 0xc 0xa 0xc 0x6 0xe 0x2 0x10 0x4 0x11 0x8 0x12 0xa 0x14 0x9 0x19 0x7 0x1b 0x9 0x19 0xd 0x17 0xf 0x17 0x10 0x1a 0x12 0x1d 0x15 0x1a 0x16 0x15 0x15 0x14 0x16 0x13 0x18 0x12 0x1d 0x10 0x19 0xe 0x17 0xd 0x17 0xb 0x17 0x8 0x17 0x5 0x19 0x2 0x19 0x3 0x17 0x8 0x14 0xb 0x12 0xe 0x11 0x10 0x10 0x11 0x10 0x14 0xe 0x19 0xb 0x1c 0x9 0x1c 0x9 0x19 0x9 0x17 0xa 0x16 0xa 0x14 0x9 0x13 0x7 0x11 0x4 0xf 0x2 0xb 0x3 0x9 0x6 0x9 0x9 0x9 0xa 0x9 0xb 0x8 0xb 0x7 0xb 0x7 0xb 0x10 0x19 0x13 0x18 0x15 0x17 0x16 0x16 0x18 0x15 0x18 0x15 0x18 0x14 0x15 0x12 0x10 0x10 0xb 0xe 0x9 0xc 0x8 0xc 0x9 0xb 0xa 0xa 0xb 0x9 0xd 0x8 0x10 0x6 0x14 0x4 0x1a 0x3 0x1d 0x4 0x1c 0x8 0x19 0xb 0x15 0xd 0x12 0xf 0x10 0x10 0xd 0x11 0xa 0x13 0x6 0x16 0x3 0x19 0x3 0x1c 0x7 0x1c 0xc 0x1a
######################################################################
# INPUT: chip8/Chip-8 Programs/BMP Viewer - Hello (C8 example) [Hap, 2005].ch8
######################################################################
:proto L1 # 202
:proto Sub1 # 226
:proto D2 # 230
: main
0x12 : D1 0x2 # SMC: jump L1
: L1
clear
i := D1
load v0
i := D2
v1 := 64
if v0 != -1 then v1 >>= v0
v0 := v1
v0 <<= v0
v2 := 0
v3 := 1
v1 += -1
loop
sprite v2 v1 1
v2 += 8
if v2 == v0 then Sub1
i += v3
again
: Sub1
v1 += -1
v2 := 0
if v1 == -1 then loop
again
return
: D2
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x3 0xc0 0x0 0x0 0x0 0x0 0x0 0x1 0x83 0xc0 0x0 0x0 0x0 0x0 0x3f 0xc3 0xc3 0xc0 0x0 0x0 0x0 0x0 0xff 0xe3 0xc3 0xc0 0x1e 0x0 0x0 0x1 0xff 0xe3 0xe3 0xc0 0x3f 0x80 0x0 0x33 0xff 0xc3 0xe3 0xc0 0x7f 0xc0 0xc0 0x7b 0xe0 0x1 0xe3 0xe0 0xff 0xf0 0xe0 0x7f 0xe0 0x1 0xe3 0xe0 0xff 0xf8 0xe0 0x7f 0xfe 0x1 0xe1 0xe0 0xf1 0xfc 0xf0 0x3f 0xff 0xc1 0xe1 0xe0 0xf0 0x7c 0xf0 0x3d 0xff 0xe1 0xe1 0xe0 0xf0 0x3e 0xf0 0x3f 0xff 0xe1 0xe1 0xe0 0xf0 0x3e 0xf0 0x3f 0xf3 0xf1 0xe1 0xe0 0xf0 0x1e 0xf8 0x1e 0xf9 0xf1 0xe1 0xe0 0xf0 0x1e 0xff 0x9e 0xff 0xf3 0xe1 0xe0 0xf0 0x3e 0x7f 0xff 0x7f 0xf3 0xe1 0xe0 0xf8 0x3e 0x7f 0xff 0x3f 0xe3 0xc1 0xe0 0xf8 0x3c 0x7f 0xff 0xf 0xc3 0xc1 0xe0 0x7c 0x7c 0x3c 0xff 0x7 0x83 0xc3 0xe0 0x7e 0x7c 0x3e 0x3f 0x0 0x3 0xc3 0xe0 0x3f 0xf8 0x3e 0xf 0x0 0x7 0xc3 0xc0 0x1f 0xf8 0x1e 0xf 0x0 0x7 0xc3 0xc0 0x1f 0xf0 0x1e 0xf 0x0 0x7 0x87 0xc0 0xf 0xc0 0x1e 0xf 0x0 0xf 0x87 0xc0 0x0 0x0 0x1e 0xf 0x0 0xf 0x8f 0x80 0x0 0x0 0x1e 0x6 0x0 0x7 0xf 0x80 0x0 0x0 0xc 0x0 0x0 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Programs/Chip8 emulator Logo [Garstyciuks].ch8
######################################################################
:proto Sub1 # 21A
:proto D1 # 220
: main
clear
v0 := 0
v1 := 0
v2 := 8
i := D1
loop
if v0 == 64 then Sub1
if v1 == 32 then loop
again
sprite v0 v1 8
i += v2
v0 += 8
again
: Sub1
v0 := 0
v1 += 8
return
: D1
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x7f 0x40 0x5f 0x50 0x57 0x54 0x54 0x0 0xfc 0x4 0xf4 0x14 0xd4 0x54 0x54 0x0 0x3f 0x20 0x2f 0x28 0x2b 0x2a 0x2a 0x0 0xfe 0x2 0xfa 0xa 0xea 0x2a 0x2a 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x54 0x54 0x54 0x54 0x54 0x54 0x74 0x0 0x54 0x54 0x54 0x54 0x74 0x0 0x0 0x0 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x3b 0x0 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0xee 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x74 0x54 0x54 0x54 0x54 0x54 0x54 0x54 0x0 0x0 0x74 0x54 0x54 0x54 0x54 0x54 0x3b 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0xee 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x54 0x54 0x57 0x50 0x5f 0x40 0x7f 0x0 0x54 0x54 0xd4 0x14 0xf4 0x4 0xfc 0x0 0x2a 0x2a 0x2b 0x28 0x2f 0x20 0x3f 0x0 0x2a 0x2a 0xea 0xa 0xfa 0x2 0xfe 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Programs/Chip8 Picture.ch8
######################################################################
:proto D1 # 248
:proto D2 # 24A
:proto D3 # 258
:proto D4 # 267
:proto D5 # 276
:proto D6 # 285
:proto D7 # 294
: main
clear
i := D1
v0 := 0
v1 := 30
v2 := 0
loop
sprite v2 v0 2
sprite v2 v1 2
v2 += 8
if v2 != 64 then
again
v0 := 0
v1 := 62
v2 := 2
i := D2
sprite v0 v2 14
sprite v1 v2 14
v2 += 14
sprite v0 v2 14
sprite v1 v2 14
i := D3
v0 := 11
v1 := 8
sprite v0 v1 15
v0 += 10
i := D4
sprite v0 v1 15
v0 += 10
i := D5
sprite v0 v1 15
v0 += 3
i := D6
sprite v0 v1 15
v0 += 10
i := D7
sprite v0 v1 15
loop
again
: D1
0xff 0xff
: D2
0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0
: D3
0xff 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0xff
: D4
0x81 0x81 0x81 0x81 0x81 0x81 0x81 0xff 0x81 0x81 0x81 0x81 0x81 0x81 0x81
: D5
0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D6
0xff 0x81 0x81 0x81 0x81 0x81 0x81 0xff 0x80 0x80 0x80 0x80 0x80 0x80 0x80
: D7
0xff 0x81 0x81 0x81 0x81 0x81 0x81 0xff 0x81 0x81 0x81 0x81 0x81 0x81 0xff 0xff
######################################################################
# INPUT: chip8/Chip-8 Programs/Clock Program [Bill Fisher, 1981].ch8
######################################################################
# InvalidOpcode('02D8',)
:proto L1 # 260
:proto Sub1 # 2CE
:proto D1 # 2E0
: main
v1 := key
v2 := key
v3 := key
v4 := key
v5 := key
v6 := key
clear
v7 := 1
Sub1
v8 += 1
i := hex v1
sprite v7 v8 5
v7 := 11
Sub1
v8 += 1
i := hex v2
sprite v7 v8 5
v7 := 23
Sub1
v8 += 1
i := hex v3
sprite v7 v8 5
v7 := 33
Sub1
v8 += 1
i := hex v4
sprite v7 v8 5
v7 := 45
Sub1
v8 += 1
i := hex v5
sprite v7 v8 5
v7 := 55
Sub1
v8 += 1
i := hex v6
sprite v7 v8 5
vD := key
vD := 37
delay := vD
jump L1
0x6d 0x3b 0xfd 0x15 0x22 0xe8 0x76 0x1 0x46 0xa 0x12 0x6a 0x22 0xe8
: L1
loop
vD := delay
if vD != 0 then
again
0x2 0xd8 0x12 0x52 0x66 0x0 0x22 0xe8 0x22 0xf0 0x75 0x1 0x45 0x6 0x12 0x7a 0x22 0xf0 0x12 0x60 0x65 0x0 0x22 0xf0 0x22 0xf8 0x74 0x1 0x44 0xa 0x12 0x8a 0x22 0xf8 0x12 0x60 0x64 0x0 0x22 0xf8 0x23 0x0 0x73 0x1 0x43 0x6 0x12 0x9a 0x23 0x0 0x12 0x60 0x63 0x0 0x23 0x0 0x23 0x8 0x72 0x1 0x42 0x4 0x12 0xba 0x42 0xa 0x12 0xae 0x23 0x8 0x12 0x60 0x62 0x0 0x23 0x8 0x23 0x10 0x71 0x1 0x23 0x10 0x12 0x60 0x41 0x2 0x12 0xc2 0x23 0x8 0x12 0x60 0x62 0x0 0x23 0x8 0x23 0x10 0x61 0x0 0x23 0x10 0x12 0x60
: Sub1
v8 := 7
i := D1
sprite v7 v8 7
v7 += 1
return
0xf8 0xfa 0xaf 0x2f 0x8f 0x3a 0xdb 0xd4
: D1
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0x0 0x67 0x38 0xf6 0x29 0xd7 0x85 0x0 0xee 0x67 0x2e 0xf5 0x29 0xd7 0x85 0x0 0xee 0x67 0x22 0xf4 0x29 0xd7 0x85 0x0 0xee 0x67 0x18 0xf3 0x29 0xd7 0x85 0x0 0xee 0x67 0xc 0xf2 0x29 0xd7 0x85 0x0 0xee 0x67 0x2 0xf1 0x29 0xd7 0x85 0x0 0xee
######################################################################
# INPUT: chip8/Chip-8 Programs/Delay Timer Test [Matthew Mikolay, 2010].ch8
######################################################################
:proto Sub1 # 21E
:proto D1 # 23A
: main
v6 := 1
: L1
loop
Sub1
v4 := key
if v4 == 2 then v3 += 1
if v4 == 8 then v3 -= v6
if v4 != 5 then
again
delay := v3
loop
v3 := delay
Sub1
if v3 != 0 then
again
jump L1
: Sub1
clear
v5 := 0
i := D1
bcd v3
load v2
i := hex v0
sprite v5 v6 5
i := hex v1
v5 := 5
sprite v5 v6 5
i := hex v2
v5 := 10
sprite v5 v6 5
return
: D1
######################################################################
# INPUT: chip8/Chip-8 Programs/Division Test [Sergey Naydenov, 2010].ch8
######################################################################
:proto L1 # 205
:proto L4 # 295
:proto L5 # 2BF
:proto Sub1 # 313
:proto L9 # 339
:proto L10 # 33F
:proto Sub2 # 351
:proto D1 # 369
:proto D2 # 36C
:proto D3 # 36D
:proto D4 # 36E
:proto D5 # 36F
:proto D6 # 370
:proto D7 # 371
:proto D8 # 372
: main
jump L1
0x43 0x38 0x50
: L1
v0 := 20
i := D6
save v0
v0 := 4
i := D5
save v0
v0 := 0
i := D7
save v0
: L2
i := D6
load v0
v5 := v0
i := D5
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 0 then jump L5
i := D6
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 >>= v1
i := D4
save v0
i := D5
load v0
i := D3
save v0
v0 := 1
i := D2
save v0
loop
i := D4
load v0
v5 := v0
i := D3
load v0
v1 := v0
v0 := v5
v2 := v1
v1 -= v0
v1 := v2
if v0 == v1 then vF := 0
if vF != 0 then jump L4
i := D3
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 <<= v1
i := D3
save v0
i := D2
load v0
v5 := v0
v0 := 1
v1 := v0
v0 := v5
v0 <<= v1
i := D2
save v0
again
: L4
i := D6
load v0
v5 := v0
i := D3
load v0
v1 := v0
v0 := v5
v0 -= v1
i := D6
save v0
i := D7
load v0
v5 := v0
i := D2
load v0
v1 := v0
v0 := v5
v0 += v1
i := D7
save v0
jump L2
: L5
v0 := 0
v3 := v0
v0 := 0
v4 := v0
i := D7
load v0
Sub2
v0 := 20
i := D6
save v0
v0 := 4
i := D5
save v0
v0 := 0
v3 := v0
v0 := 10
v4 := v0
i := D6
load v0
v5 := v0
i := D5
load v0
v1 := v0
v0 := v5
Sub1
Sub2
loop
again
0x81 0x0 0xa3 0x72 0x62 0x1 0x8e 0x25 0xfe 0x1e 0xf0 0x65 0x0 0xee 0x62 0x1 0x63 0x0 0x83 0x4 0x81 0x25 0x31 0x0 0x13 0x7 0x80 0x30 0x0 0xee
: Sub1
i := D8
i += vE
save v6
v6 := 0
: L7
v2 := v0
v2 -= v1
if vF != 1 then jump L10
v3 := v0
v3 >>= v0
v4 := v1
v5 := 1
loop
v2 := v3
v2 -= v4
if vF != 1 then jump L9
v4 <<= v0
v5 <<= v0
again
: L9
v0 -= v4
v6 += v5
jump L7
: L10
load v5
v0 := v6
return
0x82 0x0 0x80 0x15 0x3f 0x0 0x13 0x45 0x80 0x20 0x0 0xee
: Sub2
i := D1
bcd v0
load v2
i := hex v0
sprite v3 v4 5
v3 += 6
i := hex v1
sprite v3 v4 5
v3 += 6
i := hex v2
sprite v3 v4 5
return
: D1
0x28 0x63 0x29
: D2
0x0
: D3
0x0
: D4
0x0
: D5
0x0
: D6
0x0
: D7
0x0
: D8
0x0
######################################################################
# INPUT: chip8/Chip-8 Programs/Fishie [Hap, 2005].ch8
######################################################################
:proto D1 # 220
: main
clear
i := D1
v2 := 8
v0 := -8
: L1
v0 += 8
v1 := 16
if v0 == 32 then loop
again
loop
sprite v1 v0 8
i += v2
v1 += 8
if v1 == 48 then jump L1
again
0x0 0x0 0x0 0x0
: D1
0x0 0x0 0x0 0x0 0x0 0x18 0x3c 0x3c 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x3e 0x3f 0x3f 0x3b 0x39 0x38 0x38 0x38 0x0 0x0 0x80 0xc1 0xe7 0xff 0x7e 0x3c 0x0 0x1f 0xff 0xf9 0xc0 0x80 0x3 0x3 0x0 0x80 0xe0 0xf0 0x78 0x38 0x1c 0x1c 0x38 0x38 0x39 0x3b 0x3f 0x3f 0x3e 0x3c 0x78 0xfc 0xfe 0xcf 0x87 0x3 0x1 0x0 0x0 0x0 0x0 0x0 0x80 0xe3 0xff 0x7f 0x1c 0x38 0x38 0x70 0xf0 0xe0 0xc0 0x0 0x3c 0x18 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
######################################################################
# INPUT: chip8/Chip-8 Programs/Framed MK1 [GV Samways, 1980].ch8
######################################################################
# InvalidOpcode('0000',)
:proto L2 # 216
:proto L3 # 224
:proto Sub1 # 280
:proto Sub2 # 292
:proto D1 # 2A0
:proto D2 # 2A1
:proto Sub3 # 2A2
: main
Sub1
: L1
loop
vC := random 0b1
if vC == 1 then jump L2
vA := random 0b111110
vB := 2
if vA == 0 then jump L1
i := D2
sprite vA vB 1
jump L3
: L2
vB := random 0b11110
vA := 2
if vB == 0 then
again
i := D2
sprite vA vB 1
0x0 0x0
: L3
loop
vD := random 0b11
if vD == 0 then vA += -1
if vA == 1 then vA += 2
if vD == 1 then vB += -1
if vB == 1 then vB += 2
if vD == 2 then vA += 1
if vA == 62 then vA += -2
if vD == 3 then vB += 1
if vB == 30 then vB += -2
i := D2
sprite vA vB 1
if vF != 1 then jump L3
v0 := 15
if v0 -key then
again
clear
jump main
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: Sub1
vB := 0
Sub2
vB := 31
Sub2
vA := 0
Sub3
vA := 63
Sub3
return
: Sub2
vA := 0
loop
i := D1
sprite vA vB 1
vA += 8
if vA != 64 then
again
return
: D1
0xff
: D2
0x80
: Sub3
vB := 1
loop
i := D2
sprite vA vB 1
vB += 1
if vB != 31 then
again
return
######################################################################
# INPUT: chip8/Chip-8 Programs/Framed MK2 [GV Samways, 1980].ch8
######################################################################
:proto L2 # 216
:proto L3 # 224
:proto L5 # 256
:proto Sub1 # 280
:proto Sub2 # 292
:proto D1 # 2A0
:proto D2 # 2A1
:proto Sub3 # 2A2
: main
Sub1
: L1
loop
vC := random 0b1
if vC == 1 then jump L2
vA := random 0b111110
vB := 2
if vA == 0 then jump L1
i := D2
sprite vA vB 1
jump L3
: L2
vB := random 0b11110
vA := 2
if vB == 0 then
again
i := D2
sprite vA vB 1
v8 := 0
: L3
vD := random 0b11
loop
if vD == 0 then vA += -1
if vA == 1 then vA += 2
if vD == 1 then vB += -1
if vB == 1 then vB += 2
if vD == 2 then vA += 1
if vA == 62 then vA += -2
if vD == 3 then vB += 1
if vB == 30 then vB += -2
i := D2
sprite vA vB 1
if vF != 0 then jump L5
v8 += -1
if v8 != 0 then
again
v8 := random 0b11
: L5
v0 := 15
if v0 -key then jump L3
clear
jump main
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: Sub1
vB := 0
Sub2
vB := 31
Sub2
vA := 0
Sub3
vA := 63
Sub3
return
: Sub2
vA := 0
loop
i := D1
sprite vA vB 1
vA += 8
if vA != 64 then
again
return
: D1
0xff
: D2
0x80
: Sub3
vB := 1
loop
i := D2
sprite vA vB 1
vB += 1
if vB != 31 then
again
return
######################################################################
# INPUT: chip8/Chip-8 Programs/IBM Logo.ch8
######################################################################
:proto D1 # 22A
:proto D2 # 239
:proto D3 # 248
:proto D4 # 257
:proto D5 # 266
:proto D6 # 275
: main
clear
i := D1
v0 := 12
v1 := 8
sprite v0 v1 15
v0 += 9
i := D2
sprite v0 v1 15
i := D3
v0 += 8
sprite v0 v1 15
v0 += 4
i := D4
sprite v0 v1 15
v0 += 8
i := D5
sprite v0 v1 15
v0 += 8
i := D6
sprite v0 v1 15
loop
again
: D1
0xff 0x0 0xff 0x0 0x3c 0x0 0x3c 0x0 0x3c 0x0 0x3c 0x0 0xff 0x0 0xff
: D2
0xff 0x0 0xff 0x0 0x38 0x0 0x3f 0x0 0x3f 0x0 0x38 0x0 0xff 0x0 0xff
: D3
0x80 0x0 0xe0 0x0 0xe0 0x0 0x80 0x0 0x80 0x0 0xe0 0x0 0xe0 0x0 0x80
: D4
0xf8 0x0 0xfc 0x0 0x3e 0x0 0x3f 0x0 0x3b 0x0 0x39 0x0 0xf8 0x0 0xf8
: D5
0x3 0x0 0x7 0x0 0xf 0x0 0xbf 0x0 0xfb 0x0 0xf3 0x0 0xe3 0x0 0x43
: D6
0xe0 0x0 0xe0 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0xe0 0x0 0xe0
######################################################################
# INPUT: chip8/Chip-8 Programs/Jumping X and O [Harry Kleinberg, 1977].ch8
######################################################################
:proto Sub1 # 212
:proto L4 # 22E
:proto D1 # 240
:proto D2 # 246
:proto D3 # 24C
: main
i := D3
v5 := 48
v6 := 4
sprite v5 v6 6
loop
i := D1
Sub1
i := D2
Sub1
again
: Sub1
v1 := 30
v2 := 13
: L2
sprite v1 v2 5
v3 := 12
delay := v3
loop
v4 := delay
if v4 != 0 then
again
if vF == 1 then jump L4
sprite v1 v2 5
v1 := random 0b111111
v2 := random 0b11111
jump L2
: L4
sprite v1 v2 5
return
0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
: D1
0x88 0x50 0x20 0x50 0x88 0x0
: D2
0xf8 0x88 0x88 0x88 0xf8 0x0
: D3
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc
######################################################################
# INPUT: chip8/Chip-8 Programs/Keypad Test [Hap, 2006].ch8
######################################################################
:proto L2 # 24E
: main
jump L2
: D1
0x8 0x19 0x1 0x1 0x8 0x1 0xf 0x1 0x1 0x9 0x8 0x9 0xf 0x9 0x1 0x11 0x8 0x11 0xf 0x11 0x1 0x19 0xf 0x19 0x16 0x1 0x16 0x9 0x16 0x11 0x16 0x19
: D2
0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0x0
: Sub1
i := D1
v2 <<= v0
i += v2
v2 >>= v0
load v1
return
: Sub2
i := D1
v2 <<= v0
i += v2
v2 >>= v0
save v1
return
: Sub3
vF := 16
delay := vF
loop
vF := delay
if vF != 0 then
again
return
: L2
clear
v2 := 0
loop
Sub1
i := hex v2
sprite v0 v1 5
v0 += -1
v1 += -1
Sub2
v2 += 1
if v2 != 16 then
again
loop
v2 := key
Sub1
i := D2
sprite v0 v1 7
Sub3
sprite v0 v1 7
again
######################################################################
# INPUT: chip8/Chip-8 Programs/Life [GV Samways, 1980].ch8
######################################################################
:proto D1 # 238
:proto D2 # 280
:proto L4 # 284
:proto L5 # 296
:proto L6 # 2B0
:proto L7 # 2B2
:proto L8 # 2BA
:proto L9 # 2FA
: main
jump L4
: L1
v0 += 4
if v0 == 64 then v1 += 4
if v0 == 64 then v0 := 0
if v1 != 32 then jump L8
i := D1
i += vE
v1 := -4
save v1
vE := 0
loop
i := D1
i += vE
load v1
i := D2
sprite v0 v1 3
vE += 2
if v1 != -4 then
again
sprite v0 v1 3
jump L7
: L3
i := D1
i += vE
save v1
vE += 2
jump L1
: D1
0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
: D2
0xe0 0xa0 0xe0
: D3
0x80
: L4
loop
v1 := key
if v1 == 15 then jump L6
vA := 8
vA &= v1
if vA == 0 then jump L5
buzzer := vA
jump L4
: L5
v1 += v1
v1 += v1
v0 := key
v0 += v0
v0 += v0
i := D2
sprite v0 v1 3
again
: Sub1
vF := 0
sprite v0 v1 1
vC += vF
sprite v0 v1 1
return
: L6
v2 := key
: L7
v0 := 0
v1 := 0
vE := 0
v2 += -1
: L8
if v2 == 0 then jump L4
vC := 0
i := D3
sprite v0 v1 1
v4 := vF
sprite v0 v1 1
v0 += -4
Sub1
v1 += 4
Sub1
v0 += 4
Sub1
v0 += 4
Sub1
v1 += -4
Sub1
v1 += -4
Sub1
v0 += -4
Sub1
v0 += -4
Sub1
v0 += 4
v1 += 4
if vC == 2 then jump L1
if vC == 3 then jump L9
if v4 != 1 then jump L1
jump L3
: L9
if v4 != 1 then jump L3
jump L1
######################################################################
# INPUT: chip8/Chip-8 Programs/Minimal game [Revival Studios, 2007].ch8
######################################################################
:proto Sub1 # 214
:proto Sub2 # 21A
:proto Sub3 # 220
:proto L2 # 228
:proto L3 # 230
:proto L4 # 238
:proto L5 # 240
:proto Sub4 # 242
:proto D1 # 24A
: main
clear
Sub1
Sub2
loop
Sub2
Sub3
Sub2
v0 := 1
delay := v0
Sub4
again
: Sub1
v3 := 32
v4 := 25
return
: Sub2
i := D1
sprite v3 v4 6
return
: Sub3
v0 := 8
if v0 -key then jump L2
v4 += 1
: L2
v0 := 2
if v0 -key then jump L3
v4 += -1
: L3
v0 := 4
if v0 -key then jump L4
v3 += -1
: L4
v0 := 6
if v0 -key then jump L5
v3 += 1
: L5
return
: Sub4
loop
v0 := delay
if v0 != 0 then
again
return
: D1
0x3c 0x18 0xff 0x18 0x24 0xe7 0x7e 0xff 0x99 0xe7 0x3c
######################################################################
# INPUT: chip8/Chip-8 Programs/Random Number Test [Matthew Mikolay, 2010].ch8
######################################################################
:proto D1 # 224
: main
loop
clear
v0 := random 0b11111111
i := D1
bcd v0
load v2
i := hex v0
v0 := 0
v3 := 0
sprite v0 v3 5
i := hex v1
v0 := 5
sprite v0 v3 5
i := hex v2
v0 := 10
sprite v0 v3 5
v0 := key
again
0 0
: D1
######################################################################
# INPUT: chip8/Chip-8 Programs/SQRT Test [Sergey Naydenov, 2010].ch8
######################################################################
:proto L1 # 27B
:proto Sub2 # 35B
:proto D1 # 373
:proto D2 # 376
:proto D3 # 37E
:proto D4 # 37F
:proto D5 # 380
: main
jump L1
0x43 0x38 0x50
: Sub1
v0 := 4
vA := v0