[Scummvm-cvs-logs] SF.net SVN: scummvm:[49530] scummvm/branches/gsoc2010-plugins/backends/ platform/ps2
toneman1138 at users.sourceforge.net
toneman1138 at users.sourceforge.net
Wed Jun 9 06:04:34 CEST 2010
Revision: 49530
http://scummvm.svn.sourceforge.net/scummvm/?rev=49530&view=rev
Author: toneman1138
Date: 2010-06-09 04:04:34 +0000 (Wed, 09 Jun 2010)
Log Message:
-----------
added tentative GDB flag to Makefile, changed calls to psp-functions to equivalent ps2-functions in ps2loader, minor rearrangement of code in systemps2
Modified Paths:
--------------
scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
scummvm/branches/gsoc2010-plugins/backends/platform/ps2/ps2loader.cpp
scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp
Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2 2010-06-09 03:38:57 UTC (rev 49529)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2 2010-06-09 04:04:34 UTC (rev 49530)
@@ -6,34 +6,36 @@
PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /SjPcm/ee/src /tremor
PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /vorbis /tremor/tremor
-ENABLE_SCUMM = $(ENABLED)
-ENABLE_SCUMM_7_8 = $(ENABLED)
-ENABLE_HE = $(ENABLED)
-ENABLE_AGI = $(ENABLED)
-ENABLE_AGOS = $(ENABLED)
-ENABLE_CINE = $(ENABLED)
-ENABLE_CRUISE = $(ENABLED)
-ENABLE_DRASCULA = $(ENABLED)
+#ENABLE_SCUMM = $(ENABLED)
+#ENABLE_SCUMM_7_8 = $(ENABLED)
+#ENABLE_HE = $(ENABLED)
+#ENABLE_AGI = $(ENABLED)
+#ENABLE_AGOS = $(ENABLED)
+#ENABLE_CINE = $(ENABLED)
+#ENABLE_CRUISE = $(ENABLED)
+#ENABLE_DRASCULA = $(ENABLED)
#ENABLE_GOB = $(ENABLED)
#ENABLE_KYRA = $(ENABLED)
-ENABLE_LURE = $(ENABLED)
+#ENABLE_LURE = $(ENABLED)
# ENABLE_M4 = $(ENABLED)
-ENABLE_MADE = $(ENABLED)
-ENABLE_PARALLACTION = $(ENABLED)
-ENABLE_QUEEN = $(ENABLED)
-ENABLE_SAGA = $(ENABLED)
-ENABLE_SAGA2 = $(ENABLED)
-ENABLE_IHNM = $(ENABLED)
+#ENABLE_MADE = $(ENABLED)
+#ENABLE_PARALLACTION = $(ENABLED)
+#ENABLE_QUEEN = $(ENABLED)
+#ENABLE_SAGA = $(ENABLED)
+#ENABLE_SAGA2 = $(ENABLED)
+#ENABLE_IHNM = $(ENABLED)
ENABLE_SKY = $(ENABLED)
-ENABLE_SWORD1 = $(ENABLED)
-ENABLE_SWORD2 = $(ENABLED)
+#ENABLE_SWORD1 = $(ENABLED)
+#ENABLE_SWORD2 = $(ENABLED)
# ENABLE_TINSEL = $(ENABLED)
-ENABLE_TOUCHE = $(ENABLED)
+#ENABLE_TOUCHE = $(ENABLED)
# Set to 1 to enable, 0 to disable dynamic modules
DYNAMIC_MODULES = 1
# Set to 1 to enable, 0 to disable more detailed printing of gcc commands
-VERBOSE_BUILD=0
+VERBOSE_BUILD=1
+# Set to 1 to enable, 0 to disable debugging support (This won't easily work "out of the box")
+DEBUG=0
# --------------------------------------------------------------------
#General variables
@@ -46,10 +48,16 @@
CXX = ee-g++ -G 0
CXXFLAGS = -O2 -Wall -Wno-multichar -fno-exceptions -fno-rtti
DEFINES = -DUSE_VORBIS -DUSE_MAD -DUSE_TREMOR -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__
+ifeq ($(DEBUG),1)
+DEFINES += -D__PS2_DEBUG__ -g -Wall -Wno-multichar
+endif
LDFLAGS :=
INCDIR = ../../../
INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
+ifeq ($(DEBUG),1)
+INCLUDES += -I $(PS2GDB)/ee
+endif
INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
DEPDIR = .deps
MODULE_DIRS += ./
@@ -69,7 +77,8 @@
PLUGIN_PREFIX =
PLUGIN_SUFFIX = .plg
PLUGIN_EXTRA_DEPS = plugin.ld plugin.syms elf/scummvm.elf #comment out -mno?
-PLUGIN_LDFLAGS = -nostartfiles -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-q,--just-symbols,elf/scummvm.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc
+#PLUGIN_LDFLAGS = -mno-crt0 $(PS2SDK)/ee/startup/crt0.o
+PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols,elf/scummvm.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc
# Test for dynamic plugins
ifeq ($(DYNAMIC_MODULES),1)
@@ -81,10 +90,17 @@
ENABLED = STATIC_PLUGIN
endif
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o
+ifeq ($(DEBUG),1)
+LDFLAGS += -L $(PS2GDB)/lib
+endif
LDFLAGS += -L $(PS2SDK)/ee/lib -L .
LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
+ifeq ($(DEBUG),1)
+LDFLAGS += -lps2gdbStub -lps2ip -ldebug
+endif
LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
-LDFLAGS += -s
+LDFLAGS +=
OBJS := backends/platform/ps2/DmaPipe.o \
backends/platform/ps2/Gs2dScreen.o \
@@ -107,7 +123,7 @@
include $(srcdir)/Makefile.common
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T main_prog.ld #$(PS2SDK)/ee/startup/linkfile
+LDFLAGS += -Wl,-G,0 -T main_prog.ld #$(PS2SDK)/ee/startup/linkfile
all: $(TARGET)
Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/ps2loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/ps2loader.cpp 2010-06-09 03:38:57 UTC (rev 49529)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/ps2loader.cpp 2010-06-09 04:04:34 UTC (rev 49530)
@@ -30,9 +30,9 @@
#include <stdio.h>
#include <malloc.h>
#include <unistd.h>
-#include <sys/_default_fcntl.h>
+#include <sys/fcntl.h>
-#include <ps2utils.h>
+//#include <ps2utils.h> do these exist?
#include "backends/platform/ps2/ps2loader.h"
//#include "backends/platform/ps2/powerman.h" //TODO
@@ -552,7 +552,8 @@
_gpVal = (unsigned int) & _gp;
DBG("_gpVal is %x\n", _gpVal);
- PowerMan.beginCriticalSection();
+ //PS2 has no "PowerMan" for suspending the system.
+ //PowerMan.beginCriticalSection();
if ((fd = ::open(path, O_RDONLY)) < 0) {
seterror("%s not found.", path);
@@ -568,10 +569,12 @@
::close(fd);
- PowerMan.endCriticalSection();
+ //PS2 has no "PowerMan" for suspending the system.
+ //PowerMan.endCriticalSection();
// flush data cache
- sceKernelDcacheWritebackAll();
+ FlushCache(0);
+ FlushCache(2);
// Get the symbols for the global constructors and destructors
ctors_start = symbol("___plugin_ctors");
Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp 2010-06-09 03:38:57 UTC (rev 49529)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/systemps2.cpp 2010-06-09 04:04:34 UTC (rev 49530)
@@ -132,11 +132,11 @@
sioprintf("Creating system\n");
g_system = g_systemPs2 = new OSystem_PS2(argv[0]);
+ g_systemPs2->init();
+
#ifdef DYNAMIC_MODULES
PluginManager::instance().addPluginProvider(new PS2PluginProvider());
#endif
-
- g_systemPs2->init();
sioprintf("init done. starting ScummVM.\n");
int res = scummvm_main(argc, argv);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list