O2Hawk: more bug fixes
This commit is contained in:
parent
3f326109d6
commit
6e699d576a
|
@ -358,7 +358,8 @@ namespace BizHawk.Emulation.Common.Components.I8048
|
|||
Regs[PC] = (ushort)(Regs[(Regs[PSW] & 0x7) * 2 + 8] & 0xFF);
|
||||
Regs[PC] |= (ushort)((Regs[(Regs[PSW] & 0x7) * 2 + 8 + 1] & 0xF) << 8);
|
||||
Regs[PSW] &= 0xF;
|
||||
Regs[PSW] |= (ushort)(Regs[(Regs[PSW] & 0x7) * 2 + 8 + 1] & 0xF0);
|
||||
Regs[PSW] |= (ushort)(Regs[(Regs[PSW] & 0x7) * 2 + 8 + 1] & 0xF0);
|
||||
RB = (ushort)(FlagBS ? 24 : 0);
|
||||
break;
|
||||
case PULL_PC:
|
||||
Regs[PSW] = (ushort)((((Regs[PSW] & 0x7) - 1) & 0x7) | (Regs[PSW] & 0xF8));
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Common.Components.I8048
|
|||
IDLE,
|
||||
PUSH,
|
||||
IDLE,
|
||||
SET_ADDR, PC, ALU, 0);
|
||||
TR, PC, ALU);
|
||||
|
||||
IRQS = 10;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
{
|
||||
cpu.Regs[i] = (byte)i;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
for (int j = 0; j < 0x80; j++)
|
||||
{
|
||||
|
@ -119,6 +119,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
{
|
||||
ppu.WriteReg(k, (byte)k);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public DisplayType Region => DisplayType.NTSC;
|
||||
|
|
|
@ -58,7 +58,15 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
ret = VDC_col_ret;
|
||||
//Console.WriteLine("col: " + ret + " " + Core.cpu.TotalExecutedCycles);
|
||||
}
|
||||
else if(addr == 0xA3)
|
||||
else if(addr == 0xA4)
|
||||
{
|
||||
ret = (byte)LY;
|
||||
}
|
||||
else if (addr == 0xA5)
|
||||
{
|
||||
ret = (byte)(cycle - 43);
|
||||
}
|
||||
else if (addr == 0xA3)
|
||||
{
|
||||
ret = VDC_color;
|
||||
}
|
||||
|
@ -105,7 +113,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
else if (addr == 0xA0)
|
||||
{
|
||||
VDC_ctrl = value;
|
||||
//Console.WriteLine(value + " " + Core.cpu.TotalExecutedCycles);
|
||||
//Console.WriteLine("VDC_ctrl: " + value + " " + Core.cpu.TotalExecutedCycles);
|
||||
}
|
||||
else if (addr == 0xA1)
|
||||
{
|
||||
|
@ -119,6 +127,14 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
{
|
||||
VDC_color = value;
|
||||
}
|
||||
else if (addr == 0xA4)
|
||||
{
|
||||
// writing has no effect
|
||||
}
|
||||
else if (addr == 0xA5)
|
||||
{
|
||||
// writing has no effect
|
||||
}
|
||||
else if (addr <= 0xAA)
|
||||
{
|
||||
AudioWriteReg(addr, value);
|
||||
|
@ -559,7 +575,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
case 0xA9: ret = shift_reg_2; break;
|
||||
case 0xAA: ret = aud_ctrl; break;
|
||||
}
|
||||
|
||||
//Console.WriteLine("aud read: " + (addr - 0xA7) + " " + ret + " " + Core.cpu.TotalExecutedCycles);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -573,7 +589,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
|||
case 0xAA: aud_ctrl = value; break;
|
||||
}
|
||||
|
||||
//Console.WriteLine((addr - 0xA7) + " " + value);
|
||||
//Console.WriteLine("aud write: " + (addr - 0xA7) + " " + value + " " + Core.cpu.TotalExecutedCycles);
|
||||
}
|
||||
|
||||
public void Audio_tick()
|
||||
|
|
Loading…
Reference in New Issue