From 70d9cf10cf4fa7b35382165ef511f040118af7cb Mon Sep 17 00:00:00 2001 From: Ronit Dsilva <124994670+Cherrytree56567@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:12:47 +1100 Subject: [PATCH] update PSEMU/Bus.h --- PSEMU/Bus.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PSEMU/Bus.h b/PSEMU/Bus.h index c03e557..1761172 100644 --- a/PSEMU/Bus.h +++ b/PSEMU/Bus.h @@ -136,6 +136,17 @@ class Bus { throw std::runtime_error("[Bus] ERROR: Unhandled load8 into address " + std::to_string(addr)); } + + uint16_t load16(uint8_t addr) { + uint32_t abs_addr = mask_region(addr); + + if (SPU.contains(abs_addr)) { + std::cout << "[BUS] ERROR: Unhandled read from SPU register " << std::to_string(abs_addr)); + return 0; + } + + throw std::runtime_error("[Bus] ERROR: Unhandled load16 into address " + std::to_string(addr)); + } Bios bios; RAM ram;