RetroArch
ps3_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 _PS3_DEFINES_H
18 #define _PS3_DEFINES_H
19 
20 #include <sdk_version.h>
21 
22 /*============================================================
23  AUDIO PROTOTYPES
24 ============================================================ */
25 
26 #ifdef __PSL1GHT__
27 #include <audio/audio.h>
28 #include <sys/thread.h>
29 
30 #include <sys/event_queue.h>
31 #include <lv2/mutex.h>
32 #include <lv2/cond.h>
33 
34 /* define all the audio/audio port functions */
35 #define cellAudioQuit audioQuit
36 #define cellAudioInit audioInit
37 #define cellAudioPortStart audioPortStart
38 #define cellAudioPortOpen audioPortOpen
39 #define cellAudioPortClose audioPortClose
40 #define cellAudioPortStop audioPortStop
41 #define CellAudioPortParam audioPortParam
42 #define cellAudioPortOpen audioPortOpen
43 #define cellAudioAddData audioAddData
44 
45 /* define all the event queue functions */
46 #define sys_event_queue_receive sysEventQueueReceive
47 #define cellAudioSetNotifyEventQueue audioSetNotifyEventQueue
48 #define cellAudioRemoveNotifyEventQueue audioRemoveNotifyEventQueue
49 #define cellAudioCreateNotifyEventQueue audioCreateNotifyEventQueue
50 
51 /* define all the lightweight mutex functions */
52 #define sys_lwmutex_destroy sysLwMutexDestroy
53 #define sys_lwmutex_lock sysLwMutexLock
54 #define sys_lwmutex_unlock sysLwMutexUnlock
55 #define sys_lwmutex_create sysLwMutexCreate
56 
57 //forward decl. for audioAddData
58 extern int audioAddData(uint32_t portNum, float *data, uint32_t frames, float volume);
59 
60 /* define all the lightweight condition functions */
61 #define sys_lwcond_create sysLwCondCreate
62 #define sys_lwcond_destroy sysLwCondDestroy
63 #define sys_lwcond_wait sysLwCondWait
64 #define sys_lwcond_signal sysLwCondSignal
65 
66 #define CELL_AUDIO_BLOCK_SAMPLES AUDIO_BLOCK_SAMPLES
67 #define SYS_NO_TIMEOUT 0
68 #define param_attrib attrib
69 #define sys_lwmutex_attribute_t sys_lwmutex_attr_t
70 #define sys_lwcond_attribute_t sys_lwcond_attr_t
71 #define sys_semaphore_t sys_sem_t
72 
73 #else
74 #include <cell/audio.h>
75 #include <sys/event.h>
76 #include <sys/synchronization.h>
77 
78 #define numChannels nChannel
79 #define numBlocks nBlock
80 #define param_attrib attr
81 
82 #endif
83 
84 /*============================================================
85  INPUT PAD PROTOTYPES
86 ============================================================ */
87 
88 #ifdef __PSL1GHT__
89 #include <io/pad.h>
90 /* define all the ps3 pad structs */
91 #define CellPadInfo2 padInfo2
92 #define CellPadData padData
93 
94 /* define all the ps3 pad functions */
95 #define cellPadGetInfo2 ioPadGetInfo2
96 #define cellPadGetData ioPadGetData
97 #define cellPadInit ioPadInit
98 #define cellPadEnd ioPadEnd
99 
100 #define now_connect connected
101 #else
102 #include <cell/pad.h>
103 #endif
104 
105 /*============================================================
106  INPUT MOUSE PROTOTYPES
107 ============================================================ */
108 
109 #ifdef HAVE_MOUSE
110 
111 #ifdef __PSL1GHT__
112 #include <io/mouse.h>
113 
114 /* define ps3 mouse structs */
115 #define CellMouseInfo mouseInfo
116 #define CellMouseData mouseData
117 
118 /* define all the ps3 mouse functions */
119 #define cellMouseInit ioMouseInit
120 #define cellMouseGetData ioMouseGetData
121 #define cellMouseEnd ioMouseEnd
122 #define cellMouseGetInfo ioMouseGetInfo
123 
124 /* PSL1GHT does not define these in its header */
125 #define CELL_MOUSE_BUTTON_1 (UINT64_C(1) << 0) /* Button 1 */
126 #define CELL_MOUSE_BUTTON_2 (UINT64_C(1) << 1) /* Button 2 */
127 #define CELL_MOUSE_BUTTON_3 (UINT64_C(1) << 2) /* Button 3 */
128 #define CELL_MOUSE_BUTTON_4 (UINT64_C(1) << 3) /* Button 4 */
129 #define CELL_MOUSE_BUTTON_5 (UINT64_C(1) << 4) /* Button 5 */
130 #define CELL_MOUSE_BUTTON_6 (UINT64_C(1) << 5) /* Button 6 */
131 #define CELL_MOUSE_BUTTON_7 (UINT64_C(1) << 6) /* Button 7 */
132 #define CELL_MOUSE_BUTTON_8 (UINT64_C(1) << 7) /* Button 8 */
133 
134 #else
135 #include <cell/mouse.h>
136 #endif
137 
138 #endif
139 
140 /*============================================================
141  OSK PROTOTYPES
142 ============================================================ */
143 
144 #ifdef __PSL1GHT__
145 #include <sysutil/osk.h>
146 /* define all the OSK functions */
147 #define pOskLoadAsync oskLoadAsync
148 #define pOskSetLayoutMode oskSetLayoutMode
149 #define pOskSetKeyLayoutOption oskSetKeyLayoutOption
150 #define pOskGetSize oskGetSize
151 #define pOskDisableDimmer oskDisableDimmer
152 #define pOskAbort oskAbort
153 #define pOskUnloadAsync oskUnloadAsync
154 
155 /* define OSK structs / types */
156 #define sys_memory_container_t sys_mem_container_t
157 #define CellOskDialogPoint oskPoint
158 #define CellOskDialogInputFieldInfo oskInputFieldInfo
159 #define CellOskDialogCallbackReturnParam oskCallbackReturnParam
160 #define CellOskDialogParam oskParam
161 
162 #define osk_allowed_panels allowedPanels
163 #define osk_prohibit_flags prohibitFlags
164 
165 #define osk_inputfield_message message
166 #define osk_inputfield_starttext startText
167 #define osk_inputfield_max_length maxLength
168 #define osk_callback_return_param res
169 #define osk_callback_num_chars len
170 #define osk_callback_return_string str
171 
172 /* define the OSK defines */
173 #define CELL_OSKDIALOG_10KEY_PANEL OSK_10KEY_PANEL
174 #define CELL_OSKDIALOG_FULLKEY_PANEL OSK_FULLKEY_PANEL
175 #define CELL_OSKDIALOG_LAYOUTMODE_X_ALIGN_CENTER OSK_LAYOUTMODE_HORIZONTAL_ALIGN_CENTER
176 #define CELL_OSKDIALOG_LAYOUTMODE_Y_ALIGN_TOP OSK_LAYOUTMODE_VERTICAL_ALIGN_TOP
177 #define CELL_OSKDIALOG_PANELMODE_NUMERAL OSK_PANEL_TYPE_NUMERAL
178 #define CELL_OSKDIALOG_PANELMODE_NUMERAL_FULL_WIDTH OSK_PANEL_TYPE_NUMERAL_FULL_WIDTH
179 #define CELL_OSKDIALOG_PANELMODE_ALPHABET OSK_PANEL_TYPE_ALPHABET
180 #define CELL_OSKDIALOG_PANELMODE_ENGLISH OSK_PANEL_TYPE_ENGLISH
181 #define CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK (0)
182 #define CELL_OSKDIALOG_INPUT_FIELD_RESULT_CANCELED (1)
183 #define CELL_OSKDIALOG_INPUT_FIELD_RESULT_ABORT (2)
184 #define CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT (3)
185 #define CELL_OSKDIALOG_STRING_SIZE (512)
186 #else
187 #include <sysutil/sysutil_oskdialog.h>
188 /* define all the OSK functions */
189 #define pOskLoadAsync cellOskDialogLoadAsync
190 #define pOskSetLayoutMode cellOskDialogSetLayoutMode
191 #define pOskSetKeyLayoutOption cellOskDialogSetKeyLayoutOption
192 #define pOskGetSize cellOskDialogGetSize
193 #define pOskDisableDimmer cellOskDialogDisableDimmer
194 #define pOskAbort cellOskDialogAbort
195 #define pOskUnloadAsync cellOskDialogUnloadAsync
196 
197 /* define OSK structs / types */
198 #define osk_allowed_panels allowOskPanelFlg
199 #define osk_prohibit_flags prohibitFlgs
200 #define osk_inputfield_message message
201 #define osk_inputfield_starttext init_text
202 #define osk_inputfield_max_length limit_length
203 #define osk_callback_return_param result
204 #define osk_callback_num_chars numCharsResultString
205 #define osk_callback_return_string pResultString
206 #endif
207 
208 /*============================================================
209  JPEG/PNG DECODING/ENCODING PROTOTYPES
210 ============================================================ */
211 
212 #ifdef __PSL1GHT__
213 /* define all of the JPEG/PNG structs */
214 #define CellJpgDecMainHandle int
215 #define CellPngDecMainHandle int
216 #define CellJpgDecSubHandle int
217 #define CellPngDecSubHandle int
218 #define CellJpgDecThreadInParam jpgDecThreadInParam
219 #define CellPngDecThreadInParam pngDecThreadInParam
220 #define CellJpgDecThreadOutParam jpgDecThreadOutParam
221 #define CellPngDecThreadOutParam pngDecThreadOutParam
222 #define CellJpgDecSrc jpgDecSource
223 #define CellPngDecSrc pngDecSource
224 #define CellJpgDecOpnInfo uint32_t
225 #define CellPngDecOpnInfo uint32_t
226 #define CellJpgDecInfo jpgDecInfo
227 #define CellPngDecInfo pngDecInfo
228 #define CellJpgDecInParam jpgDecInParam
229 #define CellPngDecInParam pngDecInParam
230 #define CellJpgDecOutParam jpgDecOutParam
231 #define CellPngDecOutParam pngDecOutParam
232 #define CellJpgDecDataOutInfo jpgDecDataInfo
233 #define CellPngDecDataOutInfo pngDecDataInfo
234 #define CellJpgDecDataCtrlParam uint64_t
235 #define CellPngDecDataCtrlParam uint64_t
236 
237 #define spu_enable enable
238 #define stream_select stream
239 #define color_alpha alpha
240 #define color_space space
241 #define output_mode mode
242 #define output_bytes_per_line bytes_per_line
243 #define output_width width
244 #define output_height height
245 
246 /* define all of the JPEG/PNG functions */
247 #define cellJpgDecCreate jpgDecCreate
248 #define cellJpgDecOpen jpgDecOpen
249 #define cellJpgDecReadHeader jpgDecReadHeader
250 #define cellJpgDecSetParameter jpgDecSetParameter
251 #define cellJpgDecDecodeData jpgDecDecodeData
252 #define cellJpgDecClose jpgDecClose
253 #define cellJpgDecDestroy jpgDecDestroy
254 
255 #define cellPngDecCreate pngDecCreate
256 #define cellPngDecOpen pngDecOpen
257 #define cellPngDecReadHeader pngDecReadHeader
258 #define cellPngDecSetParameter pngDecSetParameter
259 #define cellPngDecDecodeData pngDecDecodeData
260 #define cellPngDecClose pngDecClose
261 #define cellPngDecDestroy pngDecDestroy
262 
263 /* define all of the JPEG/PNG defines */
264 #define CELL_PNGDEC_SPU_THREAD_ENABLE 1
265 #define CELL_JPGDEC_SPU_THREAD_ENABLE 1
266 #define CELL_JPGDEC_FILE JPGDEC_FILE
267 #define CELL_PNGDEC_FILE PNGDEC_FILE
268 #define CELL_JPGDEC_SPU_THREAD_ENABLE 1
269 #define CELL_JPGDEC_FAST JPGDEC_LOW_QUALITY
270 #define CELL_JPGDEC_TOP_TO_BOTTOM JPGDEC_TOP_TO_BOTTOM
271 #define CELL_PNGDEC_TOP_TO_BOTTOM PNGDEC_TOP_TO_BOTTOM
272 #define CELL_JPG_ARGB JPGDEC_ARGB
273 #define CELL_PNGDEC_ARGB PNGDEC_ARGB
274 #define CELL_JPGDEC_DEC_STATUS_FINISH 0
275 #define CELL_PNGDEC_DEC_STATUS_FINISH 0
276 #define CELL_PNGDEC_1BYTE_PER_1PIXEL 1
277 #define CELL_PNGDEC_STREAM_ALPHA 1
278 #define CELL_OK 0
279 #define PTR_NULL 0
280 
281 #else
282 /* define the JPEG/PNG struct member names */
283 #define spu_enable spuThreadEnable
284 #define ppu_prio ppuThreadPriority
285 #define spu_prio spuThreadPriority
286 #define malloc_func cbCtrlMallocFunc
287 #define malloc_arg cbCtrlMallocArg
288 #define free_func cbCtrlFreeFunc
289 #define free_arg cbCtrlFreeArg
290 #define stream_select srcSelect
291 #define file_name fileName
292 #define file_offset fileOffset
293 #define file_size fileSize
294 #define stream_ptr streamPtr
295 #define stream_size streamSize
296 #define down_scale downScale
297 #define color_alpha outputColorAlpha
298 #define color_space outputColorSpace
299 #define cmd_ptr commandPtr
300 #define quality method
301 #define output_mode outputMode
302 #define output_bytes_per_line outputBytesPerLine
303 #define output_width outputWidth
304 #define output_height outputHeight
305 #define bit_depth outputBitDepth
306 #define pack_flag outputPackFlag
307 #define alpha_select outputAlphaSelect
308 
309 #define PTR_NULL NULL
310 
311 #endif
312 
313 /*============================================================
314  TIMER PROTOTYPES
315 ============================================================ */
316 
317 #ifdef __PSL1GHT__
318 #define sys_timer_usleep usleep
319 #endif
320 
321 /*============================================================
322  THREADING PROTOTYPES
323 ============================================================ */
324 
325 #ifdef __PSL1GHT__
326 #include <sys/thread.h>
327 
328 /* define all the thread functions */
329 #define sys_ppu_thread_create sysThreadCreate
330 #define sys_ppu_thread_join sysThreadJoin
331 #define sys_ppu_thread_exit sysThreadExit
332 
333 #define SYS_PPU_THREAD_CREATE_JOINABLE 0 /* FIXME - not sure if this is correct */
334 #elif defined(__CELLOS_LV2__)
335 #include <sys/ppu_thread.h>
336 #endif
337 
338 /*============================================================
339  MEMORY PROTOTYPES
340 ============================================================ */
341 
342 #ifdef __PSL1GHT__
343 #define sys_memory_container_create sysMemContainerCreate
344 #define sys_memory_container_destroy sysMemContainerDestroy
345 #endif
346 
347 /*============================================================
348  RSX PROTOTYPES
349 ============================================================ */
350 
351 #ifdef __PSL1GHT__
352 #include <sysutil/video.h>
353 #define CELL_GCM_FALSE GCM_FALSE
354 #define CELL_GCM_TRUE GCM_TRUE
355 
356 #define CELL_GCM_ONE GCM_ONE
357 #define CELL_GCM_ZERO GCM_ZERO
358 #define CELL_GCM_ALWAYS GCM_ALWAYS
359 
360 #define CELL_GCM_LOCATION_LOCAL GCM_LOCATION_RSX
361 #define CELL_GCM_LOCATION_MAIN GCM_LOCATION_CELL
362 
363 #define CELL_GCM_MAX_RT_DIMENSION (4096)
364 
365 #define CELL_GCM_TEXTURE_LINEAR_NEAREST GCM_TEXTURE_LINEAR_MIPMAP_NEAREST
366 #define CELL_GCM_TEXTURE_LINEAR_LINEAR GCM_TEXTURE_LINEAR_MIPMAP_LINEAR
367 #define CELL_GCM_TEXTURE_NEAREST_LINEAR GCM_TEXTURE_NEAREST_MIPMAP_LINEAR
368 #define CELL_GCM_TEXTURE_NEAREST_NEAREST GCM_TEXTURE_NEAREST_MIPMAP_NEAREST
369 #define CELL_GCM_TEXTURE_NEAREST GCM_TEXTURE_NEAREST
370 #define CELL_GCM_TEXTURE_LINEAR GCM_TEXTURE_LINEAR
371 
372 #define CELL_GCM_TEXTURE_A8R8G8B8 GCM_TEXTURE_FORMAT_A8R8G8B8
373 #define CELL_GCM_TEXTURE_R5G6B5 GCM_TEXTURE_FORMAT_R5G6B5
374 #define CELL_GCM_TEXTURE_A1R5G5B5 GCM_TEXTURE_FORMAT_A1R5G5B5
375 
376 #define CELL_GCM_TEXTURE_CLAMP_TO_EDGE GCM_TEXTURE_CLAMP_TO_EDGE
377 
378 #define CELL_GCM_TEXTURE_MAX_ANISO_1 GCM_TEXTURE_MAX_ANISO_1
379 #define CELL_GCM_TEXTURE_CONVOLUTION_QUINCUNX GCM_TEXTURE_CONVOLUTION_QUINCUNX
380 #define CELL_GCM_TEXTURE_ZFUNC_NEVER GCM_TEXTURE_ZFUNC_NEVER
381 
382 #define CELL_GCM_DISPLAY_HSYNC GCM_FLIP_HSYNC
383 #define CELL_GCM_DISPLAY_VSYNC GCM_FLIP_VSYNC
384 
385 #define CELL_GCM_CLEAR_R GCM_CLEAR_R
386 #define CELL_GCM_CLEAR_G GCM_CLEAR_G
387 #define CELL_GCM_CLEAR_B GCM_CLEAR_B
388 #define CELL_GCM_CLEAR_A GCM_CLEAR_A
389 
390 #define CELL_GCM_FUNC_ADD GCM_FUNC_ADD
391 
392 #define CELL_GCM_SMOOTH (0x1D01)
393 #define CELL_GCM_DEBUG_LEVEL2 2
394 
395 #define CELL_GCM_COMPMODE_DISABLED 0
396 
397 #define CELL_GCM_TRANSFER_LOCAL_TO_LOCAL 0
398 
399 #define CELL_GCM_TEXTURE_REMAP_ORDER_XYXY (0)
400 #define CELL_GCM_TEXTURE_REMAP_ORDER_XXXY (1)
401 
402 #define CELL_GCM_TEXTURE_UNSIGNED_REMAP_NORMAL (0)
403 
404 #define CELL_GCM_TEXTURE_REMAP_FROM_A (0)
405 #define CELL_GCM_TEXTURE_REMAP_FROM_R (1)
406 #define CELL_GCM_TEXTURE_REMAP_FROM_G (2)
407 #define CELL_GCM_TEXTURE_REMAP_FROM_B (3)
408 
409 #define CELL_GCM_TEXTURE_REMAP_ZERO (0)
410 #define CELL_GCM_TEXTURE_REMAP_ONE (1)
411 #define CELL_GCM_TEXTURE_REMAP_REMAP (2)
412 
413 #define CELL_GCM_MAX_TEXIMAGE_COUNT (16)
414 
415 #define CELL_GCM_TEXTURE_WRAP (1)
416 
417 #define CELL_GCM_TEXTURE_NR (0x00)
418 #define CELL_GCM_TEXTURE_LN (0x20)
419 
420 #define CELL_GCM_TEXTURE_B8 (0x81)
421 
422 #define CELL_RESC_720x480 RESC_720x480
423 #define CELL_RESC_720x576 RESC_720x576
424 #define CELL_RESC_1280x720 RESC_1280x720
425 #define CELL_RESC_1920x1080 RESC_1920x1080
426 
427 #define CELL_RESC_FULLSCREEN RESC_FULLSCREEN
428 #define CELL_RESC_PANSCAN RESC_PANSCAN
429 #define CELL_RESC_LETTERBOX RESC_LETTERBOX
430 #define CELL_RESC_CONSTANT_VRAM RESC_CONSTANT_VRAM
431 #define CELL_RESC_MINIMUM_GPU_LOAD RESC_MINIMUM_GPU_LOAD
432 
433 #define CELL_RESC_PAL_50 RESC_PAL_50
434 #define CELL_RESC_PAL_60_DROP RESC_PAL_60_DROP
435 #define CELL_RESC_PAL_60_INTERPOLATE RESC_PAL_60_INTERPOLATE
436 #define CELL_RESC_PAL_60_INTERPOLATE_30_DROP RESC_PAL_60_INTERPOLATE_30_DROP
437 #define CELL_RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE
438 
439 #define CELL_RESC_INTERLACE_FILTER RESC_INTERLACE_FILTER
440 #define CELL_RESC_NORMAL_BILINEAR RESC_NORMAL_BILINEAR
441 
442 #define CELL_RESC_ELEMENT_HALF RESC_ELEMENT_HALF
443 
444 #define CELL_VIDEO_OUT_ASPECT_AUTO VIDEO_ASPECT_AUTO
445 #define CELL_VIDEO_OUT_ASPECT_4_3 VIDEO_ASPECT_4_3
446 #define CELL_VIDEO_OUT_ASPECT_16_9 VIDEO_ASPECT_16_9
447 
448 #define CELL_VIDEO_OUT_RESOLUTION_480 VIDEO_RESOLUTION_480
449 #define CELL_VIDEO_OUT_RESOLUTION_576 VIDEO_RESOLUTION_576
450 #define CELL_VIDEO_OUT_RESOLUTION_720 VIDEO_RESOLUTION_720
451 #define CELL_VIDEO_OUT_RESOLUTION_1080 VIDEO_RESOLUTION_1080
452 #define CELL_VIDEO_OUT_RESOLUTION_960x1080 VIDEO_RESOLUTION_960x1080
453 #define CELL_VIDEO_OUT_RESOLUTION_1280x1080 VIDEO_RESOLUTION_1280x1080
454 #define CELL_VIDEO_OUT_RESOLUTION_1440x1080 VIDEO_RESOLUTION_1440x1080
455 #define CELL_VIDEO_OUT_RESOLUTION_1600x1080 VIDEO_RESOLUTION_1600x1080
456 
457 #define CELL_VIDEO_OUT_SCAN_MODE_PROGRESSIVE VIDEO_SCANMODE_PROGRESSIVE
458 
459 #define CELL_VIDEO_OUT_PRIMARY VIDEO_PRIMARY
460 
461 #define CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8 VIDEO_BUFFER_FORMAT_XRGB
462 #define CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_R16G16B16X16_FLOAT VIDEO_BUFFER_FORMAT_FLOAT
463 
464 #define CellGcmSurface gcmSurface
465 #define CellGcmTexture gcmTexture
466 #define CellGcmContextData _gcmCtxData
467 #define CellGcmConfig gcmConfiguration
468 #define CellVideoOutConfiguration videoConfiguration
469 #define CellVideoOutResolution videoResolution
470 #define CellVideoOutState videoState
471 
472 #define CellRescInitConfig rescInitConfig
473 #define CellRescSrc rescSrc
474 #define CellRescBufferMode rescBufferMode
475 
476 #define resolutionId resolution
477 #define memoryFrequency memoryFreq
478 #define coreFrequency coreFreq
479 
480 #define cellGcmFinish rsxFinish
481 
482 #define cellGcmGetFlipStatus gcmGetFlipStatus
483 #define cellGcmResetFlipStatus gcmResetFlipStatus
484 #define cellGcmSetWaitFlip gcmSetWaitFlip
485 #define cellGcmSetDebugOutputLevel gcmSetDebugOutputLevel
486 #define cellGcmSetDisplayBuffer gcmSetDisplayBuffer
487 #define cellGcmSetGraphicsHandler gcmSetGraphicsHandler
488 #define cellGcmSetFlipHandler gcmSetFlipHandler
489 #define cellGcmSetVBlankHandler gcmSetVBlankHandler
490 #define cellGcmGetConfiguration gcmGetConfiguration
491 #define cellGcmSetJumpCommand rsxSetJumpCommand
492 #define cellGcmFlush rsxFlushBuffer
493 #define cellGcmSetFlipMode gcmSetFlipMode
494 #define cellGcmSetFlip gcmSetFlip
495 #define cellGcmGetLabelAddress gcmGetLabelAddress
496 #define cellGcmUnbindTile gcmUnbindTile
497 #define cellGcmBindTile gcmBindTile
498 #define cellGcmSetTileInfo gcmSetTileInfo
499 #define cellGcmAddressToOffset gcmAddressToOffset
500 
501 #define cellRescCreateInterlaceTable rescCreateInterlaceTable
502 #define cellRescSetDisplayMode rescSetDisplayMode
503 #define cellRescGetNumColorBuffers rescGetNumColorBuffers
504 #define cellRescGetBufferSize rescGetBufferSize
505 #define cellRescSetBufferAddress rescSetBufferAddress
506 #define cellRescGetFlipStatus rescGetFlipStatus
507 #define cellRescResetFlipStatus rescResetFlipStatus
508 #define cellRescSetConvertAndFlip rescSetConvertAndFlip
509 #define cellRescSetVBlankHandler rescSetVBlankHandler
510 #define cellRescSetFlipHandler rescSetFlipHandler
511 #define cellRescAdjustAspectRatio rescAdjustAspectRatio
512 #define cellRescSetWaitFlip rescSetWaitFlip
513 #define cellRescSetSrc rescSetSrc
514 #define cellRescInit rescInit
515 #define cellRescExit rescExit
516 
517 #define cellVideoOutConfigure videoConfigure
518 #define cellVideoOutGetState videoGetState
519 #define cellVideoOutGetResolution videoGetResolution
520 #define cellVideoOutGetResolutionAvailability videoGetResolutionAvailability
521 
522 #define cellGcmSetViewportInline rsxSetViewport
523 #define cellGcmSetReferenceCommandInline rsxSetReferenceCommand
524 #define cellGcmSetBlendEquationInline rsxSetBlendEquation
525 #define cellGcmSetWriteBackEndLabelInline rsxSetWriteBackendLabel
526 #define cellGcmSetWaitLabelInline rsxSetWaitLabel
527 #define cellGcmSetDepthTestEnableInline rsxSetDepthTestEnable
528 #define cellGcmSetScissorInline rsxSetScissor
529 #define cellGcmSetBlendEnableInline rsxSetBlendEnable
530 #define cellGcmSetClearColorInline rsxSetClearColor
531 #define cellGcmSetBlendFuncInline rsxSetBlendFunc
532 #define cellGcmSetBlendColorInline rsxSetBlendColor
533 #define cellGcmSetTextureFilterInline rsxTextureFilter
534 #define cellGcmSetTextureControlInline rsxTextureControl
535 #define cellGcmSetCullFaceEnableInline rsxSetCullFaceEnable
536 #define cellGcmSetShadeModeInline rsxSetShadeModel
537 #define cellGcmSetTransferImage rsxSetTransferImage
538 #define cellGcmSetBlendColor rsxSetBlendColor
539 #define cellGcmSetBlendEquation rsxSetBlendEquation
540 #define cellGcmSetBlendFunc rsxSetBlendFunc
541 #define cellGcmSetClearColor rsxSetClearColor
542 #define cellGcmSetScissor rsxSetScissor
543 #define celGcmSetInvalidateVertexCache(fifo) rsxInvalidateTextureCache(fifo, GCM_INVALIDATE_VERTEX_TEXTURE)
544 #else
545 #define cellGcmSetTransferImage cellGcmSetTransferImageInline
546 #define celGcmSetInvalidateVertexCache cellGcmSetInvalidateVertexCacheInline
547 #endif
548 
549 /*============================================================
550  NETWORK PROTOTYPES
551 ============================================================ */
552 
553 #ifdef __PSL1GHT__
554 #include <net/netctl.h>
555 
556 #define cellNetCtlInit netCtlInit
557 #define cellNetCtlGetState netCtlGetState
558 #define cellNetCtlTerm netCtlTerm
559 
560 #define CELL_NET_CTL_STATE_IPObtained NET_CTL_STATE_IPObtained
561 #endif
562 
563 /*============================================================
564  NET PROTOTYPES
565 ============================================================ */
566 
567 #if defined(HAVE_NETWORKING)
568 #ifdef __PSL1GHT__
569 #include <net/net.h>
570 
571 #define socketselect select
572 #define socketclose close
573 
574 #define sys_net_initialize_network netInitialize
575 #else
576 #include <netex/net.h>
577 #include <np.h>
578 #include <np/drm.h>
579 #endif
580 #endif
581 
582 /*============================================================
583  SYSUTIL PROTOTYPES
584 ============================================================ */
585 
586 #ifdef __PSL1GHT__
587 #include <sysutil/game.h>
588 #define CellGameContentSize sysGameContentSize
589 #define cellGameContentPermit sysGameContentPermit
590 #define cellGameBootCheck sysGameBootCheck
591 
592 #define CELL_GAME_ATTRIBUTE_APP_HOME (UINT64_C(1) <<1) /* boot from / app_home/PS3_GAME */
593 #define CELL_GAME_DIRNAME_SIZE 32
594 
595 #define CELL_GAME_GAMETYPE_SYS 0
596 #define CELL_GAME_GAMETYPE_DISC 1
597 #define CELL_GAME_GAMETYPE_HDD 2
598 #define CELL_GAME_GAMETYPE_GAMEDATA 3
599 #define CELL_GAME_GAMETYPE_HOME 4
600 
601 #endif
602 
603 #if defined(HAVE_SYSUTILS)
604 #ifdef __PSL1GHT__
605 #include <sysutil/sysutil.h>
606 
607 #define CELL_SYSUTIL_REQUEST_EXITGAME SYSUTIL_EXIT_GAME
608 
609 #define cellSysutilRegisterCallback sysUtilRegisterCallback
610 #define cellSysutilCheckCallback sysUtilCheckCallback
611 #else
612 #include <sysutil/sysutil_screenshot.h>
613 #include <sysutil/sysutil_common.h>
614 #include <sysutil/sysutil_gamecontent.h>
615 #endif
616 #endif
617 
618 #if(CELL_SDK_VERSION > 0x340000)
619 #include <sysutil/sysutil_bgmplayback.h>
620 #endif
621 
622 /*============================================================
623  SYSMODULE PROTOTYPES
624 ============================================================ */
625 
626 #if defined(HAVE_SYSMODULES)
627 #ifdef __PSL1GHT__
628 #include <sysmodule/sysmodule.h>
629 
630 #define CELL_SYSMODULE_IO SYSMODULE_IO
631 #define CELL_SYSMODULE_FS SYSMODULE_FS
632 #define CELL_SYSMODULE_NET SYSMODULE_NET
633 #define CELL_SYSMODULE_SYSUTIL_NP SYSMODULE_SYSUTIL_NP
634 #define CELL_SYSMODULE_JPGDEC SYSMODULE_JPGDEC
635 #define CELL_SYSMODULE_PNGDEC SYSMODULE_PNGDEC
636 
637 #define cellSysmoduleLoadModule sysModuleLoad
638 #define cellSysmoduleUnloadModule sysModuleUnload
639 
640 #else
641 #include <cell/sysmodule.h>
642 #endif
643 #endif
644 
645 #endif
Definition: ibxm.h:9
static struct frame frames[2]
Definition: ffmpeg_core.c:162
unsigned int uint32_t
Definition: stdint.h:126