Mercurial > sdl-ios-xcode
annotate src/video/ps3/SDL_ps3spe_c.h @ 3152:7f3341cccf42 gsoc2009_ps3
Working 1080p, 720p, 480p videomodes and double buffering.
author | Martin Lowinski <martin@goldtopf.org> |
---|---|
date | Thu, 06 Aug 2009 12:24:47 +0000 |
parents | 0cf7bff804ad |
children | cce01ba54174 |
rev | line source |
---|---|
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
1 /* |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2009 Sam Lantinga |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
4 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
9 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
14 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
18 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
19 Sam Lantinga |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
21 */ |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
23 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
24 #include "spulibs/spu_common.h" |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
25 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
26 #include <libspe2.h> |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
27 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
28 #ifndef _SDL_ps3spe_h |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
29 #define _SDL_ps3spe_h |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
30 |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
31 /* SPU handling data */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
32 typedef struct spu_data { |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
33 /* Context to be executed */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
34 spe_context_ptr_t ctx; |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
35 spe_program_handle_t program; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
36 /* Thread running the context */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
37 pthread_t thread; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
38 /* For debugging */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
39 char * program_name; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
40 /* SPE_Start() or SPE_Boot() called */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
41 unsigned int booted; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
42 /* Runs the program in an infinite loop? */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
43 unsigned int keepalive; |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
44 unsigned int entry; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
45 /* Exit code of the program */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
46 int error_code; |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
47 /* Arguments passed to the program */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
48 void * argp; |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
49 } spu_data_t; |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
50 |
3150
0cf7bff804ad
Code reviewed and added SPE API documentation.
Martin Lowinski <martin@goldtopf.org>
parents:
3144
diff
changeset
|
51 /* SPU specific API functions */ |
3144
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
52 int SPE_Start(spu_data_t * spe_data); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
53 int SPE_Stop(spu_data_t * spe_data); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
54 int SPE_Boot(spu_data_t * spe_data); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
55 int SPE_Shutdown(spu_data_t * spe_data); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
56 int SPE_SendMsg(spu_data_t * spe_data, unsigned int msg); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
57 int SPE_WaitForMsg(spu_data_t * spe_data, unsigned int msg); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
58 void SPE_RunContext(void *thread_argp); |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
59 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
60 #endif /* _SDL_ps3spe_h */ |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
61 |
0d8d1f870964
Moved SPE-functions to SDL_ps3spe.c.
Martin Lowinski <martin@goldtopf.org>
parents:
diff
changeset
|
62 /* vi: set ts=4 sw=4 expandtab: */ |