X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Finclude%2Fjaguar.h;h=6463c2ff29466283e13c8954f5eb04f948853284;hb=c2f778cea7c1e7bc6507a5749d74267babc2a232;hp=aeb449d4080e3e2a93f1f541eddffd7a908640a7;hpb=0031c06df2f7f099ca5ecf1632f46b92f6b0dd79;p=virtualjaguar diff --git a/src/include/jaguar.h b/src/include/jaguar.h index aeb449d..6463c2f 100644 --- a/src/include/jaguar.h +++ b/src/include/jaguar.h @@ -5,8 +5,7 @@ #include "log.h" #include "version.h" #include "memory.h" -//#include "../star026c/starcpu.h" -#include "m68k.h" // Musashi! Not StarCrap! (Why are you afraid to show us the source, Neill? :-) +#include "m68k.h" #include "tom.h" #include "jerry.h" #include "gpu.h" @@ -16,7 +15,7 @@ #include "clock.h" #include "anajoy.h" #include "joystick.h" -#include "pcm.h" +#include "dac.h" #include "jagdasm.h" #include "dsnd.h" #include "cdrom.h" @@ -28,15 +27,15 @@ extern int32 jaguar_cpu_in_exec; extern uint32 jaguar_mainRom_crc32; extern char * jaguar_eeproms_path; -#ifdef __PORT__ -void jaguar_init(const char * filename); -#else +//#ifdef __PORT__ +//void jaguar_init(const char * filename); +//#else void jaguar_init(void); -#endif // #ifdef __PORT__ +//#endif // #ifdef __PORT__ void jaguar_reset(void); void jaguar_reset_handler(void); void jaguar_done(void); -void jaguar_exec(int16 * backbuffer, uint8 render); +void jaguar_exec(int16 * backbuffer, bool render); unsigned jaguar_byte_read(unsigned int offset); unsigned jaguar_word_read(unsigned int offset); unsigned jaguar_long_read(unsigned int offset); @@ -46,9 +45,29 @@ void jaguar_long_write(unsigned offset, unsigned data); uint32 jaguar_interrupt_handler_is_valid(uint32 i); void jaguar_dasm(uint32 offset, uint32 qt); -//Temp debug stuff +//New stuff... +void JaguarExecute(int16 * backbuffer, bool render); + +// Some handy macros to help converting native endian to big endian (jaguar native) +// & vice versa + +#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]) +#define SET16(r, a, v) r[(a)] = ((v) & 0xFF00) >> 8, r[(a)+1] = (v) & 0xFF +#define GET16(r, a) ((r[(a)] << 8) | r[(a)+1]) + +// Various clock rates + +#define M68K_CLOCK_RATE_PAL 13296950 +#define M68K_CLOCK_RATE_NTSC 13295453 +#define RISC_CLOCK_RATE_PAL 26593900 +#define RISC_CLOCK_RATE_NTSC 26590906 + + +//Temp debug stuff (will go away soon, so don't use these) void DumpMainMemory(void); uint8 * GetRamPtr(void); -#endif // #ifndef __JAGUAR_H__ +#endif // __JAGUAR_H__