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