Compare commits
2
Commits
18b2c589e6
...
27e926bd58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27e926bd58 | ||
|
|
d802d39d8d |
+5
-3
@@ -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;
|
||||
@@ -481,10 +481,12 @@ static void vipWriteIO(
|
||||
break;
|
||||
|
||||
case 0x5F830>>1: /* CTA */
|
||||
if (debug) {
|
||||
if ((mask & 0xFF00) == 0)
|
||||
sim->vip.cta.cta_r = value >> 8;
|
||||
if ((mask & 0x00FF) == 0)
|
||||
sim->vip.cta.cta_l = value;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5F842>>1: /* XPCTRL */
|
||||
|
||||
@@ -513,6 +513,8 @@ static int dasmLine(VB *sim, uint32_t *address, uint32_t pc,
|
||||
line->isPC = *address == pc;
|
||||
for (x = 0; x < line->codeLength; x++)
|
||||
line->code[x] = vbRead(sim, *address + x, VB_U8);
|
||||
|
||||
/* Advance to the next instruction or PC, whichever is sooner */
|
||||
*address += pc != *address && pc - *address < line->codeLength ?
|
||||
pc - *address : line->codeLength;
|
||||
|
||||
@@ -657,6 +659,8 @@ static VBU_DasmLine* dasmDisassemble(VB *sim, uint32_t address,
|
||||
size = vbuCodeSize(sim, addr);
|
||||
if (address - addr < size)
|
||||
break;
|
||||
|
||||
/* Advance to the next instruction or PC, whichever is sooner */
|
||||
addr += addr != pc && pc - addr < size ? pc - addr : size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user