aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/webos/webos.mk21
-rw-r--r--backends/platform/wince/README-WinCE.txt21
-rw-r--r--backends/platform/wince/wince-sdl.cpp44
-rw-r--r--backends/platform/wince/wince.mk4
4 files changed, 76 insertions, 14 deletions
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index 37223ac56c..804b56de35 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -51,8 +51,8 @@
# Increment this number when the packaging of the app has been changed while
# ScummVM itself has the same version as before. The number can be reset to
-# 1 when the ScummVM version is increased.
-VER_PACKAGE = 5
+# 0 when the ScummVM version is increased.
+VER_PACKAGE = 0
PATH_DIST = $(srcdir)/dists/webos
PATH_MOJO = $(PATH_DIST)/mojo
@@ -60,10 +60,19 @@ APP_ID = $(shell basename $(prefix))
APP_VERSION = $(shell printf "%d.%d.%02d%02d" $(VER_MAJOR) $(VER_MINOR) $(VER_PATCH) $(VER_PACKAGE))
DESTDIR ?= staging
PORTDISTDIR ?= portdist
+ifeq ($(HOST_COMPILER),Darwin)
+ SED_DASH_I = "-i \"\""
+else
+ SED_DASH_I = "-i"
+endif
install: all
$(QUIET)$(INSTALL) -d "$(DESTDIR)$(prefix)"
+ifeq ($(HOST_COMPILER),Darwin)
+ $(QUIET)$(INSTALL) -m 0644 "$(PATH_MOJO)/"* "$(DESTDIR)$(prefix)/"
+else
$(QUIET)$(INSTALL) -m 0644 -t "$(DESTDIR)$(prefix)/" "$(PATH_MOJO)/"*
+endif
$(QUIET)$(INSTALL) -m 0755 "$(PATH_MOJO)/start" "$(DESTDIR)$(prefix)/"
$(QUIET)$(INSTALL) -d "$(DESTDIR)$(bindir)"
$(QUIET)$(INSTALL) -c -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
@@ -77,12 +86,12 @@ ifdef DYNAMIC_MODULES
$(QUIET)$(INSTALL) -c -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/"
$(QUIET)$(STRIP) "$(DESTDIR)$(libdir)/"*
endif
- $(QUIET)sed -i s/'APP_VERSION'/'$(APP_VERSION)'/ "$(DESTDIR)$(prefix)/appinfo.json"
- $(QUIET)sed -i s/'APP_ID'/'$(APP_ID)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed $(SED_DASH_I) s/'APP_VERSION'/'$(APP_VERSION)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed $(SED_DASH_I) s/'APP_ID'/'$(APP_ID)'/ "$(DESTDIR)$(prefix)/appinfo.json"
ifneq (,$(findstring -beta,$(APP_ID)))
- $(QUIET)sed -i s/'APP_TITLE'/'ScummVM Beta'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed $(SED_DASH_I) s/'APP_TITLE'/'ScummVM Beta'/ "$(DESTDIR)$(prefix)/appinfo.json"
else
- $(QUIET)sed -i s/'APP_TITLE'/'ScummVM'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed $(SED_DASH_I) s/'APP_TITLE'/'ScummVM'/ "$(DESTDIR)$(prefix)/appinfo.json"
endif
uninstall:
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index 60bcf710bb..429168c293 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -1,18 +1,23 @@
ScummVM Windows CE FAQ
-Last updated: 2011-07-20
-Release version: x.x.x
+Last updated: 2011-10-15
+Release version: 1.4.0
------------------------------------------------------------------------
New in this version
-------------------
-x.x.x:
-- Changed default values for "high_sample_rate" & "FM_high_quality" to "true" as
- most devices today are fast enough to handle this. It's still possible to set
- this to "false" if you have a slower device.
+1.4.0:
+- Changed the memory management so that it is finally possible to break the
+ 32MB per process barrier on Windows CE. It should be possible now (finally)
+ to play nearly every game with the "big" binary (scummvm.exe, which includes
+ all game engines).
+- Changed default values for "high_sample_rate" & "FM_high_quality" to "true"
+ as most devices today are fast enough to handle this. It's still possible to
+ set this to "false" if you have a slower device.
- Fix for TeenAgent & Hugo engines (both weren't running at all, crashed right
at the beginning)
-- Replaced the game mass-adding functionality with the functionality used on all
- other platforms. It now shows progress while searching for games.
+- Discworld 2 is now playable (works now because of the new memory management)
+- Replaced the game mass-adding functionality with the functionality used on
+ all other platforms. It now shows progress while searching for games.
1.3.1:
- Fix for Normal2xAspect scaler which was causing screen update issues in some
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 1abc3cb350..4e17827e5c 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -72,6 +72,50 @@
extern "C" _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *);
#endif
+#ifdef WRAP_MALLOC
+
+extern "C" void *__real_malloc(size_t size);
+extern "C" void __real_free(void *ptr);
+
+extern "C" void *__wrap_malloc(size_t size) {
+/*
+ void *ptr = __real_malloc(size);
+ printf("malloc(%d) = %p\n", size, ptr);
+ return ptr;
+*/
+ if (size < 64 * 1024) {
+ void *ptr = __real_malloc(size+4);
+// printf("malloc(%d) = %p\n", size, ptr);
+ if (ptr != NULL) {
+ *((HANDLE*)ptr) = 0;
+ return 4+(char*)ptr;
+ }
+ return NULL;
+ }
+ HANDLE H = CreateFileMapping((HANDLE)INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size+4, 0);
+ void *ptr = MapViewOfFile(H, FILE_MAP_ALL_ACCESS, 0, 0, 0);
+ *((HANDLE*)ptr) = H;
+ return 4+(char*)ptr;
+}
+
+extern "C" void __wrap_free(void *ptr) {
+/*
+ __real_free(ptr);
+ printf("free(%p)\n", ptr);
+*/
+ if (ptr != NULL) {
+ HANDLE H = *(HANDLE*)((char *)ptr-4);
+ if (H == 0) {
+ __real_free((char*)ptr-4);
+ return;
+ }
+ UnmapViewOfFile((char *)ptr-4);
+ CloseHandle(H);
+ }
+}
+
+#endif
+
using namespace CEGUI;
// ********************************************************************************************
diff --git a/backends/platform/wince/wince.mk b/backends/platform/wince/wince.mk
index cac3ad4e8f..c5f3274747 100644
--- a/backends/platform/wince/wince.mk
+++ b/backends/platform/wince/wince.mk
@@ -1,3 +1,7 @@
+ifdef WRAP_MALLOC
+ LDFLAGS += -Wl,--wrap,malloc -Wl,--wrap,free
+endif
+
backends/platform/wince/PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketSCUMM.rc
$(QUIET)$(MKDIR) $(*D)
$(WINDRES) $(WINDRESFLAGS) -I$(srcdir)/backends/platform/wince $< $@