Merge branch 'master' into patch-1
[clinton/Virtual-Jaguar-Rx.git] / src / jaguar.h
CommitLineData
cf76e892
JPM
1#ifndef __JAGUAR_H__
2#define __JAGUAR_H__
3
4#include <stdint.h>
5#include "memory.h" // For "UNKNOWN" enum
6
7void JaguarSetScreenBuffer(uint32_t * buffer);
8void JaguarSetScreenPitch(uint32_t pitch);
9void JaguarInit(void);
10void JaguarReset(void);
11void JaguarDone(void);
12
13uint8_t JaguarReadByte(uint32_t offset, uint32_t who = UNKNOWN);
14uint16_t JaguarReadWord(uint32_t offset, uint32_t who = UNKNOWN);
15uint32_t JaguarReadLong(uint32_t offset, uint32_t who = UNKNOWN);
16void JaguarWriteByte(uint32_t offset, uint8_t data, uint32_t who = UNKNOWN);
17void JaguarWriteWord(uint32_t offset, uint16_t data, uint32_t who = UNKNOWN);
18void JaguarWriteLong(uint32_t offset, uint32_t data, uint32_t who = UNKNOWN);
19
20bool JaguarInterruptHandlerIsValid(uint32_t i);
21void JaguarDasm(uint32_t offset, uint32_t qt);
22
23void JaguarExecuteNew(void);
24void JaguarStepInto(void);
25void JaguarStepOver(int depth);
26
27// Exports from JAGUAR.CPP
28
29extern int32_t jaguarCPUInExec;
30extern uint32_t jaguarMainROMCRC32, jaguarROMSize, jaguarRunAddress;
31extern char * jaguarEepromsPath;
32extern bool jaguarCartInserted;
33extern bool bpmActive, bpmSaveActive;
34extern uint32_t bpmAddress1;
35extern bool startM68KTracing;
36
37// Various clock rates
38
39#define M68K_CLOCK_RATE_PAL 13296950
40#define M68K_CLOCK_RATE_NTSC 13295453
41#define RISC_CLOCK_RATE_PAL 26593900
42#define RISC_CLOCK_RATE_NTSC 26590906
43
44// Stuff for IRQ handling
45
46#define ASSERT_LINE 1
47#define CLEAR_LINE 0
48
49//Temp debug stuff (will go away soon, so don't depend on these)
50
51void DumpMainMemory(void);
52uint8_t * GetRamPtr(void);
53
54#endif // __JAGUAR_H__