-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinitreg.asm
112 lines (99 loc) · 1.25 KB
/
initreg.asm
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
;----------------------------------------------------------------------------
; SNES Startup Routine
; Copyright (C) 2007, Tekepen
;----------------------------------------------------------------------------
.setcpu "65816"
.autoimport on
.export initRegs
.segment "STARTUP"
.proc initRegs
sep #$20 ; A 8bit
.a8
lda #$8f
sta $2100
stz $2101
stz $2102
stz $2103
stz $2105
stz $2106
stz $2107
stz $2108
stz $2109
stz $210a
stz $210b
stz $210c
stz $210d
stz $210d
stz $210e
stz $210e
stz $210f
stz $210f
stz $2110
stz $2110
stz $2111
stz $2111
stz $2112
stz $2112
stz $2113
stz $2113
stz $2114
stz $2114
lda #$80
sta $2115
stz $2116
stz $2117
stz $211a
stz $211b
lda #$01
sta $211b
stz $211c
stz $211c
stz $211d
stz $211d
stz $211e
stz $211e
stz $211f
stz $211f
stz $2120
stz $2120
stz $2121
stz $2123
stz $2124
stz $2125
stz $2126
stz $2127
stz $2128
stz $2129
stz $212a
stz $212b
lda #$01
sta $212c
stz $212d
stz $212e
stz $212f
lda #$30
sta $2130
stz $2131
lda #$e0
sta $2132
stz $2133
stz $4200
lda #$ff
sta $4201
stz $4202
stz $4203
stz $4204
stz $4205
stz $4206
stz $4207
stz $4208
stz $4209
stz $420a
stz $420b
stz $420c
stz $420d
lda $4210
rep #$20
.a16
rts
.endproc