aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2006-05-27 23:55:40 +0800
committerclsung <clsung@FreeBSD.org>2006-05-27 23:55:40 +0800
commit9231c07024749c6c69976fb4076e336dd4111aec (patch)
treefb85dbf2bb6974f127b1cf1f757cdf128efaea06
parent20b4df0a0699b3629934182da0025896adbbce6a (diff)
downloadfreebsd-ports-gnome-9231c07024749c6c69976fb4076e336dd4111aec.tar.gz
freebsd-ports-gnome-9231c07024749c6c69976fb4076e336dd4111aec.tar.zst
freebsd-ports-gnome-9231c07024749c6c69976fb4076e336dd4111aec.zip
Add cygne-sdl 0.1, the SDL port of Cygne, a free Bandai Wonderswan
emulator. PR: ports/96805 Submitted by: Li-Lun Wang <llwang@infor.org>
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/cygne-sdl/Makefile28
-rw-r--r--emulators/cygne-sdl/distinfo3
-rw-r--r--emulators/cygne-sdl/files/Makefile.bsd43
-rw-r--r--emulators/cygne-sdl/files/patch-src-Usage.h25
-rw-r--r--emulators/cygne-sdl/files/patch-src-ddrawsdl.cpp241
-rw-r--r--emulators/cygne-sdl/pkg-descr8
-rw-r--r--emulators/cygne-sdl/pkg-plist1
8 files changed, 350 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 30972000739f..4a9ea64acd62 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -14,6 +14,7 @@
SUBDIR += cingb
SUBDIR += cpmemu
SUBDIR += cpmtools
+ SUBDIR += cygne-sdl
SUBDIR += darcnes
SUBDIR += dgen-sdl
SUBDIR += dlx
diff --git a/emulators/cygne-sdl/Makefile b/emulators/cygne-sdl/Makefile
new file mode 100644
index 000000000000..7525bbaa4926
--- /dev/null
+++ b/emulators/cygne-sdl/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for: Cygne/SDL
+# Date created: 4 May 2006
+# Whom: Li-Lun Wang <llwang@infor.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cygne-sdl
+PORTVERSION= 0.1
+CATEGORIES= emulators
+MASTER_SITES= http://sdlemu.ngemu.com/OpenProjects/
+DISTNAME= Cygne-SDL-${PORTVERSION}-src
+
+MAINTAINER= llwang@infor.org
+COMMENT= The SDL port of Cygne, a free Bandai Wonderswan emulator
+
+USE_SDL= sdl
+USE_GMAKE= yes
+ONLY_FOR_ARCHS= i386
+WRKSRC= ${WRKDIR}/Cygne-SDL-${PORTVERSION}/src
+
+post-patch:
+ ${CP} ${FILESDIR}/Makefile.bsd ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cygne ${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/emulators/cygne-sdl/distinfo b/emulators/cygne-sdl/distinfo
new file mode 100644
index 000000000000..4132b93db81e
--- /dev/null
+++ b/emulators/cygne-sdl/distinfo
@@ -0,0 +1,3 @@
+MD5 (Cygne-SDL-0.1-src.tar.gz) = c3198a0e92c652597004e7bd71f6f805
+SHA256 (Cygne-SDL-0.1-src.tar.gz) = 2a4efa91a241d9039359c142860c33d5451986561c6b6c2359082e985268fd77
+SIZE (Cygne-SDL-0.1-src.tar.gz) = 106448
diff --git a/emulators/cygne-sdl/files/Makefile.bsd b/emulators/cygne-sdl/files/Makefile.bsd
new file mode 100644
index 000000000000..bb697e380867
--- /dev/null
+++ b/emulators/cygne-sdl/files/Makefile.bsd
@@ -0,0 +1,43 @@
+LD = ${CXX}
+
+### Include and lib stuff ####
+#STDINCLUDE = /usr/include
+#STDLIB = /usr/lib
+#SDLINCLUDE = /usr/local/include/SDL
+#SDLLIB = /usr/local/lib
+
+CFLAGS+= -DUNIX -DTARGET_UNIX -DGCC -DUSES_16BIT_ONLY -D__SDL__ -fomit-frame-pointer \
+ -fexpensive-optimizations -funroll-loops -funroll-all-loops -pipe \
+ -fschedule-insns2 -fstrength-reduce -malign-double -mfancy-math-387 -ffast-math -fforce-addr \
+ -fforce-mem `${SDL_CONFIG} --cflags`# \
+# -L$(STDLIB) -L$(SDLLIB) -I$(STDINCLUDE) -I$(SDLINCLUDE)
+
+#LDFLAGS = $(CFLAGS)
+
+TARGET = cygne
+
+OBJ = ddrawsdl.o filessdl.o gfx.o nec.o tcache.o memory.o mainsdl.o zlib/unzip.o
+
+LIBS = `${SDL_CONFIG} --libs` -lz
+
+all: $(TARGET)
+
+INCS = -I. `${SDL_CONFIG} --cflags`
+
+THECC = $(CC) $(CFLAGS) $(INCS)
+THECXX = $(CXX) $(CFLAGS) $(INCS)
+
+%.o: %.asm
+ $(NASM) -f elf -o $@ $<
+
+%.o: %.c
+ $(THECC) -c $< -o $@
+
+%.o: %.cpp
+ $(THECXX) -c $< -o $@
+
+cygne: $(OBJ) Makefile
+ $(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+
+clean:
+ rm -f cygne *.o zlib/*.o
diff --git a/emulators/cygne-sdl/files/patch-src-Usage.h b/emulators/cygne-sdl/files/patch-src-Usage.h
new file mode 100644
index 000000000000..ef79fd1cff66
--- /dev/null
+++ b/emulators/cygne-sdl/files/patch-src-Usage.h
@@ -0,0 +1,25 @@
+--- Usage.h.orig Tue Mar 26 09:55:20 2002
++++ Usage.h Thu May 4 18:27:46 2006
+@@ -1,13 +1,13 @@
+ void Usage()
+ {
+ printf(
+-"Usage: ./cygne romfile options
+- Where options are:
+-
+- romfile : Filename of the romfile. It can have several
+- extensions (.ws/.wsc/.rom/.bin). Gzipped and
+- zipped (.gz and .zip) are also supported.
+- -double : Scale the screen 2 times the normal size.
+- -scanline : Allows scanline output with scaling.
+-");
++"Usage: ./cygne romfile options\n"
++" Where options are:\n"
++"\n"
++" romfile : Filename of the romfile. It can have several\n"
++" extensions (.ws/.wsc/.rom/.bin). Gzipped and\n"
++" zipped (.gz and .zip) are also supported.\n"
++" -double : Scale the screen 2 times the normal size.\n"
++" -scanline : Allows scanline output with scaling.\n"
++);
+ }
diff --git a/emulators/cygne-sdl/files/patch-src-ddrawsdl.cpp b/emulators/cygne-sdl/files/patch-src-ddrawsdl.cpp
new file mode 100644
index 000000000000..b84f9c03ed1b
--- /dev/null
+++ b/emulators/cygne-sdl/files/patch-src-ddrawsdl.cpp
@@ -0,0 +1,241 @@
+--- ddrawsdl.cpp.orig Tue Mar 26 09:02:25 2002
++++ ddrawsdl.cpp Thu May 4 18:18:12 2006
+@@ -174,67 +174,67 @@
+ {
+ switch(fBlitterMode) {
+ case 1:
+- __asm__ __volatile__(".align 32
+- cld
+- rep
+- movsw"
++ __asm__ __volatile__(".align 32\n\t"
++ "cld\n\t"
++ "rep\n\t"
++ "movsw"
+ :
+ :"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
+ break;
+ case 2:
+- __asm__ __volatile__("pusha
+- xorl %%eax, %%eax
+- movl $448, %%ebx
+- emms
+- sum:
+- movq (%0, %%eax, 1), %%mm0
+- movq %%mm0, %%mm1
+- punpcklwd %%mm0, %%mm0
+- addl $8, %%eax
+- punpckhwd %%mm1,%%mm1
+- movq %%mm0, -16(%1, %%eax, 2)
+- cmpl %%ebx, %%eax
+-
+- movq %%mm1, -8(%1, %%eax, 2)
+- jnz sum
+- xorl %%eax, %%eax
+-
+- addl %2, %0
+- decl %%edx
+-
+- leal (%1, %2, 4), %1
+- jnz sum
+- emms
+- popa"
++ __asm__ __volatile__("pusha\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "movl $448, %%ebx\n\t"
++ "emms\n\t"
++ "sum:\n\t"
++ "movq (%0, %%eax, 1), %%mm0\n\t"
++ "movq %%mm0, %%mm1\n\t"
++ "punpcklwd %%mm0, %%mm0\n\t"
++ "addl $8, %%eax\n\t"
++ "punpckhwd %%mm1,%%mm1\n\t"
++ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
++ "cmpl %%ebx, %%eax\n\t"
++
++ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
++ "jnz sum\n\t"
++ "xorl %%eax, %%eax\n\t"
++
++ "addl %2, %0\n\t"
++ "decl %%edx\n\t"
++
++ "leal (%1, %2, 4), %1\n\t"
++ "jnz sum\n\t"
++ "emms\n\t"
++ "popa"
+ :
+ : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
+ break;
+
+ case 3:
+- __asm__ __volatile__("pusha
+- xorl %%eax, %%eax
+- movl $896, %%ebx
+- emms
+- sum3:
+- movq (%0, %%eax, 1), %%mm0
+- movq %%mm0, %%mm1
+- punpcklwd %%mm0, %%mm0
+- addl $8, %%eax
+- punpckhwd %%mm1,%%mm1
+- movq %%mm0, -16(%1, %%eax, 2)
+- cmpl %%ebx, %%eax
+-
+- movq %%mm1, -8(%1, %%eax, 2)
+- jnz sum3
+- xorl %%eax, %%eax
+-
+- addl %2, %0
+- decl %%edx
+-
+- leal (%1, %2, 4), %1
+- jnz sum3
+- emms
+- popa"
++ __asm__ __volatile__("pusha\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "movl $896, %%ebx\n\t"
++ "emms\n"
++ "sum3:\n\t"
++ "movq (%0, %%eax, 1), %%mm0\n\t"
++ "movq %%mm0, %%mm1\n\t"
++ "punpcklwd %%mm0, %%mm0\n\t"
++ "addl $8, %%eax\n\t"
++ "punpckhwd %%mm1,%%mm1\n\t"
++ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
++ "cmpl %%ebx, %%eax\n\t"
++ "\n\t"
++ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
++ "jnz sum3\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "\n\t"
++ "addl %2, %0\n\t"
++ "decl %%edx\n\t"
++ "\n\t"
++ "leal (%1, %2, 4), %1\n\t"
++ "jnz sum3\n\t"
++ "emms\n\t"
++ "popa"
+ :
+ : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
+ break;
+@@ -418,66 +418,66 @@
+ {
+ switch(fBlitterMode) {
+ case 1:
+- __asm__ __volatile__(".align 32
+- cld
+- rep
+- movsw"
++ __asm__ __volatile__(".align 32\n\t"
++ "cld\n\t"
++ "rep\n\t"
++ "movsw"
+ :
+ :"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
+ break;
+ case 2: // double scanlines
+- __asm__ __volatile__("pusha
+- xorl %%eax, %%eax
+- movl $288, %%ebx
+- emms
+- sumb:
+- movq (%0, %%eax, 1), %%mm0
+- movq %%mm0, %%mm1
+- punpcklwd %%mm0, %%mm0
+- addl $8, %%eax
+- punpckhwd %%mm1,%%mm1
+- movq %%mm0, -16(%1, %%eax, 2)
+- cmpl %%ebx, %%eax
+-
+- movq %%mm1, -8(%1, %%eax, 2)
+- jnz sumb
+- xorl %%eax, %%eax
+-
+- addl %2, %0
+- decl %%edx
+-
+- leal (%1, %2, 4), %1
+- jnz sumb
+- emms
+- popa"
++ __asm__ __volatile__("pusha\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "movl $288, %%ebx\n\t"
++ "emms\n"
++ "sumb:\n\t"
++ "movq (%0, %%eax, 1), %%mm0\n\t"
++ "movq %%mm0, %%mm1\n\t"
++ "punpcklwd %%mm0, %%mm0\n\t"
++ "addl $8, %%eax\n\t"
++ "punpckhwd %%mm1,%%mm1\n\t"
++ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
++ "cmpl %%ebx, %%eax\n\t"
++ "\n\t"
++ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
++ "jnz sumb\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "\n\t"
++ "addl %2, %0\n\t"
++ "decl %%edx\n\t"
++ "\n\t"
++ "leal (%1, %2, 4), %1\n\t"
++ "jnz sumb\n\t"
++ "emms\n\t"
++ "popa"
+ :
+ : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
+ break;
+ case 3: // double stretch mode
+- __asm__ __volatile__("pusha
+- xorl %%eax, %%eax
+- movl $576, %%ebx
+- emms
+- sumc:
+- movq (%0, %%eax, 1), %%mm0
+- movq %%mm0, %%mm1
+- punpcklwd %%mm0, %%mm0
+- addl $8, %%eax
+- punpckhwd %%mm1,%%mm1
+- movq %%mm0, -16(%1, %%eax, 2)
+- cmpl %%ebx, %%eax
+-
+- movq %%mm1, -8(%1, %%eax, 2)
+- jnz sumc
+- xorl %%eax, %%eax
+-
+- addl %2, %0
+- decl %%edx
+-
+- leal (%1, %2, 4), %1
+- jnz sumc
+- emms
+- popa"
++ __asm__ __volatile__("pusha\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "movl $576, %%ebx\n\t"
++ "emms\n"
++ "sumc:\n\t"
++ "movq (%0, %%eax, 1), %%mm0\n\t"
++ "movq %%mm0, %%mm1\n\t"
++ "punpcklwd %%mm0, %%mm0\n\t"
++ "addl $8, %%eax\n\t"
++ "punpckhwd %%mm1,%%mm1\n\t"
++ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
++ "cmpl %%ebx, %%eax\n\t"
++ "\n\t"
++ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
++ "jnz sumc\n\t"
++ "xorl %%eax, %%eax\n\t"
++ "\n\t"
++ "addl %2, %0\n\t"
++ "decl %%edx\n\t"
++ "\n\t"
++ "leal (%1, %2, 4), %1\n\t"
++ "jnz sumc\n\t"
++ "emms\n\t"
++ "popa"
+ :
+ : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
+ break;
diff --git a/emulators/cygne-sdl/pkg-descr b/emulators/cygne-sdl/pkg-descr
new file mode 100644
index 000000000000..6c72f9368a68
--- /dev/null
+++ b/emulators/cygne-sdl/pkg-descr
@@ -0,0 +1,8 @@
+Cygne/SDL is the Simple Directmedia Layer (or SDL) port of the Windows
+version of Cygne, a free and now OpenSource (since 12-03-2002) Bandai
+Wonderswan Color handheld software based emulator.
+
+WWW: http://icculus.org/Cygne-SDL/
+
+-- Li-Lun Wang
+llwang@infor.org
diff --git a/emulators/cygne-sdl/pkg-plist b/emulators/cygne-sdl/pkg-plist
new file mode 100644
index 000000000000..d35b500760f8
--- /dev/null
+++ b/emulators/cygne-sdl/pkg-plist
@@ -0,0 +1 @@
+bin/cygne