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 d63227b commit 95b6572
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PSEMU/Bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Bus {
const Range EXPANSION_1 = Range(0x1f000000, 512 * 1024);
const Range IRQ_CONTROL = Range(0x1f801070, 8);
const Range TIMERS = Range(0x1f801100, 0x30);
const Range DMA = Range(0x1f801080, 0x80);

uint32_t mask_region(uint32_t addr) {
// Index address space in 512MB chunks
Expand All @@ -41,6 +42,9 @@ class Bus {
} else if (IRQ_CONTROL.contains(abs_addr)) {
std::cout << "[BUS] WARNING: IRQ CONTROL NOT IMPLEMENTED. IRQ control read " << std::to_string(IRQ_CONTROL.offset(abs_addr)) << "\n";
return 0;
} else if (DMA.contains(abs_addr)) {
std::cout << "[BUS] WARNING: DMA NOT IMPLEMENTED. DMA read: " << std::to_string(abs_addr);
return 0;
}

if (addr % 4 != 0) {
Expand Down Expand Up @@ -86,6 +90,9 @@ class Bus {
return;
} else if (RAM_.contains(abs_addr)) {
return ram.store16(offset, val);
} else if (DMA.contains(abs_addr)) {
std::cout << "[BUS] WARNING: DMA NOT IMPLEMENTED. DMA write: " << std::to_string(abs_addr) << " " << std::to_string(val);
return;
}

if (addr % 4 != 0) {
Expand Down

0 comments on commit 95b6572

Please sign in to comment.