去掉大量不必要debug堆栈

This commit is contained in:
sin365 2025-01-17 00:23:39 +08:00
parent c7c9e57e52
commit 5c4d90bf01
5 changed files with 63 additions and 63 deletions

View File

@ -161,7 +161,7 @@ namespace cpu.m68000
public Action<int, int> WriteLong; public Action<int, int> WriteLong;
public delegate void debug_delegate(); public delegate void debug_delegate();
public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback; //public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback;
// Initialization // Initialization
@ -229,11 +229,11 @@ namespace cpu.m68000
{ {
int prevCycles = pendingCycles; int prevCycles = pendingCycles;
PPC = PC; PPC = PC;
debugger_start_cpu_hook_callback(); //debugger_start_cpu_hook_callback();
op = (ushort)ReadOpWord(PC); PC += 2; op = (ushort)ReadOpWord(PC); PC += 2;
Opcodes[op](); Opcodes[op]();
m68ki_check_interrupts(); m68ki_check_interrupts();
debugger_stop_cpu_hook_callback(); //debugger_stop_cpu_hook_callback();
int delta = prevCycles - pendingCycles; int delta = prevCycles - pendingCycles;
totalExecutedCycles += (ulong)delta; totalExecutedCycles += (ulong)delta;
} }

View File

@ -25,7 +25,7 @@ namespace cpu.m6809
public delegate int irq_delegate(int irqline); public delegate int irq_delegate(int irqline);
public irq_delegate irq_callback; public irq_delegate irq_callback;
public delegate void debug_delegate(); public delegate void debug_delegate();
public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback; //public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback;
private ulong totalExecutedCycles; private ulong totalExecutedCycles;
private int pendingCycles; private int pendingCycles;
public override ulong TotalExecutedCycles public override ulong TotalExecutedCycles
@ -575,10 +575,10 @@ namespace cpu.m6809
//debugger_instruction_hook(Machine, PCD); //debugger_instruction_hook(Machine, PCD);
ireg = ReadOp(PC.LowWord); ireg = ReadOp(PC.LowWord);
PC.LowWord++; PC.LowWord++;
debugger_start_cpu_hook_callback(); //debugger_start_cpu_hook_callback();
insn[ireg](); insn[ireg]();
pendingCycles -= cycles_6809[ireg]; pendingCycles -= cycles_6809[ireg];
debugger_stop_cpu_hook_callback(); //debugger_stop_cpu_hook_callback();
int delta = prevCycles - pendingCycles; int delta = prevCycles - pendingCycles;
totalExecutedCycles += (ulong)delta; totalExecutedCycles += (ulong)delta;
} while (pendingCycles > 0); } while (pendingCycles > 0);

View File

@ -87,7 +87,7 @@
PPC = RegPC.Word; PPC = RegPC.Word;
OP = ReadOp(PPC); OP = ReadOp(PPC);
RegPC.Word++; RegPC.Word++;
debugger_start_cpu_hook_callback(); //debugger_start_cpu_hook_callback();
switch (OP)//ReadMemory(RegPC.Word++)) switch (OP)//ReadMemory(RegPC.Word++))
{ {
case 0x00: // NOP case 0x00: // NOP
@ -11699,7 +11699,7 @@
totalExecutedCycles += 11; pendingCycles -= 11; totalExecutedCycles += 11; pendingCycles -= 11;
break; break;
} }
debugger_stop_cpu_hook_callback(); //debugger_stop_cpu_hook_callback();
} }
} }
while (pendingCycles > 0); while (pendingCycles > 0);

View File

@ -120,7 +120,7 @@ namespace cpu.z80
public Action<ushort, byte> WriteMemory; public Action<ushort, byte> WriteMemory;
public delegate void debug_delegate(); public delegate void debug_delegate();
public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback; //public debug_delegate debugger_start_cpu_hook_callback, debugger_stop_cpu_hook_callback;
public void UnregisterMemoryMapper() public void UnregisterMemoryMapper()
{ {

View File

@ -2118,45 +2118,45 @@ namespace MAME.Core
case "PGM": case "PGM":
case "Taito B": case "Taito B":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
case "Tehkan": case "Tehkan":
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback; //Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback;
Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback; //Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback;
break; break;
case "IGS011": case "IGS011":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
break; break;
case "SunA8": case "SunA8":
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback; //Z80A.zz1[1].debugger_start_cpu_hook_callback = null_callback;
Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback; //Z80A.zz1[1].debugger_stop_cpu_hook_callback = null_callback;
break; break;
case "Namco System 1": case "Namco System 1":
M6809Motion.m6809State = CPUState.RUN; M6809Motion.m6809State = CPUState.RUN;
M6809.mm1[0].DisassemblerInit(); M6809.mm1[0].DisassemblerInit();
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug; //M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug;
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug; //M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug;
M6809.mm1[1].debugger_start_cpu_hook_callback = null_callback; //M6809.mm1[1].debugger_start_cpu_hook_callback = null_callback;
M6809.mm1[1].debugger_stop_cpu_hook_callback = null_callback; //M6809.mm1[1].debugger_stop_cpu_hook_callback = null_callback;
M6809.mm1[2].debugger_start_cpu_hook_callback = null_callback; //M6809.mm1[2].debugger_start_cpu_hook_callback = null_callback;
M6809.mm1[2].debugger_stop_cpu_hook_callback = null_callback; //M6809.mm1[2].debugger_stop_cpu_hook_callback = null_callback;
break; break;
case "M72": case "M72":
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
case "M92": case "M92":
break; break;
@ -2186,12 +2186,12 @@ namespace MAME.Core
case "bublcave11": case "bublcave11":
case "bublcave10": case "bublcave10":
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[2].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[2].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[2].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[2].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
case "opwolf": case "opwolf":
case "opwolfa": case "opwolfa":
@ -2199,21 +2199,21 @@ namespace MAME.Core
case "opwolfu": case "opwolfu":
case "opwolfp": case "opwolfp":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
case "opwolfb": case "opwolfb":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
} }
break; break;
@ -2222,16 +2222,16 @@ namespace MAME.Core
{ {
case "cuebrick": case "cuebrick":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
break; break;
default: default:
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
} }
break; break;
@ -2251,11 +2251,11 @@ namespace MAME.Core
case "diamond": case "diamond":
M6809Motion.m6809State = CPUState.RUN; M6809Motion.m6809State = CPUState.RUN;
M6809.mm1[0].DisassemblerInit(); M6809.mm1[0].DisassemblerInit();
M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug; //M6809.mm1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_start_debug;
M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug; //M6809.mm1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.m6809motion.m6809_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
case "sf": case "sf":
case "sfua": case "sfua":
@ -2264,13 +2264,13 @@ namespace MAME.Core
case "sfan": case "sfan":
case "sfp": case "sfp":
M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN; M68000Motion.m68000State = M68000Motion.M68000State.M68000_RUN;
MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug; //MC68000.m1.debugger_start_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_start_debug;
MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug; //MC68000.m1.debugger_stop_cpu_hook_callback = Machine.mainMotion.m68000motion.m68000_stop_debug;
Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN; Z80Motion.z80State = Z80Motion.Z80AState.Z80A_RUN;
Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[0].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[0].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug; //Z80A.zz1[1].debugger_start_cpu_hook_callback = Machine.mainMotion.z80motion.z80_start_debug;
Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug; //Z80A.zz1[1].debugger_stop_cpu_hook_callback = Machine.mainMotion.z80motion.z80_stop_debug;
break; break;
} }
break; break;