make use of my new small utility library

This commit is contained in:
2026-03-25 15:50:47 +01:00
parent 0d1aa938e3
commit d9a620bc1f
20 changed files with 194 additions and 506 deletions
+5 -5
View File
@@ -188,7 +188,7 @@ auto PI::BusRead<u16, false>(u32 addr) -> u16 {
if (index > mem.rom.cart.size() - 1) {
panic("Address 0x{:08X} accessed an index {}/0x{:X} outside the bounds of the ROM!", addr, index, index);
}
return Util::ReadAccess<u16>(mem.rom.cart, index);
return ircolib::ReadAccess<u16>(mem.rom.cart, index);
}
default:
panic("Should never end up here! Access to address {:08X} which did not match any PI bus regions!", addr);
@@ -260,7 +260,7 @@ auto PI::BusRead<u32, false>(u32 addr) -> u32 {
if (index > mem.rom.cart.size() - 3) { // -3 because we're reading an entire word
switch (addr) {
case REGION_CART_ISVIEWER_BUFFER:
return std::byteswap<u32>(Util::ReadAccess<u32>(mem.isviewer, addr - SREGION_CART_ISVIEWER_BUFFER));
return std::byteswap<u32>(ircolib::ReadAccess<u32>(mem.isviewer, addr - SREGION_CART_ISVIEWER_BUFFER));
case CART_ISVIEWER_FLUSH:
panic("Read from ISViewer flush!");
default:
@@ -270,7 +270,7 @@ auto PI::BusRead<u32, false>(u32 addr) -> u32 {
return 0;
}
return Util::ReadAccess<u32>(mem.rom.cart, index);
return ircolib::ReadAccess<u32>(mem.rom.cart, index);
}
default:
panic("Should never end up here! Access to address {:08X} which did not match any PI bus regions!", addr);
@@ -314,7 +314,7 @@ void PI::BusWrite<u32, false>(u32 addr, u32 val) {
case REGION_PI_ROM:
switch (addr) {
case REGION_CART_ISVIEWER_BUFFER:
Util::WriteAccess<u32>(mem.isviewer, addr - SREGION_CART_ISVIEWER_BUFFER, std::byteswap(val));
ircolib::WriteAccess<u32>(mem.isviewer, addr - SREGION_CART_ISVIEWER_BUFFER, std::byteswap(val));
break;
case CART_ISVIEWER_FLUSH:
{
@@ -368,7 +368,7 @@ auto PI::BusRead<u64, false>(u32 addr) -> u64 {
if (index > mem.rom.cart.size() - 7) { // -7 because we're reading an entire dword
panic("Address 0x{:08X} accessed an index {}/0x{:X} outside the bounds of the ROM!", addr, index, index);
}
return Util::ReadAccess<u64>(mem.rom.cart, index);
return ircolib::ReadAccess<u64>(mem.rom.cart, index);
}
default:
panic("Should never end up here! Access to address {:08X} which did not match any PI bus regions!", addr);