Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
155a3aa678 | ||
|
|
04e79c9151 |
@@ -159,6 +159,8 @@ static void busRead(VB *sim, uint32_t address, int type, int32_t *value) {
|
|||||||
|
|
||||||
case 2: /* Misc. I/O */
|
case 2: /* Misc. I/O */
|
||||||
*value = busReadMisc(sim, address, type);
|
*value = busReadMisc(sim, address, type);
|
||||||
|
if (type == VB_S8)
|
||||||
|
*value = (int8_t) *value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: break; /* Unmapped */
|
case 3: break; /* Unmapped */
|
||||||
|
|||||||
+24
-19
@@ -654,29 +654,29 @@ static int vipEmulateDisplay(VB *sim, uint32_t clocks) {
|
|||||||
vipThrow(sim, 0x0010); /* FRAMESTART */
|
vipThrow(sim, 0x0010); /* FRAMESTART */
|
||||||
|
|
||||||
/* Game frame */
|
/* Game frame */
|
||||||
if (sim->vip.xp.xpen) {
|
if (sim->vip.xp.frame >= sim->vip.frmcyc) {
|
||||||
if (sim->vip.xp.frame >= sim->vip.frmcyc) {
|
sim->vip.xp.frame = 0;
|
||||||
sim->vip.dp.buffer ^= sim->vip.xp.toggle;
|
|
||||||
sim->vip.xp.frame = 0;
|
|
||||||
sim->vip.xp.toggle = 0;
|
|
||||||
|
|
||||||
/* Initiate drawing procedure */
|
vipThrow(sim, 0x0008); /* GAMESTART */
|
||||||
if (sim->vip.xp.step == 0) {
|
if (sim->vip.xp.step != 0) {
|
||||||
sim->vip.xp.enabled = 1;
|
sim->vip.xp.overtime = 1;
|
||||||
sim->vip.xp.overtime = 0;
|
vipThrow(sim, 0x8000); /* TIMEERR */
|
||||||
sim->vip.xp.step = 1;
|
}
|
||||||
vipThrow(sim, 0x0008); /* GAMESTART */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Drawing procedure has run into overtime */
|
/* Initiate drawing procedure */
|
||||||
else {
|
else if (sim->vip.xp.xpen) {
|
||||||
sim->vip.xp.overtime = 1;
|
sim->vip.dp.buffer ^= sim->vip.xp.toggle;
|
||||||
vipThrow(sim, 0x8000); /* TIMEERR */
|
sim->vip.xp.enabled = 1;
|
||||||
}
|
sim->vip.xp.overtime = 0;
|
||||||
|
sim->vip.xp.step = 1;
|
||||||
|
sim->vip.xp.toggle = 0;
|
||||||
|
}
|
||||||
|
|
||||||
} else sim->vip.xp.frame++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Not a game frame */
|
||||||
|
else sim->vip.xp.frame++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* 0ms-3ms - Idle */
|
/* 0ms-3ms - Idle */
|
||||||
@@ -1316,8 +1316,13 @@ static void vipRead(VB *sim, uint32_t address, int type, int32_t *value) {
|
|||||||
*value = 0;
|
*value = 0;
|
||||||
|
|
||||||
/* I/O register */
|
/* I/O register */
|
||||||
else if (address < 0x60000)
|
else if (address < 0x60000) {
|
||||||
*value = vipReadIO(sim, address, type);
|
*value = vipReadIO(sim, address, type);
|
||||||
|
switch (type) {
|
||||||
|
case VB_S8 : *value = (int8_t ) *value; break;
|
||||||
|
case VB_S16: *value = (int16_t) *value; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Unmapped */
|
/* Unmapped */
|
||||||
else if (address < 0x78000)
|
else if (address < 0x78000)
|
||||||
|
|||||||
Reference in New Issue
Block a user