Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added ps3 video driver based on the dummy driver.
Browse files Browse the repository at this point in the history
Added spulib for copying to framebuffer.
Added SPU managing functions.
Added open/close and taking control of the framebuffer.
  • Loading branch information
martinlowinski committed May 29, 2009
1 parent aad28ee commit 6dc66ff
Show file tree
Hide file tree
Showing 13 changed files with 1,294 additions and 0 deletions.
28 changes: 28 additions & 0 deletions configure.in
Expand Up @@ -1501,6 +1501,33 @@ AC_HELP_STRING([--enable-video-ps2gs], [use PlayStation 2 GS video driver [[defa
fi
}

dnl See if we're running on PlayStation 3 Cell hardware
CheckPS3()
{
AC_ARG_ENABLE(video-ps3,
AC_HELP_STRING([--enable-video-ps3], [use PlayStation 3 Cell driver [[default=yes]]]),
, enable_video_ps3=yes)
if test x$enable_video = xyes -a x$enable_video_ps3 = xyes; then
AC_MSG_CHECKING(for PlayStation 3 Cell support)
video_ps3=no
AC_TRY_COMPILE([
#include <linux/fb.h>
#include <asm/ps3fb.h>
],[
],[
video_ps3=yes
])
AC_MSG_RESULT($video_ps3)
if test x$video_ps3 = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_PS3)
SOURCES="$SOURCES $srcdir/src/video/ps3/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I/opt/cell/sdk/usr/include"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/cell/sdk/usr/lib -lspe2 -lfb_writer_spu"
have_video=yes
fi
fi
}

dnl Find the SVGAlib includes and libraries
CheckSVGA()
{
Expand Down Expand Up @@ -2380,6 +2407,7 @@ case "$host" in
CheckDirectFB
CheckFusionSound
CheckPS2GS
CheckPS3
CheckSVGA
CheckVGL
CheckWscons
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config.h.in
Expand Up @@ -287,6 +287,7 @@
#undef SDL_VIDEO_DRIVER_PHOTON
#undef SDL_VIDEO_DRIVER_QNXGF
#undef SDL_VIDEO_DRIVER_PS2GS
#undef SDL_VIDEO_DRIVER_PS3
#undef SDL_VIDEO_DRIVER_RISCOS
#undef SDL_VIDEO_DRIVER_SVGALIB
#undef SDL_VIDEO_DRIVER_VGL
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_sysvideo.h
Expand Up @@ -355,6 +355,9 @@ extern VideoBootStrap DirectFB_bootstrap;
#if SDL_VIDEO_DRIVER_PS2GS
extern VideoBootStrap PS2GS_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_PS3
extern VideoBootStrap PS3_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_VGL
extern VideoBootStrap VGL_bootstrap;
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -73,6 +73,9 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_PS2GS
&PS2GS_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_PS3
&PS3_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_VGL
&VGL_bootstrap,
#endif
Expand Down
36 changes: 36 additions & 0 deletions src/video/ps3/SDL_ps3events.c
@@ -0,0 +1,36 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2009 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"

#include "../../events/SDL_sysevents.h"
#include "../../events/SDL_events_c.h"

#include "SDL_ps3video.h"
#include "SDL_ps3events_c.h"

void
PS3_PumpEvents(_THIS)
{
/* do nothing. */
}

/* vi: set ts=4 sw=4 expandtab: */
28 changes: 28 additions & 0 deletions src/video/ps3/SDL_ps3events_c.h
@@ -0,0 +1,28 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2009 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"

#include "SDL_ps3video.h"

extern void PS3_PumpEvents(_THIS);

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 6dc66ff

Please sign in to comment.