SAM6883: Fixed a bug by which VDG addressing incorrectly honored the page bit

This affected the CoCo/Dragon family of drivers

Special thanks to Ciaran Anscomb for identifying this problem
This commit is contained in:
Nathan Woods 2017-07-31 08:14:51 -04:00 committed by Vas Crabb
parent bb0964f9a2
commit c9b47bd56c
2 changed files with 1 additions and 6 deletions

View File

@ -247,14 +247,12 @@ void sam6883_device::update_memory(void)
// 4K mode
m_space_0000.point(m_banks[0], 0x0000, m_banks[0].m_memory_size);
m_counter_mask = 0x0FFF;
m_counter_or = 0x0000;
break;
case SAM_STATE_M0:
// 16K mode
m_space_0000.point(m_banks[0], 0x0000, m_banks[0].m_memory_size);
m_counter_mask = 0x3FFF;
m_counter_or = 0x0000;
break;
case SAM_STATE_M1:
@ -268,7 +266,6 @@ void sam6883_device::update_memory(void)
m_space_A000.point(m_banks[0], 0xA000);
m_space_C000.point(m_banks[0], 0xC000);
m_counter_mask = 0xFFFF;
m_counter_or = 0x0000;
setup_rom = false;
}
else
@ -277,7 +274,6 @@ void sam6883_device::update_memory(void)
uint16_t ram_base = (m_sam_state & SAM_STATE_P1) ? 0x8000 : 0x0000;
m_space_0000.point(m_banks[0], ram_base, m_banks[0].m_memory_size);
m_counter_mask = 0x7FFF;
m_counter_or = ram_base;
}
break;
}

View File

@ -121,7 +121,7 @@ public:
if (bit3_carry)
counter_carry_bit3();
}
return m_read_res((m_counter & m_counter_mask) | m_counter_or);
return m_read_res(m_counter & m_counter_mask);
}
DECLARE_WRITE_LINE_MEMBER( hs_w );
@ -185,7 +185,6 @@ private:
sam_space<0xFF60, 0xFFBF> m_space_FF60;
sam_space<0xFFE0, 0xFFFF> m_space_FFE0;
uint16_t m_counter_mask;
uint16_t m_counter_or;
// SAM state
uint16_t m_counter;