-
Notifications
You must be signed in to change notification settings - Fork 0
/
_common.asm
218 lines (206 loc) · 3.58 KB
/
_common.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
;== SFC-side MMIO ==============================================|
PPU = $2100
struct PPU PPU
.display: skip 1
.obsel: skip 1
.oamaddr:
.oamaddrLo: skip 1
.oamaddrHi: skip 1
.oamdata: skip 1
.bgmode: skip 1
.mosaic: skip 1
.bg1map: skip 1
.bg2map: skip 1
.bg3map: skip 1
.bg4map: skip 1
.bg12gfx: skip 1
.bg34gfx: skip 1
.bg1x: skip 1
.bg1y: skip 1
.bg2x: skip 1
.bg2y: skip 1
.bg3x: skip 1
.bg3y: skip 1
.bg4x: skip 1
.bg4y: skip 1
.vramctrl: skip 1
.vramaddr:
.vramaddrLo: skip 1
.vramaddrHi: skip 1
.vramdata:
.vramdataLo: skip 1
.vramdataHi: skip 1
.m7sel: skip 1
.m7a: skip 1
.m7b: skip 1
.m7c: skip 1
.m7d: skip 1
.m7x: skip 1
.m7y: skip 1
.cgramaddr: skip 1
.cgramdata: skip 1
.bg12mask: skip 1
.bg34mask: skip 1
.objmask: skip 1
.win1L: skip 1
.win1R: skip 1
.win2L: skip 1
.win2R: skip 1
.bgmasklog: skip 1
.objmasklog: skip 1
.mainscr: skip 1
.subscr: skip 1
.mainscrmask: skip 1
.subscrmask: skip 1
.cgwsel: skip 1
.cgadsub: skip 1
.coldata: skip 1
.setini: skip 1
.multLo: skip 1
.multHi: skip 1
.multBk: skip 1
.latch: skip 1
.oamread: skip 1
.vramread:
.vramreadLo: skip 1
.vramreadHi: skip 1
.cgramread: skip 1
.hcount: skip 1
.vcount: skip 1
.stat77: skip 1
.stat78: skip 1
endstruct
APU = $2140
struct APU APU
.io0: skip 1
.io1: skip 1
.io2: skip 1
.io3: skip 1
endstruct
WRAM = $2180
struct WRAM WRAM
.data: skip 1
.addr:
.addrLo: skip 1
.addrHi: skip 1
.addrBk: skip 1
endstruct
NES = $4016
struct NES NES
.joy0: skip 1
.joy1: skip 1
endstruct
CPU = $4200
struct CPU CPU
.interrupt: skip 1
.iowrite: skip 1
.multA: skip 1
.multB: skip 1
.dividend:
.dividendLo: skip 1
.dividendHi: skip 1
.divisor: skip 1
.htime:
.htimeLo: skip 1
.htimeHi: skip 1
.vtime:
.vtimeLo: skip 1
.vtimeHi: skip 1
.dma: skip 1
.hdma: skip 1
.fastrom: skip 1
skip 2
.nmiflag: skip 1
.irqflag: skip 1
.ppustatus: skip 1
.ioread: skip 1
.quotient:
.quotientLo: skip 1
.quotientHi: skip 1
.product:
.productLo:
.remainder:
.remainderLo: skip 1
.productHi:
.remainderHi: skip 1
skip -1
endstruct
struct JOY extends CPU
.Lo: skip 1
.Hi: skip 1
endstruct align 2
DMA = $4300
struct DMA DMA
.ctrl: skip 1
.reg: skip 1
.src:
.srcLo: skip 1
.srcHi: skip 1
.srcBk: skip 1
.size:
.sizeLo:
.ind:
.indLo: skip 1
.sizeHi:
.indHi: skip 1
.indBk: skip 1
.table:
.tableLo: skip 1
.tableHi: skip 1
.line: skip 1
.misc: skip 1
endstruct align 16
;== APU-side MMIO ==============================================|
SPC = $F0
struct SPC SPC
.speed: skip 1
.timerctrl: skip 1
.dspaddr: skip 1
.dspdata: skip 1
.io0: skip 1
.io1: skip 1
.io2: skip 1
.io3: skip 1
.misc0: skip 1
.misc1: skip 1
.timer0: skip 1
.timer1: skip 1
.timer2: skip 1
.counter0: skip 1
.counter1: skip 1
.counter2: skip 1
endstruct
DSP = $00
struct DSP DSP
.volL: skip 1
.volR: skip 1
.pitch:
.pitchLo: skip 1
.pitchHi: skip 1
.srcn: skip 1
.adsr1: skip 1
.adsr2: skip 1
.gain: skip 1
.envx: skip 1
.outx: skip 1
skip 5
.coef: skip 1
endstruct align 16
struct REG extends DSP
skip -4
.mainvolL: skip 1
.efb: skip 15
.mainvolR: skip 16
.echovolL: skip 1
.pitchmod: skip 15
.echovolR: skip 1
.noiseOn: skip 15
.keyOn: skip 1
.echoOn: skip 15
.keyOff: skip 1
.srcdir: skip 15
.flg: skip 1
.echodir: skip 15
.endx: skip 1
.echodelay: skip 1
endstruct