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