From 7a3a661e2a77715de443fdeb166b3a08983a6a8a Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 18 Feb 2024 17:28:33 -0800 Subject: [PATCH] platinum: Allow reading swatch registers. --- devices/memctrl/platinum.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/devices/memctrl/platinum.cpp b/devices/memctrl/platinum.cpp index 1dfd3f2..e359f31 100644 --- a/devices/memctrl/platinum.cpp +++ b/devices/memctrl/platinum.cpp @@ -145,6 +145,30 @@ uint32_t PlatinumCtrl::read(uint32_t rgn_start, uint32_t offset, int size) { case PlatinumReg::CLR_CURSOR_INT: this->update_irq(0, SWATCH_INT_CURSOR); return 0; + //case PlatinumReg::CLR_ANIM_INT: + //case PlatinumReg::CLR_VBL_INT: + //case PlatinumReg::CURSOR_LINE: + //case PlatinumReg::ANIMATE_LINE: + //case PlatinumReg::COUNTER_TEST: + //break; + case PlatinumReg::SWATCH_HSERR: + case PlatinumReg::SWATCH_HLFLN: + case PlatinumReg::SWATCH_HEQ: + case PlatinumReg::SWATCH_HSP: + case PlatinumReg::SWATCH_HBWAY: + case PlatinumReg::SWATCH_HBRST: + case PlatinumReg::SWATCH_HBP: + case PlatinumReg::SWATCH_HAL: + case PlatinumReg::SWATCH_HFP: + case PlatinumReg::SWATCH_HPIX: + case PlatinumReg::SWATCH_VHLINE: + case PlatinumReg::SWATCH_VSYNC: + case PlatinumReg::SWATCH_VBPEQ: + case PlatinumReg::SWATCH_VBP: + case PlatinumReg::SWATCH_VAL: + case PlatinumReg::SWATCH_VFP: + case PlatinumReg::SWATCH_VFPEQ: + return this->swatch_params[REG_TO_INDEX(offset >> 4)]; case PlatinumReg::TIMING_ADJUST: return this->timing_adjust; case PlatinumReg::IRIDIUM_CONFIG: