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
30 extern uint32 VROM_size;
\r
31 extern uint32 ROM_size;
\r
33 extern void (*MapStateRestore)(int version);
\r
34 extern void (*MapClose)(void);
\r
35 extern void (*MapperReset)(void);
\r
37 /* This order is necessary */
\r
38 #define WRAM (GameMemBlock)
\r
39 #define sizeofWRAM 8192
\r
41 #define MapperExRAM (GameMemBlock+sizeofWRAM)
\r
42 #define sizeofMapperExRAM 32768
\r
43 /* for the MMC5 code to work properly. It might be fixed later... */
\r
45 #define CHRRAM (GameMemBlock+sizeofWRAM+sizeofMapperExRAM)
\r
46 #define sizeofCHRRAM 8192
\r
48 #define ExtraNTARAM (GameMemBlock+sizeofWRAM+sizeofMapperExRAM+sizeofCHRRAM)
\r
49 #define sizeofExtraNTARAM 2048
\r
51 #define PRGBankList (ExtraNTARAM+sizeofExtraNTARAM)
\r
53 #define mapbyte1 (PRGBankList+4)
\r
54 #define mapbyte2 (mapbyte1+8)
\r
55 #define mapbyte3 (mapbyte2+8)
\r
56 #define mapbyte4 (mapbyte3+8)
\r
57 extern uint16 iNESCHRBankList[8];
\r
58 extern int32 iNESIRQLatch,iNESIRQCount;
\r
59 extern uint8 iNESMirroring;
\r
60 extern uint8 iNESIRQa;
\r
62 #define IRQa iNESIRQa
\r
63 #define Mirroring iNESMirroring
\r
64 #define IRQCount iNESIRQCount
\r
65 #define IRQLatch iNESIRQLatch
\r
66 #define CHRBankList iNESCHRBankList
\r
71 char ID[4]; /*NES^Z*/
\r
79 void FASTAPASS(2) VRAM_BANK1(uint32 A, uint8 V);
\r
80 void FASTAPASS(2) VRAM_BANK4(uint32 A,uint32 V);
\r
82 void FASTAPASS(2) VROM_BANK1(uint32 A,uint32 V);
\r
83 void FASTAPASS(2) VROM_BANK2(uint32 A,uint32 V);
\r
84 void FASTAPASS(2) VROM_BANK4(uint32 A, uint32 V);
\r
85 void FASTAPASS(1) VROM_BANK8(uint32 V);
\r
86 void FASTAPASS(2) ROM_BANK8(uint32 A, uint32 V);
\r
87 void FASTAPASS(2) ROM_BANK16(uint32 A, uint32 V);
\r
88 void FASTAPASS(1) ROM_BANK32(uint32 V);
\r
91 extern uint32 vmask1;
\r
92 extern uint32 vmask2;
\r
93 extern uint32 vmask4;
\r
94 extern uint32 pmask8;
\r
95 extern uint8 pmask16;
\r
96 extern uint8 pmask32;
\r
98 void FASTAPASS(1) onemir(uint8 V);
\r
99 void FASTAPASS(1) MIRROR_SET2(uint8 V);
\r
100 void FASTAPASS(1) MIRROR_SET(uint8 V);
\r
102 void Mapper0_init(void);
\r
103 void Mapper1_init(void);
\r
104 //void Mapper2_init(void);
\r
105 //void Mapper3_init(void);
\r
106 void Mapper6_init(void);
\r
107 void Mapper7_init(void);
\r
108 void Mapper8_init(void);
\r
109 void Mapper9_init(void);
\r
110 void Mapper10_init(void);
\r
111 void Mapper11_init(void);
\r
112 void Mapper12_init(void);
\r
113 //void Mapper13_init(void);
\r
114 void Mapper14_init(void);
\r
115 void Mapper15_init(void);
\r
116 void Mapper16_init(void);
\r
117 void Mapper17_init(void);
\r
118 void Mapper18_init(void);
\r
119 void Mapper19_init(void);
\r
120 void Mapper20_init(void);
\r
121 void Mapper21_init(void);
\r
122 void Mapper22_init(void);
\r
123 void Mapper23_init(void);
\r
124 void Mapper24_init(void);
\r
125 void Mapper25_init(void);
\r
126 void Mapper26_init(void);
\r
127 void Mapper27_init(void);
\r
128 void Mapper28_init(void);
\r
129 void Mapper29_init(void);
\r
130 void Mapper30_init(void);
\r
131 void Mapper31_init(void);
\r
132 void Mapper32_init(void);
\r
133 void Mapper33_init(void);
\r
134 void Mapper34_init(void);
\r
135 void Mapper35_init(void);
\r
136 void Mapper36_init(void);
\r
137 void Mapper37_init(void);
\r
138 void Mapper38_init(void);
\r
139 void Mapper39_init(void);
\r
140 void Mapper40_init(void);
\r
141 void Mapper41_init(void);
\r
142 void Mapper42_init(void);
\r
143 void Mapper43_init(void);
\r
144 void Mapper44_init(void);
\r
145 void Mapper45_init(void);
\r
146 void Mapper46_init(void);
\r
147 void Mapper47_init(void);
\r
148 void Mapper48_init(void);
\r
149 void Mapper49_init(void);
\r
150 void Mapper50_init(void);
\r
151 void Mapper51_init(void);
\r
152 void Mapper53_init(void);
\r
153 void Mapper54_init(void);
\r
154 void Mapper55_init(void);
\r
155 void Mapper56_init(void);
\r
156 void Mapper57_init(void);
\r
157 void Mapper58_init(void);
\r
158 void Mapper59_init(void);
\r
159 void Mapper60_init(void);
\r
160 void Mapper61_init(void);
\r
161 void Mapper62_init(void);
\r
162 void Mapper63_init(void);
\r
163 void Mapper64_init(void);
\r
164 void Mapper65_init(void);
\r
165 void Mapper66_init(void);
\r
166 void Mapper67_init(void);
\r
167 void Mapper68_init(void);
\r
168 void Mapper69_init(void);
\r
169 void Mapper70_init(void);
\r
170 void Mapper71_init(void);
\r
171 void Mapper72_init(void);
\r
172 void Mapper73_init(void);
\r
173 void Mapper74_init(void);
\r
174 void Mapper75_init(void);
\r
175 void Mapper76_init(void);
\r
176 void Mapper77_init(void);
\r
177 void Mapper78_init(void);
\r
178 void Mapper79_init(void);
\r
179 void Mapper80_init(void);
\r
180 void Mapper81_init(void);
\r
181 void Mapper82_init(void);
\r
182 void Mapper83_init(void);
\r
183 void Mapper84_init(void);
\r
184 void Mapper85_init(void);
\r
185 void Mapper86_init(void);
\r
186 void Mapper87_init(void);
\r
187 void Mapper88_init(void);
\r
188 void Mapper89_init(void);
\r
189 void Mapper91_init(void);
\r
190 void Mapper92_init(void);
\r
191 void Mapper93_init(void);
\r
192 void Mapper94_init(void);
\r
193 void Mapper96_init(void);
\r
194 void Mapper97_init(void);
\r
195 void Mapper98_init(void);
\r
196 void Mapper99_init(void);
\r
197 void Mapper100_init(void);
\r
198 void Mapper101_init(void);
\r
199 void Mapper102_init(void);
\r
200 void Mapper103_init(void);
\r
201 void Mapper104_init(void);
\r
202 void Mapper106_init(void);
\r
203 void Mapper107_init(void);
\r
204 void Mapper108_init(void);
\r
205 void Mapper109_init(void);
\r
206 void Mapper110_init(void);
\r
207 void Mapper111_init(void);
\r
208 //void Mapper112_init(void);
\r
209 void Mapper113_init(void);
\r
210 //void Mapper114_init(void);
\r
211 void Mapper115_init(void);
\r
212 void Mapper116_init(void);
\r
213 void Mapper117_init(void);
\r
214 void Mapper120_init(void);
\r
215 void Mapper121_init(void);
\r
216 void Mapper122_init(void);
\r
217 void Mapper123_init(void);
\r
218 void Mapper124_init(void);
\r
219 void Mapper126_init(void);
\r
220 void Mapper127_init(void);
\r
221 void Mapper128_init(void);
\r
222 void Mapper129_init(void);
\r
223 void Mapper130_init(void);
\r
224 void Mapper131_init(void);
\r
225 void Mapper132_init(void);
\r
226 void Mapper134_init(void);
\r
227 void Mapper135_init(void);
\r
228 void Mapper136_init(void);
\r
229 void Mapper137_init(void);
\r
230 //void Mapper138_init(void);
\r
231 void Mapper139_init(void);
\r
232 void Mapper140_init(void);
\r
233 void Mapper141_init(void);
\r
234 void Mapper142_init(void);
\r
235 void Mapper143_init(void);
\r
236 void Mapper144_init(void);
\r
237 //void Mapper145_init(void);
\r
238 //void Mapper146_init(void);
\r
239 //void Mapper147_init(void);
\r
240 //void Mapper149_init(void);
\r
241 void Mapper150_init(void);
\r
242 void Mapper151_init(void);
\r
243 void Mapper152_init(void);
\r
244 void Mapper153_init(void);
\r
245 void Mapper154_init(void);
\r
246 void Mapper156_init(void);
\r
247 void Mapper157_init(void);
\r
248 void Mapper158_init(void);
\r
249 void Mapper159_init(void);
\r
250 void Mapper160_init(void);
\r
251 void Mapper161_init(void);
\r
252 void Mapper162_init(void);
\r
253 void Mapper166_init(void);
\r
254 void Mapper167_init(void);
\r
255 void Mapper168_init(void);
\r
256 void Mapper169_init(void);
\r
257 void Mapper170_init(void);
\r
258 void Mapper171_init(void);
\r
259 void Mapper172_init(void);
\r
260 void Mapper173_init(void);
\r
261 void Mapper174_init(void);
\r
262 void Mapper175_init(void);
\r
263 void Mapper176_init(void);
\r
264 void Mapper177_init(void);
\r
265 void Mapper178_init(void);
\r
266 void Mapper179_init(void);
\r
267 void Mapper180_init(void);
\r
268 void Mapper181_init(void);
\r
269 void Mapper184_init(void);
\r
270 void Mapper185_init(void);
\r
271 void Mapper189_init(void);
\r
272 //void Mapper191_init(void);
\r
273 void Mapper192_init(void);
\r
274 void Mapper193_init(void);
\r
275 void Mapper194_init(void);
\r
276 void Mapper195_init(void);
\r
277 void Mapper196_init(void);
\r
278 void Mapper197_init(void);
\r
279 void Mapper198_init(void);
\r
280 void Mapper199_init(void);
\r
281 void Mapper200_init(void);
\r
282 void Mapper201_init(void);
\r
283 void Mapper202_init(void);
\r
284 void Mapper203_init(void);
\r
285 void Mapper204_init(void);
\r
286 void Mapper207_init(void);
\r
287 void Mapper211_init(void);
\r
288 void Mapper212_init(void);
\r
289 void Mapper213_init(void);
\r
290 void Mapper214_init(void);
\r
291 void Mapper218_init(void);
\r
292 void Mapper219_init(void);
\r
293 void Mapper220_init(void);
\r
294 void Mapper221_init(void);
\r
295 void Mapper222_init(void);
\r
296 void Mapper223_init(void);
\r
297 void Mapper224_init(void);
\r
298 void Mapper225_init(void);
\r
299 void Mapper226_init(void);
\r
300 void Mapper227_init(void);
\r
301 void Mapper228_init(void);
\r
302 void Mapper229_init(void);
\r
303 void Mapper230_init(void);
\r
304 void Mapper231_init(void);
\r
305 void Mapper232_init(void);
\r
306 void Mapper233_init(void);
\r
307 void Mapper234_init(void);
\r
308 void Mapper235_init(void);
\r
309 void Mapper236_init(void);
\r
310 void Mapper237_init(void);
\r
311 void Mapper238_init(void);
\r
312 void Mapper239_init(void);
\r
313 void Mapper240_init(void);
\r
314 void Mapper241_init(void);
\r
315 void Mapper242_init(void);
\r
316 void Mapper244_init(void);
\r
317 void Mapper245_init(void);
\r
318 void Mapper246_init(void);
\r
319 void Mapper247_init(void);
\r
320 void Mapper249_init(void);
\r
321 void Mapper251_init(void);
\r
322 void Mapper252_init(void);
\r
323 void Mapper253_init(void);
\r
324 void Mapper255_init(void);
\r
326 void NSFVRC6_Init(void);
\r
327 void NSFMMC5_Init(void);
\r
328 void NSFAY_Init(void);
\r
329 void NSFN106_Init(void);
\r
330 void NSFVRC7_Init(void);
\r
331 void Mapper19_ESI(void);
\r
333 void Mapper1_Init(CartInfo *);
\r
334 void Mapper4_Init(CartInfo *);
\r
335 void Mapper5_Init(CartInfo *);
\r
336 void Mapper12_Init(CartInfo *);
\r
337 void Mapper19_Init(CartInfo *);
\r
338 void Mapper44_Init(CartInfo *);
\r
339 void Mapper45_Init(CartInfo *);
\r
340 void Mapper47_Init(CartInfo *);
\r
341 void Mapper49_Init(CartInfo *);
\r
342 void Mapper52_Init(CartInfo *);
\r
343 void Mapper74_Init(CartInfo *);
\r
344 void Mapper90_Init(CartInfo *);
\r
345 void Mapper95_Init(CartInfo *);
\r
346 void Mapper105_Init(CartInfo *);
\r
347 void Mapper112_Init(CartInfo *);
\r
348 void Mapper114_Init(CartInfo *);
\r
349 void Mapper115_Init(CartInfo *);
\r
350 void Mapper116_Init(CartInfo *);
\r
351 void Mapper118_Init(CartInfo *);
\r
352 void Mapper119_Init(CartInfo *);
\r
353 void Mapper125_Init(CartInfo *);
\r
354 void Mapper155_Init(CartInfo *);
\r
355 void Mapper163_Init(CartInfo *);
\r
356 void Mapper164_Init(CartInfo *);
\r
357 void Mapper165_Init(CartInfo *);
\r
358 void Mapper182_Init(CartInfo *);
\r
359 void Mapper183_Init(CartInfo *);
\r
360 void Mapper186_Init(CartInfo *);
\r
361 void Mapper187_Init(CartInfo *);
\r
362 void Mapper188_Init(CartInfo *);
\r
363 void Mapper191_Init(CartInfo *);
\r
364 void Mapper205_Init(CartInfo *);
\r
365 void Mapper208_Init(CartInfo *);
\r
366 void Mapper209_Init(CartInfo *);
\r
367 void Mapper210_Init(CartInfo *);
\r
368 void Mapper215_Init(CartInfo *);
\r
369 void Mapper216_Init(CartInfo *);
\r
370 void Mapper217_Init(CartInfo *);
\r
371 void Mapper245_Init(CartInfo *);
\r
372 void Mapper249_Init(CartInfo *);
\r
373 void Mapper250_Init(CartInfo *);
\r
374 void Mapper254_Init(CartInfo *);
\r