[Scummvm-cvs-logs] SF.net SVN: scummvm:[39708] scummvm/trunk

dhewg at users.sourceforge.net dhewg at users.sourceforge.net
Fri Mar 27 15:12:42 CET 2009


Revision: 39708
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39708&view=rev
Author:   dhewg
Date:     2009-03-27 14:12:42 +0000 (Fri, 27 Mar 2009)

Log Message:
-----------
Improved configure support for the GP2X port.

Modified Paths:
--------------
    scummvm/trunk/configure

Added Paths:
-----------
    scummvm/trunk/backends/platform/gp2x/gp2x-mem.cpp

Removed Paths:
-------------
    scummvm/trunk/backends/platform/gp2x/gp2x-mem.c

Deleted: scummvm/trunk/backends/platform/gp2x/gp2x-mem.c
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-mem.c	2009-03-27 13:49:11 UTC (rev 39707)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-mem.c	2009-03-27 14:12:42 UTC (rev 39708)
@@ -1,86 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program 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 General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * GP2X: Memory tweaking stuff.
- *
- */
-
-#include <stdio.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "gp2x-mem.h"
-
-void SetClock (unsigned c)
-{
-	unsigned v;
-	unsigned mdiv,pdiv=3,scale=0;
-
-	// Set ARM920t clock
-	c *= 1000000;
-	mdiv = (c*pdiv) / SYS_CLK_FREQ;
-    mdiv = ((mdiv-8)<<8) & 0xff00;
-	pdiv = ((pdiv-2)<<2) & 0xfc;
-    scale &= 3;
-    v = mdiv | pdiv | scale;
-    gp2x_memregs[0x910>>1] = v;
-}
-
-void patchMMU (void)
-{
-	//volatile unsigned int *secbuf = (unsigned int *)malloc (204800);
-
-	printf ("Reconfiguring cached memory regions...\n");
-
-	//hackpgtable();
-	//printf ("Sucess...\n");
-
-	system("/sbin/rmmod mmuhack");
-	system("/sbin/insmod -f mmuhack.o");
-
-	int mmufd = open("/dev/mmuhack", O_RDWR);
-
-	if(mmufd < 0)
-	{
-		printf ("Upper memory uncached (attempt failed, access to upper memory will be slower)...\n");
-	}
-	else
-	{
-		printf ("Upper memory cached...\n");
-		close(mmufd);
-	}
-}
-
-void unpatchMMU (void)
-{
-	printf ("Restoreing cached memory regions...\n");
-	system("/sbin/rmmod mmuhack");
-}

Copied: scummvm/trunk/backends/platform/gp2x/gp2x-mem.cpp (from rev 39706, scummvm/trunk/backends/platform/gp2x/gp2x-mem.c)
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-mem.cpp	                        (rev 0)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-mem.cpp	2009-03-27 14:12:42 UTC (rev 39708)
@@ -0,0 +1,86 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program 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 General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+/*
+ * GP2X: Memory tweaking stuff.
+ *
+ */
+
+#include <stdio.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "gp2x-mem.h"
+
+void SetClock (unsigned c)
+{
+	unsigned v;
+	unsigned mdiv,pdiv=3,scale=0;
+
+	// Set ARM920t clock
+	c *= 1000000;
+	mdiv = (c*pdiv) / SYS_CLK_FREQ;
+    mdiv = ((mdiv-8)<<8) & 0xff00;
+	pdiv = ((pdiv-2)<<2) & 0xfc;
+    scale &= 3;
+    v = mdiv | pdiv | scale;
+    gp2x_memregs[0x910>>1] = v;
+}
+
+void patchMMU (void)
+{
+	//volatile unsigned int *secbuf = (unsigned int *)malloc (204800);
+
+	printf ("Reconfiguring cached memory regions...\n");
+
+	//hackpgtable();
+	//printf ("Sucess...\n");
+
+	system("/sbin/rmmod mmuhack");
+	system("/sbin/insmod -f mmuhack.o");
+
+	int mmufd = open("/dev/mmuhack", O_RDWR);
+
+	if(mmufd < 0)
+	{
+		printf ("Upper memory uncached (attempt failed, access to upper memory will be slower)...\n");
+	}
+	else
+	{
+		printf ("Upper memory cached...\n");
+		close(mmufd);
+	}
+}
+
+void unpatchMMU (void)
+{
+	printf ("Restoreing cached memory regions...\n");
+	system("/sbin/rmmod mmuhack");
+}

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2009-03-27 13:49:11 UTC (rev 39707)
+++ scummvm/trunk/configure	2009-03-27 14:12:42 UTC (rev 39708)
@@ -784,6 +784,7 @@
 gp2x)
 	_host_os=gp2x-linux
 	_host_cpu=arm
+	_host_alias=arm-open2x-linux
 	;;
 i586-mingw32msvc)
 	_host_os=mingw32msvc
@@ -1177,16 +1178,21 @@
 			;;
 		gp2x)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
-			DEFINES="$DEFINES -DUNIX -DGP2X -DUSE_ARM_SMUSH_ASM"
+			DEFINES="$DEFINES -DUNIX -DGP2X -DNDEBUG -DUSE_ARM_SMUSH_ASM"
+			CXXFLAGS="$CXXFLAGS -march=armv4t"
+			LDFLAGS="$LDFLAGS -static"
 			_endian=little
 			_need_memalign=yes
 			type_1_byte='char'
 			type_2_byte='short'
 			type_4_byte='int'
+			_ar="$_host_alias-ar cru"
+			_ranlib=$_host_alias-ranlib
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			_backend="gp2x"
 			_build_hq_scalers="no"
+			_mt32emu="no"
 			;;
 		neuros)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"


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