Mario Kart 64
Loading...
Searching...
No Matches
os_vi.h
Go to the documentation of this file.
1#ifndef _ULTRA64_VI_H_
2#define _ULTRA64_VI_H_
3
4#include <PR/ultratypes.h>
5#include <PR/os_message.h>
6
7/* Ultra64 Video Interface */
8
9/* Special Features */
10#define OS_VI_GAMMA_ON 0x0001
11#define OS_VI_GAMMA_OFF 0x0002
12#define OS_VI_GAMMA_DITHER_ON 0x0004
13#define OS_VI_GAMMA_DITHER_OFF 0x0008
14#define OS_VI_DIVOT_ON 0x0010
15#define OS_VI_DIVOT_OFF 0x0020
16#define OS_VI_DITHER_FILTER_ON 0x0040
17#define OS_VI_DITHER_FILTER_OFF 0x0080
18
19#define OS_VI_GAMMA 0x08
20#define OS_VI_GAMMA_DITHER 0x04
21#define OS_VI_DIVOT 0x10
22#define OS_VI_DITHER_FILTER 0x10000
23#define OS_VI_UNK200 0x200
24#define OS_VI_UNK100 0x100
25
26/* Types */
27
39
47
48typedef struct {
51 OSViFieldRegs fldRegs[2];
52} OSViMode;
53
54typedef struct {
55 /* 0x00 */ u16 unk00; // some kind of flags. swap buffer sets to 0x10
56 /* 0x02 */ u16 retraceCount;
57 /* 0x04 */ void* buffer;
58 /* 0x08 */ OSViMode* modep;
59 /* 0x0c */ u32 features;
60 /* 0x10 */ OSMesgQueue* mq;
61 /* 0x14 */ OSMesg* msg;
62 /* 0x18 */ u32 unk18;
63 /* 0x1c */ u32 unk1c;
64 /* 0x20 */ u32 unk20;
65 /* 0x24 */ f32 unk24;
66 /* 0x28 */ u16 unk28;
67 /* 0x2c */ u32 unk2c;
69
70void osCreateViManager(OSPri pri);
71void osViSetMode(OSViMode* mode);
72void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount);
73void osViBlack(u8 active);
75void osViSwapBuffer(void* vaddr);
76
77#define OS_VI_NTSC_LPN1 0 /* NTSC */
78#define OS_VI_NTSC_LPF1 1
79#define OS_VI_NTSC_LAN1 2
80#define OS_VI_NTSC_LAF1 3
81#define OS_VI_NTSC_LPN2 4
82#define OS_VI_NTSC_LPF2 5
83#define OS_VI_NTSC_LAN2 6
84#define OS_VI_NTSC_LAF2 7
85#define OS_VI_NTSC_HPN1 8
86#define OS_VI_NTSC_HPF1 9
87#define OS_VI_NTSC_HAN1 10
88#define OS_VI_NTSC_HAF1 11
89#define OS_VI_NTSC_HPN2 12
90#define OS_VI_NTSC_HPF2 13
91
92#define OS_VI_PAL_LPN1 14 /* PAL */
93#define OS_VI_PAL_LPF1 15
94#define OS_VI_PAL_LAN1 16
95#define OS_VI_PAL_LAF1 17
96#define OS_VI_PAL_LPN2 18
97#define OS_VI_PAL_LPF2 19
98#define OS_VI_PAL_LAN2 20
99#define OS_VI_PAL_LAF2 21
100#define OS_VI_PAL_HPN1 22
101#define OS_VI_PAL_HPF1 23
102#define OS_VI_PAL_HAN1 24
103#define OS_VI_PAL_HAF1 25
104#define OS_VI_PAL_HPN2 26
105#define OS_VI_PAL_HPF2 27
106
107extern OSViMode osViModeTable[]; /* Global VI mode table */
108
109#endif
s32 OSPri
Definition os_thread.h:21
void osCreateViManager(OSPri pri)
Definition osCreateViManager.c:22
void osViSetSpecialFeatures(u32 func)
Definition osViSetSpecialFeatures.c:5
OSViMode osViModeTable[]
Definition osViTable.c:3
void osViBlack(u8 active)
Definition osViBlack.c:6
void osViSetMode(OSViMode *mode)
Definition osViSetMode.c:5
void osViSetEvent(OSMesgQueue *mq, OSMesg msg, u32 retraceCount)
Definition osViSetEvent.c:5
void osViSwapBuffer(void *vaddr)
Definition osViSwapBuffer.c:5
Definition os_vi.h:28
u32 hStart
Definition os_vi.h:35
u32 xScale
Definition os_vi.h:36
u32 ctrl
Definition os_vi.h:29
u32 width
Definition os_vi.h:30
u32 vSync
Definition os_vi.h:32
u32 hSync
Definition os_vi.h:33
u32 burst
Definition os_vi.h:31
u32 leap
Definition os_vi.h:34
u32 vCurrent
Definition os_vi.h:37
Definition os_vi.h:54
OSViMode * modep
Definition os_vi.h:58
u16 unk00
Definition os_vi.h:55
u32 features
Definition os_vi.h:59
OSMesgQueue * mq
Definition os_vi.h:60
OSMesg * msg
Definition os_vi.h:61
u16 retraceCount
Definition os_vi.h:56
void * buffer
Definition os_vi.h:57
u32 unk20
Definition os_vi.h:64
u16 unk28
Definition os_vi.h:66
u32 unk1c
Definition os_vi.h:63
u32 unk18
Definition os_vi.h:62
f32 unk24
Definition os_vi.h:65
u32 unk2c
Definition os_vi.h:67
Definition os_vi.h:40
u32 vBurst
Definition os_vi.h:44
u32 yScale
Definition os_vi.h:42
u32 vIntr
Definition os_vi.h:45
u32 vStart
Definition os_vi.h:43
u32 origin
Definition os_vi.h:41
Definition os_vi.h:48
u8 type
Definition os_vi.h:49
OSViCommonRegs comRegs
Definition os_vi.h:50
unsigned int u32
Definition ultratypes.h:16
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14
unsigned char u8
Definition ultratypes.h:12