]> Shamusworld >> Repos - virtualjaguar/blob - src/gpu.h
97ba4b33a3a7fdf804d27d3751bee3e864f75a5a
[virtualjaguar] / src / gpu.h
1 //
2 // GPU.H: Header file
3 //
4
5 #ifndef __GPU_H__
6 #define __GPU_H__
7
8 //#include "types.h"
9 #include "memory.h"
10
11 #define GPU_CONTROL_RAM_BASE    0x00F02100
12 #define GPU_WORK_RAM_BASE               0x00F03000
13
14 void GPUInit(void);
15 void GPUReset(void);
16 void GPUExec(int32);
17 void GPUDone(void);
18 void GPUUpdateRegisterBanks(void);
19 void GPUHandleIRQs(void);
20 void GPUSetIRQLine(int irqline, int state);
21
22 uint8 GPUReadByte(uint32 offset, uint32 who = UNKNOWN);
23 uint16 GPUReadWord(uint32 offset, uint32 who = UNKNOWN);
24 uint32 GPUReadLong(uint32 offset, uint32 who = UNKNOWN);
25 void GPUWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN);
26 void GPUWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN);
27 void GPUWriteLong(uint32 offset, uint32 data, uint32 who = UNKNOWN);
28
29 uint32 GPUGetPC(void);
30 void GPUReleaseTimeslice(void);
31 void GPUResetStats(void);
32 uint32 GPUReadPC(void);
33
34 // GPU interrupt numbers (from $F00100, bits 4-8)
35
36 enum { GPUIRQ_CPU = 0, GPUIRQ_DSP, GPUIRQ_TIMER, GPUIRQ_OBJECT, GPUIRQ_BLITTER };
37
38 #endif  // __GPU_H__