1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 1998 Bero
5 * Copyright (C) 2002 Ben Parnell
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 void FASTAPASS(2) VRAM_BANK1(uint32 A, uint8 V)
25 PPUCHRRAM|=(1<<(A>>10));
26 CHRBankList[(A)>>10]=V;
27 VPage[(A)>>10]=&CHRRAM[V<<10]-(A);
30 void FASTAPASS(2) VRAM_BANK4(uint32 A, uint32 V)
33 PPUCHRRAM|=(0xF<<(A>>10));
34 CHRBankList[(A)>>10]=(V<<2);
35 CHRBankList[((A)>>10)+1]=(V<<2)+1;
36 CHRBankList[((A)>>10)+2]=(V<<2)+2;
37 CHRBankList[((A)>>10)+3]=(V<<2)+3;
38 VPage[(A)>>10]=&CHRRAM[V<<10]-(A);
41 void FASTAPASS(2) VROM_BANK1(uint32 A,uint32 V)
44 CHRBankList[(A)>>10]=V;
47 void FASTAPASS(2) VROM_BANK2(uint32 A,uint32 V)
50 CHRBankList[(A)>>10]=(V<<1);
51 CHRBankList[((A)>>10)+1]=(V<<1)+1;
54 void FASTAPASS(2) VROM_BANK4(uint32 A, uint32 V)
57 CHRBankList[(A)>>10]=(V<<2);
58 CHRBankList[((A)>>10)+1]=(V<<2)+1;
59 CHRBankList[((A)>>10)+2]=(V<<2)+2;
60 CHRBankList[((A)>>10)+3]=(V<<2)+3;
63 void FASTAPASS(1) VROM_BANK8(uint32 V)
66 CHRBankList[0]=(V<<3);
67 CHRBankList[1]=(V<<3)+1;
68 CHRBankList[2]=(V<<3)+2;
69 CHRBankList[3]=(V<<3)+3;
70 CHRBankList[4]=(V<<3)+4;
71 CHRBankList[5]=(V<<3)+5;
72 CHRBankList[6]=(V<<3)+6;
73 CHRBankList[7]=(V<<3)+7;
76 void FASTAPASS(2) ROM_BANK8(uint32 A, uint32 V)
80 PRGBankList[((A-0x8000)>>13)]=V;
83 void FASTAPASS(2) ROM_BANK16(uint32 A, uint32 V)
88 PRGBankList[((A-0x8000)>>13)]=V<<1;
89 PRGBankList[((A-0x8000)>>13)+1]=(V<<1)+1;
93 void FASTAPASS(2) ROM_BANK32(uint32 V)
97 PRGBankList[1]=(V<<2)+1;
98 PRGBankList[2]=(V<<2)+2;
99 PRGBankList[3]=(V<<2)+3;