aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qtopia/snes9x
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-24 17:57:24 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-30 02:35:12 +0100
commite9b45ff67d32fdc27950a51135b6dabada8334e7 (patch)
treede99cd760c8292ee1dd334e23e1e5cc43e90dfbd /recipes-qtopia/snes9x
downloadmeta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.gz
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.bz2
meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.zip
initial commit of meta-opie
Populate the repository with files from OpenEmbedded at revision 45edf621296daf150c72b876d720861235e5762e - no changes, only rearranged the directory structure to match the new oe-core style and added COPYING.MIT and README. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-qtopia/snes9x')
-rw-r--r--recipes-qtopia/snes9x/64bit.patch110
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb32
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl/compile.patch275
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl/gcc-4.1.patch28
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl_1.39.bb27
-rw-r--r--recipes-qtopia/snes9x/snes9x/configure.patch12
-rw-r--r--recipes-qtopia/snes9x/snes9x/linkage.patch31
-rw-r--r--recipes-qtopia/snes9x/snes9x/makefile.patch39
-rw-r--r--recipes-qtopia/snes9x/snes9x/private.patch10
-rw-r--r--recipes-qtopia/snes9x/snes9x_1.43-WIP1.bb32
10 files changed, 596 insertions, 0 deletions
diff --git a/recipes-qtopia/snes9x/64bit.patch b/recipes-qtopia/snes9x/64bit.patch
new file mode 100644
index 0000000..a8388de
--- /dev/null
+++ b/recipes-qtopia/snes9x/64bit.patch
@@ -0,0 +1,110 @@
+--- s/offsets.cpp~ 2004-07-11 22:50:59.000000000 +0100
++++ s/offsets.cpp 2008-07-27 10:28:40.000000000 +0100
+@@ -100,30 +100,30 @@
+ #endif
+
+ #define OFFSET(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " CPU + %d\n", (int) &((struct SCPUState *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " CPU + %d\n", &((struct SCPUState *) 0)->F);
+ #define OFFSET2(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " Registers + %d\n", (int) &((struct SRegisters *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " Registers + %d\n", &((struct SRegisters *) 0)->F);
+ #define OFFSET3(F) \
+-fprintf (S9xSTREAM, "#define " #F " Memory + %d\n", (int) &((class CMemory *) 0)->F);
++fprintf (S9xSTREAM, "#define " #F " Memory + %d\n", &((class CMemory *) 0)->F);
+ #define OFFSET4(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " APU + %d\n", (int) &((struct SAPU *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " APU + %d\n", &((struct SAPU *) 0)->F);
+ #define OFFSET5(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " IAPU + %d\n", (int) &((struct SIAPU *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " IAPU + %d\n", &((struct SIAPU *) 0)->F);
+ #define OFFSET6(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " ICPU + %d\n", (int) &((struct SICPU *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " ICPU + %d\n", &((struct SICPU *) 0)->F);
+ #define OFFSET7(N,F) \
+-fprintf (S9xSTREAM, "#define " #N " Settings + %d\n", (int) &((struct SSettings *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " Settings + %d\n", &((struct SSettings *) 0)->F);
+ #define OFFSET8(N, F) \
+-fprintf (S9xSTREAM, "#define " #N " APURegisters + %d\n", (int) &((struct SAPURegisters *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " APURegisters + %d\n", &((struct SAPURegisters *) 0)->F);
+
+ #define OFFSET9(N, F) \
+-fprintf (S9xSTREAM, "#define " #N " PPU + %d\n", (int) &((struct SPPU *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " PPU + %d\n", &((struct SPPU *) 0)->F);
+ #define OFFSET10(N, F) \
+-fprintf (S9xSTREAM, "#define " #N " IPPU + %d\n", (int) &((struct InternalPPU *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " IPPU + %d\n", &((struct InternalPPU *) 0)->F);
+ #define OFFSET11(N, F) \
+-fprintf (S9xSTREAM, "#define " #N " SA1 + %d\n", (int) &((struct SSA1 *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " SA1 + %d\n", &((struct SSA1 *) 0)->F);
+ #define OFFSET12(N, F) \
+-fprintf (S9xSTREAM, "#define " #N " SA1Registers + %d\n", (int) &((struct SSA1Registers *) 0)->F);
++fprintf (S9xSTREAM, "#define " #N " SA1Registers + %d\n", &((struct SSA1Registers *) 0)->F);
+
+ int main (int /*argc*/, char ** /*argv*/)
+ {
+--- s/getset.h~ 2004-07-11 22:50:58.000000000 +0100
++++ s/getset.h 2008-07-27 10:30:38.000000000 +0100
+@@ -120,7 +120,7 @@
+ return (*(GetAddress + (Address & 0xffff)));
+ }
+
+- switch ((int) GetAddress)
++ switch ((long)GetAddress)
+ {
+ case CMemory::MAP_PPU:
+ return (S9xGetPPU (Address & 0xffff));
+@@ -225,7 +225,7 @@
+ #endif
+ }
+
+- switch ((int) GetAddress)
++ switch ((long) GetAddress)
+ {
+ case CMemory::MAP_PPU:
+ return (S9xGetPPU (Address & 0xffff) |
+@@ -349,7 +349,7 @@
+ return;
+ }
+
+- switch ((int) SetAddress)
++ switch ((long) SetAddress)
+ {
+ case CMemory::MAP_PPU:
+ S9xSetPPU (Byte, Address & 0xffff);
+@@ -482,7 +482,7 @@
+ return;
+ }
+
+- switch ((int) SetAddress)
++ switch ((long) SetAddress)
+ {
+ case CMemory::MAP_PPU:
+ S9xSetPPU ((uint8) Word, Address & 0xffff);
+@@ -603,7 +603,7 @@
+ {
+ return s7r.bank50;
+ }
+- switch ((int) GetAddress)
++ switch ((long) GetAddress)
+ {
+ case CMemory::MAP_SPC7110_DRAM:
+ #ifdef SPC7110_DEBUG
+@@ -669,7 +669,7 @@
+ if(Settings.SPC7110&&((Address&0x7FFFFF)==0x4800))
+ return s7r.bank50;
+
+- switch ((int) GetAddress)
++ switch ((long) GetAddress)
+ {
+ case CMemory::MAP_SPC7110_DRAM:
+ #ifdef SPC7110_DEBUG
+@@ -729,7 +729,7 @@
+ return;
+ }
+
+- switch ((int) GetAddress)
++ switch ((long) GetAddress)
+ {
+ case CMemory::MAP_PPU:
+ CPU.PCBase = Memory.FillRAM;
diff --git a/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb b/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb
new file mode 100644
index 0000000..485c5bc
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Super Nintendo Emulator based on SDL, QtE Palmtop Environments Edition"
+SECTION = "opie/games"
+PRIORITY = "optional"
+DEPENDS = "libsdl-qpe"
+LICENSE = "snes9x"
+PR = "r4"
+
+SRC_URI = "http://www.vanille.de/mirror/snes9x-sdl-${PV}.tar.bz2 \
+ file://compile.patch"
+S = "${WORKDIR}/snes9x-sdl-${PV}"
+
+FILESPATHPKG .= ":snes9x-sdl"
+
+inherit qmake_base
+
+QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}'
+
+do_compile() {
+ oe_runmake CC="${CC}" CCC="${CXX}" \
+ INCLUDES="-I${STAGING_INCDIR} `sdl-config --cflags`" \
+ LDLIBS="`sdl-config --libs` -L${OE_QMAKE_LIBDIR_QT} -Wl,-rpath-link,${STAGING_LIBDIR} -lqpe -l${QT_LIBRARY}"
+}
+
+do_install() {
+ install -d ${D}${palmtopdir}/bin/
+ install -m 0755 snes9x ${D}${palmtopdir}/bin/snes9x
+}
+
+FILES_${PN} = "${palmtopdir}/bin/snes9x"
+
+SRC_URI[md5sum] = "a7836a9b6eaae433079c1c9d19f2635a"
+SRC_URI[sha256sum] = "489bb2f9fb69922e9befc27ae1b8d19d31c83c586f55b7ecc503cb4f5e767da4"
diff --git a/recipes-qtopia/snes9x/snes9x-sdl/compile.patch b/recipes-qtopia/snes9x/snes9x-sdl/compile.patch
new file mode 100644
index 0000000..b41a30f
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x-sdl/compile.patch
@@ -0,0 +1,275 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- snes9x-sdl-1.39/unix/svga.cpp~compile
++++ snes9x-sdl-1.39/unix/svga.cpp
+@@ -48,7 +48,7 @@
+ #include <stdlib.h>
+ #include <signal.h>
+
+-#include "sdl.h"
++#include <SDL.h>
+
+ #include "snes9x.h"
+ #include "memmap.h"
+--- snes9x-sdl-1.39/unix/unix.cpp~compile
++++ snes9x-sdl-1.39/unix/unix.cpp
+@@ -50,7 +50,7 @@
+ #include <sys/types.h>
+ #include <ctype.h>
+ #include <dirent.h>
+-#include <sdl.h>
++#include <SDL.h>
+ #include "keydef.h"
+
+ #undef USE_THREADS
+@@ -189,8 +189,7 @@
+ }
+
+ /*#include "cheats.h"*/
+-extern "C"
+-int SDL_main (int argc, char **argv)
++int main (int argc, char **argv)
+ {
+ if (argc < 2)
+ S9xUsage ();
+--- /dev/null
++++ snes9x-sdl-1.39/unzip/unzipP.h
+@@ -0,0 +1,124 @@
++#ifndef _UNZIPP_H_
++#define _UNZIPP_H_
++
++#include "unzip.h"
++
++#ifndef local
++#define local static
++#endif
++/* compile with -Dlocal if your debugger can't find static symbols */
++
++
++
++#if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) && \
++ !defined(CASESENSITIVITYDEFAULT_NO)
++#define CASESENSITIVITYDEFAULT_NO
++#endif
++
++
++#ifndef UNZ_BUFSIZE
++#define UNZ_BUFSIZE (16384)
++#endif
++
++#ifndef UNZ_MAXFILENAMEINZIP
++#define UNZ_MAXFILENAMEINZIP (256)
++#endif
++
++#ifndef ALLOC
++#define ALLOC(size) (malloc(size))
++#endif
++#ifndef TRYFREE
++#define TRYFREE(p) {if (p) free(p);}
++#endif
++
++#define SIZECENTRALDIRITEM (0x2e)
++#define SIZEZIPLOCALHEADER (0x1e)
++
++
++/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
++
++#ifndef SEEK_CUR
++#define SEEK_CUR 1
++#endif
++
++#ifndef SEEK_END
++#define SEEK_END 2
++#endif
++
++#ifndef SEEK_SET
++#define SEEK_SET 0
++#endif
++
++/* unz_file_info_interntal contain internal info about a file in zipfile */
++typedef struct unz_file_info_internal_s
++{
++ uLong offset_curfile; /* relative offset of local header 4
++ * bytes */
++} unz_file_info_internal;
++
++
++/*
++ * file_in_zip_read_info_s contain internal information about a file in
++ * zipfile, when reading and decompress it
++ */
++typedef struct
++{
++ char *read_buffer;/* internal buffer for compressed data */
++ z_stream stream; /* zLib stream structure for inflate */
++
++ uLong pos_in_zipfile; /* position in byte on the zipfile,
++ * for fseek */
++ uLong stream_initialised; /* flag set if stream structure is
++ * initialised */
++
++ uLong offset_local_extrafield; /* offset of the local extra
++ * field */
++ uInt size_local_extrafield; /* size of the local extra
++ * field */
++ uLong pos_local_extrafield; /* position in the local
++ * extra field in read */
++
++ uLong crc32; /* crc32 of all data uncompressed */
++ uLong crc32_wait; /* crc32 we must obtain after decompress all */
++ uLong rest_read_compressed; /* number of byte to be
++ * decompressed */
++ uLong rest_read_uncompressed; /* number of byte to be
++ * obtained after decomp */
++ FILE *file; /* io structore of the zipfile */
++ uLong compression_method; /* compression method (0==store) */
++ uLong byte_before_the_zipfile; /* byte before the zipfile,
++ * (>0 for sfx) */
++} file_in_zip_read_info_s;
++
++
++/*
++ * unz_s contain internal information about the zipfile
++ */
++typedef struct
++{
++ FILE *file; /* io structore of the zipfile */
++ unz_global_info gi; /* public global information */
++ uLong byte_before_the_zipfile; /* byte before the zipfile,
++ * (>0 for sfx) */
++ uLong num_file; /* number of the current file in the zipfile */
++ uLong pos_in_central_dir; /* pos of the current file in the
++ * central dir */
++ uLong current_file_ok; /* flag about the usability of the
++ * current file */
++ uLong central_pos;/* position of the beginning of the central
++ * dir */
++
++ uLong size_central_dir; /* size of the central directory */
++ uLong offset_central_dir; /* offset of start of central
++ * directory with respect to the
++ * starting disk number */
++
++ unz_file_info cur_file_info; /* public info about the current file
++ * in zip */
++ unz_file_info_internal cur_file_info_internal; /* private info about it */
++ file_in_zip_read_info_s *pfile_in_zip_read; /* structure about the
++ * current file if we are
++ * decompressing it */
++} unz_s;
++
++#endif
+--- snes9x-sdl-1.39/Makefile~compile
++++ snes9x-sdl-1.39/Makefile
+@@ -53,12 +53,12 @@
+
+ ifdef THREAD_SOUND
+ CPUDEFINES += -DUSE_THREADS
+-EXTRALIBS += -lpthread -L/usr/local/lib -lcygipc
++EXTRALIBS += -lpthread -lcygipc
+ endif
+
+ ifdef GLIDE
+ GLIDEOBJS = unix/glide.o
+-GLIDEDEFINES = -DUSE_GLIDE -I/usr/include/glide
++GLIDEDEFINES = -DUSE_GLIDE
+ GLIDELIBS = -lglide2x
+ GLIDEDEPENDS=use_glide
+ GLIDENO_DEPENDS=no_glide
+@@ -82,14 +82,12 @@
+ CC = gcc
+ NASM = nasm
+
+-INCLUDES=-I/usr/local/include
++INCLUDES=
+
+-OPTIMISE= -D_ZAURUS -Os -ffast-math -fstrict-aliasing -fomit-frame-pointer -mcpu=strongarm1100 -mtune=strongarm1100
++OPTIMISE= -D_ZAURUS -Os -ffast-math -fstrict-aliasing -fomit-frame-pointer
+ CCFLAGS = $(OPTIMISE) \
+--I/opt/Qtopia/include/SDL \
+ -I. \
+ -Iunzip \
+--Isdl \
+ -D__linux \
+ -DZLIB \
+ -DVAR_CYCLES \
+@@ -114,7 +112,7 @@
+
+ .SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj
+
+-LDLIBS = -L/opt/Qtopia/sharp/lib
++LDLIBS=
+
+ ifdef GLIDE
+ all: offsets gsnes9x
+@@ -146,7 +144,7 @@
+ $(RM) $(OPENGLNO_DEPENDS)
+
+ snes9x: $(OBJECTS)
+- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(EXTRALIBS) -L/opt/QtPalmtop/lib/ -lSDL -lSDLmain $(LDLIBS) -lqpe -lqte -lpthread
++ $(CC) $(INCLUDES) -o $@ $(OBJECTS) $(EXTRALIBS) $(LDLIBS) -lz -lpthread
+
+ gsnes9x: $(OBJECTS) unix/x11.o unix/glide.o
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/x11.o unix/glide.o $(LDLIBS) $(GLIDELIBS) -lXext -lX11 -lXxf86dga -lXxf86vm $(EXTRALIBS) -lz -lm
+--- snes9x-sdl-1.39/snapshot.cpp~compile
++++ snes9x-sdl-1.39/snapshot.cpp
+@@ -671,7 +671,7 @@
+ fields [i].type);
+ }
+
+- uint8 *block = new uint8 [len];
++ uint8 *block = (uint8*) malloc(len);
+ uint8 *ptr = block;
+ uint16 word;
+ uint32 dword;
+@@ -739,7 +739,7 @@
+ }
+
+ FreezeBlock (stream, name, block, len);
+- delete block;
++ free(block);
+ }
+
+ void FreezeBlock (STREAM stream, char *name, uint8 *block, int size)
+@@ -767,7 +767,7 @@
+ fields [i].type);
+ }
+
+- uint8 *block = new uint8 [len];
++ uint8 *block = (uint8*) malloc(len);
+ uint8 *ptr = block;
+ uint16 word;
+ uint32 dword;
+@@ -776,7 +776,7 @@
+
+ if ((result = UnfreezeBlock (stream, name, block, len)) != SUCCESS)
+ {
+- delete block;
++ free(block);
+ return (result);
+ }
+
+@@ -841,7 +841,7 @@
+ }
+ }
+
+- delete block;
++ free(block);
+ return (result);
+ }
+
+@@ -865,9 +865,9 @@
+
+ if (rem)
+ {
+- char *junk = new char [rem];
++ char *junk = (char*) malloc(rem);
+ READ_STREAM (junk, rem, stream);
+- delete junk;
++ free(junk);
+ }
+
+ return (SUCCESS);
diff --git a/recipes-qtopia/snes9x/snes9x-sdl/gcc-4.1.patch b/recipes-qtopia/snes9x/snes9x-sdl/gcc-4.1.patch
new file mode 100644
index 0000000..a63c051
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x-sdl/gcc-4.1.patch
@@ -0,0 +1,28 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- snes9x-sdl-1.39/dsp1.h~gcc-4.1
++++ snes9x-sdl-1.39/dsp1.h
+@@ -233,8 +233,8 @@
+ void S9xResetDSP1 ();
+ uint8 S9xGetDSP (uint16 Address);
+ void S9xSetDSP (uint8 Byte, uint16 Address);
+-END_EXTERN_C
+
+ extern struct SDSP1 DSP1;
++END_EXTERN_C
+
+ #endif
+--- snes9x-sdl-1.39/unix/unix.cpp~gcc-4.1
++++ snes9x-sdl-1.39/unix/unix.cpp
+@@ -1046,7 +1046,7 @@
+ {
+ }
+
+-static uint8 Buf[MAX_BUFFER_SIZE];
++static uint8 Buf[MAX_BUFFER_SIZE] __attribute__((aligned(4)));
+
+ #define FIXED_POINT 0x10000
+ #define FIXED_POINT_SHIFT 16
diff --git a/recipes-qtopia/snes9x/snes9x-sdl_1.39.bb b/recipes-qtopia/snes9x/snes9x-sdl_1.39.bb
new file mode 100644
index 0000000..df712f5
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x-sdl_1.39.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Super Nintendo Emulator based on SDL"
+SECTION = "games"
+PRIORITY = "optional"
+DEPENDS = "virtual/libsdl zlib"
+LICENSE = "snes9x"
+PR = "r3"
+
+SRC_URI = "http://www.vanille.de/mirror/snes9x-sdl-${PV}.tar.bz2 \
+ file://compile.patch \
+ file://gcc-4.1.patch"
+S = "${WORKDIR}/snes9x-sdl-${PV}"
+
+do_compile() {
+ oe_runmake CC="${CC}" CCC="${CXX} -fno-rtti -fno-exceptions" \
+ INCLUDES="-I${STAGING_INCDIR} `sdl-config --cflags`" \
+ LDLIBS="`sdl-config --libs`"
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 snes9x ${D}${bindir}/snes9x
+}
+
+FILES_${PN} = "${bindir}/snes9x"
+
+SRC_URI[md5sum] = "a7836a9b6eaae433079c1c9d19f2635a"
+SRC_URI[sha256sum] = "489bb2f9fb69922e9befc27ae1b8d19d31c83c586f55b7ecc503cb4f5e767da4"
diff --git a/recipes-qtopia/snes9x/snes9x/configure.patch b/recipes-qtopia/snes9x/snes9x/configure.patch
new file mode 100644
index 0000000..e9fb685
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x/configure.patch
@@ -0,0 +1,12 @@
+--- configure 2009-05-21 15:48:14.000000000 +0100
++++ configure 2009-05-21 15:48:14.000000000 +0100
+@@ -4474,9 +4474,6 @@
+ LIBS="-lX11 -lXext"
+ SYSLIBS="$SYSLIBS -L$x_libraries -lX11 -lXext"
+ fi
+-if test x$x_includes != x ; then
+- XINCLUDES="-I$x_includes"
+-fi
+ echo $ac_n "checking for XDGAQueryVersion in -lXxf86dga""... $ac_c" 1>&6
+ echo "configure:4482: checking for XDGAQueryVersion in -lXxf86dga" >&5
+ ac_lib_var=`echo Xxf86dga'_'XDGAQueryVersion | sed 'y%./+-%__p_%'`
diff --git a/recipes-qtopia/snes9x/snes9x/linkage.patch b/recipes-qtopia/snes9x/snes9x/linkage.patch
new file mode 100644
index 0000000..cc007b5
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x/linkage.patch
@@ -0,0 +1,31 @@
+--- ppu.h~ 2004-07-11 22:50:59.000000000 +0100
++++ ppu.h 2009-05-21 15:54:06.000000000 +0100
+@@ -332,10 +332,14 @@
+ uint8 _5A22;
+ } SnesModel;
+
++START_EXTERN_C
++
+ extern SnesModel* Model;
+ extern SnesModel M1SNES;
+ extern SnesModel M2SNES;
+
++END_EXTERN_C
++
+ #define MAX_5C77_VERSION 0x01
+ #define MAX_5C78_VERSION 0x03
+ #define MAX_5A22_VERSION 0x02
+--- dsp1.h~ 2004-07-11 22:50:57.000000000 +0100
++++ dsp1.h 2009-05-21 15:53:46.000000000 +0100
+@@ -122,9 +122,10 @@
+ void S9xResetDSP1 ();
+ uint8 S9xGetDSP (uint16 Address);
+ void S9xSetDSP (uint8 Byte, uint16 Address);
+-END_EXTERN_C
+
+ extern struct SDSP1 DSP1;
+
++END_EXTERN_C
++
+ #endif
+
diff --git a/recipes-qtopia/snes9x/snes9x/makefile.patch b/recipes-qtopia/snes9x/snes9x/makefile.patch
new file mode 100644
index 0000000..dc99864
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x/makefile.patch
@@ -0,0 +1,39 @@
+--- snes9x-1.43-dev-src/snes9x/Makefile.in.old 2004-10-02 17:34:58.000000000 +0100
++++ snes9x-1.43-dev-src/snes9x/Makefile.in 2004-10-02 17:42:25.000000000 +0100
+@@ -142,7 +142,7 @@
+ #INCLUDES = -I../zlib @XINCLUDES@
+ INCLUDES = @XINCLUDES@
+
+-OPTIMISE = @OPTIMIZE@
++OPTIMISE = $(filter-out @OPTIMIZE@,-pedantic)
+
+ #OPTIMISE=-g -fno-exceptions
+
+@@ -165,7 +165,7 @@
+ $(KREEDDEFINES) \
+ $(SDD1DEFINES) \
+ $(JOYDEFINES) \
+--DNO_INLINE_SET_GET @SYSDEFINES@
++-DNO_INLINE_SET_GET @SYSDEFINES@ $(OECFLAGS)
+
+ #-DOLD_COLOUR_BLENDING
+ #-DSOUND
+@@ -204,15 +204,15 @@
+ #ggisnes9x
+ #xf86snes9x
+
+-offsets: offsets.o
+- $(CCC) $(INCLUDES) -o $@ offsets.o
++offsets: offsets.cpp
++ $(BUILD_CXX) $(INCLUDES) -o $@ $<
+ ./offsets >i386/offsets.h
+
+ #../zlib/libz.a:
+ # cd ../zlib && sh ./configure && make
+
+ snes9x: $(OBJECTS) unix/x11.o $(AIDOOBJS) $(GUIOBJS)
+- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(AIDOOBJS) $(GLIDEOBJS) $(OPENGLOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(OPENGLLIBS) $(GUILIBS) @SYSLIBS@ -lXext -lX11 $(EXTRALIBS) -lm
++ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(AIDOOBJS) $(GLIDEOBJS) $(OPENGLOBJS) unix/x11.o $(GUIOBJS) $(OELDFLAGS) $(LDLIBS) $(GLIDELIBS) $(OPENGLLIBS) $(GUILIBS) @SYSLIBS@ -lXext -lX11 $(EXTRALIBS) -lm
+
+ ssnes9x: $(OBJECTS) unix/svga.o
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/svga.o $(LDLIBS) $(GLIDELIBS) -lvga -lvgagl $(EXTRALIBS) -lm
diff --git a/recipes-qtopia/snes9x/snes9x/private.patch b/recipes-qtopia/snes9x/snes9x/private.patch
new file mode 100644
index 0000000..83808f4
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x/private.patch
@@ -0,0 +1,10 @@
+--- unix/x11.cpp.old 2004-10-03 21:27:10.000000000 +0100
++++ unix/x11.cpp 2004-10-03 21:29:02.000000000 +0100
+@@ -154,6 +154,7 @@
+ #if defined (__cplusplus) || defined (c_plusplus)
+ #define private c_private
+ #include <X11/extensions/xf86vmode.h>
++#undef private
+ #endif
+
+ #define ALL_DEVICE_EVENTS 0
diff --git a/recipes-qtopia/snes9x/snes9x_1.43-WIP1.bb b/recipes-qtopia/snes9x/snes9x_1.43-WIP1.bb
new file mode 100644
index 0000000..1b9091c
--- /dev/null
+++ b/recipes-qtopia/snes9x/snes9x_1.43-WIP1.bb
@@ -0,0 +1,32 @@
+SECTION = "x11/games"
+PR = "r4"
+LICENSE = "snes9x"
+DEPENDS = "libxxf86dga libxxf86vm"
+DEPENDS_append_i686 = " nasm-native"
+RDEPENDS_epia = "kernel-module-joydev"
+
+SRC_URI = "http://www.lysator.liu.se/snes9x/1.43-WIP1/snes9x-1.43-WIP1-src.tar.gz \
+ file://makefile.patch;striplevel=2 \
+ file://private.patch;striplevel=0 \
+ file://64bit.patch \
+ file://configure.patch;striplevel=0 \
+ file://linkage.patch;striplevel=0"
+
+S = "${WORKDIR}/snes9x-1.43-dev-src/snes9x"
+
+inherit autotools
+
+export OECFLAGS="${CFLAGS}"
+export OELDFLAGS="${LDFLAGS}"
+
+do_configure() {
+ oe_runconf
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install snes9x ${D}${bindir}
+}
+
+SRC_URI[md5sum] = "caa2ed89fdc643a18310d2a50db1e02c"
+SRC_URI[sha256sum] = "bc14905c7a7967de59b70909c021d2439d9ec1c9bae835b70cdb786e59caa81c"