[ES-1064] Qi Long Zhu (C) should be mostly playable now, still some graphic glitches though
This commit is contained in:
parent
15c980ff10
commit
e63fb66b40
|
@ -8,12 +8,16 @@ static int32 irq_enable, irq_counter, irq_latch, irq_clock;
|
|||
|
||||
static void Mapper253_IRQHook(int cycles)
|
||||
{
|
||||
//basically, this happens at every frame
|
||||
//0x72 is 114 cycles, so like one scanline
|
||||
//happens for 0xff scanlines so 256 scanlines (frame)
|
||||
if( irq_enable & 0x02 )
|
||||
{
|
||||
if( (irq_clock+=cycles) >= 0x72 )
|
||||
{
|
||||
irq_clock -= 0x72;
|
||||
if( irq_counter == 0xFF )
|
||||
|
||||
if( irq_counter == 0xFF)
|
||||
{
|
||||
irq_counter = irq_latch;
|
||||
irq_enable = (irq_enable & 0x01) * 3;
|
||||
|
@ -40,22 +44,20 @@ static void SetBank_PPUSUB(int bank, int page)
|
|||
}
|
||||
if ((page == 4) || (page == 5))
|
||||
{
|
||||
printf("Page in 4 5: %d\n", page);
|
||||
if(VRAM_switch == 0)
|
||||
setchr1( bank << 10, page ); //CHR-ROM
|
||||
else
|
||||
setchr1( bank << 10, page ); //CHR-RAM
|
||||
// [ES-1064] Qi Long Zhu (C).NES game uses CHR-RAM for these pages
|
||||
//and doesn't seem to set VRAM switch so use
|
||||
//CHR-RAM as default for now
|
||||
//if (VRAM_switch == 0)
|
||||
// setchr1(bank << 10, page); //CHR-ROM
|
||||
else
|
||||
setvramb1(&CHRRAM[page << 10], page << 10, 0); //CHR-RAM
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Page: %d\n", page);
|
||||
setchr1(bank << 10, page);
|
||||
}
|
||||
}
|
||||
|
||||
static DECLFW(Mapper253_Write)
|
||||
{
|
||||
printf("Address: 0x%X V: 0x%X\n", A, V);
|
||||
if (A == 0x8010) //8kb select at 0x8000
|
||||
{
|
||||
setprg8(0x8000, V);
|
||||
|
@ -169,9 +171,6 @@ static DECLFW(Mapper253_Write)
|
|||
}
|
||||
X6502_IRQEnd(FCEU_IQEXT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
//printf("Not handled 0x%X 0x%X", A, V);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue