diff -u ../scummvm/Makefile ./Makefile
--- ../scummvm/Makefile	Sat Apr 27 11:58:28 2002
+++ ./Makefile	Sun Jul 21 23:58:49 2002
@@ -1,14 +1,15 @@
 # $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.41 2002/04/27 16:58:28 ender Exp $
 
-CC      = g++
+CC      = arm-linux-g++
 CFLAGS  = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar 
-DEFINES = -DUNIX
+DEFINES = -DUNIX -DCOMPRESSED_SOUND_FILE -DBYPASS_COPY_PROT -DQTOPIA 
 LDFLAGS :=
-INCLUDES:= `sdl-config --cflags` -I./ -I./sound
+INCLUDES:= `/opt/Qtopia/sharp/bin/sdl-config --cflags` -I./ -I./sound
 CPPFLAGS= $(DEFINES) $(INCLUDES)
 
 # Add -lmad for -DCOMPRESSED_SOUND_FILE
-LIBS	= `sdl-config --libs` -lncurses
+LIBS	= `/opt/Qtopia/sharp/bin/sdl-config --libs` -lmad
+#-lncurses
 
 OBJS	= sdl.o
 
diff -u ../scummvm/config-file.cpp ./config-file.cpp
--- ../scummvm/config-file.cpp	Sun May 12 16:59:03 2002
+++ ./config-file.cpp	Mon Jul 22 00:04:14 2002
@@ -76,7 +76,9 @@
 
 hashconfig::~hashconfig()
 {
+	#ifndef QTOPIA
 	xfree(domain);
+	#endif
 }
 
 bool hashconfig::is_domain(const char *d) const
@@ -210,6 +212,7 @@
 
 Config::~Config()
 {
+	#ifndef QTOPIA
 	int i;
 
 	xfree(filename);
@@ -219,6 +222,7 @@
 		delete hash[i];
 	}
 	xfree(hash);
+	#endif
 }
 
 const char *Config::get(const char *key, const char *d) const
Common subdirectories: ../scummvm/dc and ./dc
Common subdirectories: ../scummvm/debian and ./debian
Common subdirectories: ../scummvm/mac and ./mac
Common subdirectories: ../scummvm/macosclassic and ./macosclassic
diff -u ../scummvm/main.cpp ./main.cpp
--- ../scummvm/main.cpp	Mon May 13 11:09:11 2002
+++ ./main.cpp	Mon Jul 22 00:41:54 2002
@@ -28,6 +28,7 @@
 #include "simon/simon.h"
 #include "config-file.h"
 
+
 GameDetector detector;
 Gui gui;
 
@@ -38,10 +39,13 @@
 
 #if defined(MACOSX) && defined(UNIX)
 #include <SDL.h>
-#elif !defined(__MORPHOS__)
+#elif !defined(QTOPIA) 
+//#elif !defined(QTOPIA) || !defined(__MORPHOS__)
+// someone please explain to me why the above doesn't work
 #undef main
 #endif
 
+
 #if defined(UNIX) || defined(UNIX_X11)
 #include <sys/param.h>
 #ifndef MAXPATHLEN
@@ -55,6 +59,12 @@
 #if defined(UNIX) || defined(UNIX_X11)
 #include <signal.h>
 
+#ifdef QTOPIA
+#include <SDL.h>
+extern "C" int main(int argc, char *argv[]);
+#endif
+
+
 static void handle_errors(int sig_num) {
 	error("Your system does not support unaligned memory accesses. Please rebuild with SCUMM_NEED_ALIGNMENT ");
 }
@@ -92,9 +102,14 @@
 
 #endif
 
+#ifdef main
+#warning "main defined"
+#endif
+
 int main(int argc, char *argv[])
 {
-/*
+printf("entering scummvm main\n");
+	/*
 Disabled this for now. What good does it do, anyway, we now have real config
 files, and a proper port to MacOS classic should offer a dialog or so for any
 game settings!
Common subdirectories: ../scummvm/morphos and ./morphos
diff -u ../scummvm/scummsys.h ./scummsys.h
--- ../scummvm/scummsys.h	Thu May  9 04:53:05 2002
+++ ./scummsys.h	Sun Jul 21 23:58:42 2002
@@ -107,6 +107,10 @@
 #endif
 #endif
 
+#ifdef QTOPIA
+#define SCUMM_NEED_ALIGNMENT
+#endif
+
 #define FORCEINLINE inline
 #define CDECL 
 
diff -u ../scummvm/sdl.cpp ./sdl.cpp
--- ../scummvm/sdl.cpp	Sat May 11 16:22:05 2002
+++ ./sdl.cpp	Mon Jul 22 00:54:31 2002
@@ -748,7 +748,7 @@
 	for(;;) {
 		if (!SDL_PollEvent(&ev))
 			return false;
-
+		
 		switch(ev.type) {
 		case SDL_KEYDOWN: {
 				byte b = 0;
@@ -767,7 +767,6 @@
 					quit();
 					break;
 				}
-
 				if (b == (KBD_CTRL|KBD_ALT) && 
 				    (ev.key.keysym.sym>='1') && (ev.key.keysym.sym<='7')) {
 					Property prop;
@@ -775,11 +774,46 @@
 					property(PROP_SET_GFX_MODE, &prop);
 					break;
 				}
-
-
+				#ifdef QTOPIA
+				// quit on fn+backspace on zaurus
+				if (ev.key.keysym.sym==127) {
+					quit();
+					break;
+					}
+				// map menu key (f11) to f5 (scumm menu)
+				if (ev.key.keysym.sym==292) {
+					event->event_code = EVENT_KEYDOWN;
+					event->kbd.keycode = 286;
+					event->kbd.ascii = mapKey(286, ev.key.keysym.mod);
+					}
+				// map center (space) to tab (default action )
+				// i wanted to map the calendar button but the calendar comes up
+				//
+				else if (ev.key.keysym.sym==32) {
+					event->event_code = EVENT_KEYDOWN;
+					event->kbd.keycode = 9;
+					event->kbd.ascii = mapKey(9, ev.key.keysym.mod);
+					}
+				// since we stole space (pause) above we'll rebind it to the tab key on the keyboard
+				else if (ev.key.keysym.sym==9) {
+					event->event_code = EVENT_KEYDOWN;
+					event->kbd.keycode = 32;
+					event->kbd.ascii = mapKey(32, ev.key.keysym.mod);
+				}
+				else {
+				// let the events fall through if we didn't change them, this may not be the best way to
+				// set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
+				// and yes i have an huge terminal size so i dont wrap soon enough.
+					event->event_code = EVENT_KEYDOWN;
+					event->kbd.keycode = ev.key.keysym.sym;
+					event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod);
+				}
+				#endif
+				#ifndef QTOPIA
 				event->event_code = EVENT_KEYDOWN;
 				event->kbd.keycode = ev.key.keysym.sym;
 				event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod);
+				#endif
 				return true;
 			}
 
@@ -904,8 +938,10 @@
 		return 1;
 
 	case PROP_OPEN_CD:
+			#ifndef QTOPIA
 		if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1)
 			cdrom = NULL;
+			
 		else {
 			cdrom = SDL_CDOpen(value->cd_num);
 			/* Did if open? Check if cdrom is NULL */
@@ -914,7 +950,11 @@
 			}
 		}
 		break;
-
+			#endif
+			#ifdef QTOPIA
+			cdrom = NULL;
+			break;
+			#endif
 	case PROP_SET_GFX_MODE:
 		if (value->gfx_mode >= 7)
 			return 0;
@@ -937,8 +977,10 @@
 		
 void OSystem_SDL::quit() {
   if(cdrom) {
+  #ifndef QTOPIA
     SDL_CDStop(cdrom);
     SDL_CDClose(cdrom);
+  #endif
   }
 	unload_gfx_mode();		
 	exit(1);
@@ -1066,8 +1108,10 @@
 	cd_num_loops = num_loops;
 	cd_start_frame = start_frame;
 
+  	#ifndef QTOPIA
 	SDL_CDStatus(cdrom);	
 	SDL_CDPlayTracks(cdrom, track, start_frame, 0, end_frame);
+	#endif
 	cd_end_frame = end_frame;
 	cd_stop_time = 0;
 	cd_end_time = SDL_GetTicks() + cdrom->track[track].length * 1000 / CD_FPS;
@@ -1077,6 +1121,9 @@
 	if (!cdrom)
 		return false;
 
+	#ifdef QTOPIA
+		return (cd_num_loops != 0 && (SDL_GetTicks() < cd_end_time != CD_STOPPED));
+	#endif
 	return (cd_num_loops != 0 && (SDL_GetTicks() < cd_end_time || SDL_CDStatus(cdrom) != CD_STOPPED));
 }
 
@@ -1085,7 +1132,9 @@
 		return;
 		
 	if (cd_stop_time != 0 && SDL_GetTicks() >= cd_stop_time) {
+  		#ifndef QTOPIA
 		SDL_CDStop(cdrom);
+		#endif
 		cd_num_loops = 0;
 		cd_stop_time = 0;
 		return;
@@ -1094,17 +1143,21 @@
 	if (cd_num_loops == 0 || SDL_GetTicks() < cd_end_time)
 		return;
 
+	#ifndef QTOPIA
 	if (cd_num_loops != 1 && SDL_CDStatus(cdrom) != CD_STOPPED) {
 		// Wait another second for it to be done
 		cd_end_time += 1000;
 		return;
 	}
+	#endif
 
 	if (cd_num_loops > 0)
 		cd_num_loops--;
 
 	if (cd_num_loops != 0) {
+  		#ifndef QTOPIA
 		SDL_CDPlayTracks(cdrom, cd_track, cd_start_frame, 0, cd_end_frame);
+		#endif
 		cd_end_time = SDL_GetTicks() + cdrom->track[cd_track].length * 1000 / CD_FPS;
 	}
 }
Common subdirectories: ../scummvm/simon and ./simon
Common subdirectories: ../scummvm/sound and ./sound
Common subdirectories: ../scummvm/v3 and ./v3
Common subdirectories: ../scummvm/v4 and ./v4
Common subdirectories: ../scummvm/wince and ./wince
