[Core/CD] improved accuracy of Word-RAM byte writes (verified on schematic)

This commit is contained in:
ekeeke 2019-01-09 00:54:59 +01:00
parent e075526f71
commit 0b75d4ba74
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Mega CD / Sega CD hardware
*
* Copyright (C) 2012-2018 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2012-2019 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -255,7 +255,7 @@ static void word_ram_z80_write_byte(unsigned int address, unsigned int data)
}
else
{
WRITE_BYTE(m68k.memory_map[offset].base, address & 0xffff, data);
*(uint16 *)(m68k.memory_map[offset].base + (address & 0xfffe)) = data | (data << 8);
}
}
@ -293,7 +293,7 @@ static void word_ram_m68k_write_byte(unsigned int address, unsigned int data)
}
else
{
WRITE_BYTE(m68k.memory_map[offset].base, address & 0xffff, data);
*(uint16 *)(m68k.memory_map[offset].base + (address & 0xfffe)) = data | (data << 8);
}
}
@ -345,7 +345,7 @@ static void word_ram_s68k_write_byte(unsigned int address, unsigned int data)
}
else
{
WRITE_BYTE(s68k.memory_map[offset].base, address & 0xffff, data);
*(uint16 *)(s68k.memory_map[offset].base + (address & 0xfffe)) = data | (data << 8);
}
}

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Mega CD / Sega CD hardware
*
* Copyright (C) 2012-2018 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2012-2019 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: