aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-10-08 20:59:53 +0000
committerMax Horn2009-10-08 20:59:53 +0000
commitcc236d97990486bfe36a4f19fd01b139ea90d969 (patch)
treef9826ad47093e2dbe08698d6ccf23e11b8d68e0f
parentb6967bc70d8a7fa248fadd591ea08bcf56ba4ec1 (diff)
downloadscummvm-rg350-cc236d97990486bfe36a4f19fd01b139ea90d969.tar.gz
scummvm-rg350-cc236d97990486bfe36a4f19fd01b139ea90d969.tar.bz2
scummvm-rg350-cc236d97990486bfe36a4f19fd01b139ea90d969.zip
PS2: Add some stubs for the ps2 port to our primary build system (incomplete WIP)
svn-id: r44800
-rw-r--r--backends/platform/ps2/module.mk25
-rwxr-xr-xconfigure37
2 files changed, 60 insertions, 2 deletions
diff --git a/backends/platform/ps2/module.mk b/backends/platform/ps2/module.mk
new file mode 100644
index 0000000000..86b12cb668
--- /dev/null
+++ b/backends/platform/ps2/module.mk
@@ -0,0 +1,25 @@
+MODULE := backends/platform/ps2
+
+MODULE_OBJS := \
+ DmaPipe.o \
+ Gs2dScreen.o \
+ irxboot.o \
+ ps2input.o \
+ ps2pad.o \
+ savefilemgr.o \
+ fileio.o \
+ asyncfio.o \
+ icon.o \
+ cd.o \
+ eecodyvdfs.o \
+ rpckbd.o \
+ systemps2.o \
+ ps2mutex.o \
+ ps2time.o \
+ ps2debug.o
+
+MODULE_DIRS += \
+ backends/platform/ps2/
+
+# We don't use the rules.mk here on purpose
+OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
diff --git a/configure b/configure
index e5eb19d3e5..f9d2572cd9 100755
--- a/configure
+++ b/configure
@@ -296,7 +296,7 @@ get_system_exe_extension() {
gp2x-linux)
_exeext=".gp2x"
;;
- dreamcast | wii | gamecube | nds | psp)
+ dreamcast | wii | gamecube | nds | psp | ps2)
_exeext=".elf"
;;
*)
@@ -570,7 +570,7 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (sdl, dc, gp2x, gp2xwiz, iphone, morphos, nds, psp, wii, wince, linuxmoto, null) [sdl]
+ --backend=BACKEND backend to build (sdl, dc, gp2x, gp2xwiz, iphone, morphos, nds, psp, ps2, wii, wince, linuxmoto, null) [sdl]
Installation directories:
--prefix=DIR use this prefix for installing ScummVM [/usr/local]
@@ -589,6 +589,7 @@ Special configuration feature:
iphone for Apple iPhone
wince for Windows CE
psp for PlayStation Portable
+ ps2 for PlayStation 2
Game engines:
--enable-all-engines enable all engines
@@ -896,6 +897,12 @@ psp)
_host_alias=psp
LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec"
;;
+ps2)
+ _host_os=ps2
+ # TODO: The following CPU name is gibberish, need to find out what the 'correct one is
+ _host_cpu=mips_emotion_engine
+ _host_alias=ee
+ ;;
*)
if test -n "$_host"; then
guessed_host=`$_srcdir/config.sub $_host`
@@ -951,6 +958,12 @@ psp)
exit 1
fi
;;
+ps2)
+ if test -z "$PS2DEV"; then
+ echo "Please set PS2DEV in your environment. export PS2DEV=<path to ps2 toolchain>"
+ exit 1
+ fi
+ ;;
*)
;;
esac
@@ -1267,6 +1280,9 @@ case $_host_os in
psp)
CXXFLAGS="$CXXFLAGS -O3 -G0 -I$PSPDEV/psp/sdk/include -D_PSP_FW_VERSION=150"
;;
+ ps2)
+ # TODO ps2
+ ;;
wince)
CXXFLAGS="$CXXFLAGS -O3 -march=armv4 -mtune=xscale -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT"
CXXFLAGS="$CXXFLAGS -DWIN32 -Dcdecl= -D__cdecl__="
@@ -1549,6 +1565,18 @@ if test -n "$_host"; then
_mt32emu="no"
_port_mk="backends/platform/psp/psp.mk"
;;
+ ps2)
+ echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+ # TODO: complete this
+ _endian=little
+ _need_memalign=yes
+ type_1_byte='char'
+ type_2_byte='short'
+ type_4_byte='int'
+ _backend="ps2"
+ _build_scalers="no"
+ _build_hq_scalers="no"
+ ;;
*)
echo "Continuing with auto-detected values ... if you have problems, please add your target to configure."
;;
@@ -2258,6 +2286,11 @@ case $_backend in
INCLUDES="$INCLUDES -I$PSPDEV/psp/include/SDL"
LIBS="$LIBS -lSDL"
;;
+ ps2)
+ # TODO ps2
+ DEFINES="$DEFINES -D_EE -D__PLAYSTATION2__"
+ LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++ "
+ ;;
*)
echo "support for $_backend backend not implemented in configure script yet"
exit 1