From 1b6d9bed82671eec2224408a5e097f4972de739e Mon Sep 17 00:00:00 2001 From: Brendan Fletcher Date: Thu, 23 Nov 2023 23:42:53 -0500 Subject: [PATCH] Latch the values of GPIO DIR and OUT ports --- core/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/control.c b/core/control.c index 743884e86..20192b575 100644 --- a/core/control.c +++ b/core/control.c @@ -139,6 +139,7 @@ static void control_write(const uint16_t pio, const uint8_t byte, bool poke) { break; case 0x07: control.readBatteryStatus = (byte & 0x90) ? 1 : 0; + control.ports[index] = byte; break; case 0x09: switch (control.readBatteryStatus) { @@ -163,9 +164,9 @@ static void control_write(const uint16_t pio, const uint8_t byte, bool poke) { control.readBatteryStatus += (control.readBatteryStatus == 3) ? 1 : 0; control.ports[index] = byte; break; - case 0x0B: case 0x0C: control.readBatteryStatus = 0; + control.ports[index] = byte; break; case 0x0D: /* This bit disables vram and makes it garbage */