-//
-// Main Jaguar execution loop (1 frame)
-//
-void JaguarExecute(uint32 * backbuffer, bool render)
-{
- uint16 vp = TOMReadWord(0xF0003E) + 1;
- uint16 vi = TOMReadWord(0xF0004E);
-//Using WO registers is OK, since we're the ones controlling access--there's nothing wrong here! ;-)
-//Though we shouldn't be able to do it using TOMReadWord... !!! FIX !!!
-
-// uint16 vdb = TOMReadWord(0xF00046);
-//Note: This is the *definite* end of the display, though VDE *might* be less than this...
-// uint16 vbb = TOMReadWord(0xF00040);
-//It seems that they mean it when they say that VDE is the end of object processing.
-//However, we need to be able to tell the OP (or TOM) that we've reached the end of the
-//buffer and not to write any more pixels... !!! FIX !!!
-// uint16 vde = TOMReadWord(0xF00048);
-
- uint16 refreshRate = (vjs.hardwareTypeNTSC ? 60 : 50);
- uint32 m68kClockRate = (vjs.hardwareTypeNTSC ? M68K_CLOCK_RATE_NTSC : M68K_CLOCK_RATE_PAL);
-//Not sure the above is correct, since the number of lines and timings given in the JTRM
-//seem to indicate the refresh rate is *half* the above...
-// uint16 refreshRate = (vjs.hardwareTypeNTSC ? 30 : 25);
- // Should these be hardwired or read from VP? Yes, from VP!
- uint32 M68KCyclesPerScanline = m68kClockRate / (vp * refreshRate);
- uint32 RISCCyclesPerScanline = m68kClockRate / (vp * refreshRate);
-
- TOMResetBackbuffer(backbuffer);
-/*extern int effect_start;
-if (effect_start)
- WriteLog("JagExe: VP=%u, VI=%u, CPU CPS=%u, GPU CPS=%u\n", vp, vi, M68KCyclesPerScanline, RISCCyclesPerScanline);//*/
-
-//extern int start_logging;
- for(uint16 i=0; i<vp; i++)
- {
- // Increment the horizontal count (why? RNG? Besides which, this is *NOT* cycle accurate!)
- TOMWriteWord(0xF00004, (TOMReadWord(0xF00004) + 1) & 0x7FF);
-
- TOMWriteWord(0xF00006, i); // Write the VC
-
-// if (i == vi) // Time for Vertical Interrupt?
-//Not sure if this is correct...
-//Seems to be, kinda. According to the JTRM, this should only fire on odd lines in non-interlace mode...
-//Which means that it normally wouldn't go when it's zero.
- if (i == vi && i > 0 && TOMIRQEnabled(IRQ_VBLANK)) // Time for Vertical Interrupt?
- {
- // We don't have to worry about autovectors & whatnot because the Jaguar
- // tells you through its HW registers who sent the interrupt...
- TOMSetPendingVideoInt();
- m68k_set_irq(7);
- }
-
-//if (start_logging)
-// WriteLog("About to execute M68K (%u)...\n", i);
- m68k_execute(M68KCyclesPerScanline);
-//if (start_logging)
-// WriteLog("About to execute TOM's PIT (%u)...\n", i);
- TOMExecPIT(RISCCyclesPerScanline);
-//if (start_logging)
-// WriteLog("About to execute JERRY's PIT (%u)...\n", i);
- JERRYExecPIT(RISCCyclesPerScanline);
-//if (start_logging)
-// WriteLog("About to execute JERRY's SSI (%u)...\n", i);
- JERRYI2SExec(RISCCyclesPerScanline);
- BUTCHExec(RISCCyclesPerScanline);
-//if (start_logging)
-// WriteLog("About to execute GPU (%u)...\n", i);
- GPUExec(RISCCyclesPerScanline);
-
- if (vjs.DSPEnabled)
- {
- if (vjs.usePipelinedDSP)
- DSPExecP2(RISCCyclesPerScanline); // Pipelined DSP execution (3 stage)...
- else
- DSPExec(RISCCyclesPerScanline); // Ordinary non-pipelined DSP
-// DSPExecComp(RISCCyclesPerScanline); // Comparison core
- }
-
-//if (start_logging)
-// WriteLog("About to execute OP (%u)...\n", i);
- TOMExecScanline(i, render);
- }
+ // temp, until debugger is in place
+//00802016: jsr $836F1A.l
+//0080201C: jsr $836B30.l
+//00802022: jsr $836B18.l
+//00802028: jsr $8135F0.l
+//00813C1E: jsr $813F76.l
+//00802038: jsr $836D00.l
+//00802098: jsr $8373A4.l
+//008020A2: jsr $83E24A.l
+//008020BA: jsr $83E156.l
+//008020C6: jsr $83E19C.l
+//008020E6: jsr $8445E8.l
+//008020EC: jsr $838C20.l
+//0080211A: jsr $838ED6.l
+//00802124: jsr $89CA56.l
+//0080212A: jsr $802B48.l
+#if 0
+ WriteLog("-------------------------------------------\n");
+ JaguarDasm(0x8445E8, 0x200);
+ WriteLog("-------------------------------------------\n");
+ JaguarDasm(0x838C20, 0x200);
+ WriteLog("-------------------------------------------\n");
+ JaguarDasm(0x838ED6, 0x200);
+ WriteLog("-------------------------------------------\n");
+ JaguarDasm(0x89CA56, 0x200);
+ WriteLog("-------------------------------------------\n");
+ JaguarDasm(0x802B48, 0x200);
+ WriteLog("\n\nM68000 disassembly at $802000...\n");
+ JaguarDasm(0x802000, 6000);
+ WriteLog("\n");//*/
+#endif
+/* WriteLog("\n\nM68000 disassembly at $6004...\n");
+ JaguarDasm(0x6004, 10000);
+ WriteLog("\n");//*/
+// WriteLog("\n\nM68000 disassembly at $802000...\n");
+// JaguarDasm(0x802000, 0x1000);
+// WriteLog("\n\nM68000 disassembly at $4100...\n");
+// JaguarDasm(0x4100, 200);
+// WriteLog("\n\nM68000 disassembly at $800800...\n");
+// JaguarDasm(0x800800, 0x1000);