Fixed mapper 16, Dragon Ball Z 3 can now be played again

This commit is contained in:
qeed 2009-08-08 19:47:12 +00:00
parent f4486cc6ad
commit ce317b00a1
1 changed files with 14 additions and 3 deletions

View File

@ -25,7 +25,8 @@
static uint8 reg[16], is153;
static uint8 IRQa;
static uint16 IRQCount, IRQLatch;
static uint16 IRQLatch;
static int16 IRQCount;
static uint8 *WRAM=NULL;
static uint32 WRAMSIZE;
@ -95,9 +96,19 @@ static DECLFW(BandaiWrite)
else
switch(A)
{
/* disch's docs say that the writing to 0x0B and 0x0C will change
* the counter value directly, not reload value
* but keep the old code here in case something goes wrong */
/*
case 0x0A: X6502_IRQEnd(FCEU_IQEXT); IRQa=V&1; IRQCount=IRQLatch; break;
case 0x0B: IRQLatch&=0xFF00; IRQLatch|=V; break;
case 0x0C: IRQLatch&=0xFF; IRQLatch|=V<<8; break;
case 0x0B: IRQLatch&=0xFF00; IRQLatch|=V; break;
case 0x0C: IRQLatch&=0xFF; IRQLatch|=V<<8; break;
*/
case 0x0A: X6502_IRQEnd(FCEU_IQEXT); IRQa=V&1; break;
case 0x0B: IRQCount &= 0xFF00; IRQCount |= V; break;
case 0x0C: IRQCount &= 0xFF; IRQCount |= (V << 8); break;
case 0x0D: break;// Serial EEPROM control port
}
}