diff --git a/core/vip.c b/core/vip.c index 74b9bb2..cabbd4e 100644 --- a/core/vip.c +++ b/core/vip.c @@ -234,7 +234,7 @@ static void vipWriteCell(VB *sim, uint32_t offset, int type, int32_t value) { case VB_S8: case VB_U8: value = offset & 1 ? - value << 8 | sim->vip.ram[0x20000 | offset] : + value << 8 | sim->vip.ram[0x20001 ^ offset] : value | (int32_t) sim->vip.ram[0x20001 | offset] << 8 ; break; @@ -284,7 +284,7 @@ static void vipWriteObject(VB *sim, uint32_t offset, int type, int32_t value) { case VB_S8: case VB_U8: value = offset & 1 ? - value << 8 | sim->vip.ram[0x3E000 | offset] : + value << 8 | sim->vip.ram[0x3E001 ^ offset] : value | (int32_t) sim->vip.ram[0x3E001 | offset] << 8 ; break; @@ -326,7 +326,7 @@ static void vipWriteWorld(VB *sim, uint32_t offset, int type, int32_t value) { case VB_S8: case VB_U8: value = offset & 1 ? - value << 8 | sim->vip.ram[0x3D800 | offset] : + value << 8 | sim->vip.ram[0x3D801 ^ offset] : value | (int32_t) sim->vip.ram[0x3D801 | offset] << 8 ; break;