mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
Fix subtle memory subsystem bug [O. Galibert]
This commit is contained in:
parent
87d548d205
commit
3cddb3dbb2
@ -84,10 +84,10 @@ template<int Width, int AddrShift, int Endian> memory_units_descriptor<Width, Ad
|
|||||||
|
|
||||||
for(u32 i=0; i<4; i++)
|
for(u32 i=0; i<4; i++)
|
||||||
if(m_entries_for_key.find(m_keymap[i]) == m_entries_for_key.end())
|
if(m_entries_for_key.find(m_keymap[i]) == m_entries_for_key.end())
|
||||||
generate(m_keymap[i], umasks[i], cswidth, bits_per_access, base_shift, shift, active_count);
|
generate(m_keymap[i], unitmask, umasks[i], cswidth, bits_per_access, base_shift, shift, active_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<int Width, int AddrShift, int Endian> void memory_units_descriptor<Width, AddrShift, Endian>::generate(u8 ukey, typename emu::detail::handler_entry_size<Width>::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count)
|
template<int Width, int AddrShift, int Endian> void memory_units_descriptor<Width, AddrShift, Endian>::generate(u8 ukey, typename emu::detail::handler_entry_size<Width>::uX gumask, typename emu::detail::handler_entry_size<Width>::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count)
|
||||||
{
|
{
|
||||||
auto &entries = m_entries_for_key[ukey];
|
auto &entries = m_entries_for_key[ukey];
|
||||||
|
|
||||||
@ -105,8 +105,9 @@ template<int Width, int AddrShift, int Endian> void memory_units_descriptor<Widt
|
|||||||
if(umask & numask) {
|
if(umask & numask) {
|
||||||
uX amask = csmask << (i & ~(cswidth - 1));
|
uX amask = csmask << (i & ~(cswidth - 1));
|
||||||
entries.emplace_back(entry{ amask, numask, shift, u8(i), u8(Endian == ENDIANNESS_BIG ? active_count - 1 - offset : offset) });
|
entries.emplace_back(entry{ amask, numask, shift, u8(i), u8(Endian == ENDIANNESS_BIG ? active_count - 1 - offset : offset) });
|
||||||
offset ++;
|
|
||||||
}
|
}
|
||||||
|
if(gumask & numask)
|
||||||
|
offset ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,5 +37,5 @@ private:
|
|||||||
u8 m_access_width;
|
u8 m_access_width;
|
||||||
u8 m_access_endian;
|
u8 m_access_endian;
|
||||||
|
|
||||||
void generate(u8 ukey, uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count);
|
void generate(u8 ukey, uX gumask, uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user