| 1 | #ifndef __JAGUAR_H__ |
| 2 | #define __JAGUAR_H__ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include "memory.h" // For "UNKNOWN" enum |
| 6 | |
| 7 | // Breakpoint struture |
| 8 | typedef struct BrkInfo |
| 9 | { |
| 10 | bool Used; // Allocated breakpoint |
| 11 | bool Active; // Active breakpoint |
| 12 | char *Name; // Functions's name |
| 13 | char *Filename; // Source filename |
| 14 | char *LineSrc; // Source code line |
| 15 | size_t NumLine; // Line number |
| 16 | size_t Adr; // Breakpoint address |
| 17 | size_t HitCounts; // Hit counts |
| 18 | }S_BrkInfo; |
| 19 | |
| 20 | void JaguarSetScreenBuffer(uint32_t * buffer); |
| 21 | void JaguarSetScreenPitch(uint32_t pitch); |
| 22 | extern void JaguarInit(void); |
| 23 | extern void JaguarReset(void); |
| 24 | extern void JaguarDone(void); |
| 25 | |
| 26 | // Memory functions |
| 27 | uint8_t JaguarReadByte(uint32_t offset, uint32_t who = UNKNOWN); |
| 28 | uint16_t JaguarReadWord(uint32_t offset, uint32_t who = UNKNOWN); |
| 29 | uint32_t JaguarReadLong(uint32_t offset, uint32_t who = UNKNOWN); |
| 30 | void JaguarWriteByte(uint32_t offset, uint8_t data, uint32_t who = UNKNOWN); |
| 31 | void JaguarWriteWord(uint32_t offset, uint16_t data, uint32_t who = UNKNOWN); |
| 32 | void JaguarWriteLong(uint32_t offset, uint32_t data, uint32_t who = UNKNOWN); |
| 33 | |
| 34 | bool JaguarInterruptHandlerIsValid(uint32_t i); |
| 35 | void JaguarDasm(uint32_t offset, uint32_t qt); |
| 36 | |
| 37 | void JaguarExecuteNew(void); |
| 38 | void JaguarStepInto(void); |
| 39 | void JaguarStepOver(int depth); |
| 40 | |
| 41 | // Exports from JAGUAR.CPP |
| 42 | |
| 43 | extern int32_t jaguarCPUInExec; |
| 44 | extern uint32_t jaguarMainROMCRC32, jaguarROMSize, jaguarRunAddress; |
| 45 | extern char * jaguarEepromsPath; |
| 46 | extern bool jaguarCartInserted; |
| 47 | extern bool bpmActive, bpmSaveActive; |
| 48 | extern size_t bpmHitCounts; |
| 49 | extern uint32_t bpmAddress1; |
| 50 | extern bool startM68KTracing; |
| 51 | extern S_BrkInfo *brkInfo; |
| 52 | extern size_t brkNbr; |
| 53 | |
| 54 | // Various clock rates |
| 55 | |
| 56 | #define M68K_CLOCK_RATE_PAL 13296950 |
| 57 | #define M68K_CLOCK_RATE_NTSC 13295453 |
| 58 | #define RISC_CLOCK_RATE_PAL 26593900 |
| 59 | #define RISC_CLOCK_RATE_NTSC 26590906 |
| 60 | |
| 61 | // Stuff for IRQ handling |
| 62 | |
| 63 | #define ASSERT_LINE 1 |
| 64 | #define CLEAR_LINE 0 |
| 65 | |
| 66 | //Temp debug stuff (will go away soon, so don't depend on these) |
| 67 | |
| 68 | void DumpMainMemory(void); |
| 69 | uint8_t * GetRamPtr(void); |
| 70 | |
| 71 | #endif // __JAGUAR_H__ |