aboutsummaryrefslogtreecommitdiff
path: root/src/ppu
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-04-07 23:14:46 +0200
committerlonkaars <loek@pipeframe.xyz>2023-04-07 23:14:46 +0200
commit0daeed25c65412400e7b0b12ee1dc371c4060920 (patch)
treebf37543034f4b37e61269fa370342cc8694e1e39 /src/ppu
parentcc5fda1626ac77a74459bcfe3c422be3c2a5267b (diff)
last-ditch debugging efforts
Diffstat (limited to 'src/ppu')
-rw-r--r--src/ppu/internals.c1
-rw-r--r--src/ppu/stm.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/ppu/internals.c b/src/ppu/internals.c
index 7fd2eb9..5badfc9 100644
--- a/src/ppu/internals.c
+++ b/src/ppu/internals.c
@@ -105,6 +105,7 @@ void hh_ppu_vram_buffer(uint8_t data[4]) {
}
void hh_ppu_vram_flush() {
+ if (g_hh_ppu_vram_buffer_size == 0) return;
hh_ppu_vram_buffer((uint8_t[4]){ 0xff, 0xff, 0xff, 0xff });
hh_ppu_vram_dwrite(g_hh_ppu_vram_buffer_ptr, g_hh_ppu_vram_buffer_size);
g_hh_ppu_vram_buffer_size = 0;
diff --git a/src/ppu/stm.c b/src/ppu/stm.c
index ccf3566..7f60aed 100644
--- a/src/ppu/stm.c
+++ b/src/ppu/stm.c
@@ -8,6 +8,7 @@ void hh_ppu_init() {
hh_ppu_update_aux((hh_s_ppu_loc_aux) { .sysreset = 1 });
hh_ppu_vram_buffer((uint8_t[4]) { 0xff, 0xff, 0xff, 0xff });
hh_ppu_flush();
+ HAL_Delay(10);
}
void hh_ppu_deinit() {}