-
Notifications
You must be signed in to change notification settings - Fork 7
/
video_low.h
56 lines (46 loc) · 2.54 KB
/
video_low.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
BootMii - a Free Software replacement for the Nintendo/BroadOn bootloader.
low-level video support for the BootMii UI
Copyright (C) 2008, 2009 Hector Martin "marcan" <[email protected]>
Copyright (C) 2009 Haxx Enterprises <[email protected]>
Copyright (C) 2009 Sven Peter <[email protected]>
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Some routines and initialization constants originally came from the
"GAMECUBE LOW LEVEL INFO" document and sourcecode released by Titanik
of Crazy Nation and the GC Linux project.
*/
#ifndef VIDEO_LOW_H
#define VIDEO_LOW_H
#define MEM_VIDEO_BASE (0xCC002000) ///< Memory address of Video Interface
#define MEM_VIDEO_BASE_PTR (u32*)MEM_VIDEO_BASE ///< Pointer to Video Interface
// 32-bit-wide registers
#define R_VIDEO_VTIMING (MEM_VIDEO_BASE+0x00) ///< Vertical timing.
#define R_VIDEO_STATUS1 (MEM_VIDEO_BASE+0x02) ///< Status? register location.
#define R_VIDEO_PSB_ODD (MEM_VIDEO_BASE+0x00) ///< Postblank odd.
#define R_VIDEO_PRB_ODD (MEM_VIDEO_BASE+0x00) ///< Preblank odd.
#define R_VIDEO_PSB_EVEN (MEM_VIDEO_BASE+0x00) ///< Postblank even.
#define R_VIDEO_PRB_EVEN (MEM_VIDEO_BASE+0x00) ///< Preblank even.
#define R_VIDEO_FRAMEBUFFER_1 (MEM_VIDEO_BASE+0x1C) ///< Framebuffer1 register location.
#define R_VIDEO_FRAMEBUFFER_2 (MEM_VIDEO_BASE+0x24) ///< Framebuffer2 register location.
// 16-bit-wide registers
#define R_VIDEO_HALFLINE_1 (MEM_VIDEO_BASE+0x2C) ///< HalfLine1 register location.
#define R_VIDEO_HALFLINE_2 (MEM_VIDEO_BASE+0x2E) ///< HalfLine2 register location.
#define R_VIDEO_STATUS (MEM_VIDEO_BASE+0x6C) ///< VideoStatus register location.
#define R_VIDEO_VISEL (MEM_VIDEO_BASE+0x6E) // cable detect
// Constants for VIDEO_Init()
#define VIDEO_640X480_NTSCi_YUV16 (0)
#define VIDEO_640X480_PAL50_YUV16 (1)
#define VIDEO_640X480_PAL60_YUV16 (2)
#define VIDEO_640X480_NTSCp_YUV16 (3)
// Constants for VIDEO_SetFrameBuffer
#define VIDEO_FRAMEBUFFER_1 (1)
#define VIDEO_FRAMEBUFFER_2 (2)
#define VIDEO_FRAMEBUFFER_BOTH (0)
void VIDEO_Init (int VideoMode);
void VIDEO_SetFrameBuffer (void *FrameBufferAddr);
void VIDEO_WaitVSync (void);
void VIDEO_BlackOut (void);
void VIDEO_Shutdown (void);
void VISetupEncoder (void);
#endif /* VIDEO_H */