Handbook
Glossary
space-invaders
Vocabulary
roms
.
space-invaders
Definition
USING:
cpu.8080.emulator
;
IN:
roms.space-invaders
TUPLE:
space-invaders
<
cpu
port1 port2i port2o port3o port4lo port4hi port5o bitmap
sounds looping?
;
Methods
USING:
combinators
cpu.8080.emulator
kernel
roms.space-invaders
;
M:
space-invaders
read-port
swap
{
{
1
[
read-port1
]
}
{
2
[
read-port2
]
}
{
3
[
read-port3
]
}
[
2drop
0
]
}
case
;
USING:
accessors
cpu.8080.emulator
generic
kernel
roms.space-invaders
;
M:
space-invaders
reset
dup
M\
space-invaders
reset
(call-next-method)
0
>>port1
0
>>port2i
0
>>port2o
0
>>port3o
0
>>port4lo
0
>>port4hi
0
>>port5o
drop
;
USING:
accessors
cpu.8080.emulator
kernel
math
roms.space-invaders
;
M:
space-invaders
update-video
over
9216
>=
[
bitmap>>
-rot
do-bitmap-update
]
[
3drop
]
if
;
USING:
combinators
cpu.8080.emulator
kernel
roms.space-invaders
;
M:
space-invaders
write-port
swap
{
{
2
[
write-port2
]
}
{
3
[
write-port3
]
}
{
4
[
write-port4
]
}
{
5
[
write-port5
]
}
[
3drop
]
}
case
;