Skip to content

Commit

Permalink
update PSEMU/Bus.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrytree56567 committed Oct 18, 2023
1 parent 9643829 commit 70d9cf1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions PSEMU/Bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70d9cf1

Please sign in to comment.