Here's the cleanup. Nothing really important, but it does remove a variable from ARM state structure so make sure to properly recompile all ARM core sources.

Code
diff -Nru old/arm7.c new/arm7.c
--- old/arm7.c	2008-02-24 21:25:19.000000000 +0100
+++ new/arm7.c	2008-02-24 21:25:26.000000000 +0100
@@ -51,7 +51,6 @@
   // sane startup values
   ARM7.fiq = 0;
   ARM7.irq = 0;
-  ARM7.swi = 0;
   ARM7.carry = 0;
   ARM7.overflow = 0;
   ARM7.flagi = FALSE;
@@ -175,14 +174,6 @@
   //--------------------------------------------------------------------------
 
   //--------------------------------------------------------------------------
-  /** Sets SWI state. */
-void ARM7_SetSWI (void)
-  {
-    ARM7.swi = 1;
-  }
-  //--------------------------------------------------------------------------
-
-  //--------------------------------------------------------------------------
   /** Tests for pending interrupts, switches to one if possible. */
 void ARM7_CheckIRQ ()
   {
@@ -219,19 +210,6 @@
       ARM7.irq = 0;
       }
     }
-
-  if (ARM7.swi)
-    {
-	ARM7_SetCPSR ((sr & 0xffffffc0) | ARM7_CPSR_M_svc);
-	ARM7.Rx [ARM7_SPSR] = sr;
-
-	if  (sr & ARM7_CPSR_T)
-		ARM7.Rx [ARM7_LR] = ARM7.Rx [ARM7_PC] + 2;
-	else
-		ARM7.Rx [ARM7_LR] = ARM7.Rx [ARM7_PC] + 4;
-	ARM7.Rx [ARM7_PC] = 0x00000008;
-	ARM7.swi = 0;
-    }
 #endif
   }
   //--------------------------------------------------------------------------
diff -Nru old/arm7.h new/arm7.h
--- old/arm7.h	2008-02-24 21:25:19.000000000 +0100
+++ new/arm7.h	2008-02-24 21:25:26.000000000 +0100
@@ -101,7 +101,7 @@
   ARM7_REG Rx_bank [6][10];
 
   /** FIQ and IRQ interrupt requests. */
-  int fiq, irq, swi;
+  int fiq, irq;
 
   /** Carry flag for barrel shifter and ALU operations. */
   int carry;
@@ -141,8 +141,6 @@
 void ARM7_SetFIQ (int stan);
   /** Sets IRQ line state. */
 void ARM7_SetIRQ (int stan);
-  /** Sets SWI state. */
-void ARM7_SetSWI (void);
 
   /** Tests for pending interrupts, switches to one if possible. */
 void ARM7_CheckIRQ (void);

Last minute update: DCDSF is now operational. Hooked to my PC via SCART -> Line-in.
If anyone wants a tune hardware-checked, drop me a note smile

Last edited by Deunan Knute; 02/24/08 09:38 PM.