Ignore error 3 "INVALID WRITE at FF7F"

This commit is contained in:
Vincent Mistler
2022-12-11 10:14:07 +01:00
parent daef90e7d2
commit 9fe2ca6121
+4 -4
View File
@@ -760,7 +760,7 @@ uint8_t __gb_read(struct gb_s *gb, const uint16_t addr)
/* Return address that caused read error. */ /* Return address that caused read error. */
(gb->gb_error)(gb, GB_INVALID_READ, addr); (gb->gb_error)(gb, GB_INVALID_READ, addr);
PGB_UNREACHABLE(); // PGB_UNREACHABLE();
} }
/** /**
@@ -1067,7 +1067,7 @@ void __gb_write(struct gb_s *gb, const uint_fast16_t addr, const uint8_t val)
/* Return address that caused write error. */ /* Return address that caused write error. */
(gb->gb_error)(gb, GB_INVALID_WRITE, addr); (gb->gb_error)(gb, GB_INVALID_WRITE, addr);
PGB_UNREACHABLE(); // PGB_UNREACHABLE();
} }
uint8_t __gb_execute_cb(struct gb_s *gb) uint8_t __gb_execute_cb(struct gb_s *gb)
@@ -2329,7 +2329,7 @@ void __gb_step_cpu(struct gb_s *gb)
/* This may be intentional, but this is required to stop an infinite /* This may be intentional, but this is required to stop an infinite
* loop. */ * loop. */
(gb->gb_error)(gb, GB_HALT_FOREVER, gb->cpu_reg.pc.reg - 1); (gb->gb_error)(gb, GB_HALT_FOREVER, gb->cpu_reg.pc.reg - 1);
PGB_UNREACHABLE(); // PGB_UNREACHABLE();
} }
if(gb->hram_io[IO_SC] & SERIAL_SC_TX_START) if(gb->hram_io[IO_SC] & SERIAL_SC_TX_START)
@@ -3246,7 +3246,7 @@ void __gb_step_cpu(struct gb_s *gb)
default: default:
/* Return address where invlid opcode that was read. */ /* Return address where invlid opcode that was read. */
(gb->gb_error)(gb, GB_INVALID_OPCODE, gb->cpu_reg.pc.reg - 1); (gb->gb_error)(gb, GB_INVALID_OPCODE, gb->cpu_reg.pc.reg - 1);
PGB_UNREACHABLE(); // PGB_UNREACHABLE();
} }
do do