X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=mappers%2Fsimple.c;fp=mappers%2Fsimple.c;h=0000000000000000000000000000000000000000;hp=8310fbb817a239cacb098fabfc73e09ca0fae1f5;hb=43725da7349c85fa13e828fdbf20cc7ac8d298d6;hpb=386f5371eb984fb9c2860c83e740890a75cd45c1 diff --git a/mappers/simple.c b/mappers/simple.c deleted file mode 100644 index 8310fbb..0000000 --- a/mappers/simple.c +++ /dev/null @@ -1,88 +0,0 @@ -/* FCE Ultra - NES/Famicom Emulator - * - * Copyright notice for this file: - * Copyright (C) 1998 BERO - * Copyright (C) 2002 Xodnizel - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "mapinc.h" - -static uint8 latche; - -static DECLFW(Mapper34_write) -{ - switch(A) - { - case 0x7FFD:ROM_BANK32(V);break; - case 0x7FFE:VROM_BANK4(0x0000,V);break; - case 0x7fff:VROM_BANK4(0x1000,V);break; - } - if(A>=0x8000) - ROM_BANK32(V); -} - -void Mapper34_init(void) -{ - ROM_BANK32(0); - SetWriteHandler(0x7ffd,0xffff,Mapper34_write); -} - -/* I might want to add some code to the mapper 96 PPU hook function - to not change CHR banks if the attribute table is being accessed, - if I make emulation a little more accurate in the future. -*/ - -static uint8 M96LA; -static DECLFW(Mapper96_write) -{ - latche=V; - setprg32(0x8000,V&3); - setchr4r(0x10,0x0000,(latche&4)|M96LA); - setchr4r(0x10,0x1000,(latche&4)|3); -} - -static void M96Hook(uint32 A) -{ - if((A&0x3000)!=0x2000) return; - //if((A&0x3ff)>=0x3c0) return; - M96LA=(A>>8)&3; - setchr4r(0x10,0x0000,(latche&4)|M96LA); -} - -static void M96Sync(int v) -{ - setprg32(0x8000,latche&3); - setchr4r(0x10,0x0000,(latche&4)|M96LA); - setchr4r(0x10,0x1000,(latche&4)|3); -} - -void Mapper96_init(void) -{ - SetWriteHandler(0x8000,0xffff,Mapper96_write); - PPU_hook=M96Hook; - AddExState(&latche, 1, 0, "LATC"); - AddExState(&M96LA, 1, 0, "LAVA"); - SetupCartCHRMapping(0x10, MapperExRAM, 32768, 1); - latche=M96LA=0; - M96Sync(0); - setmirror(MI_0); - GameStateRestore=M96Sync; -} - -// DIS23C01 Open Soft, Korea -// Metal Force (K) -// Buzz and Waldog (K)