Compare commits

...

3 commits

2 changed files with 7 additions and 2 deletions

View file

@ -913,13 +913,18 @@ template<class T> void NesPpu<T>::ProcessScanlineImpl()
//copy vertical scrolling value from t
_videoRamAddr = (_videoRamAddr & ~0x7BE0) | (_tmpVideoRamAddr & 0x7BE0);
}
// Load the extra sprites before tile loading starts (which matters for MMC5)
// The CHR banks are switched back to the bg tileset in LoadTileInfo on cycle 321
// and the extra sprites will potentially read from the wrong banks
if(_cycle == 320) {
LoadExtraSprites();
}
}
} else if(_cycle >= 321 && _cycle <= 336) {
LoadTileInfo();
if(_cycle == 321) {
if(IsRenderingEnabled()) {
LoadExtraSprites();
_oamCopybuffer = _secondarySpriteRam[0];
}
} else if(_prevRenderingEnabled && (_cycle == 328 || _cycle == 336)) {

View file

@ -909,7 +909,7 @@ void SmsVdp::DebugSendFrame()
memset(_currentOutputBuffer + offset, 0, pixelsToClear * sizeof(uint16_t));
}
uint32_t height = _console->GetModel() == SmsModel::Sms ? _state.VisibleScanlineCount : 144;
uint32_t height = _console->GetModel() == SmsModel::Sms ? 240 : 144;
RenderedFrame frame(_currentOutputBuffer, width, height, 1.0, _state.FrameCount);
_emu->GetVideoDecoder()->UpdateFrame(frame, false, false);
}