PS2: Add some stubs for the ps2 port to our primary build system (incomplete WIP)

svn-id: r44800
This commit is contained in:
Max Horn 2009-10-08 20:59:53 +00:00
parent b6967bc70d
commit cc236d9799
2 changed files with 60 additions and 2 deletions

View File

@ -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)

37
configure vendored
View File

@ -296,7 +296,7 @@ get_system_exe_extension() {
gp2x-linux) gp2x-linux)
_exeext=".gp2x" _exeext=".gp2x"
;; ;;
dreamcast | wii | gamecube | nds | psp) dreamcast | wii | gamecube | nds | psp | ps2)
_exeext=".elf" _exeext=".elf"
;; ;;
*) *)
@ -570,7 +570,7 @@ Usage: $0 [OPTIONS]...
Configuration: Configuration:
-h, --help display this help and exit -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: Installation directories:
--prefix=DIR use this prefix for installing ScummVM [/usr/local] --prefix=DIR use this prefix for installing ScummVM [/usr/local]
@ -589,6 +589,7 @@ Special configuration feature:
iphone for Apple iPhone iphone for Apple iPhone
wince for Windows CE wince for Windows CE
psp for PlayStation Portable psp for PlayStation Portable
ps2 for PlayStation 2
Game engines: Game engines:
--enable-all-engines enable all engines --enable-all-engines enable all engines
@ -896,6 +897,12 @@ psp)
_host_alias=psp _host_alias=psp
LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec" 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 if test -n "$_host"; then
guessed_host=`$_srcdir/config.sub $_host` guessed_host=`$_srcdir/config.sub $_host`
@ -951,6 +958,12 @@ psp)
exit 1 exit 1
fi fi
;; ;;
ps2)
if test -z "$PS2DEV"; then
echo "Please set PS2DEV in your environment. export PS2DEV=<path to ps2 toolchain>"
exit 1
fi
;;
*) *)
;; ;;
esac esac
@ -1267,6 +1280,9 @@ case $_host_os in
psp) psp)
CXXFLAGS="$CXXFLAGS -O3 -G0 -I$PSPDEV/psp/sdk/include -D_PSP_FW_VERSION=150" CXXFLAGS="$CXXFLAGS -O3 -G0 -I$PSPDEV/psp/sdk/include -D_PSP_FW_VERSION=150"
;; ;;
ps2)
# TODO ps2
;;
wince) wince)
CXXFLAGS="$CXXFLAGS -O3 -march=armv4 -mtune=xscale -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" 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__=" CXXFLAGS="$CXXFLAGS -DWIN32 -Dcdecl= -D__cdecl__="
@ -1549,6 +1565,18 @@ if test -n "$_host"; then
_mt32emu="no" _mt32emu="no"
_port_mk="backends/platform/psp/psp.mk" _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." 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" INCLUDES="$INCLUDES -I$PSPDEV/psp/include/SDL"
LIBS="$LIBS -lSDL" 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" echo "support for $_backend backend not implemented in configure script yet"
exit 1 exit 1