]> Shamusworld >> Repos - virtualjaguar/blob - src/jaguar.h
Stretched the virtual screen slightly.
[virtualjaguar] / src / jaguar.h
1 #ifndef __JAGUAR_H__
2 #define __JAGUAR_H__
3
4 #include "types.h"
5 #include "memory.h"                                                     // For "UNKNOWN" enum
6
7 void JaguarSetScreenBuffer(uint32 * buffer);
8 void JaguarSetScreenPitch(uint32 pitch);
9 void JaguarInit(void);
10 void JaguarReset(void);
11 void JaguarDone(void);
12
13 uint8 JaguarReadByte(uint32 offset, uint32 who = UNKNOWN);
14 uint16 JaguarReadWord(uint32 offset, uint32 who = UNKNOWN);
15 uint32 JaguarReadLong(uint32 offset, uint32 who = UNKNOWN);
16 void JaguarWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN);
17 void JaguarWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN);
18 void JaguarWriteLong(uint32 offset, uint32 data, uint32 who = UNKNOWN);
19
20 bool JaguarInterruptHandlerIsValid(uint32 i);
21 void JaguarDasm(uint32 offset, uint32 qt);
22
23 void JaguarExecute(uint32 * backbuffer, bool render);
24 //For testing the new system...
25 void JaguarExecuteNew(void);
26
27 // Exports from JAGUAR.CPP
28
29 extern int32 jaguarCPUInExec;
30 extern uint32 jaguarMainROMCRC32, jaguarROMSize, jaguarRunAddress;
31 extern char * jaguarEepromsPath;
32 extern bool jaguarCartInserted;
33
34 // Various clock rates
35
36 #define M68K_CLOCK_RATE_PAL             13296950
37 #define M68K_CLOCK_RATE_NTSC    13295453
38 #define RISC_CLOCK_RATE_PAL             26593900
39 #define RISC_CLOCK_RATE_NTSC    26590906
40
41 // Stuff for IRQ handling
42
43 #define ASSERT_LINE             1
44 #define CLEAR_LINE              0
45
46 // Video stuff (should go in tom.h?)
47
48 // NB: This virtual width is for PWIDTH = 4
49 //#define VIRTUAL_SCREEN_WIDTH            320
50 #define VIRTUAL_SCREEN_WIDTH            340
51 #define VIRTUAL_SCREEN_HEIGHT_NTSC      240
52 #define VIRTUAL_SCREEN_HEIGHT_PAL       256
53
54 //Temp debug stuff (will go away soon, so don't depend on these)
55
56 void DumpMainMemory(void);
57 uint8 * GetRamPtr(void);
58
59 #endif  // __JAGUAR_H__