// Cleanups and endian wrongness amelioration by James L. Hammons
// Note: Endian wrongness probably stems from the MAME origins of this emu and
// the braindead way in which MAME handles memory. :-)
-//
+//
#include "jaguar.h"
#include "gpu.h"
#include "memory.h"
#include "joystick.h"
+#include "gui.h"
#define CPU_DEBUG
//Do this in makefile??? Yes! Could, but it's easier to define here...
uint32 jaguar_mainRom_crc32, jaguarRomSize, jaguarRunAddress;
-/*static*/ uint8 * jaguar_mainRam = NULL;
-/*static*/ uint8 * jaguar_mainRom = NULL;
-/*static*/ uint8 * jaguar_bootRom = NULL;
-/*static*/ uint8 * jaguar_CDBootROM = NULL;
+uint8 * jaguar_mainRam = NULL;
+uint8 * jaguar_mainRom = NULL;
+uint8 * jaguar_bootRom = NULL;
+uint8 * jaguar_CDBootROM = NULL;
+bool BIOSLoaded = false;
+bool CDBIOSLoaded = false;
#ifdef CPU_DEBUG_MEMORY
uint8 writeMemMax[0x400000], writeMemMin[0x400000];
WriteLog("Jaguar: Unknown byte %02X written at %08X by %s (M68K PC=%06X)\n", data, address, whoName[who], m68k_get_reg(NULL, M68K_REG_PC));
#endif
#ifdef ABORT_ON_UNMAPPED_MEMORY_ACCESS
- extern bool finished;
+// extern bool finished;
finished = true;
- extern bool doDSPDis;
+// extern bool doDSPDis;
if (who == DSP)
doDSPDis = true;
#endif
WriteLog("Jaguar: Unknown word %04X written at %08X by %s (M68K PC=%06X)\n", data, address, whoName[who], m68k_get_reg(NULL, M68K_REG_PC));
#endif
#ifdef ABORT_ON_UNMAPPED_MEMORY_ACCESS
- extern bool finished;
+// extern bool finished;
finished = true;
- extern bool doDSPDis;
+// extern bool doDSPDis;
if (who == DSP)
doDSPDis = true;
#endif
WriteLog("Jaguar: Unknown byte read at %08X by %s (M68K PC=%06X)\n", address, whoName[who], m68k_get_reg(NULL, M68K_REG_PC));
#endif
#ifdef ABORT_ON_UNMAPPED_MEMORY_ACCESS
- extern bool finished;
+// extern bool finished;
finished = true;
- extern bool doDSPDis;
+// extern bool doDSPDis;
if (who == DSP)
doDSPDis = true;
#endif
WriteLog("Jaguar: Unknown word read at %08X by %s (M68K PC=%06X)\n", address, whoName[who], m68k_get_reg(NULL, M68K_REG_PC));
#endif
#ifdef ABORT_ON_UNMAPPED_MEMORY_ACCESS
- extern bool finished;
+// extern bool finished;
finished = true;
- extern bool doDSPDis;
+// extern bool doDSPDis;
if (who == DSP)
doDSPDis = true;
#endif
JERRYWriteByte(offset, data, who);
return;
}
-
+
jaguar_unknown_writebyte(offset, data, who);
}
//New timer based code stuffola...
void ScanlineCallback(void);
void RenderCallback(void);
-extern uint32 * backbuffer;
+//extern uint32 * backbuffer;
void jaguar_reset(void)
{
//NOTE: This causes a (virtual) crash if this is set in the config but not found... !!! FIX !!!
if (vc == 0)
// if (vc == vbb)
{
- joystick_exec();
+ JoystickExec();
RenderBackbuffer();
TOMResetBackbuffer(backbuffer);
frameDone = true;