1 /* FCE Ultra - NES/Famicom Emulator
\r
3 * Copyright notice for this file:
\r
4 * Copyright (C) 1998 Bero
\r
5 * Copyright (C) 2002 Xodnizel
\r
7 * This program is free software; you can redistribute it and/or modify
\r
8 * it under the terms of the GNU General Public License as published by
\r
9 * the Free Software Foundation; either version 2 of the License, or
\r
10 * (at your option) any later version.
\r
12 * This program is distributed in the hope that it will be useful,
\r
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 * GNU General Public License for more details.
\r
17 * You should have received a copy of the GNU General Public License
\r
18 * along with this program; if not, write to the Free Software
\r
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
25 void iNESStateRestore(int version);
\r
26 extern uint32 iNESGameCRC32;
\r
28 extern uint32 VROM_size;
\r
29 extern uint32 ROM_size;
\r
31 extern void (*MapStateRestore)(int version);
\r
32 extern void (*MapClose)(void);
\r
33 extern void (*MapperReset)(void);
\r
35 /* This order is necessary */
\r
36 #define WRAM (GameMemBlock)
\r
37 #define sizeofWRAM 8192
\r
39 #define MapperExRAM (GameMemBlock+sizeofWRAM)
\r
40 #define sizeofMapperExRAM 32768
\r
41 /* for the MMC5 code to work properly. It might be fixed later... */
\r
43 #define CHRRAM (GameMemBlock+sizeofWRAM+sizeofMapperExRAM)
\r
44 #define sizeofCHRRAM 8192
\r
46 #define ExtraNTARAM (GameMemBlock+sizeofWRAM+sizeofMapperExRAM+sizeofCHRRAM)
\r
47 #define sizeofExtraNTARAM 2048
\r
49 #define PRGBankList (ExtraNTARAM+sizeofExtraNTARAM)
\r
51 #define mapbyte1 (PRGBankList+4)
\r
52 #define mapbyte2 (mapbyte1+8)
\r
53 #define mapbyte3 (mapbyte2+8)
\r
54 #define mapbyte4 (mapbyte3+8)
\r
55 extern uint16 iNESCHRBankList[8];
\r
56 extern int32 iNESIRQLatch,iNESIRQCount;
\r
57 extern uint8 iNESMirroring;
\r
58 extern uint8 iNESIRQa;
\r
60 #define IRQa iNESIRQa
\r
61 #define Mirroring iNESMirroring
\r
62 #define IRQCount iNESIRQCount
\r
63 #define IRQLatch iNESIRQLatch
\r
64 #define CHRBankList iNESCHRBankList
\r
69 char ID[4]; /*NES^Z*/
\r
77 void FASTAPASS(2) VRAM_BANK1(uint32 A, uint8 V);
\r
78 void FASTAPASS(2) VRAM_BANK4(uint32 A,uint32 V);
\r
80 void FASTAPASS(2) VROM_BANK1(uint32 A,uint32 V);
\r
81 void FASTAPASS(2) VROM_BANK2(uint32 A,uint32 V);
\r
82 void FASTAPASS(2) VROM_BANK4(uint32 A, uint32 V);
\r
83 void FASTAPASS(1) VROM_BANK8(uint32 V);
\r
84 void FASTAPASS(2) ROM_BANK8(uint32 A, uint32 V);
\r
85 void FASTAPASS(2) ROM_BANK16(uint32 A, uint32 V);
\r
86 void FASTAPASS(1) ROM_BANK32(uint32 V);
\r
89 extern uint32 vmask1;
\r
90 extern uint32 vmask2;
\r
91 extern uint32 vmask4;
\r
92 extern uint32 pmask8;
\r
93 extern uint8 pmask16;
\r
94 extern uint8 pmask32;
\r
96 void FASTAPASS(1) onemir(uint8 V);
\r
97 void FASTAPASS(1) MIRROR_SET2(uint8 V);
\r
98 void FASTAPASS(1) MIRROR_SET(uint8 V);
\r
100 void Mapper0_init(void);
\r
101 void Mapper1_init(void);
\r
102 //void Mapper2_init(void);
\r
103 //void Mapper3_init(void);
\r
104 void Mapper6_init(void);
\r
105 //void Mapper7_init(void);
\r
106 void Mapper8_init(void);
\r
107 void Mapper9_init(void);
\r
108 void Mapper10_init(void);
\r
109 //void Mapper11_init(void);
\r
110 void Mapper12_init(void);
\r
111 //void Mapper13_init(void);
\r
112 void Mapper14_init(void);
\r
113 void Mapper15_init(void);
\r
114 void Mapper16_init(void);
\r
115 void Mapper17_init(void);
\r
116 void Mapper18_init(void);
\r
117 void Mapper19_init(void);
\r
118 void Mapper20_init(void);
\r
119 void Mapper21_init(void);
\r
120 void Mapper22_init(void);
\r
121 void Mapper23_init(void);
\r
122 void Mapper24_init(void);
\r
123 void Mapper25_init(void);
\r
124 void Mapper26_init(void);
\r
125 void Mapper27_init(void);
\r
126 void Mapper28_init(void);
\r
127 void Mapper29_init(void);
\r
128 void Mapper30_init(void);
\r
129 void Mapper31_init(void);
\r
130 void Mapper32_init(void);
\r
131 void Mapper33_init(void);
\r
132 void Mapper34_init(void);
\r
133 void Mapper35_init(void);
\r
134 void Mapper36_init(void);
\r
135 //void Mapper37_init(void);
\r
136 void Mapper38_init(void);
\r
137 void Mapper39_init(void);
\r
138 void Mapper40_init(void);
\r
139 void Mapper41_init(void);
\r
140 void Mapper42_init(void);
\r
141 void Mapper43_init(void);
\r
142 void Mapper44_init(void);
\r
143 void Mapper45_init(void);
\r
144 void Mapper46_init(void);
\r
145 void Mapper47_init(void);
\r
146 void Mapper48_init(void);
\r
147 void Mapper49_init(void);
\r
148 void Mapper50_init(void);
\r
149 void Mapper51_init(void);
\r
150 void Mapper53_init(void);
\r
151 void Mapper54_init(void);
\r
152 void Mapper55_init(void);
\r
153 void Mapper56_init(void);
\r
154 void Mapper59_init(void);
\r
155 void Mapper60_init(void);
\r
156 void Mapper61_init(void);
\r
157 void Mapper62_init(void);
\r
158 void Mapper63_init(void);
\r
159 void Mapper64_init(void);
\r
160 void Mapper65_init(void);
\r
161 //void Mapper66_init(void);
\r
162 void Mapper67_init(void);
\r
163 void Mapper68_init(void);
\r
164 void Mapper69_init(void);
\r
165 //void Mapper70_init(void);
\r
166 void Mapper71_init(void);
\r
167 void Mapper72_init(void);
\r
168 void Mapper73_init(void);
\r
169 void Mapper74_init(void);
\r
170 void Mapper75_init(void);
\r
171 void Mapper76_init(void);
\r
172 void Mapper77_init(void);
\r
173 //void Mapper78_init(void);
\r
174 void Mapper79_init(void);
\r
175 void Mapper80_init(void);
\r
176 void Mapper81_init(void);
\r
177 void Mapper82_init(void);
\r
178 void Mapper83_init(void);
\r
179 void Mapper84_init(void);
\r
180 void Mapper85_init(void);
\r
181 void Mapper86_init(void);
\r
182 //void Mapper87_init(void);
\r
183 void Mapper88_init(void);
\r
184 void Mapper89_init(void);
\r
185 void Mapper91_init(void);
\r
186 void Mapper92_init(void);
\r
187 //void Mapper93_init(void);
\r
188 //void Mapper94_init(void);
\r
189 void Mapper96_init(void);
\r
190 void Mapper97_init(void);
\r
191 void Mapper98_init(void);
\r
192 void Mapper99_init(void);
\r
193 void Mapper100_init(void);
\r
194 void Mapper101_init(void);
\r
195 void Mapper103_init(void);
\r
196 void Mapper104_init(void);
\r
197 void Mapper106_init(void);
\r
198 //void Mapper107_init(void);
\r
199 void Mapper108_init(void);
\r
200 void Mapper109_init(void);
\r
201 void Mapper110_init(void);
\r
202 void Mapper111_init(void);
\r
203 void Mapper113_init(void);
\r
204 void Mapper115_init(void);
\r
205 void Mapper116_init(void);
\r
206 //void Mapper117_init(void);
\r
207 void Mapper120_init(void);
\r
208 void Mapper121_init(void);
\r
209 void Mapper122_init(void);
\r
210 void Mapper123_init(void);
\r
211 void Mapper124_init(void);
\r
212 void Mapper126_init(void);
\r
213 void Mapper127_init(void);
\r
214 void Mapper128_init(void);
\r
215 void Mapper129_init(void);
\r
216 void Mapper130_init(void);
\r
217 void Mapper131_init(void);
\r
218 void Mapper132_init(void);
\r
219 void Mapper134_init(void);
\r
220 void Mapper135_init(void);
\r
221 void Mapper136_init(void);
\r
222 void Mapper137_init(void);
\r
223 void Mapper139_init(void);
\r
224 //void Mapper140_init(void);
\r
225 void Mapper141_init(void);
\r
226 void Mapper142_init(void);
\r
227 void Mapper143_init(void);
\r
228 //void Mapper144_init(void);
\r
229 void Mapper150_init(void);
\r
230 void Mapper151_init(void);
\r
231 //void Mapper152_init(void);
\r
232 void Mapper153_init(void);
\r
233 void Mapper154_init(void);
\r
234 void Mapper156_init(void);
\r
235 void Mapper157_init(void);
\r
236 void Mapper158_init(void);
\r
237 void Mapper159_init(void);
\r
238 void Mapper160_init(void);
\r
239 void Mapper161_init(void);
\r
240 void Mapper162_init(void);
\r
241 void Mapper166_init(void);
\r
242 void Mapper167_init(void);
\r
243 void Mapper168_init(void);
\r
244 void Mapper169_init(void);
\r
245 void Mapper170_init(void);
\r
246 void Mapper171_init(void);
\r
247 void Mapper172_init(void);
\r
248 void Mapper173_init(void);
\r
249 void Mapper174_init(void);
\r
250 void Mapper175_init(void);
\r
251 void Mapper176_init(void);
\r
252 void Mapper177_init(void);
\r
253 void Mapper178_init(void);
\r
254 void Mapper179_init(void);
\r
255 void Mapper180_init(void);
\r
256 //void Mapper181_init(void);
\r
257 void Mapper184_init(void);
\r
258 //void Mapper185_init(void);
\r
259 //void Mapper189_init(void);
\r
260 //void Mapper192_init(void);
\r
261 void Mapper193_init(void);
\r
262 //void Mapper194_init(void);
\r
263 void Mapper195_init(void);
\r
264 void Mapper196_init(void);
\r
265 void Mapper197_init(void);
\r
266 //void Mapper198_init(void);
\r
267 void Mapper199_init(void);
\r
268 void Mapper200_init(void);
\r
269 void Mapper201_init(void);
\r
270 void Mapper202_init(void);
\r
271 void Mapper203_init(void);
\r
272 void Mapper204_init(void);
\r
273 void Mapper207_init(void);
\r
274 //void Mapper211_init(void);
\r
275 void Mapper212_init(void);
\r
276 void Mapper213_init(void);
\r
277 void Mapper214_init(void);
\r
278 //void Mapper218_init(void);
\r
279 void Mapper219_init(void);
\r
280 //void Mapper220_init(void);
\r
281 void Mapper221_init(void);
\r
282 //void Mapper222_init(void);
\r
283 void Mapper223_init(void);
\r
284 void Mapper224_init(void);
\r
285 void Mapper225_init(void);
\r
286 void Mapper226_init(void);
\r
287 void Mapper227_init(void);
\r
288 void Mapper228_init(void);
\r
289 void Mapper229_init(void);
\r
290 void Mapper230_init(void);
\r
291 void Mapper231_init(void);
\r
292 void Mapper232_init(void);
\r
293 void Mapper233_init(void);
\r
294 void Mapper234_init(void);
\r
295 //void Mapper235_init(void);
\r
296 void Mapper236_init(void);
\r
297 void Mapper237_init(void);
\r
298 void Mapper238_init(void);
\r
299 void Mapper239_init(void);
\r
300 void Mapper240_init(void);
\r
301 void Mapper241_init(void);
\r
302 void Mapper242_init(void);
\r
303 void Mapper244_init(void);
\r
304 void Mapper245_init(void);
\r
305 void Mapper246_init(void);
\r
306 void Mapper247_init(void);
\r
307 void Mapper249_init(void);
\r
308 void Mapper251_init(void);
\r
309 void Mapper252_init(void);
\r
310 void Mapper253_init(void);
\r
311 void Mapper255_init(void);
\r
313 void NSFVRC6_Init(void);
\r
314 void NSFMMC5_Init(void);
\r
315 void NSFAY_Init(void);
\r
316 void NSFN106_Init(void);
\r
317 void NSFVRC7_Init(void);
\r
318 void Mapper19_ESI(void);
\r
320 void Mapper1_Init(CartInfo *);
\r
321 void Mapper4_Init(CartInfo *);
\r
322 void Mapper5_Init(CartInfo *);
\r
323 void Mapper11_Init(CartInfo *);
\r
324 void Mapper12_Init(CartInfo *);
\r
325 void Mapper19_Init(CartInfo *);
\r
326 void Mapper37_Init(CartInfo *);
\r
327 void Mapper44_Init(CartInfo *);
\r
328 void Mapper45_Init(CartInfo *);
\r
329 void Mapper47_Init(CartInfo *);
\r
330 void Mapper49_Init(CartInfo *);
\r
331 void Mapper52_Init(CartInfo *);
\r
332 void Mapper57_Init(CartInfo *);
\r
333 void Mapper58_Init(CartInfo *);
\r
334 void Mapper70_Init(CartInfo *);
\r
335 void Mapper74_Init(CartInfo *);
\r
336 void Mapper78_Init(CartInfo *);
\r
337 void Mapper87_Init(CartInfo *);
\r
338 void Mapper88_Init(CartInfo *);
\r
339 void Mapper90_Init(CartInfo *);
\r
340 void Mapper93_Init(CartInfo *);
\r
341 void Mapper94_Init(CartInfo *);
\r
342 void Mapper95_Init(CartInfo *);
\r
343 void Mapper105_Init(CartInfo *);
\r
344 void Mapper107_Init(CartInfo *);
\r
345 void Mapper112_Init(CartInfo *);
\r
346 void Mapper114_Init(CartInfo *);
\r
347 void Mapper115_Init(CartInfo *);
\r
348 void Mapper116_Init(CartInfo *);
\r
349 void Mapper117_Init(CartInfo *);
\r
350 void Mapper118_Init(CartInfo *);
\r
351 void Mapper119_Init(CartInfo *);
\r
352 void Mapper125_Init(CartInfo *);
\r
353 void Mapper140_Init(CartInfo *);
\r
354 void Mapper144_Init(CartInfo *);
\r
355 void Mapper152_Init(CartInfo *);
\r
356 void Mapper154_Init(CartInfo *);
\r
357 void Mapper155_Init(CartInfo *);
\r
358 void Mapper163_Init(CartInfo *);
\r
359 void Mapper164_Init(CartInfo *);
\r
360 void Mapper165_Init(CartInfo *);
\r
361 void Mapper181_Init(CartInfo *);
\r
362 void Mapper182_Init(CartInfo *);
\r
363 void Mapper183_Init(CartInfo *);
\r
364 void Mapper185_Init(CartInfo *);
\r
365 void Mapper186_Init(CartInfo *);
\r
366 void Mapper187_Init(CartInfo *);
\r
367 void Mapper188_Init(CartInfo *);
\r
368 void Mapper189_Init(CartInfo *);
\r
369 void Mapper191_Init(CartInfo *);
\r
370 void Mapper192_Init(CartInfo *);
\r
371 void Mapper194_Init(CartInfo *);
\r
372 void Mapper198_Init(CartInfo *);
\r
373 void Mapper199_Init(CartInfo *);
\r
374 void Mapper205_Init(CartInfo *);
\r
375 void Mapper208_Init(CartInfo *);
\r
376 void Mapper209_Init(CartInfo *);
\r
377 void Mapper210_Init(CartInfo *);
\r
378 void Mapper211_Init(CartInfo *);
\r
379 void Mapper215_Init(CartInfo *);
\r
380 void Mapper216_Init(CartInfo *);
\r
381 void Mapper217_Init(CartInfo *);
\r
382 void Mapper220_Init(CartInfo *);
\r
383 void Mapper222_Init(CartInfo *);
\r
384 void Mapper235_Init(CartInfo *);
\r
385 void Mapper236_Init(CartInfo *);
\r
386 void Mapper237_Init(CartInfo *);
\r
387 void Mapper245_Init(CartInfo *);
\r
388 void Mapper249_Init(CartInfo *);
\r
389 void Mapper250_Init(CartInfo *);
\r
390 void Mapper254_Init(CartInfo *);
\r