O2Hawk: fix cosmic conflict

This commit is contained in:
alyosha-tas 2020-04-04 18:01:19 -04:00
parent 49e4d49927
commit 6edc1310d2
3 changed files with 11 additions and 6 deletions

View File

@ -511,7 +511,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048
public Action<TraceInfo> TraceCallback;
public string TraceHeader => "MC6809: PC, machine code, mnemonic, operands, registers (A, B, X, Y, US, SP, DP, CC), Cy, flags (CAFBIFTTR)";
public string TraceHeader => "MC6809: PC, machine code, mnemonic, operands, registers (A, B, X, Y, US, SP, DP, CC), Cy, flags (CAFBIFT0T1TFR)";
public TraceInfo State(bool disassemble = true)
{
@ -521,7 +521,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048
{
Disassembly = $"{(disassemble ? Disassemble(Regs[PC], ReadMemory, out notused) : "---")} ".PadRight(50),
RegisterInfo = string.Format(
"A:{0:X2} R0:{1:X2} R1:{2:X2} R2:{3:X2} R3:{4:X2} R4:{5:X2} R5:{6:X2} R6:{7:X2} R7:{8:X2} PSW:{9:X4} Cy:{10} LY:{11} {12}{13}{14}{15}{16}{17}{18}{19}{20}{21}",
"A:{0:X2} R0:{1:X2} R1:{2:X2} R2:{3:X2} R3:{4:X2} R4:{5:X2} R5:{6:X2} R6:{7:X2} R7:{8:X2} PSW:{9:X4} Cy:{10} LY:{11} {12}{13}{14}{15}{16}{17}{18}{19}{20}{21}{22}",
Regs[A],
Regs[(ushort)(R0 + RB)],
Regs[(ushort)(R1 + RB)],
@ -543,6 +543,7 @@ namespace BizHawk.Emulation.Cores.Components.I8048
F1 ? "F" : "f",
T0 ? "T" : "t",
T1 ? "T" : "t",
TF ? "T" : "t",
RB > 0 ? "R" : "r"
)
};

View File

@ -1,4 +1,5 @@
using BizHawk.Emulation.Common;
using System;
namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
{
@ -60,6 +61,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
SendVideoBuffer();
bool frame_chk = true;
//Console.WriteLine("----------FRAME----------");
if (is_pal)
{

View File

@ -68,11 +68,12 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
else if (addr == 0xA0)
{
ret = VDC_ctrl;
Core.cpu.IRQPending = false;
//Core.cpu.IRQPending = false;
}
else if (addr == 0xA1)
{
ret = VDC_status;
Core.cpu.IRQPending = false;
}
else if (addr == 0xA2)
{
@ -173,7 +174,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
else if (addr == 0xA3)
{
VDC_color = value;
//Console.WriteLine("VDC_color: " + value + " " + Core.cpu.TotalExecutedCycles);
//Console.WriteLine("VDC_color: " + value + " " + LY + " " + Core.cpu.TotalExecutedCycles);
grid_brightness = (!lum_en | VDC_color.Bit(6)) ? 8 : 0;
bg_brightness = !lum_en ? 8 : 0;
}
@ -201,6 +202,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
{
if (!VDC_ctrl.Bit(3)) { Grid_V[addr - 0xE0] = value; }
}
//Console.WriteLine(addr + " " + value + " " + LY + " " + Core.cpu.TotalExecutedCycles);
}
public void tick()
@ -855,7 +857,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
0xFF94309F, // violet
0xFF77670B, // yellow
0xFF676767, // grey
0xFF000000, // black
0xFF676767, // grey
0xFF5C80F6, // light blue
0xFF56C469, // light green
0xFF77E6EB, // light blue-green
@ -976,7 +978,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
}
C_final = output_bit;
C_final *= ((aud_ctrl & 0xF) + 1) * 3200;
C_final *= ((aud_ctrl & 0xF) + 1) * 800;
}
if (C_final != latched_sample_C)