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