]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/jaguar.h
Fixed fullscreen<-->windowed mode swith in OpenGL mode, phase one of
[virtualjaguar] / src / jaguar.h
index 0855bee2e2faf5f13cb40b430554f4e77c99c1e8..f6a6aec5fdf8a90ef0fe751059c452c2a52a43c4 100644 (file)
@@ -1,34 +1,7 @@
 #ifndef __JAGUAR_H__
 #define __JAGUAR_H__
 
-#include <string.h>    // Why??? (for memset, etc... Lazy!) Dunno why, but this just strikes me as wrong...
 #include "types.h"
-#include "log.h"
-#include "version.h"
-#include "memory.h"
-#include "m68k.h"
-#include "tom.h"
-#include "jerry.h"
-#include "gpu.h"
-#include "dsp.h"
-#include "objectp.h"
-#include "blitter.h"
-#include "clock.h"
-//#include "anajoy.h"
-#include "joystick.h"
-#include "dac.h"
-#include "jagdasm.h"
-#include "cdrom.h"
-#include "eeprom.h"
-//#include "cdi.h"
-//#include "cdbios.h"
-
-// Exports from JAGUAR.CPP
-
-extern int32 jaguar_cpu_in_exec;
-extern uint32 jaguar_mainRom_crc32, jaguarRomSize, jaguarRunAddress;
-extern char * jaguar_eeproms_path;
-extern char * whoName[9];
 
 void jaguar_init(void);
 void jaguar_reset(void);
@@ -48,9 +21,30 @@ void JaguarExecute(uint32 * backbuffer, bool render);
 //For testing the new system...
 void JaguarExecuteNew(void);
 
+// Exports from JAGUAR.CPP
+
+extern uint8 * jaguar_mainRam;
+extern uint8 * jaguar_mainRom;
+extern uint8 * jaguar_bootRom;
+extern uint8 * jaguar_CDBootROM;
+extern bool BIOSLoaded;
+extern bool CDBIOSLoaded;
+extern int32 jaguar_cpu_in_exec;
+extern uint32 jaguar_mainRom_crc32, jaguarRomSize, jaguarRunAddress;
+extern char * jaguar_eeproms_path;
+extern const char * whoName[9];
+
 // Some handy macros to help converting native endian to big endian (jaguar native)
 // & vice versa
 
+#define SET64(r, a, v)         r[(a)] = ((v) & 0xFF00000000000000) >> 56, r[(a)+1] = ((v) & 0x00FF000000000000) >> 48, \
+                                               r[(a)+2] = ((v) & 0x0000FF0000000000) >> 40, r[(a)+3] = ((v) & 0x000000FF00000000) >> 32, \
+                                               r[(a)+4] = ((v) & 0xFF000000) >> 24, r[(a)+5] = ((v) & 0x00FF0000) >> 16, \
+                                               r[(a)+6] = ((v) & 0x0000FF00) >> 8, r[(a)+7] = (v) & 0x000000FF
+#define GET64(r, a)            (((uint64)r[(a)] << 56) | ((uint64)r[(a)+1] << 48) | \
+                                               ((uint64)r[(a)+2] << 40) | ((uint64)r[(a)+3] << 32) | \
+                                               ((uint64)r[(a)+4] << 24) | ((uint64)r[(a)+5] << 16) | \
+                                               ((uint64)r[(a)+6] << 8) | (uint64)r[(a)+7])
 #define SET32(r, a, v) r[(a)] = ((v) & 0xFF000000) >> 24, r[(a)+1] = ((v) & 0x00FF0000) >> 16, \
                                                r[(a)+2] = ((v) & 0x0000FF00) >> 8, r[(a)+3] = (v) & 0x000000FF
 #define GET32(r, a)            ((r[(a)] << 24) | (r[(a)+1] << 16) | (r[(a)+2] << 8) | r[(a)+3])