Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ares/pce/vdp-performance/background.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ auto VDC::Background::scanline(n16 y) -> void {
}

auto VDC::Background::render(n16 y) -> void {
if(!enable) return (void)memset(&output, 0, sizeof(output));
// The burstMode check fixes a glitch in the intro of City Hunter. It hasn't been tested in other games.
if(!enable || burstMode) return (void)memset(&output, 0, sizeof(output));

for(u32 x = 0; x < vdp.vce.width();) {
n8 tileX = hoffset >> 3 & width - 1;
Expand Down
2 changes: 2 additions & 0 deletions ares/pce/vdp-performance/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ auto VDC::serialize(serializer& s) -> void {
s(background.height);
s(background.hoffset);
s(background.voffset);
s(background.burstMode);
s(background.latch.vramMode);
s(background.latch.characterMode);

s(sprite.enable);
s(sprite.vramMode);
s(sprite.burstMode);
s(sprite.latch.vramMode);
}

Expand Down
3 changes: 2 additions & 1 deletion ares/pce/vdp-performance/sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ auto VDC::Sprite::scanline(n16 y) -> void {
}

auto VDC::Sprite::render(n16 y) -> void {
if(!enable) return (void)memset(&output, 0, sizeof(output));
// The burstMode check fixes a glitch in the intro of City Hunter. It hasn't been tested in other games.
if(!enable || burstMode) return (void)memset(&output, 0, sizeof(output));

y += 64;

Expand Down
1 change: 1 addition & 0 deletions ares/pce/vdp-performance/vdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ auto VDC::vsync() -> void {
}

latch.burstMode = !background.enable && !sprite.enable;
background.burstMode = sprite.burstMode = latch.burstMode;
}

auto VDC::hclock() -> void {
Expand Down
2 changes: 2 additions & 0 deletions ares/pce/vdp-performance/vdc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ struct VDC : VDCBase {
auto render(n16 y) -> void;

n1 enable;
n1 burstMode;
n2 vramMode; //partially emulated
n1 characterMode;
n10 hscroll;
Expand Down Expand Up @@ -207,6 +208,7 @@ struct VDC : VDCBase {
adaptive_array<Object, 16> objects;

n1 enable;
n1 burstMode;
n2 vramMode; //partially emulated

struct Latch {
Expand Down