diff --git a/devices/memctrl/platinum.cpp b/devices/memctrl/platinum.cpp index e359f31..8ca1a80 100644 --- a/devices/memctrl/platinum.cpp +++ b/devices/memctrl/platinum.cpp @@ -64,6 +64,10 @@ PlatinumCtrl::PlatinumCtrl() : MemCtrlBase(), VideoCtrlBase(640, 480) { // attach DACula RAMDAC this->dacula = std::unique_ptr(new AppleRamdac(DacFlavour::DACULA)); + this->dacula->get_clut_entry_cb = [this](uint8_t index, uint8_t *colors) { + uint8_t a; + this->get_palette_color(index, colors[0], colors[1], colors[2], a); + }; this->dacula->set_clut_entry_cb = [this](uint8_t index, uint8_t *colors) { this->set_palette_color(index, colors[0], colors[1], colors[2], 0xFF); }; diff --git a/devices/video/appleramdac.h b/devices/video/appleramdac.h index 6faa7c5..07c32ef 100644 --- a/devices/video/appleramdac.h +++ b/devices/video/appleramdac.h @@ -65,6 +65,7 @@ enum RamdacRegs : uint8_t { }; // namespace RamdacRegs +typedef std::function GetClutEntryCallback; typedef std::function SetClutEntryCallback; typedef std::function CursorCtrlCallback; @@ -89,6 +90,7 @@ public: void measure_hw_cursor(uint8_t *fb_ptr); void draw_hw_cursor(uint8_t *src_buf, uint8_t *dst_buf, int dst_pitch); + GetClutEntryCallback get_clut_entry_cb = nullptr; SetClutEntryCallback set_clut_entry_cb = nullptr; CursorCtrlCallback cursor_ctrl_cb = nullptr; diff --git a/devices/video/control.cpp b/devices/video/control.cpp index 0352c81..2816563 100644 --- a/devices/video/control.cpp +++ b/devices/video/control.cpp @@ -94,6 +94,10 @@ ControlVideo::ControlVideo() // attach RAMDAC this->radacal = std::unique_ptr(new AppleRamdac(DacFlavour::RADACAL)); + this->radacal->get_clut_entry_cb = [this](uint8_t index, uint8_t *colors) { + uint8_t a; + this->get_palette_color(index, colors[0], colors[1], colors[2], a); + }; this->radacal->set_clut_entry_cb = [this](uint8_t index, uint8_t *colors) { this->set_palette_color(index, colors[0], colors[1], colors[2], 0xFF); };