Skip to content

Commit

Permalink
Latch the values of GPIO DIR and OUT ports
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Nov 24, 2023
1 parent d8fbb9e commit 1b6d9be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 */
Expand Down

0 comments on commit 1b6d9be

Please sign in to comment.