Fix compiling errors for MON_ID_SENSE (platinum)

This commit is contained in:
dingusdev 2024-12-04 07:48:38 -07:00
parent 05658ad5c5
commit 31323e7bf1

View File

@ -211,6 +211,9 @@ void PlatinumCtrl::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in
{ {
static uint8_t vid_enable_seq[] = {3, 2, 0}; static uint8_t vid_enable_seq[] = {3, 2, 0};
uint8_t mon_dirs = 0;
uint8_t mon_levels = 0;
if (rgn_start == VRAM_REGION_BASE) { if (rgn_start == VRAM_REGION_BASE) {
if (offset < this->vram_size) if (offset < this->vram_size)
write_mem(&this->vram_ptr[offset], value, size); write_mem(&this->vram_ptr[offset], value, size);
@ -268,10 +271,11 @@ void PlatinumCtrl::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in
break; break;
case PlatinumReg::MON_ID_SENSE: case PlatinumReg::MON_ID_SENSE:
value &= 7; value &= 7;
uint8_t dirs = value ^ 7; mon_dirs = value ^ 7;
uint8_t levels = (this->fb_test >> SENSE_LINE_OUTPUT_DATA_pos) & 7; mon_levels = (this->fb_test >> SENSE_LINE_OUTPUT_DATA_pos) & 7;
levels = (levels & dirs) | (dirs ^ 7); mon_levels = (mon_levels & mon_dirs) | (mon_dirs ^ 7);
this->mon_sense = (dirs << 3) | (this->display_id->read_monitor_sense(levels, dirs) ^ 7); this->mon_sense = (mon_dirs << 3) |
(this->display_id->read_monitor_sense(mon_levels, mon_dirs) ^ 7);
break; break;
case PlatinumReg::FB_RESET: case PlatinumReg::FB_RESET:
if (value == 7 && this->crtc_on) { if (value == 7 && this->crtc_on) {