forked from Timendus/chip8-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-chip8-logo.8o
45 lines (38 loc) · 1018 Bytes
/
1-chip8-logo.8o
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# CHIP-8 logo ROM by Timendus, published here before:
# https://github.com/Timendus/chip-8/blob/master/octo/CHIP-8%20logo.8o
# 132 bytes, 20 cycles to show "CHIP-8" on the screen
#
# This ROM is simpler than the IBM logo in two ways:
# a) It does not use the addition instruction
# b) It only renders aligned sprites (all coordinates are multiples of 8)
#
# Uses only these five instructions:
# * Clear the screen
# * Load normal register with immediate value
# * Load i register with immediate value
# * Draw sprite to screen (only aligned)
# * Jump (at the end, so kinda optional)
:macro show X address {
v0 := X
i := address
sprite v0 v1 15
}
: main
clear
v1 := 1
show 8 splash-0-0
show 16 splash-1-0
show 24 splash-2-0
show 32 splash-3-0
show 40 splash-4-0
show 48 splash-5-0
v1 := 16
show 8 splash-0-1
show 16 splash-1-1
show 24 splash-2-1
show 32 splash-3-1
show 40 splash-4-1
show 48 splash-5-1
loop again
:segment data
:include "../../pictures/splash.png"