X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=mappers%2F18.c;h=030c055f4bcc27af4c5e51b9cf14f981156497d1;hp=13b3ab9028427bb3c7f587804b88a3335bd11be2;hb=386f5371eb984fb9c2860c83e740890a75cd45c1;hpb=c0bf6f9f02a2b6afb961a7e9195e2168d7e9cecf diff --git a/mappers/18.c b/mappers/18.c index 13b3ab9..030c055 100644 --- a/mappers/18.c +++ b/mappers/18.c @@ -1,7 +1,7 @@ /* FCE Ultra - NES/Famicom Emulator * * Copyright notice for this file: - * Copyright (C) 2002 Ben Parnell + * 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 @@ -15,7 +15,7 @@ * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "mapinc.h" @@ -23,7 +23,7 @@ #define K4buf mapbyte2 #define K4buf2 mapbyte3 -void FP_FASTAPASS(1) JalecoIRQHook(int a) +void JalecoIRQHook(int a) { if(IRQa && IRQCount) { @@ -39,38 +39,37 @@ void FP_FASTAPASS(1) JalecoIRQHook(int a) DECLFW(Mapper18_write) { - A&=0xF003; - if(A>=0x8000 && A<=0x9001) - { + A&=0xF003; + if(A>=0x8000 && A<=0x9001) + { int x=((A>>1)&1)|((A-0x8000)>>11); K4buf2[x]&=(0xF0)>>((A&1)<<2); K4buf2[x]|=(V&0xF)<<((A&1)<<2); ROM_BANK8(0x8000+(x<<13),K4buf2[x]); - X6502_Rebase(); - } - else if(A>=0xa000 && A<=0xd003) - { - int x=((A>>1)&1)|((A-0xA000)>>11); + } + else if(A>=0xa000 && A<=0xd003) + { + int x=((A>>1)&1)|((A-0xA000)>>11); K4buf[x]&=(0xF0)>>((A&1)<<2); K4buf[x]|=(V&0xF)<<((A&1)<<2); VROM_BANK1(x<<10,K4buf[x]); - } + } else switch(A) { - case 0xe000:IRQLatch&=0xFFF0;IRQLatch|=(V&0x0f);break; - case 0xe001:IRQLatch&=0xFF0F;IRQLatch|=(V&0x0f)<<4;break; - case 0xe002:IRQLatch&=0xF0FF;IRQLatch|=(V&0x0f)<<8;break; - case 0xe003:IRQLatch&=0x0FFF;IRQLatch|=(V&0x0f)<<12;break; - case 0xf000:IRQCount=IRQLatch; - break; - case 0xf001:IRQa=V&1; - X6502_IRQEnd(FCEU_IQEXT); - break; - case 0xf002:MIRROR_SET2(V&1); - if(V&2) onemir(0); - break; + case 0xe000:IRQLatch&=0xFFF0;IRQLatch|=(V&0x0f);break; + case 0xe001:IRQLatch&=0xFF0F;IRQLatch|=(V&0x0f)<<4;break; + case 0xe002:IRQLatch&=0xF0FF;IRQLatch|=(V&0x0f)<<8;break; + case 0xe003:IRQLatch&=0x0FFF;IRQLatch|=(V&0x0f)<<12;break; + case 0xf000:IRQCount=IRQLatch; + break; + case 0xf001:IRQa=V&1; + X6502_IRQEnd(FCEU_IQEXT); + break; + case 0xf002:MIRROR_SET2(V&1); + if(V&2) onemir(0); + break; } }