From 041e6659b33dac614d35063fe1f09beebb70d21a Mon Sep 17 00:00:00 2001
From: Nik Henson <nik-m3@diablo-designs.co.uk>
Date: Sun, 18 Sep 2011 22:13:20 +0000
Subject: [PATCH] Changes due to updates in debugger classes.

---
 Src/CPU/PowerPC/ppc603.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/Src/CPU/PowerPC/ppc603.c b/Src/CPU/PowerPC/ppc603.c
index 7f4d0c7..a2bbcc8 100644
--- a/Src/CPU/PowerPC/ppc603.c
+++ b/Src/CPU/PowerPC/ppc603.c
@@ -29,7 +29,7 @@ void ppc603_exception(int exception)
 {
 #ifdef SUPERMODEL_DEBUGGER
 		if (PPCDebug != NULL)
-			PPCDebug->CheckException(exception);
+			PPCDebug->CPUException(exception);
 #endif
 
 	switch( exception )
@@ -280,6 +280,11 @@ int ppc_execute(int cycles)
 
 	ppc603_check_interrupts();
 
+#ifdef SUPERMODEL_DEBUGGER
+	if (PPCDebug != NULL)
+		PPCDebug->CPUActive();
+#endif // SUPERMODEL_DEBUGGER
+
 	while( ppc_icount > 0 && !ppc.fatalError)
 	{
 		ppc.pc = ppc.npc;
@@ -294,10 +299,10 @@ int ppc_execute(int cycles)
 #ifdef SUPERMODEL_DEBUGGER
 		if (PPCDebug != NULL)
 		{
-			while (PPCDebug->CheckExecution(ppc.pc, opcode))
+			while (PPCDebug->CPUExecute(ppc.pc, opcode, (PPCDebug->instrCount > 0 ? 1 : 0)))
 				opcode = *ppc.op++;
 		}
-#endif
+#endif // SUPERMODEL_DEBUGGER
 
 		switch(opcode >> 26)
 		{
@@ -320,6 +325,11 @@ int ppc_execute(int cycles)
 		//ppc603_check_interrupts();
 	}
 
+#ifdef SUPERMODEL_DEBUGGER
+	if (PPCDebug != NULL)
+		PPCDebug->CPUInactive();
+#endif // SUPERMODEL_DEBUGGER
+
 	// update timebase
 	// timebase is incremented once every four core clock cycles, so adjust the cycles accordingly
 	ppc.tb += ((ppc_tb_base_icount - ppc_icount) / 4);