KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
pvr2.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 dc/pvr/pvr2.h
4 Copyright (C) 2026 Ruslan Rostovtsev
5*/
6
7/** \file dc/pvr/pvr2.h
8 \brief Second PowerVR (CLXB) on NAOMI 2
9 \ingroup pvr2
10
11 Second PowerVR (CLXB) on NAOMI 2. Same registers and VRAM as CLXA,
12 at \ref PVR2_ADDR_STRIDE. Those addresses do not decode until Elan
13 IFCTL bit 2 is set (cleared at boot). \ref pvr2_init() sets that bit
14 and initializes the memory controller so \ref PVR2_RAM_BASE can be
15 used. Display output on this chip stays off.
16
17 \author Ruslan Rostovtsev
18*/
19
20#ifndef __DC_PVR_PVR2_H
21#define __DC_PVR_PVR2_H
22
23#include <kos/cdefs.h>
24__BEGIN_DECLS
25
26/** \defgroup pvr2 Second PVR (NAOMI 2)
27 \brief CLXB bring-up and VRAM mapping
28 \ingroup pvr
29
30 @{
31*/
32
33/** \brief Enable CLXB windows and initialize its memory controller.
34
35 \retval 0 On success (or already initialized)
36 \retval -1 If Elan is not present
37*/
38int pvr2_init(void);
39
40/** \brief Reset CLXB and disable its address windows.
41
42 \retval 0 On success
43 \retval -1 If it was not initialized
44*/
45int pvr2_shutdown(void);
46
47/** \brief True if \ref pvr2_init() has succeeded in this process. */
48int pvr2_enabled(void);
49
50/** @} */
51
52__END_DECLS
53
54#endif /* __DC_PVR_PVR2_H */
Various common macros used throughout the codebase.
int pvr2_enabled(void)
True if pvr2_init() has succeeded in this process.
int pvr2_init(void)
Enable CLXB windows and initialize its memory controller.
int pvr2_shutdown(void)
Reset CLXB and disable its address windows.