From a644a53c4fbfc0d9fa2acdf333a7c8a44603ea4d Mon Sep 17 00:00:00 2001 From: FitzRoyX <57089001+FitzRoyX@users.noreply.github.com> Date: Wed, 29 Jan 2025 02:24:49 -0600 Subject: [PATCH 1/3] Update ppu.cpp --- ares/fc/ppu/ppu.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ares/fc/ppu/ppu.cpp b/ares/fc/ppu/ppu.cpp index dbb5bd6c0a..7a6d6dab29 100644 --- a/ares/fc/ppu/ppu.cpp +++ b/ares/fc/ppu/ppu.cpp @@ -97,11 +97,14 @@ auto PPU::frame() -> void { screen->setViewport(0, 0, 283, displayHeight()); } else { int x = 16; - int y = 8; - int width = 283 - 33; - int height = displayHeight() - 16; - - if(Region::PAL()) height -= 48; + int y = 0; + int width = 283 - 27; + int height = displayHeight() - 2; + + if(Region::PAL()) { + x += 2; + height -= 46; + } screen->setSize(width, height); screen->setViewport(x, y, width, height); From deb3894bf8bbbfdbf6051e4e6bba2b1543ac17c1 Mon Sep 17 00:00:00 2001 From: FitzRoyX <57089001+FitzRoyX@users.noreply.github.com> Date: Wed, 29 Jan 2025 02:39:51 -0600 Subject: [PATCH 2/3] Update render.cpp --- ares/fc/ppu/render.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ares/fc/ppu/render.cpp b/ares/fc/ppu/render.cpp index 277b044b3d..22eb100a96 100644 --- a/ares/fc/ppu/render.cpp +++ b/ares/fc/ppu/render.cpp @@ -25,8 +25,10 @@ auto PPU::renderPixel() -> void { u32 objectPalette = 0; bool objectPriority = 0; - //PAL systems blank the topmost scanline and the first and last 2px of active display - if(Region::PAL()) if(io.ly == 0 || x < 2 || x > 254) return; + //PAL systems technically blank the topmost scanline and a 2px column on each side of active display. + //This does little else but crop good tiledata and mismatch screenshots with ntsc. + //Uncomment the line below to enable. + //if(Region::PAL()) if(io.ly == 0 || x < 2 || x > 253) return; palette |= latch.tiledataLo & mask ? 1 : 0; palette |= latch.tiledataHi & mask ? 2 : 0; From 0abc7ec8156240b0c8a3c419b2eba5808f107bf2 Mon Sep 17 00:00:00 2001 From: FitzRoyX <57089001+FitzRoyX@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:29:25 -0600 Subject: [PATCH 3/3] Update render.cpp --- ares/fc/ppu/render.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ares/fc/ppu/render.cpp b/ares/fc/ppu/render.cpp index 22eb100a96..1afec55251 100644 --- a/ares/fc/ppu/render.cpp +++ b/ares/fc/ppu/render.cpp @@ -26,9 +26,7 @@ auto PPU::renderPixel() -> void { bool objectPriority = 0; //PAL systems technically blank the topmost scanline and a 2px column on each side of active display. - //This does little else but crop good tiledata and mismatch screenshots with ntsc. - //Uncomment the line below to enable. - //if(Region::PAL()) if(io.ly == 0 || x < 2 || x > 253) return; + if(Region::PAL()) if(io.ly == 0 || x < 2 || x > 253) return; palette |= latch.tiledataLo & mask ? 1 : 0; palette |= latch.tiledataHi & mask ? 2 : 0;