RetroArch
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Variables
a
b
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
g
i
l
m
o
p
q
r
s
t
u
v
x
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
q
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
u
x
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Á
á
é
Ά
Ή
Α
Δ
Ε
Κ
Ο
Π
Σ
Ω
α
ε
θ
π
В
И
К
О
П
У
а
в
д
з
и
к
о
п
с
ф
ч
я
オ
キ
ス
チ
デ
レ
上
下
中
右
启
啟
回
実
屏
左
已
巻
支
显
次
聲
过
鍵
需
顯
게
구
너
넷
도
동
되
레
리
버
변
비
사
성
쉐
시
실
애
연
오
이
입
잘
조
죄
중
지
참
코
키
필
화
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Á
á
Ά
Ή
Α
Ε
Κ
Ο
К
П
а
д
з
к
オ
ス
デ
レ
上
下
中
右
启
啟
回
屏
左
巻
支
显
次
聲
顯
너
넷
동
레
버
비
시
잘
중
지
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
é
Δ
Ε
Κ
Π
Σ
Ω
α
ε
θ
π
В
И
К
О
У
в
д
з
и
к
о
п
с
ф
ч
я
キ
チ
実
已
过
鍵
需
게
구
도
되
리
변
사
성
쉐
시
실
애
연
오
이
입
조
죄
참
코
키
필
화
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
defines
psp_defines.h
Go to the documentation of this file.
1
/* RetroArch - A frontend for libretro.
2
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3
* Copyright (C) 2011-2017 - Daniel De Matteis
4
*
5
* RetroArch is free software: you can redistribute it and/or modify it under the terms
6
* of the GNU General Public License as published by the Free Software Found-
7
* ation, either version 3 of the License, or (at your option) any later version.
8
*
9
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License along with RetroArch.
14
* If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
#ifndef _PSP_DEFINES_H
18
#define _PSP_DEFINES_H
19
20
/*============================================================
21
ERROR PROTOTYPES
22
============================================================ */
23
24
#ifndef SCE_OK
25
#define SCE_OK 0
26
#endif
27
28
/*============================================================
29
DISPLAY PROTOTYPES
30
============================================================ */
31
32
#if defined(SN_TARGET_PSP2) || defined(VITA)
33
34
#ifdef VITA
35
int
sceClibPrintf (
const
char
*
format
, ... );
36
#define printf sceClibPrintf
37
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
38
#else
39
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
40
#endif
41
42
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, sync)
43
44
#define PSP_FB_WIDTH 960
45
#define PSP_FB_HEIGHT 544
46
#define PSP_PITCH_PIXELS 1024
47
48
#elif defined(PSP)
49
#define DisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync) sceDisplaySetFrameBuf(topaddr, bufferwidth, pixelformat, sync)
50
51
#define SCE_DISPLAY_UPDATETIMING_NEXTVSYNC 1
52
53
#define PSP_FB_WIDTH 512
54
#define PSP_FB_HEIGHT 512
55
#define PSP_PITCH_PIXELS 512
56
57
#endif
58
59
/*============================================================
60
INPUT PROTOTYPES
61
============================================================ */
62
63
#if defined(SN_TARGET_PSP2) || defined(VITA)
64
65
#define STATE_BUTTON(state) ((state).buttons)
66
#define STATE_ANALOGLX(state) ((state).lx)
67
#define STATE_ANALOGLY(state) ((state).ly)
68
#define STATE_ANALOGRX(state) ((state).rx)
69
#define STATE_ANALOGRY(state) ((state).ry)
70
71
#if defined(VITA)
72
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_ANALOG)
73
74
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
75
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
76
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
77
#define PSP_CTRL_UP SCE_CTRL_UP
78
#define PSP_CTRL_START SCE_CTRL_START
79
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
80
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
81
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
82
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
83
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
84
#define PSP_CTRL_L SCE_CTRL_L1
85
#define PSP_CTRL_R SCE_CTRL_R1
86
#define PSP_CTRL_L2 SCE_CTRL_LTRIGGER
87
#define PSP_CTRL_R2 SCE_CTRL_RTRIGGER
88
#define PSP_CTRL_L3 SCE_CTRL_L3
89
#define PSP_CTRL_R3 SCE_CTRL_R3
90
#else
91
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_DIGITALANALOG)
92
93
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
94
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
95
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
96
#define PSP_CTRL_UP SCE_CTRL_UP
97
#define PSP_CTRL_START SCE_CTRL_START
98
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
99
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
100
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
101
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
102
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
103
#define PSP_CTRL_L SCE_CTRL_L
104
#define PSP_CTRL_R SCE_CTRL_R
105
#endif
106
107
#if defined(VITA)
108
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingModeExt(mode)
109
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositiveExt2(port, pad_data, bufs)
110
#else
111
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingMode(mode)
112
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(port, pad_data, bufs)
113
#endif
114
115
#elif defined(PSP)
116
117
#define PSP_CTRL_L PSP_CTRL_LTRIGGER
118
#define PSP_CTRL_R PSP_CTRL_RTRIGGER
119
120
#define STATE_BUTTON(state) ((state).Buttons)
121
#define STATE_ANALOGLX(state) ((state).Lx)
122
#define STATE_ANALOGLY(state) ((state).Ly)
123
#define STATE_ANALOGRX(state) ((state).Rx)
124
#define STATE_ANALOGRY(state) ((state).Ry)
125
126
#define DEFAULT_SAMPLING_MODE (PSP_CTRL_MODE_ANALOG)
127
128
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingMode(mode)
129
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(pad_data, bufs)
130
#endif
131
132
#endif
format
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition:
glext.h:6293
Generated by
1.8.15