summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-09 16:28:07 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-09 16:28:07 +0000
commitae044aeba549da343d278a26bb72bac844e5a5e4 (patch)
treeb16ea879113ef2bd09bb78bb00e8338b088d3afb /games-emulation/zsnes
parentNew package - rename. (diff)
downloadgentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.tar.gz
gentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.tar.bz2
gentoo-2-ae044aeba549da343d278a26bb72bac844e5a5e4.zip
welcome to games-emulation
Diffstat (limited to 'games-emulation/zsnes')
-rw-r--r--games-emulation/zsnes/ChangeLog77
-rw-r--r--games-emulation/zsnes/Manifest6
-rw-r--r--games-emulation/zsnes/files/digest-zsnes-1.35-r11
-rw-r--r--games-emulation/zsnes/files/digest-zsnes-1.361
-rw-r--r--games-emulation/zsnes/files/zsnes-1.35-cvs.patch855
-rw-r--r--games-emulation/zsnes/zsnes-1.35-r1.ebuild37
-rw-r--r--games-emulation/zsnes/zsnes-1.36.ebuild42
7 files changed, 1019 insertions, 0 deletions
diff --git a/games-emulation/zsnes/ChangeLog b/games-emulation/zsnes/ChangeLog
new file mode 100644
index 000000000000..4b3b3d3fcd86
--- /dev/null
+++ b/games-emulation/zsnes/ChangeLog
@@ -0,0 +1,77 @@
+# ChangeLog for app-emulation/zsnes
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+ 10 Jul 2003; Michael Sterrett <msterret@gentoo.org> zsnes-1.36.ebuild:
+ use emake; use use_with
+
+ 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+*zsnes-1.36 (21 Jul 2002)
+
+ 03 Nov 2002; Mike Frysinger <vapier@gentoo.org> :
+ Added pkg_setup fix for #9446.
+
+ 06 Aug 2002; Mark Guertin <gerk@gentoo.org> :
+ Added -ppc -sparc -sparc64 BACK to keywords, when bumping please please
+ honor these KEYWORDS if they are set and read ChangeLog entries
+ Also please make sure to enter _something_ in the cvs log when updating
+ files "*** empty log message ***" was the last cvs log entry for this
+
+ 21 Jul 2002; Dan Armak <danarmak@gentoo.org> ChangeLog :
+
+ New upstream version.
+
+ 20 Jul 2002; Phil Bordelon <sunflare@gentoo.org> zsnes-1.35.ebuild zsnes-1.35-r1.ebuild zsnes-1.337-r2.ebuild :
+
+ ZSNES relies on x86 assembly, and will not build on PPC, SPARC, or
+ SPARC64 platforms. Updated the KEYWORDS to reflect this.
+
+*zsnes-1.35-r1 (08 Jul 2002)
+
+ 11 Jul 2002; Brandon Low <lostlogic@gentoo.org> zsnes-1.35-r1.ebuild :
+
+ Just fix the ebuild to die if patching fails.
+
+ 08 Jul 2002; Phil Bordelon <sunflare@gentoo.org> zsnes-1.35-r1.ebuild zsnes-1.337-r2.ebuild :
+
+ There are a number of problems with raw ZSNES 1.35. Thomas Weidner
+ alerted us to the problem and submitted both a patch against ZSNES
+ CVS and an updated ebuild. Changed the description string, but
+ otherwise the ebuild is identical. See Bug #4704 for details.
+
+ I also updated zsnes-1.337-r2.ebuild to make repoman happy.
+
+*zsnes-1.35 (06 Jul 2002)
+
+ 06 Jul 2002; Phil Bordelon <sunflare@gentoo.org> zsnes-1.35.ebuild :
+
+ Updated to the latest version. Brought the ebuild up to current repoman
+ and lintool specs. The patch in -r2 is no longer needed. The Author in
+ the ebuild was Dan Armak.
+
+*zsnes-1.337-r2 (17 May 2002)
+
+ 17 May 2002; Dan Armak <danarmak@gentoo.org> changelog:
+
+ Fix bugs #2746, #2783 - remove a comment from init.asm which confused nasm.
+
+*zsnes-1.337-r1 (7 May 2002)
+ 7 May 2002; Spider <spider@gentoo.org> zsnes-1.337-r1.ebuild zsnes-1.337.ebuild :
+ fix sourceforge mirror stuff
+
+*zsnes-1.337-r1 (12 Apr 2002)
+
+ 12 Apr 2002; Seemant Kulleen <seemant@gentoo.org> zsnes-1.337-r1.ebuild :
+
+ Compile against newest libpng
+
+*zsnes-1.337 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest
new file mode 100644
index 000000000000..e0a246d3b642
--- /dev/null
+++ b/games-emulation/zsnes/Manifest
@@ -0,0 +1,6 @@
+MD5 52a6112e3305550e63ba3850945b774f ChangeLog 2961
+MD5 bfea58291f44d170fb7e23f265a602a8 zsnes-1.35-r1.ebuild 1010
+MD5 e4f923317c8959b0654fcd1060116cbf zsnes-1.36.ebuild 1029
+MD5 7e06a09862a6acda30bfbc3b18da0bbe files/digest-zsnes-1.35-r1 63
+MD5 b828464647d2d51e3a08b60e05795f1d files/digest-zsnes-1.36 63
+MD5 658c1c5cabe7d4bdd5ea5de5f6690cb8 files/zsnes-1.35-cvs.patch 21246
diff --git a/games-emulation/zsnes/files/digest-zsnes-1.35-r1 b/games-emulation/zsnes/files/digest-zsnes-1.35-r1
new file mode 100644
index 000000000000..9fba14488721
--- /dev/null
+++ b/games-emulation/zsnes/files/digest-zsnes-1.35-r1
@@ -0,0 +1 @@
+MD5 669ec6ad2709f2f04e0bd5003c915cb1 zsnes135src.tar.gz 876712
diff --git a/games-emulation/zsnes/files/digest-zsnes-1.36 b/games-emulation/zsnes/files/digest-zsnes-1.36
new file mode 100644
index 000000000000..95b924b5ba5a
--- /dev/null
+++ b/games-emulation/zsnes/files/digest-zsnes-1.36
@@ -0,0 +1 @@
+MD5 576f6f5cc50c7c6f7877aca220ee99b3 zsnes136src.tar.gz 901081
diff --git a/games-emulation/zsnes/files/zsnes-1.35-cvs.patch b/games-emulation/zsnes/files/zsnes-1.35-cvs.patch
new file mode 100644
index 000000000000..88e356ebe4af
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.35-cvs.patch
@@ -0,0 +1,855 @@
+diff -ru zsnes-1.35/authors.txt zsnes/authors.txt
+--- zsnes-1.35/authors.txt 2002-06-24 07:34:32.000000000 +0200
++++ zsnes/authors.txt 2002-07-07 05:12:02.000000000 +0200
+@@ -1,6 +1,30 @@
+-ZSNES Open Source Authors:
+---------------------------
++--------------
++The ZSNES Team
++--------------
+
+ zsKnight <zsknight@zsnes.com>
+ _Demo_ <z_demo_z@users.sourceforge.net>
++pagefault
+
++------------------
++Additional Authors
++------------------
++
++stainless
++pharos
++teuf
++relnev
++prometheus
++theoddone33
++EvilTypeGuy
++hpsolo
++aaronl
++Diablo-D3
++
++-------------
++Miscellaneous
++-------------
++
++Wilbern Cobb - initial OpenBSD work
++Thorsten "mirabile" Glaser - more OpenBSD integration
++Mitchell "The Khan Artist" Mebane - manpage
+diff -ru zsnes-1.35/src/aclocal.m4 zsnes/src/aclocal.m4
+--- zsnes-1.35/src/aclocal.m4 2002-06-24 07:34:43.000000000 +0200
++++ zsnes/src/aclocal.m4 2002-07-08 19:13:13.000000000 +0200
+@@ -1,6 +1,6 @@
+-dnl aclocal.m4 generated automatically by aclocal 1.4
++dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+Only in zsnes-1.35/src: config.cache
+diff -ru zsnes-1.35/src/cpu/dma.asm zsnes/src/cpu/dma.asm
+--- zsnes-1.35/src/cpu/dma.asm 2002-06-24 07:34:32.000000000 +0200
++++ zsnes/src/cpu/dma.asm 2002-06-28 00:04:57.000000000 +0200
+@@ -88,7 +88,7 @@
+ and al,00000111b
+ cmp al,5
+ jne .notmode5dma
+- mov al,1
++ sub al,4
+ .notmode5dma
+ mov bl,al
+ shl bl,3
+@@ -475,6 +475,10 @@
+ xor ecx,ecx
+ mov al,[esi]
+ and al,00000111b
++ cmp al,5
++ jb .notmode567dma
++ sub al,4
++.notmode567dma
+ mov ah,[.addrnumt+eax]
+ mov [edx+16],ah
+ mov bl,al
+@@ -575,6 +579,10 @@
+ xor ecx,ecx
+ mov al,[esi]
+ and al,00000111b
++ cmp al,5
++ jb .notmode567dma
++ sub al,4
++.notmode567dma
+ mov ah,[.addrnumt+eax]
+ mov [edx+16],ah
+ mov bl,al
+@@ -677,6 +685,10 @@
+ xor ecx,ecx
+ mov al,[esi]
+ and al,00000111b
++ cmp al,5
++ jb .notmode567dma
++ sub al,4
++.notmode567dma
+ mov ah,[.addrnumt+eax]
+ mov [edx+16],ah
+ mov bl,al
+diff -ru zsnes-1.35/src/cpu/dspproc.asm zsnes/src/cpu/dspproc.asm
+--- zsnes-1.35/src/cpu/dspproc.asm 2002-06-24 07:34:32.000000000 +0200
++++ zsnes/src/cpu/dspproc.asm 2002-07-04 05:13:27.000000000 +0200
+@@ -1746,22 +1746,33 @@
+ sar eax,8
+ add edx,eax
+
++ cmp dword [filter0],488
++ jne %%notfilter2
++
++ mov eax,[prev0]
++ movsx eax,ax
++ mov [prev1],eax
++ mov eax,edx
++ and eax,0fffffffch
++ mov [prev0],eax
++
++ jmp %%skipclamp
++%%notfilter2
+ mov eax,[prev0]
+ mov [prev1],eax
+ cmp edx,-32768
+ jnl %%notless
+- mov dx,0
+-; mov edx,-32768
++ mov edx,-32768
+ mov byte[filteron],1
+ %%notless
+ cmp edx,32767
+ jng %%notgreater
+- mov dx,0
+-; mov edx,32767
++ mov edx,32767
+ mov byte[filteron],1
+ %%notgreater
+ movsx edx,dx
+ mov [prev0],edx
++%%skipclamp
+ %endmacro
+
+ %macro ProcessDynamicLowPass 0
+diff -ru zsnes-1.35/src/cpu/regs.inc zsnes/src/cpu/regs.inc
+--- zsnes-1.35/src/cpu/regs.inc 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/cpu/regs.inc 2002-06-29 18:01:27.000000000 +0200
+@@ -64,7 +64,7 @@
+ setreg 2141h*4,reg2141r
+ setreg 2142h*4,reg2142r
+ setreg 2143h*4,reg2143r
+- setreg 2144h*4,reg2144r
++ setreg 2144h*4,reg2140r
+ setreg 2180h*4,reg2180r
+
+ setreg 2A00h*4,reg2Axxr
+@@ -948,6 +948,8 @@
+
+ ; V counter data by external or software latch
+ reg213Dr:
++ cmp byte[latchyr],2 ; hack for games that don't read 213F
++ je .noreset
+ cmp byte[latchyr],1
+ je .highv
+ mov al,byte[latchy]
+@@ -959,7 +961,11 @@
+ or al,byte[latchy+1]
+ mov byte[latchyr],0
+ ret
+-
++.noreset
++ mov al,byte[latchy]
++ and al,0FEh
++ or al,byte[latchy+1]
++ ret
+ ; PPU Status Flag & Version number (OBJ over flags)
+ reg213Er:
+ mov al,01h
+@@ -1426,7 +1432,7 @@
+ ret
+
+ regINVALID: ; Invalid Register
+- cmp cx,2050h
++ cmp cx,2100h
+ jb .cleared
+ mov al,ch
+ cmp byte[SPC7110Enable],0
+diff -ru zsnes-1.35/src/cpu/regsw.inc zsnes/src/cpu/regsw.inc
+--- zsnes-1.35/src/cpu/regsw.inc 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/cpu/regsw.inc 2002-06-27 20:13:35.000000000 +0200
+@@ -109,6 +109,7 @@
+ setregw 2141h*4,reg2141w
+ setregw 2142h*4,reg2142w
+ setregw 2143h*4,reg2143w
++ setregw 2144h*4,reg2140w
+ setregw 2180h*4,reg2180w
+ setregw 2181h*4,reg2181w
+ setregw 2182h*4,reg2182w
+diff -ru zsnes-1.35/src/gui/gui.asm zsnes/src/gui/gui.asm
+--- zsnes-1.35/src/gui/gui.asm 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/gui/gui.asm 2002-06-29 02:54:35.000000000 +0200
+@@ -606,6 +606,9 @@
+ NEWSYM CombinDataGlob, times 3300 db 0 ; 20-name, 42-combo, 2-key#, 1-P#, 1-ff
+ NEWSYM CombinDataLocl, times 3300 db 0
+
++NEWSYM CmdLineNetPlay, db 0
++NEWSYM CmdLineTCPIPAddress, times 29 db 0
++
+ GUIwinorder times 18 db 0
+ GUIwinpos times 18 db 0
+ GUIwinactiv times 18 db 0
+@@ -892,9 +895,6 @@
+ or bl,80h
+ ret
+
+-NEWSYM CmdLineNetPlay, db 0
+-NEWSYM CmdLineTCPIPAddress, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+-
+ NEWSYM GUIRestoreVars
+ mov edx,GUIFName
+ call Open_File
+diff -ru zsnes-1.35/src/init.asm zsnes/src/init.asm
+--- zsnes-1.35/src/init.asm 2002-06-24 07:34:32.000000000 +0200
++++ zsnes/src/init.asm 2002-07-04 19:13:59.000000000 +0200
+@@ -1451,6 +1451,7 @@
+ .mmx2head db 50,58,56,62,50,62,49,95,39,77,95,95,95,95,95,95,95,95,95,95
+
+ EXTSYM ewj2hack
++EXTSYM latchyr
+
+ NEWSYM headerhack
+ mov byte[disablehdma],0
+@@ -1465,6 +1466,103 @@
+ mov byte[MMXSRAMFix],0
+
+ mov esi,[romdata]
++ add esi,0FFC0h
++ cmp dword[esi],'SAMU'
++ jne .notsamuraishodown
++ cmp dword[esi+4],'RAI '
++ jne .notsamuraishodown
++ cmp dword[esi+8],'SHOD'
++ jne .notsamuraishodown
++ cmp dword[esi+12],'OWN '
++ jne .notsamuraishodown
++ mov word [IRQHack],1
++.notsamuraishodown
++
++ mov esi,[romdata]
++ add esi,07FC0h
++ cmp dword[esi],0DFCAB0BDh
++ jne .notfamista1
++ cmp dword[esi+4],0D0A7CCB0h
++ jne .notfamista1
++ cmp dword[esi+8],02020C0BDh
++ jne .notfamista1
++ cmp dword[esi+12],20202020h
++ jne .notfamista1
++ mov esi,[romdata]
++ add esi,2762Fh
++ mov word [esi],0EAEAh ; Skip a check for value FF at 2140 when spc not
++ ; initialized yet?!?
++.notfamista1
++
++ mov esi,[romdata]
++ add esi,07FC0h
++ cmp dword[esi],0DFCAB0BDh
++ jne .notfamista2
++ cmp dword[esi+4],0D0A7CCB0h
++ jne .notfamista2
++ cmp dword[esi+8],03220C0BDh
++ jne .notfamista2
++ cmp dword[esi+12],20202020h
++ jne .notfamista2
++ mov esi,[romdata]
++ add esi,6CEDh
++ mov word [esi],0EAEAh ; Skip a check for value FF at 2140 when spc not
++ ; initialized yet?!?
++ mov esi,[romdata]
++ add esi,6CF9h
++ mov word [esi],0EAEAh ; Skip a check for value FF at 2140 when spc not
++ ; initialized yet?!?
++.notfamista2
++
++ mov esi,[romdata]
++ add esi,07FC0h
++ cmp dword[esi],20434653h
++ jne .notkamenrider
++ cmp dword[esi+4],0D7DDD2B6h
++ jne .notkamenrider
++ cmp dword[esi+8],0B0DEC0B2h
++ jne .notkamenrider
++ cmp dword[esi+12],20202020h
++ jne .notkamenrider
++ mov byte[latchyr],2
++.notkamenrider
++
++ mov esi,[romdata]
++ add esi,07FC0h
++ cmp dword[esi],'EURO'
++ jne .noteuropeanprimegoal
++ cmp dword[esi+4],'PEAN'
++ jne .noteuropeanprimegoal
++ cmp dword[esi+8],' PRI'
++ jne .noteuropeanprimegoal
++ cmp dword[esi+12],'ME G'
++ jne .noteuropeanprimegoal
++ mov al,0h
++ mov edi,spcRam
++ mov ecx,65472
++ rep stosb
++ ret
++.noteuropeanprimegoal
++
++ mov esi,[romdata]
++ add esi,07FC0h
++ cmp dword[esi],'CYBE'
++ jne .notcyberknight2
++ cmp dword[esi+4],'R KN'
++ jne .notcyberknight2
++ cmp dword[esi+8],'IGHT'
++ jne .notcyberknight2
++ cmp dword[esi+12],' 2 '
++ jne .notcyberknight2
++ mov byte[cycpb268],75
++ mov byte[cycpb358],77
++ mov byte[cycpbl2],75
++ mov byte[cycpblt2],75
++ mov byte[cycpbl],75
++ mov byte[cycpblt],75
++.notcyberknight2
++
++ mov esi,[romdata]
+ add esi,07FC0h
+ cmp dword[esi],0B4B1DEC3h
+ jne .notdeasomething
+@@ -6047,6 +6145,8 @@
+ and al,0F0h
+ cmp al,10h
+ je .yessfx
++ cmp al,20h
++ je .yesobc
+ cmp al,30h
+ je near .yessa1
+ cmp al,40h
+@@ -6071,6 +6171,7 @@
+ add esi,32704
+ cmp dword[esi],'META'
+ jne .notsfx
++.yesobc
+ mov byte[OBCEnable],1
+ jmp .nosfx
+ .notsfx
+diff -ru zsnes-1.35/src/linux/copyvwin.asm zsnes/src/linux/copyvwin.asm
+--- zsnes-1.35/src/linux/copyvwin.asm 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/linux/copyvwin.asm 2002-06-28 08:50:20.000000000 +0200
+@@ -38,12 +38,11 @@
+ SECTION .text
+
+ NEWSYM copy640x480x16bwin
+- pushad
+ cmp byte[curblank],40h
+ jne .startcopy
+- popad
+ ret
+ .startcopy
++ pushad
+ mov esi,[vidbuffer]
+ mov edi,[WinVidMemStart]
+ add esi,16*2+256*2+32*2
+@@ -120,14 +119,13 @@
+ inc ebx
+ dec dl
+ jnz near .loopa
++ popad
+ xor byte[res512switch],1
+ cmp byte[MMXSupport],1
+ je .mmx2
+- popad
+ ret
+ .mmx2
+ emms
+- popad
+ ret
+ .yeshires
+ mov byte[ebx],0
+@@ -231,7 +229,7 @@
+ .loopab
+ mov ecx,256
+ cmp byte[ebx],1
+- je .yeshiresb
++ je near .yeshiresb
+ cmp byte[ebx],1
+ jbe .ignorehrb
+ call HighResProc
+@@ -261,10 +259,10 @@
+ inc ebx
+ dec dl
+ jnz .loopab
++ popad
+ xor byte[res512switch],1
+ cmp byte[MMXSupport],1
+ je near .mmx2
+- popad
+ ret
+ .yeshiresb
+ mov byte[ebx],0
+@@ -348,9 +346,9 @@
+ inc ebx
+ dec dl
+ jnz near .loopabh
++ popad
+ cmp byte[MMXSupport],1
+ je near .mmx2
+- popad
+ ret
+ .mmxslh
+ mov eax,[spritetablea]
+@@ -448,9 +446,9 @@
+ inc ebx
+ dec byte[lineleft]
+ jnz near .loopabh2
++ popad
+ cmp byte[MMXSupport],1
+ je near .mmx2
+- popad
+ ret
+ .mmxslh2
+ mov eax,[spritetablea]
+@@ -529,7 +527,6 @@
+ jnz .nofielde
+ add edi,[NumBytesPerLine]
+ .nofielde
+- popad
+ ret
+ .hiresmode7
+ cmp byte[MMXSupport],1
+@@ -557,7 +554,6 @@
+ dec ecx
+ jnz .a2b
+ sub esi,75036*4
+- popad
+ ret
+ .yeshiresngmmxmode7
+ mov ecx,64
+@@ -590,7 +586,6 @@
+ dec ecx
+ jnz .mmxrb
+ sub esi,75036*4
+- popad
+ ret
+ .hires
+ cmp byte[MMXSupport],1
+@@ -611,7 +606,6 @@
+ jnz .lowerfield
+ add edi,[NumBytesPerLine]
+ .lowerfield
+- popad
+ ret
+ .nofieldb
+ cmp byte[scanlines],1
+@@ -631,10 +625,8 @@
+ add edi,4
+ dec ecx
+ jnz .bngb
+- popad
+ ret
+ .scanlines
+- popad
+ ret
+ .yeshiresngmmx
+ mov eax,[spritetablea]
+@@ -663,7 +655,6 @@
+ jnz .lowerfieldb
+ add edi,[NumBytesPerLine]
+ .lowerfieldb
+- popad
+ ret
+ .nofieldc
+ cmp byte[scanlines],1
+@@ -696,7 +687,6 @@
+ add edi,32
+ dec ecx
+ jnz .mmxr2
+- popad
+ ret
+ .antialias
+ add edi,[AddEndBytes]
+@@ -730,7 +720,6 @@
+ add esi,8
+ dec ecx
+ jnz .mmxr2aa
+- popad
+ ret
+ .halfscanlines
+ add edi,[AddEndBytes]
+@@ -747,7 +736,6 @@
+ add edi,4
+ dec ecx
+ jnz .abhs
+- popad
+ ret
+ .quartscanlines
+ add edi,[AddEndBytes]
+@@ -767,7 +755,6 @@
+ add edi,4
+ dec ecx
+ jnz .abhs2
+- popad
+ ret
+ .halfscanlinesmmx
+ mov eax,[spritetablea]
+@@ -796,7 +783,6 @@
+ add edi,32
+ dec ecx
+ jnz .mmxr2h
+- popad
+ ret
+ .quartscanlinesmmx
+ mov eax,[spritetablea]
+@@ -1383,7 +1369,7 @@
+ jmp .returninterps
+ .ignorehrs
+ cmp byte[ebx],1
+- je .yeshiresb
++ je near .yeshiresb
+ .ignorehrb
+ push ebx
+ .ab
+diff -ru zsnes-1.35/src/linux/sdlintrf.asm zsnes/src/linux/sdlintrf.asm
+--- zsnes-1.35/src/linux/sdlintrf.asm 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/linux/sdlintrf.asm 2002-06-29 01:46:14.000000000 +0200
+@@ -170,6 +170,10 @@
+ mov byte[esi+11+256],'t'
+ mov byte[esi+12+256],0
+
++ mov byte[spcon],1
++ mov byte[soundon],1
++ mov byte[cfgsoundon],1
++
+ ; Get and set the initial directory
+ %ifdef __LINUX__
+ call obtaindir
+diff -ru zsnes-1.35/src/linux/sdllink.c zsnes/src/linux/sdllink.c
+--- zsnes-1.35/src/linux/sdllink.c 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/linux/sdllink.c 2002-07-07 05:45:40.000000000 +0200
+@@ -580,6 +580,22 @@
+ return TRUE;
+ }
+
++int saybitdepth()
++{
++ int MyBitsPerPixel;
++ const SDL_VideoInfo *info;
++ SDL_Init(SDL_INIT_VIDEO);
++ info = SDL_GetVideoInfo();
++ MyBitsPerPixel = info->vfmt->BitsPerPixel;
++ switch (MyBitsPerPixel)
++ {
++ case 0: printf("Cannot detect bitdepth. On fbcon and svgalib this is normal.\nTrying to force 16 bpp.\n\n"); break;
++ case 16: break;
++ default: printf("You are running in %d bpp, but ZSNES is forcing 16 bpp.\nYou may experience poor performance and/or crashing.\n\n", MyBitsPerPixel); break;
++ }
++ return 0;
++}
++
+ int startgame(void)
+ {
+ int status;
+@@ -598,7 +614,7 @@
+ if (sdl_state == vid_soft) sw_end();
+ #ifdef __OPENGL__
+ else if (sdl_state == vid_gl) gl_end();
+-
++ saybitdepth();
+ if (UseOpenGL)
+ {
+ status = gl_start(WindowWidth, WindowHeight, BitDepth, FullScreen);
+diff -ru zsnes-1.35/src/linux/sw_draw.c zsnes/src/linux/sw_draw.c
+--- zsnes-1.35/src/linux/sw_draw.c 2002-06-24 07:34:33.000000000 +0200
++++ zsnes/src/linux/sw_draw.c 2002-07-07 04:51:19.000000000 +0200
+@@ -41,9 +41,7 @@
+ {
+ unsigned int color32, p;
+ int i;
+- Uint32 flags = SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_HWPALETTE | SDL_ANYFORMAT
+-
+-;
++ Uint32 flags = SDL_DOUBLEBUF | SDL_HWSURFACE | SDL_HWPALETTE;
+ DWORD GBitMask;
+
+ p = BitConv32Ptr;
+diff -ru zsnes-1.35/src/ui.asm zsnes/src/ui.asm
+--- zsnes-1.35/src/ui.asm 2002-06-24 07:34:32.000000000 +0200
++++ zsnes/src/ui.asm 2002-07-07 05:12:02.000000000 +0200
+@@ -21,7 +21,7 @@
+ EXTSYM ConvertJoyMap,ConvertJoyMap1,ConvertJoyMap2,printhex,InitSPC
+ EXTSYM StartUp,PrintStr,WaitForKey,PrintChar,ZFileSystemInit
+ EXTSYM SPCDisable,SystemInit,allocmem
+-EXTSYM FPSOn,FPSAtStart,cfgsoundon,FirstTimeData
++EXTSYM FPSOn,FPSAtStart,cfgsoundon
+ EXTSYM xa
+ EXTSYM SBPort,SBInt,SBIrq,SBDMA,SBDMAPage,SBHDMAPage,getenv,vibracard
+ EXTSYM ram7fa,wramdataa
+@@ -69,14 +69,6 @@
+
+ cld ;clear direction flag
+
+-%ifndef __MSDOS__
+- cmp byte[FirstTimeData],1
+- je .nofirsttime
+- mov byte[soundon],1
+- mov byte[cfgsoundon],1
+-.nofirsttime
+-%endif
+-
+ call setnoise
+ call InitSPC
+ call allocmem ;allocate memory
+@@ -151,8 +143,7 @@
+ db 'ZSNES v',ZVERSION,' (c) 1997-2002, ZSNES Team (zsKnight & _Demo_)',13,10,13,10
+ db 'Be sure to check http://www.zsnes.com/ for the latest version.',13,10
+ db 'Please report crashes to zsnes-devel@lists.sourceforge.net.',13,10,13,10
+- db ' Main Coders : zsKnight, _Demo_, and pagefault',13,10
+- db ' Assistant Coders : Pharos, teuf, theoddone33, and stainless',13,10,13,10
++ db 'ZSNES is written by the ZSNES Team (See AUTHORS.TXT)',13,10
+ db 'ZSNES comes with ABSOLUTELY NO WARRANTY. This is free software,',10,13
+ db 'and you are welcome to redistribute it under certain conditions;',10,13
+ %ifdef __LINUX__
+diff -ru zsnes-1.35/src/video/newgfx16.mac zsnes/src/video/newgfx16.mac
+--- zsnes-1.35/src/video/newgfx16.mac 2002-06-24 07:34:34.000000000 +0200
++++ zsnes/src/video/newgfx16.mac 2002-06-29 20:07:04.000000000 +0200
+@@ -2832,12 +2832,15 @@
+ je near .offsetm
+ cmp byte[t16x161+ebx+%1*256],1
+ je near .tiles16x16
+- cmp byte[BGMA+ebx],4
+- je near .offsetm
+ .nooffsetm
+ mov eax,[BGPT1+ebx*2+%1*512]
+ test ecx,100h
+ jz .noyinc
++ cmp byte[osm2dis],1
++ je .nooffsetm4
++ cmp byte[BGMA+ebx],4
++ je near .offsetm
++.nooffsetm4
+ add eax,[BGPT1Y+ebx*2+%1*512]
+ .noyinc
+ lea ecx,[ecx*8]
+@@ -3131,10 +3134,7 @@
+ shl edx,6
+ xor eax,eax
+ mov ax,[BGPT3+ebx*2]
+- cmp dx,0
+- jl .isneg1
+ add ax,dx
+-.isneg1
+ xor edx,edx
+ mov dx,[BG3SXl+ebx*2]
+ and dx,0F8h
+@@ -3303,10 +3303,7 @@
+ shl edx,6
+ xor eax,eax
+ mov ax,[BGPT3+ebx*2]
+- cmp dx,0
+- jl .isneg2
+ add ax,dx
+-.isneg2
+ xor edx,edx
+ mov dx,[BG3SXl+ebx*2]
+ and dx,0F8h
+@@ -3709,10 +3706,7 @@
+ shl edx,6
+ xor eax,eax
+ mov ax,[BGPT3+ebx*2]
+- cmp dx,0
+- jl .isneg3
+ add ax,dx
+-.isneg3
+ xor edx,edx
+ mov dx,[BG3SXl+ebx*2]
+ and dx,0F8h
+diff -ru zsnes-1.35/src/video/newgfx.mac zsnes/src/video/newgfx.mac
+--- zsnes-1.35/src/video/newgfx.mac 2002-06-24 07:34:34.000000000 +0200
++++ zsnes/src/video/newgfx.mac 2002-06-29 20:25:36.000000000 +0200
+@@ -2611,20 +2611,24 @@
+ add ecx,ebx
+ jmp %%yesmosaic
+ %%nomosaic
+-
+ cmp byte[BGMA+ebx],5
+ jae near .tiles16x8
+ %%yesmosaic
+-
+ cmp byte[t16x161+ebx+%1*256],1
+ je near .tiles16x16
++ cmp byte[osm2dis],1
++ je .nooffsetm
+ cmp byte[BGMA+ebx],2
+ je near .offsetm
+- cmp byte[BGMA+ebx],4
+- je near .offsetm
++.nooffsetm
+ mov eax,[BGPT1+ebx*2+%1*512]
+ test ecx,100h
+ jz .noyinc
++ cmp byte[osm2dis],1
++ je .nooffsetm4
++ cmp byte[BGMA+ebx],4
++ je near .offsetm
++.nooffsetm4
+ add eax,[BGPT1Y+ebx*2+%1*512]
+ .noyinc
+ lea ecx,[ecx*8]
+@@ -2888,10 +2892,7 @@
+ shl edx,6
+ xor eax,eax
+ mov ax,[BGPT3+ebx*2]
+- cmp dx,0
+- jl .isneg
+ add ax,dx
+-.isneg
+ xor edx,edx
+ mov dx,[BG3SXl+ebx*2]
+ and dx,0F8h
+@@ -2955,6 +2956,21 @@
+ add eax,ecx
+ add [ofsmtptr],ecx
+ mov [ofsmmptr],eax
++
++ mov word[bgtxadd2],0
++ cmp word[BGPT3X+ebx*2],0
++ je .yesoverfl
++ mov cx,word[BG3SXl+ebx*2]
++ add cx,16
++ test cx,100h
++ jz .notoverfl
++ add dword[ofsmcptr],800h
++ sub word[bgtxadd2],800h
++ jmp .yesoverfl
++.notoverfl
++ add word[bgtxadd2],800h
++.yesoverfl
++
+ mov dword[ofshvaladd],0
+ mov ecx,[BGOPT1+ebx*2+%1*512]
+ mov edx,[BGMA+ebx]
+@@ -3066,10 +3082,13 @@
+ %%yesmosaic
+ cmp byte[t16x161+ebx+%1*256],1
+ je near .tiles16x16
++ cmp byte[osm2dis],1
++ je .nooffsetm
+ cmp byte[BGMA+ebx],2
+ je near .offsetm
+- cmp byte[BGMA+ebx],4
+- je near .offsetm
++; cmp byte[BGMA+ebx],4
++; je near .offsetm
++.nooffsetm
+ mov eax,[BG1SYl+ebx*2+%1*512]
+ and eax,0FFFFh
+ add eax,ebx
+@@ -3240,10 +3259,7 @@
+ shl edx,6
+ xor eax,eax
+ mov ax,[BGPT3+ebx*2]
+- cmp dx,0
+- jl .isneg
+ add ax,dx
+-.isneg
+ xor edx,edx
+ mov dx,[BG3SXl+ebx*2]
+ and dx,0F8h
+@@ -3275,6 +3291,21 @@
+ mov eax,[BGPT1+ebx*2+%1*512]
+ mov [ofsmtptr],eax
+ mov [ofsmtptrs],eax
++
++ mov word[bgtxadd2],0
++ cmp word[BGPT3X+ebx*2],0
++ je .yesoverfl
++ mov cx,word[BG3SXl+ebx*2]
++ add cx,16
++ test cx,100h
++ jz .notoverfl
++ add dword[ofsmcptr],800h
++ sub word[bgtxadd2],800h
++ jmp .yesoverfl
++.notoverfl
++ add word[bgtxadd2],800h
++.yesoverfl
++
+ mov ecx,[BG1SXl+ebx*2+%1*512]
+ mov edx,[BGPT1X+ebx*2+%1*512]
+ test ecx,100h
+diff -ru zsnes-1.35/src/win/winintrf.asm zsnes/src/win/winintrf.asm
+--- zsnes-1.35/src/win/winintrf.asm 2002-06-24 07:34:34.000000000 +0200
++++ zsnes/src/win/winintrf.asm 2002-06-29 01:46:14.000000000 +0200
+@@ -189,6 +189,10 @@
+ mov byte[esi+11+256],'t'
+ mov byte[esi+12+256],0
+
++ mov byte[spcon],1
++ mov byte[soundon],1
++ mov byte[cfgsoundon],1
++
+ ; Get and set the initial directory
+ mov ebx,InitDir
+ mov edx,InitDrive
+diff -ru zsnes-1.35/src/win/zloaderw.c zsnes/src/win/zloaderw.c
+--- zsnes-1.35/src/win/zloaderw.c 2002-06-24 07:34:34.000000000 +0200
++++ zsnes/src/win/zloaderw.c 2002-06-29 01:39:53.000000000 +0200
+@@ -40,7 +40,8 @@
+ romtype, scanlines, showallext, smallscreenon, soundon,
+ spcon, vsyncon, DisplayS, fname, filefound, SnowOn,
+ NetChatFirst,NetServer,NetNewNick,
+- NetFilename,TCPIPAddress,NetQuitAfter,UDPConfig;
++ NetFilename,CmdLineTCPIPAddress,NetQuitAfter,UDPConfig,
++ CmdLineNetPlay;
+
+ void ccmdline(void);
+
+@@ -178,7 +179,8 @@
+ if (strptr<4) {
+ NetServer=0;
+ } else {
+- strp=&TCPIPAddress;
++ CmdLineNetPlay = 1;
++ strp=&CmdLineTCPIPAddress;
+ strncpy(strp,ExtA[3],28);
+ }
+ }
+@@ -670,10 +672,17 @@
+ }
+ else
+ {
+- if(gfnm > 0)
++ if(gfnm > 0) // Quick fix to allow spaces, might produce strange names
++ // if there are unrecognized options
+ {
+- printf("Limit yourself to one filename\n");
+- return 2;
++ char *fvar, *fvar2;
++ fvar=&fname;
++ fvar2=&fname+fvar[0]+1;
++ if(fvar[0]+3>127) return(2);
++ fvar2[0]=' ';
++ strncpy(&fvar2[1],argv[p],127-fvar[0]-1);
++ fvar[0] += strlen(argv[p])+1;
++ gfnm++;
+ }
+ else
+ {
+@@ -685,7 +694,7 @@
+ }
+ }
+ }
+- if(gfnm == 1)
++ if(gfnm > 0)
+ {
+ filefound=0;
+ makeextension();
diff --git a/games-emulation/zsnes/zsnes-1.35-r1.ebuild b/games-emulation/zsnes/zsnes-1.35-r1.ebuild
new file mode 100644
index 000000000000..141e63c3b777
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.35-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.35-r1.ebuild,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
+SRC_URI="mirror://sourceforge/zsnes/zsnes${PV//./}src.tar.gz"
+HOMEPAGE="http://www.zsnes.com/"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 -sparc -ppc"
+SLOT="0"
+IUSE="opengl"
+
+RDEPEND="opengl? ( virtual/opengl )
+ virtual/x11
+ >=media-libs/libsdl-1.2.0
+ sys-libs/zlib
+ media-libs/libpng"
+DEPEND="${RDEPEND}
+ >=dev-lang/nasm-0.98"
+
+src_compile() {
+ # Don't attempt to introduce $CFLAGS usage, docs say result will be slower.
+ patch -p1 < ${FILESDIR}/${P}-cvs.patch || die "CVS patch failed"
+ cd ${S}/src
+ use opengl || myconf="--without-opengl"
+ ./configure --prefix=/usr --host=${CHOST} $myconf || die
+ make || die
+}
+src_install() {
+ cd ${S}/src
+ into /usr
+ dobin zsnes
+ doman linux/zsnes.1
+ cd ${S}
+ dodoc *.txt linux/*
+}
diff --git a/games-emulation/zsnes/zsnes-1.36.ebuild b/games-emulation/zsnes/zsnes-1.36.ebuild
new file mode 100644
index 000000000000..74817af92072
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.36.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.36.ebuild,v 1.1 2003/09/09 16:26:50 vapier Exp $
+
+DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
+SRC_URI="mirror://sourceforge/zsnes/zsnes${PV//./}src.tar.gz"
+HOMEPAGE="http://www.zsnes.com/"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 -ppc -sparc"
+IUSE="opengl"
+SLOT="0"
+
+RDEPEND="opengl? ( virtual/opengl )
+ virtual/x11
+ >=media-libs/libsdl-1.2.0
+ sys-libs/zlib
+ media-libs/libpng"
+DEPEND="${RDEPEND}
+ >=dev-lang/nasm-0.98"
+
+pkg_setup() {
+ # xfree should not install these, remove until the fixed
+ # xfree is in main use.
+ rm -f /usr/X11R6/include/{zconf.h,zlib.h}
+}
+
+src_compile() {
+ # Don't attempt to introduce $CFLAGS usage, docs say result will be slower.
+ cd ${S}/src
+ econf `use_with opengl`
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd ${S}/src
+ into /usr
+ dobin zsnes
+ doman linux/zsnes.1
+ cd ${S}
+ dodoc *.txt linux/*
+}