i need to start caring about carry >.<

This commit is contained in:
2026-05-19 12:26:51 +02:00
parent 8824b6b75a
commit f9ab690ccd
17 changed files with 558 additions and 18 deletions
+31
View File
@@ -0,0 +1,31 @@
#include <mem.hpp>
#include <broadway/mmio/pi.hpp>
#include <ircolib/log.hpp>
namespace weee::core {
processor_interface::processor_interface(mem &mem) {
mem.register_write32_handler(0x0c003000, 0x0c0030ff,
[&](ircolib::u32 addr, ircolib::u32 value) { return write32(addr, value); });
mem.register_read32_handler(0x0c003000, 0x0c0030ff, [&](ircolib::u32 addr) { return read32(addr); });
}
void processor_interface::write32(ircolib::u32 addr, ircolib::u32 value) {
switch (addr) {
case 0x04:
intmr.raw = value;
break;
default:
ircolib::panic("processor_interface::write32 to unimplemented addr 0x{:08X} with value 0x{:08X}", addr, value);
}
}
ircolib::u32 processor_interface::read32(ircolib::u32 addr) {
switch (addr) {
case 0x2c:
return 2;
default:
ircolib::panic("processor_interface::read32 from unimplemented addr 0x{:08X}", addr);
return 0;
}
}
} // namespace weee::core