mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-04 06:29:56 +00:00
atimach64gx: Add missing WRITE_VALUE_AND_LOG.
This commit fixes conflict resolution mistakes in the following commits: "atimach64gx: Let crtc_update calculate fb_ptr." "atimach64gx: Redraw only when necessary." "atimach64gx: Log unhandled overlay registers." was mistakenly included in "atimach64gx: Let crtc_update calculate fb_ptr.". The OVR_ registers were included because they may be needed for 2D acceleration in System 7.5.3 and later.
This commit is contained in:
parent
755dd7f60a
commit
288d97f24c
@ -362,6 +362,15 @@ uint32_t AtiMach64Gx::read_reg(uint32_t reg_offset, uint32_t size)
|
|||||||
return static_cast<uint32_t>(result);
|
return static_cast<uint32_t>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WRITE_VALUE_AND_LOG() \
|
||||||
|
do { \
|
||||||
|
this->regs[reg_num] = new_value; \
|
||||||
|
LOG_F(9, "%s: write %s %04x.%c = %0*x = %08x", this->name.c_str(), \
|
||||||
|
get_reg_name(reg_num), reg_offset, SIZE_ARG(size), size * 2, \
|
||||||
|
(uint32_t)extract_bits<uint64_t>(value, offset * 8, size * 8), new_value \
|
||||||
|
); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
||||||
{
|
{
|
||||||
uint32_t reg_num = reg_offset >> 2;
|
uint32_t reg_num = reg_offset >> 2;
|
||||||
@ -389,6 +398,7 @@ void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
|||||||
break;
|
break;
|
||||||
case ATI_CRTC_OFF_PITCH:
|
case ATI_CRTC_OFF_PITCH:
|
||||||
new_value = value;
|
new_value = value;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
this->crtc_update();
|
this->crtc_update();
|
||||||
return;
|
return;
|
||||||
case ATI_CRTC_INT_CNTL:
|
case ATI_CRTC_INT_CNTL:
|
||||||
@ -506,6 +516,7 @@ void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
|||||||
case ATI_OVR_WID_LEFT_RIGHT:
|
case ATI_OVR_WID_LEFT_RIGHT:
|
||||||
case ATI_OVR_WID_TOP_BOTTOM:
|
case ATI_OVR_WID_TOP_BOTTOM:
|
||||||
new_value = value;
|
new_value = value;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
LOG_F(ERROR, "%s: Unhandled value 0x%08x.", this->name.c_str(), value);
|
LOG_F(ERROR, "%s: Unhandled value 0x%08x.", this->name.c_str(), value);
|
||||||
}
|
}
|
||||||
@ -515,12 +526,14 @@ void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
|||||||
new_value = value;
|
new_value = value;
|
||||||
this->cursor_dirty = true;
|
this->cursor_dirty = true;
|
||||||
draw_fb = true;
|
draw_fb = true;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
return;
|
return;
|
||||||
case ATI_CUR_OFFSET:
|
case ATI_CUR_OFFSET:
|
||||||
new_value = value;
|
new_value = value;
|
||||||
if (old_value != new_value)
|
if (old_value != new_value)
|
||||||
this->cursor_dirty = true;
|
this->cursor_dirty = true;
|
||||||
draw_fb = true;
|
draw_fb = true;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
return;
|
return;
|
||||||
case ATI_CUR_HORZ_VERT_OFF:
|
case ATI_CUR_HORZ_VERT_OFF:
|
||||||
new_value = value;
|
new_value = value;
|
||||||
@ -530,10 +543,12 @@ void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
|||||||
)
|
)
|
||||||
this->cursor_dirty = true;
|
this->cursor_dirty = true;
|
||||||
draw_fb = true;
|
draw_fb = true;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
return;
|
return;
|
||||||
case ATI_CUR_HORZ_VERT_POSN:
|
case ATI_CUR_HORZ_VERT_POSN:
|
||||||
new_value = value;
|
new_value = value;
|
||||||
draw_fb = true;
|
draw_fb = true;
|
||||||
|
WRITE_VALUE_AND_LOG();
|
||||||
return;
|
return;
|
||||||
case ATI_DAC_REGS:
|
case ATI_DAC_REGS:
|
||||||
new_value = old_value; // no change
|
new_value = old_value; // no change
|
||||||
|
Loading…
x
Reference in New Issue
Block a user