4 #include <string.h> // Why??? (for memset, etc... Lazy!) Dunno why, but this just strikes me as wrong...
26 // Exports from JAGUAR.CPP
28 extern int32 jaguar_cpu_in_exec;
29 extern uint32 jaguar_mainRom_crc32;
30 extern char * jaguar_eeproms_path;
31 extern char * whoName[9];
33 void jaguar_init(void);
34 void jaguar_reset(void);
35 void jaguar_done(void);
37 uint8 JaguarReadByte(uint32 offset, uint32 who = UNKNOWN);
38 uint16 JaguarReadWord(uint32 offset, uint32 who = UNKNOWN);
39 uint32 JaguarReadLong(uint32 offset, uint32 who = UNKNOWN);
40 void JaguarWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN);
41 void JaguarWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN);
42 void JaguarWriteLong(uint32 offset, uint32 data, uint32 who = UNKNOWN);
44 uint32 jaguar_interrupt_handler_is_valid(uint32 i);
45 void jaguar_dasm(uint32 offset, uint32 qt);
47 void JaguarExecute(int16 * backbuffer, bool render);
49 // Some handy macros to help converting native endian to big endian (jaguar native)
52 #define SET32(r, a, v) r[(a)] = ((v) & 0xFF000000) >> 24, r[(a)+1] = ((v) & 0x00FF0000) >> 16, \
53 r[(a)+2] = ((v) & 0x0000FF00) >> 8, r[(a)+3] = (v) & 0x000000FF
54 #define GET32(r, a) ((r[(a)] << 24) | (r[(a)+1] << 16) | (r[(a)+2] << 8) | r[(a)+3])
55 #define SET16(r, a, v) r[(a)] = ((v) & 0xFF00) >> 8, r[(a)+1] = (v) & 0xFF
56 #define GET16(r, a) ((r[(a)] << 8) | r[(a)+1])
58 // Various clock rates
60 #define M68K_CLOCK_RATE_PAL 13296950
61 #define M68K_CLOCK_RATE_NTSC 13295453
62 #define RISC_CLOCK_RATE_PAL 26593900
63 #define RISC_CLOCK_RATE_NTSC 26590906
65 // Stuff for IRQ handling
70 //Temp debug stuff (will go away soon, so don't depend on these)
72 void DumpMainMemory(void);
73 uint8 * GetRamPtr(void);
75 #endif // __JAGUAR_H__