X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fjaguar.h;h=63e6de6238ca4876b0859b451754f2eaafe93c16;hb=f005034d4a3990efc8e445ce46222ce32600411b;hp=0855bee2e2faf5f13cb40b430554f4e77c99c1e8;hpb=2ae315f25e623cc8279d3c9012a3a166d86684c2;p=virtualjaguar diff --git a/src/jaguar.h b/src/jaguar.h index 0855bee..63e6de6 100644 --- a/src/jaguar.h +++ b/src/jaguar.h @@ -1,61 +1,35 @@ #ifndef __JAGUAR_H__ #define __JAGUAR_H__ -#include // 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" +#include +#include "memory.h" // For "UNKNOWN" enum -// 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 JaguarSetScreenBuffer(uint32_t * buffer); +void JaguarSetScreenPitch(uint32_t pitch); +void JaguarInit(void); +void JaguarReset(void); +void JaguarDone(void); -void jaguar_init(void); -void jaguar_reset(void); -void jaguar_done(void); +uint8_t JaguarReadByte(uint32_t offset, uint32_t who = UNKNOWN); +uint16_t JaguarReadWord(uint32_t offset, uint32_t who = UNKNOWN); +uint32_t JaguarReadLong(uint32_t offset, uint32_t who = UNKNOWN); +void JaguarWriteByte(uint32_t offset, uint8_t data, uint32_t who = UNKNOWN); +void JaguarWriteWord(uint32_t offset, uint16_t data, uint32_t who = UNKNOWN); +void JaguarWriteLong(uint32_t offset, uint32_t data, uint32_t who = UNKNOWN); -uint8 JaguarReadByte(uint32 offset, uint32 who = UNKNOWN); -uint16 JaguarReadWord(uint32 offset, uint32 who = UNKNOWN); -uint32 JaguarReadLong(uint32 offset, uint32 who = UNKNOWN); -void JaguarWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN); -void JaguarWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN); -void JaguarWriteLong(uint32 offset, uint32 data, uint32 who = UNKNOWN); +bool JaguarInterruptHandlerIsValid(uint32_t i); +void JaguarDasm(uint32_t offset, uint32_t qt); -uint32 jaguar_interrupt_handler_is_valid(uint32 i); -void jaguar_dasm(uint32 offset, uint32 qt); - -void JaguarExecute(uint32 * backbuffer, bool render); -//For testing the new system... void JaguarExecuteNew(void); -// Some handy macros to help converting native endian to big endian (jaguar native) -// & vice versa +// Exports from JAGUAR.CPP -#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]) +extern int32_t jaguarCPUInExec; +extern uint32_t jaguarMainROMCRC32, jaguarROMSize, jaguarRunAddress; +extern char * jaguarEepromsPath; +extern bool jaguarCartInserted; +extern bool bpmActive; +extern uint32_t bpmAddress1; // Various clock rates @@ -72,6 +46,6 @@ void JaguarExecuteNew(void); //Temp debug stuff (will go away soon, so don't depend on these) void DumpMainMemory(void); -uint8 * GetRamPtr(void); +uint8_t * GetRamPtr(void); #endif // __JAGUAR_H__