tracer: use .log extention (allows extension based user syntax highlight)
genesis disasm: prefix immediate values with #.
This commit is contained in:
parent
e9225089d6
commit
c41c24cd85
|
@ -198,7 +198,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var sfd = new SaveFileDialog();
|
var sfd = new SaveFileDialog();
|
||||||
if (_logFile == null)
|
if (_logFile == null)
|
||||||
{
|
{
|
||||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game) + ".txt";
|
sfd.FileName = PathManager.FilesystemSafeName(Global.Game) + ".log";
|
||||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null);
|
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null);
|
||||||
}
|
}
|
||||||
else if (!string.IsNullOrWhiteSpace(_logFile.FullName))
|
else if (!string.IsNullOrWhiteSpace(_logFile.FullName))
|
||||||
|
|
|
@ -89,8 +89,8 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
else if (Opcodes[op] == CMP) CMP_Disasm(info);
|
else if (Opcodes[op] == CMP) CMP_Disasm(info);
|
||||||
else if (Opcodes[op] == CMPM) CMPM_Disasm(info);
|
else if (Opcodes[op] == CMPM) CMPM_Disasm(info);
|
||||||
else if (Opcodes[op] == CMPA) CMPA_Disasm(info);
|
else if (Opcodes[op] == CMPA) CMPA_Disasm(info);
|
||||||
|
|
||||||
else if (Opcodes[op] == CMPI) CMPI_Disasm(info);
|
else if (Opcodes[op] == CMPI) CMPI_Disasm(info);
|
||||||
|
|
||||||
else if (Opcodes[op] == MULU) MULU_Disasm(info);
|
else if (Opcodes[op] == MULU) MULU_Disasm(info);
|
||||||
else if (Opcodes[op] == MULS) MULS_Disasm(info);
|
else if (Opcodes[op] == MULS) MULS_Disasm(info);
|
||||||
else if (Opcodes[op] == DIVU) DIVU_Disasm(info);
|
else if (Opcodes[op] == DIVU) DIVU_Disasm(info);
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
info.Mnemonic = "andi.b";
|
info.Mnemonic = "andi.b";
|
||||||
sbyte imm = (sbyte)ReadWord(pc); pc += 2;
|
sbyte imm = (sbyte)ReadWord(pc); pc += 2;
|
||||||
info.Args = string.Format("${0:X}, ", imm);
|
info.Args = string.Format("#${0:X}, ", imm);
|
||||||
info.Args += DisassembleValue(dstMode, dstReg, 1, ref pc);
|
info.Args += DisassembleValue(dstMode, dstReg, 1, ref pc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
info.Mnemonic = "andi.w";
|
info.Mnemonic = "andi.w";
|
||||||
short imm = ReadWord(pc); pc += 2;
|
short imm = ReadWord(pc); pc += 2;
|
||||||
info.Args = string.Format("${0:X}, ", imm);
|
info.Args = string.Format("#${0:X}, ", imm);
|
||||||
info.Args += DisassembleValue(dstMode, dstReg, 2, ref pc);
|
info.Args += DisassembleValue(dstMode, dstReg, 2, ref pc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
info.Mnemonic = "andi.l";
|
info.Mnemonic = "andi.l";
|
||||||
int imm = ReadLong(pc); pc += 4;
|
int imm = ReadLong(pc); pc += 4;
|
||||||
info.Args = string.Format("${0:X}, ", imm);
|
info.Args = string.Format("#${0:X}, ", imm);
|
||||||
info.Args += DisassembleValue(dstMode, dstReg, 4, ref pc);
|
info.Args += DisassembleValue(dstMode, dstReg, 4, ref pc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -355,21 +355,21 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
info.Mnemonic = "eori.b";
|
info.Mnemonic = "eori.b";
|
||||||
sbyte immed = (sbyte)ReadWord(pc); pc += 2;
|
sbyte immed = (sbyte)ReadWord(pc); pc += 2;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: // word
|
case 1: // word
|
||||||
{
|
{
|
||||||
info.Mnemonic = "eori.w";
|
info.Mnemonic = "eori.w";
|
||||||
short immed = ReadWord(pc); pc += 2;
|
short immed = ReadWord(pc); pc += 2;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 2, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 2, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: // long
|
case 2: // long
|
||||||
{
|
{
|
||||||
info.Mnemonic = "eori.l";
|
info.Mnemonic = "eori.l";
|
||||||
int immed = ReadLong(pc); pc += 4;
|
int immed = ReadLong(pc); pc += 4;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 4, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 4, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -568,21 +568,21 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
info.Mnemonic = "ori.b";
|
info.Mnemonic = "ori.b";
|
||||||
sbyte immed = (sbyte)ReadWord(pc); pc += 2;
|
sbyte immed = (sbyte)ReadWord(pc); pc += 2;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: // word
|
case 1: // word
|
||||||
{
|
{
|
||||||
info.Mnemonic = "ori.w";
|
info.Mnemonic = "ori.w";
|
||||||
short immed = ReadWord(pc); pc += 2;
|
short immed = ReadWord(pc); pc += 2;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 2, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 2, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: // long
|
case 2: // long
|
||||||
{
|
{
|
||||||
info.Mnemonic = "ori.l";
|
info.Mnemonic = "ori.l";
|
||||||
int immed = ReadLong(pc); pc += 4;
|
int immed = ReadLong(pc); pc += 4;
|
||||||
info.Args = String.Format("${0:X}, {1}", immed, DisassembleValue(mode, reg, 4, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immed, DisassembleValue(mode, reg, 4, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1001,17 +1001,17 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
case 0:
|
case 0:
|
||||||
immediate = (byte)ReadWord(pc); pc += 2;
|
immediate = (byte)ReadWord(pc); pc += 2;
|
||||||
info.Mnemonic = "cmpi.b";
|
info.Mnemonic = "cmpi.b";
|
||||||
info.Args = String.Format("${0:X}, {1}", immediate, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immediate, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
immediate = ReadWord(pc); pc += 2;
|
immediate = ReadWord(pc); pc += 2;
|
||||||
info.Mnemonic = "cmpi.w";
|
info.Mnemonic = "cmpi.w";
|
||||||
info.Args = String.Format("${0:X}, {1}", immediate, DisassembleValue(mode, reg, 2, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immediate, DisassembleValue(mode, reg, 2, ref pc));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
immediate = ReadLong(pc); pc += 4;
|
immediate = ReadLong(pc); pc += 4;
|
||||||
info.Mnemonic = "cmpi.l";
|
info.Mnemonic = "cmpi.l";
|
||||||
info.Args = String.Format("${0:X}, {1}", immediate, DisassembleValue(mode, reg, 4, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", immediate, DisassembleValue(mode, reg, 4, ref pc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
info.Length = pc - info.PC;
|
info.Length = pc - info.PC;
|
||||||
|
|
|
@ -319,7 +319,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
int reg = op & 7;
|
int reg = op & 7;
|
||||||
|
|
||||||
info.Mnemonic = "btst";
|
info.Mnemonic = "btst";
|
||||||
info.Args = String.Format("${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
info.Length = pc - info.PC;
|
info.Length = pc - info.PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
int reg = op & 7;
|
int reg = op & 7;
|
||||||
|
|
||||||
info.Mnemonic = "bchg";
|
info.Mnemonic = "bchg";
|
||||||
info.Args = String.Format("${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
info.Length = pc - info.PC;
|
info.Length = pc - info.PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
int reg = op & 7;
|
int reg = op & 7;
|
||||||
|
|
||||||
info.Mnemonic = "bclr";
|
info.Mnemonic = "bclr";
|
||||||
info.Args = String.Format("${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
info.Length = pc - info.PC;
|
info.Length = pc - info.PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
int reg = op & 7;
|
int reg = op & 7;
|
||||||
|
|
||||||
info.Mnemonic = "bset";
|
info.Mnemonic = "bset";
|
||||||
info.Args = String.Format("${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
info.Args = String.Format("#${0:X}, {1}", bit, DisassembleValue(mode, reg, 1, ref pc));
|
||||||
info.Length = pc - info.PC;
|
info.Length = pc - info.PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
void TRAP_Disasm(DisassemblyInfo info)
|
void TRAP_Disasm(DisassemblyInfo info)
|
||||||
{
|
{
|
||||||
info.Mnemonic = "trap";
|
info.Mnemonic = "trap";
|
||||||
info.Args = string.Format("${0:X}", op & 0xF);
|
info.Args = string.Format("#${0:X}", op & 0xF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrapVector(int vector)
|
void TrapVector(int vector)
|
||||||
|
|
|
@ -359,13 +359,13 @@ namespace BizHawk.Emulation.Cores.Components.M68000
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
immed = (byte)ReadWord(pc); pc += 2;
|
immed = (byte)ReadWord(pc); pc += 2;
|
||||||
return String.Format("${0:X}", immed);
|
return String.Format("#${0:X}", immed);
|
||||||
case 2:
|
case 2:
|
||||||
immed = (ushort)ReadWord(pc); pc += 2;
|
immed = (ushort)ReadWord(pc); pc += 2;
|
||||||
return String.Format("${0:X}", immed);
|
return String.Format("#${0:X}", immed);
|
||||||
case 4:
|
case 4:
|
||||||
immed = ReadLong(pc); pc += 4;
|
immed = ReadLong(pc); pc += 4;
|
||||||
return String.Format("${0:X}", immed);
|
return String.Format("#${0:X}", immed);
|
||||||
}
|
}
|
||||||
throw new ArgumentException("Invalid size");
|
throw new ArgumentException("Invalid size");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue