去掉大量不必要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 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
@ -229,11 +229,11 @@ namespace cpu.m68000
{
int prevCycles = pendingCycles;
PPC = PC;
debugger_start_cpu_hook_callback();
//debugger_start_cpu_hook_callback();
op = (ushort)ReadOpWord(PC); PC += 2;
Opcodes[op]();
m68ki_check_interrupts();
debugger_stop_cpu_hook_callback();
//debugger_stop_cpu_hook_callback();
int delta = prevCycles - pendingCycles;
totalExecutedCycles += (ulong)delta;
}

View File

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

View File

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

View File

@ -120,7 +120,7 @@ namespace cpu.z80
public Action<ushort, byte> WriteMemory;
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()
{

View File

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