INTV: adjust sme timings and fix accesses to registers, fixes motocross

This commit is contained in:
alyosha-tas 2021-11-22 21:17:57 -05:00
parent 70215eddc7
commit 0715db5608
2 changed files with 10 additions and 10 deletions

View File

@ -87,7 +87,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
_stic.active_display = false;
_stic.Sr1 = false;
_cpu.PendingCycles = 3000 + _cpu.GetPendingCycles();
_cpu.PendingCycles = 2990 + _cpu.GetPendingCycles();
while (_cpu.GetPendingCycles() > 0)
{
@ -97,7 +97,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
}
// vblank phase 2
_cpu.PendingCycles = 791 + _cpu.GetPendingCycles();
_cpu.PendingCycles = 801 + _cpu.GetPendingCycles();
_stic.in_vb_1 = false;
while (_cpu.GetPendingCycles() > 0)

View File

@ -194,7 +194,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
switch (addr & 0xF000)
{
case 0x0000:
if (addr <= 0x003F && (in_vb_1 | !active_display))
if (addr <= 0x003F && (in_vb_1 | (!active_display & !in_vb_2)))
{
if (addr == 0x0021 && !peek)
{
@ -209,7 +209,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
}
break;
case 0x4000:
if ((addr <= 0x403F) && (in_vb_1 | !active_display))
if ((addr <= 0x403F) && (in_vb_1 | (!active_display & !in_vb_2)))
{
if (addr == 0x4021 && !peek)
{
@ -218,7 +218,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
}
break;
case 0x8000:
if ((addr <= 0x803F) && (in_vb_1 | !active_display))
if ((addr <= 0x803F) && (in_vb_1 | (!active_display & !in_vb_2)))
{
if (addr == 0x8021 && !peek)
{
@ -227,7 +227,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
}
break;
case 0xC000:
if ((addr <= 0xC03F) && (in_vb_1 | !active_display))
if ((addr <= 0xC03F) && (in_vb_1 | (!active_display & !in_vb_2)))
{
if (addr == 0xC021 && !peek)
{
@ -245,28 +245,28 @@ namespace BizHawk.Emulation.Cores.Intellivision
switch (addr & 0xF000)
{
case 0x0000:
if (addr <= 0x003F && (in_vb_1 | !active_display))
if (addr <= 0x003F && (in_vb_1 | (!active_display & !in_vb_2)))
{
write_reg(addr, value, poke);
return true;
}
break;
case 0x4000:
if (addr <= 0x403F && (in_vb_1 | !active_display))
if (addr <= 0x403F && (in_vb_1 | (!active_display & !in_vb_2)))
{
write_reg(addr-0x4000, value, poke);
return true;
}
break;
case 0x8000:
if (addr <= 0x803F && (in_vb_1 | !active_display))
if (addr <= 0x803F && (in_vb_1 | (!active_display & !in_vb_2)))
{
write_reg(addr-0x8000, value, poke);
return true;
}
break;
case 0xC000:
if (addr <= 0xC03F && (in_vb_1 | !active_display))
if (addr <= 0xC03F && (in_vb_1 | (!active_display & !in_vb_2)))
{
write_reg(addr-0xC000, value, poke);
return true;