]> Shamusworld >> Repos - virtualjaguar/blob - src/tom.h
Extensive changes to remove gcc 4.x warnings, general code cleanup
[virtualjaguar] / src / tom.h
1 //
2 // TOM Header file
3 //
4
5 #ifndef __TOM_H__
6 #define __TOM_H__
7
8 //#include "jaguar.h"
9 #include "types.h"
10
11 #define VIDEO_MODE_16BPP_CRY    0
12 #define VIDEO_MODE_24BPP_RGB    1
13 #define VIDEO_MODE_16BPP_DIRECT 2
14 #define VIDEO_MODE_16BPP_RGB    3
15
16 // 68000 Interrupt bit positions (enabled at $F000E0)
17
18 enum { IRQ_VBLANK = 0, IRQ_GPU, IRQ_OPFLAG, IRQ_TIMER, IRQ_DSP };
19
20 void tom_init(void);
21 void tom_reset(void);
22 void tom_done(void);
23
24 uint8 TOMReadByte(uint32 offset, uint32 who = UNKNOWN);
25 uint16 TOMReadWord(uint32 offset, uint32 who = UNKNOWN);
26 void TOMWriteByte(uint32 offset, uint8 data, uint32 who = UNKNOWN);
27 void TOMWriteWord(uint32 offset, uint16 data, uint32 who = UNKNOWN);
28
29 //void TOMExecScanline(int16 * backbuffer, int32 scanline, bool render);
30 void TOMExecScanline(uint16 scanline, bool render);
31 uint32 tom_getVideoModeWidth(void);
32 uint32 tom_getVideoModeHeight(void);
33 uint8 tom_getVideoMode(void);
34 uint8 * tom_get_ram_pointer(void);
35 uint16 tom_get_hdb(void);
36 uint16 tom_get_vdb(void);
37 //uint16 tom_get_scanline(void);
38 //uint32 tom_getHBlankWidthInPixels(void);
39
40 int     tom_irq_enabled(int irq);
41 uint16 tom_irq_control_reg(void);
42 void tom_set_irq_latch(int irq, int enabled);
43 void TOMExecPIT(uint32 cycles);
44 void tom_set_pending_jerry_int(void);
45 void tom_set_pending_timer_int(void);
46 void tom_set_pending_object_int(void);
47 void tom_set_pending_gpu_int(void);
48 void tom_set_pending_video_int(void);
49 void TOMResetPIT(void);
50
51 //uint32 TOMGetSDLScreenPitch(void);
52 void TOMResetBackbuffer(uint32 * backbuffer);
53
54 // Exported variables
55
56 extern uint32 tom_width;
57 extern uint32 tom_height;
58 extern uint8 tom_ram_8[];
59
60 #endif  // __TOM_H__