fixed dragon lair (mapper 4 version) in new ppu
This commit is contained in:
parent
5a2750d160
commit
5e4aa9b7ad
14
src/ppu.cpp
14
src/ppu.cpp
|
@ -2137,7 +2137,6 @@ struct BGData {
|
||||||
|
|
||||||
int framectr=0;
|
int framectr=0;
|
||||||
int FCEUX_PPU_Loop(int skip) {
|
int FCEUX_PPU_Loop(int skip) {
|
||||||
|
|
||||||
//262 scanlines
|
//262 scanlines
|
||||||
if (ppudead)
|
if (ppudead)
|
||||||
{
|
{
|
||||||
|
@ -2286,8 +2285,9 @@ int FCEUX_PPU_Loop(int skip) {
|
||||||
//2. is the bg pixel nonzero?
|
//2. is the bg pixel nonzero?
|
||||||
//then, it is spritehit.
|
//then, it is spritehit.
|
||||||
if(oam[6] == 0 && pixel != 0)
|
if(oam[6] == 0 && pixel != 0)
|
||||||
|
{
|
||||||
PPU_status |= 0x40;
|
PPU_status |= 0x40;
|
||||||
|
}
|
||||||
havepixel = true;
|
havepixel = true;
|
||||||
|
|
||||||
//priority handling
|
//priority handling
|
||||||
|
@ -2409,14 +2409,18 @@ int FCEUX_PPU_Loop(int skip) {
|
||||||
else
|
else
|
||||||
runppu(kFetchTime);
|
runppu(kFetchTime);
|
||||||
}
|
}
|
||||||
|
//Dragon's Lair (Europe version mapper 4)
|
||||||
if(((PPU[0]&0x38)!=0x18) && s == 2 && SpriteON ) {
|
//does not set SpriteON in the beginning but it does
|
||||||
|
//set the bg on so if using the conditional SpriteON the MMC3 counter
|
||||||
|
//the counter will never count and no IRQs will be fired so use PPUON
|
||||||
|
if(((PPU[0]&0x38)!=0x18) && s == 2 && PPUON) { //SpriteON ) {
|
||||||
//(The MMC3 scanline counter is based entirely on PPU A12, triggered on rising edges (after the line remains low for a sufficiently long period of time))
|
//(The MMC3 scanline counter is based entirely on PPU A12, triggered on rising edges (after the line remains low for a sufficiently long period of time))
|
||||||
//http://nesdevwiki.org/wiki/index.php/Nintendo_MMC3
|
//http://nesdevwiki.org/wiki/index.php/Nintendo_MMC3
|
||||||
//test cases for timing: SMB3, Crystalis
|
//test cases for timing: SMB3, Crystalis
|
||||||
//crystalis requires deferring this til somewhere in sprite [1,3]
|
//crystalis requires deferring this til somewhere in sprite [1,3]
|
||||||
//kirby requires deferring this til somewhere in sprite [2,5..
|
//kirby requires deferring this til somewhere in sprite [2,5..
|
||||||
if(PPUON && GameHBIRQHook) {
|
//if (PPUON && GameHBIRQHook) {
|
||||||
|
if(GameHBIRQHook) {
|
||||||
GameHBIRQHook();
|
GameHBIRQHook();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue