|
|
@ -20,7 +20,7 @@ inline void Read(T& var, const u32 raw_addr) {
|
|
|
|
|
|
|
|
|
|
|
|
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
|
|
|
|
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
|
|
|
|
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
|
|
|
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
|
|
|
LOG_ERROR(HW_LCD, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
|
|
|
|
NGLOG_ERROR(HW_LCD, "Unknown Read{} @ {:#010X}", sizeof(var) * 8, addr);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ inline void Write(u32 addr, const T data) {
|
|
|
|
|
|
|
|
|
|
|
|
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
|
|
|
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
|
|
|
|
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
|
|
|
if (index >= 0x400 || !std::is_same<T, u32>::value) {
|
|
|
|
LOG_ERROR(HW_LCD, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
|
|
|
|
NGLOG_ERROR(HW_LCD, "Unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, data, addr);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -56,12 +56,12 @@ template void Write<u8>(u32 addr, const u8 data);
|
|
|
|
/// Initialize hardware
|
|
|
|
/// Initialize hardware
|
|
|
|
void Init() {
|
|
|
|
void Init() {
|
|
|
|
memset(&g_regs, 0, sizeof(g_regs));
|
|
|
|
memset(&g_regs, 0, sizeof(g_regs));
|
|
|
|
LOG_DEBUG(HW_LCD, "initialized OK");
|
|
|
|
NGLOG_DEBUG(HW_LCD, "Initialized OK");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Shutdown hardware
|
|
|
|
/// Shutdown hardware
|
|
|
|
void Shutdown() {
|
|
|
|
void Shutdown() {
|
|
|
|
LOG_DEBUG(HW_LCD, "shutdown OK");
|
|
|
|
NGLOG_DEBUG(HW_LCD, "Shutdown OK");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace LCD
|
|
|
|
} // namespace LCD
|
|
|
|