Fix watchpoints for >8-bit address spaces.

This commit is contained in:
Aaron Giles 2010-08-23 14:14:06 +00:00
parent ba6544bce1
commit 0a38a62d17

View File

@ -783,7 +783,7 @@ private:
template<typename _UintType> template<typename _UintType>
_UintType watchpoint_r(address_space &space, offs_t offset, _UintType mask) _UintType watchpoint_r(address_space &space, offs_t offset, _UintType mask)
{ {
m_space.device().debug()->memory_read_hook(m_space, offset, mask); m_space.device().debug()->memory_read_hook(m_space, offset * sizeof(_UintType), mask);
UINT8 *oldtable = m_live_lookup; UINT8 *oldtable = m_live_lookup;
m_live_lookup = m_table; m_live_lookup = m_table;
@ -836,7 +836,7 @@ private:
template<typename _UintType> template<typename _UintType>
void watchpoint_w(address_space &space, offs_t offset, _UintType data, _UintType mask) void watchpoint_w(address_space &space, offs_t offset, _UintType data, _UintType mask)
{ {
m_space.device().debug()->memory_write_hook(m_space, offset, data, 0xff); m_space.device().debug()->memory_write_hook(m_space, offset * sizeof(_UintType), data, mask);
UINT8 *oldtable = m_live_lookup; UINT8 *oldtable = m_live_lookup;
m_live_lookup = m_table; m_live_lookup = m_table;