]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gpu.cpp
Fixes for the 68K IRQ system. There's probably a little more to do though.
[virtualjaguar] / src / gpu.cpp
index 0275a26da1676490e582e7257906da806200ff87..4a141c419a1c13a572a3488c5c8c8d7209153f35 100644 (file)
@@ -1,9 +1,20 @@
+#if 1
+
 //
 // GPU Core
 //
 // Originally by David Raingeard (Cal2)
 // GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS)
 // Cleanups, endian wrongness, and bad ASM amelioration by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -------------------------------------------------------------
+// JLH  01/16/2010  Created this log ;-)
+
+//
 // Note: Endian wrongness probably stems from the MAME origins of this emu and
 //       the braindead way in which MAME handles memory. :-)
 //
@@ -21,7 +32,7 @@
 #include "jaguar.h"
 #include "log.h"
 #include "m68k.h"
-#include "memory.h"
+//#include "memory.h"
 #include "tom.h"
 
 //#define GPU_DEBUG
@@ -728,10 +739,11 @@ WriteLog("GPU: %s setting GPU PC to %08X %s\n", whoName[who], gpu_pc, (GPU_RUNNI
 //WriteLog("GPU->CPU interrupt\n");
                                if (TOMIRQEnabled(IRQ_GPU))
                                {
-                                       if ((TOMIRQEnabled(IRQ_GPU)) && (JaguarInterruptHandlerIsValid(64)))
+//This is the programmer's responsibility, to make sure the handler is valid, not ours!
+//                                     if ((TOMIRQEnabled(IRQ_GPU))// && (JaguarInterruptHandlerIsValid(64)))
                                        {
                                                TOMSetPendingGPUInt();
-                                               m68k_set_irq(7);                        // Set 68000 NMI
+                                               m68k_set_irq(2);                        // Set 68000 IPL 2
                                                GPUReleaseTimeslice();
                                        }
                                }
@@ -2419,3 +2431,13 @@ static void gpu_opcode_sh(void)
 //Temporary: Testing only!
 //#include "gpu2.cpp"
 //#include "gpu3.cpp"
+
+#else
+
+// New thread-safe GPU core
+
+int GPUCore(void * data)
+{
+}
+
+#endif