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