mirror of
https://github.com/holub/mame
synced 2025-07-03 00:56:03 +03:00
z8000: fix m20 word io writes
This commit is contained in:
parent
ab56f7de85
commit
a924a9a5d5
@ -252,7 +252,7 @@ uint16_t z8002_device::RDPORT_W(int mode, uint16_t addr)
|
||||
{
|
||||
memory_access<16, 1, 0, ENDIANNESS_BIG>::specific &space = (mode == 0) ? m_io : m_sio;
|
||||
if (BIT(addr, 0))
|
||||
return swapendian_int16(space.read_word(addr & ~1, 0x00ff));
|
||||
return swapendian_int16(space.read_word(addr & ~1, 0xffff));
|
||||
else
|
||||
return space.read_word(addr);
|
||||
}
|
||||
@ -268,7 +268,7 @@ void z8002_device::WRPORT_W(int mode, uint16_t addr, uint16_t value)
|
||||
{
|
||||
memory_access<16, 1, 0, ENDIANNESS_BIG>::specific &space = (mode == 0) ? m_io : m_sio;
|
||||
if (BIT(addr, 0))
|
||||
space.write_word(addr & ~1, swapendian_int16(value), 0x00ff);
|
||||
space.write_word(addr & ~1, swapendian_int16(value), 0xffff);
|
||||
else
|
||||
space.write_word(addr, value, 0xffff);
|
||||
}
|
||||
|
@ -158,13 +158,13 @@ void m24_z8000_device::dmem_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
|
||||
uint16_t m24_z8000_device::i86_io_r(offs_t offset, uint16_t mem_mask)
|
||||
{
|
||||
uint16_t ret = m_maincpu->space(AS_IO).read_word(offset << 1, swapendian_int16(mem_mask));
|
||||
uint16_t ret = m_maincpu->space(AS_IO).read_word(offset << 1, mem_mask == 0xffff ? 0xff00 : swapendian_int16(mem_mask));
|
||||
return swapendian_int16(ret);
|
||||
}
|
||||
|
||||
void m24_z8000_device::i86_io_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
m_maincpu->space(AS_IO).write_word(offset << 1, swapendian_int16(data), swapendian_int16(mem_mask));
|
||||
m_maincpu->space(AS_IO).write_word(offset << 1, swapendian_int16(data), mem_mask == 0xffff ? 0xff00 : swapendian_int16(mem_mask));
|
||||
}
|
||||
|
||||
void m24_z8000_device::irqctl_w(uint8_t data)
|
||||
|
Loading…
Reference in New Issue
Block a user