ports/96805: New port: emulators/cygne-sdl The SDL port of Cygne, a free Bandai Wonderswan emulator
Li-Lun Wang (Leland Wang)
llwang at infor.org
Fri May 5 00:20:16 UTC 2006
>Number: 96805
>Category: ports
>Synopsis: New port: emulators/cygne-sdl The SDL port of Cygne, a free Bandai Wonderswan emulator
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri May 05 00:20:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Li-Lun Wang (Leland Wang)
>Release: FreeBSD 6.0-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD Athena.infor.org 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #3: Thu Jan 26 23:44:20 CST 2006 root at Athena.infor.org:/usr/obj/usr/src/sys/Athena i386
>Description:
Add the SDL port of Cygne, a free Bandai Wonderswan Color handheld software
based emulator.
Added files:
emulators/cygne-sdl Makefile distinfo pkg-descr pkg-plist
emulators/cygne-sdl/files Makefile patch-src::Usage.h patch-src::ddrawsdl.cpp
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# cygne-sdl
# cygne-sdl/Makefile
# cygne-sdl/distinfo
# cygne-sdl/files
# cygne-sdl/files/Makefile
# cygne-sdl/files/patch-src::ddrawsdl.cpp
# cygne-sdl/files/patch-src::Usage.h
# cygne-sdl/pkg-descr
# cygne-sdl/pkg-plist
#
echo c - cygne-sdl
mkdir -p cygne-sdl > /dev/null 2>&1
echo x - cygne-sdl/Makefile
sed 's/^X//' >cygne-sdl/Makefile << 'END-of-cygne-sdl/Makefile'
X# New ports collection makefile for: Cygne/SDL
X# Date created: 4 May 2006
X# Whom: Li-Lun Wang <llwang at infor.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME= cygne-sdl
XPORTVERSION= 0.1
XCATEGORIES= emulators
XMASTER_SITES= http://sdlemu.ngemu.com/OpenProjects/
XDISTNAME= Cygne-SDL-${PORTVERSION}-src
X
XMAINTAINER= llwang at infor.org
XCOMMENT= The SDL port of Cygne, a free Bandai Wonderswan emulator
X
XUSE_SDL= sdl
XUSE_GMAKE= yes
XONLY_FOR_ARCHS= i386
XWRKSRC= ${WRKDIR}/Cygne-SDL-${PORTVERSION}/src
X
Xpost-patch:
X ${CP} ${FILESDIR}/Makefile ${WRKSRC}
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/cygne ${PREFIX}/bin
X
X.include <bsd.port.mk>
END-of-cygne-sdl/Makefile
echo x - cygne-sdl/distinfo
sed 's/^X//' >cygne-sdl/distinfo << 'END-of-cygne-sdl/distinfo'
XMD5 (Cygne-SDL-0.1-src.tar.gz) = c3198a0e92c652597004e7bd71f6f805
XSHA256 (Cygne-SDL-0.1-src.tar.gz) = 2a4efa91a241d9039359c142860c33d5451986561c6b6c2359082e985268fd77
XSIZE (Cygne-SDL-0.1-src.tar.gz) = 106448
END-of-cygne-sdl/distinfo
echo c - cygne-sdl/files
mkdir -p cygne-sdl/files > /dev/null 2>&1
echo x - cygne-sdl/files/Makefile
sed 's/^X//' >cygne-sdl/files/Makefile << 'END-of-cygne-sdl/files/Makefile'
XLD = ${CXX}
X
X### Include and lib stuff ####
X#STDINCLUDE = /usr/include
X#STDLIB = /usr/lib
X#SDLINCLUDE = /usr/local/include/SDL
X#SDLLIB = /usr/local/lib
X
XCFLAGS+= -DUNIX -DTARGET_UNIX -DGCC -DUSES_16BIT_ONLY -D__SDL__ -fomit-frame-pointer \
X -fexpensive-optimizations -funroll-loops -funroll-all-loops -pipe \
X -fschedule-insns2 -fstrength-reduce -malign-double -mfancy-math-387 -ffast-math -fforce-addr \
X -fforce-mem `${SDL_CONFIG} --cflags`# \
X# -L$(STDLIB) -L$(SDLLIB) -I$(STDINCLUDE) -I$(SDLINCLUDE)
X
X#LDFLAGS = $(CFLAGS)
X
XTARGET = cygne
X
XOBJ = ddrawsdl.o filessdl.o gfx.o nec.o tcache.o memory.o mainsdl.o zlib/unzip.o
X
XLIBS = `${SDL_CONFIG} --libs` -lz
X
Xall: $(TARGET)
X
XINCS = -I. `${SDL_CONFIG} --cflags`
X
XTHECC = $(CC) $(CFLAGS) $(INCS)
XTHECXX = $(CXX) $(CFLAGS) $(INCS)
X
X%.o: %.asm
X $(NASM) -f elf -o $@ $<
X
X%.o: %.c
X $(THECC) -c $< -o $@
X
X%.o: %.cpp
X $(THECXX) -c $< -o $@
X
Xcygne: $(OBJ) Makefile
X $(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
X
Xclean:
X rm -f cygne *.o zlib/*.o
END-of-cygne-sdl/files/Makefile
echo x - cygne-sdl/files/patch-src::ddrawsdl.cpp
sed 's/^X//' >cygne-sdl/files/patch-src::ddrawsdl.cpp << 'END-of-cygne-sdl/files/patch-src::ddrawsdl.cpp'
X--- ddrawsdl.cpp.orig Tue Mar 26 09:02:25 2002
X+++ ddrawsdl.cpp Thu May 4 18:18:12 2006
X@@ -174,67 +174,67 @@
X {
X switch(fBlitterMode) {
X case 1:
X- __asm__ __volatile__(".align 32
X- cld
X- rep
X- movsw"
X+ __asm__ __volatile__(".align 32\n\t"
X+ "cld\n\t"
X+ "rep\n\t"
X+ "movsw"
X :
X :"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
X break;
X case 2:
X- __asm__ __volatile__("pusha
X- xorl %%eax, %%eax
X- movl $448, %%ebx
X- emms
X- sum:
X- movq (%0, %%eax, 1), %%mm0
X- movq %%mm0, %%mm1
X- punpcklwd %%mm0, %%mm0
X- addl $8, %%eax
X- punpckhwd %%mm1,%%mm1
X- movq %%mm0, -16(%1, %%eax, 2)
X- cmpl %%ebx, %%eax
X-
X- movq %%mm1, -8(%1, %%eax, 2)
X- jnz sum
X- xorl %%eax, %%eax
X-
X- addl %2, %0
X- decl %%edx
X-
X- leal (%1, %2, 4), %1
X- jnz sum
X- emms
X- popa"
X+ __asm__ __volatile__("pusha\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "movl $448, %%ebx\n\t"
X+ "emms\n\t"
X+ "sum:\n\t"
X+ "movq (%0, %%eax, 1), %%mm0\n\t"
X+ "movq %%mm0, %%mm1\n\t"
X+ "punpcklwd %%mm0, %%mm0\n\t"
X+ "addl $8, %%eax\n\t"
X+ "punpckhwd %%mm1,%%mm1\n\t"
X+ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
X+ "cmpl %%ebx, %%eax\n\t"
X+
X+ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
X+ "jnz sum\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+
X+ "addl %2, %0\n\t"
X+ "decl %%edx\n\t"
X+
X+ "leal (%1, %2, 4), %1\n\t"
X+ "jnz sum\n\t"
X+ "emms\n\t"
X+ "popa"
X :
X : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
X break;
X
X case 3:
X- __asm__ __volatile__("pusha
X- xorl %%eax, %%eax
X- movl $896, %%ebx
X- emms
X- sum3:
X- movq (%0, %%eax, 1), %%mm0
X- movq %%mm0, %%mm1
X- punpcklwd %%mm0, %%mm0
X- addl $8, %%eax
X- punpckhwd %%mm1,%%mm1
X- movq %%mm0, -16(%1, %%eax, 2)
X- cmpl %%ebx, %%eax
X-
X- movq %%mm1, -8(%1, %%eax, 2)
X- jnz sum3
X- xorl %%eax, %%eax
X-
X- addl %2, %0
X- decl %%edx
X-
X- leal (%1, %2, 4), %1
X- jnz sum3
X- emms
X- popa"
X+ __asm__ __volatile__("pusha\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "movl $896, %%ebx\n\t"
X+ "emms\n"
X+ "sum3:\n\t"
X+ "movq (%0, %%eax, 1), %%mm0\n\t"
X+ "movq %%mm0, %%mm1\n\t"
X+ "punpcklwd %%mm0, %%mm0\n\t"
X+ "addl $8, %%eax\n\t"
X+ "punpckhwd %%mm1,%%mm1\n\t"
X+ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
X+ "cmpl %%ebx, %%eax\n\t"
X+ "\n\t"
X+ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
X+ "jnz sum3\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "\n\t"
X+ "addl %2, %0\n\t"
X+ "decl %%edx\n\t"
X+ "\n\t"
X+ "leal (%1, %2, 4), %1\n\t"
X+ "jnz sum3\n\t"
X+ "emms\n\t"
X+ "popa"
X :
X : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
X break;
X@@ -418,66 +418,66 @@
X {
X switch(fBlitterMode) {
X case 1:
X- __asm__ __volatile__(".align 32
X- cld
X- rep
X- movsw"
X+ __asm__ __volatile__(".align 32\n\t"
X+ "cld\n\t"
X+ "rep\n\t"
X+ "movsw"
X :
X :"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
X break;
X case 2: // double scanlines
X- __asm__ __volatile__("pusha
X- xorl %%eax, %%eax
X- movl $288, %%ebx
X- emms
X- sumb:
X- movq (%0, %%eax, 1), %%mm0
X- movq %%mm0, %%mm1
X- punpcklwd %%mm0, %%mm0
X- addl $8, %%eax
X- punpckhwd %%mm1,%%mm1
X- movq %%mm0, -16(%1, %%eax, 2)
X- cmpl %%ebx, %%eax
X-
X- movq %%mm1, -8(%1, %%eax, 2)
X- jnz sumb
X- xorl %%eax, %%eax
X-
X- addl %2, %0
X- decl %%edx
X-
X- leal (%1, %2, 4), %1
X- jnz sumb
X- emms
X- popa"
X+ __asm__ __volatile__("pusha\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "movl $288, %%ebx\n\t"
X+ "emms\n"
X+ "sumb:\n\t"
X+ "movq (%0, %%eax, 1), %%mm0\n\t"
X+ "movq %%mm0, %%mm1\n\t"
X+ "punpcklwd %%mm0, %%mm0\n\t"
X+ "addl $8, %%eax\n\t"
X+ "punpckhwd %%mm1,%%mm1\n\t"
X+ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
X+ "cmpl %%ebx, %%eax\n\t"
X+ "\n\t"
X+ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
X+ "jnz sumb\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "\n\t"
X+ "addl %2, %0\n\t"
X+ "decl %%edx\n\t"
X+ "\n\t"
X+ "leal (%1, %2, 4), %1\n\t"
X+ "jnz sumb\n\t"
X+ "emms\n\t"
X+ "popa"
X :
X : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
X break;
X case 3: // double stretch mode
X- __asm__ __volatile__("pusha
X- xorl %%eax, %%eax
X- movl $576, %%ebx
X- emms
X- sumc:
X- movq (%0, %%eax, 1), %%mm0
X- movq %%mm0, %%mm1
X- punpcklwd %%mm0, %%mm0
X- addl $8, %%eax
X- punpckhwd %%mm1,%%mm1
X- movq %%mm0, -16(%1, %%eax, 2)
X- cmpl %%ebx, %%eax
X-
X- movq %%mm1, -8(%1, %%eax, 2)
X- jnz sumc
X- xorl %%eax, %%eax
X-
X- addl %2, %0
X- decl %%edx
X-
X- leal (%1, %2, 4), %1
X- jnz sumc
X- emms
X- popa"
X+ __asm__ __volatile__("pusha\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "movl $576, %%ebx\n\t"
X+ "emms\n"
X+ "sumc:\n\t"
X+ "movq (%0, %%eax, 1), %%mm0\n\t"
X+ "movq %%mm0, %%mm1\n\t"
X+ "punpcklwd %%mm0, %%mm0\n\t"
X+ "addl $8, %%eax\n\t"
X+ "punpckhwd %%mm1,%%mm1\n\t"
X+ "movq %%mm0, -16(%1, %%eax, 2)\n\t"
X+ "cmpl %%ebx, %%eax\n\t"
X+ "\n\t"
X+ "movq %%mm1, -8(%1, %%eax, 2)\n\t"
X+ "jnz sumc\n\t"
X+ "xorl %%eax, %%eax\n\t"
X+ "\n\t"
X+ "addl %2, %0\n\t"
X+ "decl %%edx\n\t"
X+ "\n\t"
X+ "leal (%1, %2, 4), %1\n\t"
X+ "jnz sumc\n\t"
X+ "emms\n\t"
X+ "popa"
X :
X : "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
X break;
END-of-cygne-sdl/files/patch-src::ddrawsdl.cpp
echo x - cygne-sdl/files/patch-src::Usage.h
sed 's/^X//' >cygne-sdl/files/patch-src::Usage.h << 'END-of-cygne-sdl/files/patch-src::Usage.h'
X--- Usage.h.orig Tue Mar 26 09:55:20 2002
X+++ Usage.h Thu May 4 18:27:46 2006
X@@ -1,13 +1,13 @@
X void Usage()
X {
X printf(
X-"Usage: ./cygne romfile options
X- Where options are:
X-
X- romfile : Filename of the romfile. It can have several
X- extensions (.ws/.wsc/.rom/.bin). Gzipped and
X- zipped (.gz and .zip) are also supported.
X- -double : Scale the screen 2 times the normal size.
X- -scanline : Allows scanline output with scaling.
X-");
X+"Usage: ./cygne romfile options\n"
X+" Where options are:\n"
X+"\n"
X+" romfile : Filename of the romfile. It can have several\n"
X+" extensions (.ws/.wsc/.rom/.bin). Gzipped and\n"
X+" zipped (.gz and .zip) are also supported.\n"
X+" -double : Scale the screen 2 times the normal size.\n"
X+" -scanline : Allows scanline output with scaling.\n"
X+);
X }
END-of-cygne-sdl/files/patch-src::Usage.h
echo x - cygne-sdl/pkg-descr
sed 's/^X//' >cygne-sdl/pkg-descr << 'END-of-cygne-sdl/pkg-descr'
XCygne/SDL is the Simple Directmedia Layer (or SDL) port of the Windows
Xversion of Cygne, a free and now OpenSource (since 12-03-2002) Bandai
XWonderswan Color handheld software based emulator.
X
XWWW: http://icculus.org/Cygne-SDL/
X
X-- Li-Lun Wang
Xllwang at infor.org
END-of-cygne-sdl/pkg-descr
echo x - cygne-sdl/pkg-plist
sed 's/^X//' >cygne-sdl/pkg-plist << 'END-of-cygne-sdl/pkg-plist'
Xbin/cygne
END-of-cygne-sdl/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list