From 3ecea80ecba084b91bd187ae717b68765eff75c2 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Sun, 10 Nov 2019 10:01:13 +0900 Subject: [PATCH] v112.10 Fix accuracy PPU mosaic rendering when size!=0 && enable==0 --- bsnes/sfc/ppu/mode7.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsnes/sfc/ppu/mode7.cpp b/bsnes/sfc/ppu/mode7.cpp index a23592ba..09dd63f1 100644 --- a/bsnes/sfc/ppu/mode7.cpp +++ b/bsnes/sfc/ppu/mode7.cpp @@ -21,9 +21,11 @@ auto PPU::Background::runMode7() -> void { int voffset = (int13)latch.voffset; uint x = mosaic.hoffset; - uint y = ppu.bg1.mosaic.voffset; //BG2 vertical mosaic uses BG1 mosaic size + uint y = mosaic.enable ? ppu.bg1.mosaic.voffset : ppu.vcounter(); //BG2 vertical mosaic uses BG1 mosaic size - if(--mosaic.hcounter == 0) { + if(!mosaic.enable) { + mosaic.hoffset += 1; + } else if(--mosaic.hcounter == 0) { mosaic.hcounter = mosaic.size + 1; mosaic.hoffset += mosaic.size + 1; }