X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=mappers%2F17.c;h=7fae1a82b695e4d842579020039a2b837a7e09a7;hp=1e764216a270d325186519bef75a1d716d35f638;hb=d97315ac0bca825d2d50a44453bc5652946e2c67;hpb=890e37ba2b8ea1c7593dc05926d7431e3bd00bfb diff --git a/mappers/17.c b/mappers/17.c index 1e76421..7fae1a8 100644 --- a/mappers/17.c +++ b/mappers/17.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 @@ -27,10 +27,9 @@ static void FP_FASTAPASS(1) FFEIRQHook(int a) if(IRQa) { IRQCount+=a; - if(IRQCount>=0x10000) { - TriggerIRQ(); + X6502_IRQBegin(FCEU_IQEXT); IRQa=0; IRQCount=0; } @@ -42,24 +41,20 @@ DECLFW(Mapper17_write) { switch(A){ default: - break; + break; case 0x42FE: onemir((V>>4)&1); break; case 0x42FF: MIRROR_SET((V>>4)&1); - break; - case 0x4501:IRQa=V&1;break; + break; + case 0x4501:IRQa=0;X6502_IRQEnd(FCEU_IQEXT);break; case 0x4502:IRQCount&=0xFF00;IRQCount|=V;break; case 0x4503:IRQCount&=0x00FF;IRQCount|=V<<8;IRQa=1;break; - case 0x4504: ROM_BANK8(0x8000,V); - X6502_Rebase();break; - case 0x4505: ROM_BANK8(0xA000,V); - X6502_Rebase();break; - case 0x4506: ROM_BANK8(0xC000,V); - X6502_Rebase();break; - case 0x4507: ROM_BANK8(0xE000,V); - X6502_Rebase();break; + case 0x4504: ROM_BANK8(0x8000,V);break; + case 0x4505: ROM_BANK8(0xA000,V);break; + case 0x4506: ROM_BANK8(0xC000,V);break; + case 0x4507: ROM_BANK8(0xE000,V);break; case 0x4510: VROM_BANK1(0x0000,V);break; case 0x4511: VROM_BANK1(0x0400,V);break; case 0x4512: VROM_BANK1(0x0800,V);break;