1 |
mr_bones_ 11/09/29 20:11:35 |
2 |
|
3 |
Added: zsnes-1.51-buffer.patch |
4 |
Log: |
5 |
fix building with newer zlib (bug #384473); add patch from rpmfusion (bug #257963) |
6 |
|
7 |
(Portage version: 2.1.10.11/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-emulation/zsnes/files/zsnes-1.51-buffer.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/zsnes/files/zsnes-1.51-buffer.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/zsnes/files/zsnes-1.51-buffer.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: zsnes-1.51-buffer.patch |
16 |
=================================================================== |
17 |
--- zsnes_1_51/src/initc.c.fortify 2007-01-20 01:02:24.000000000 +0100 |
18 |
+++ zsnes_1_51/src/initc.c 2007-02-26 12:10:19.000000000 +0100 |
19 |
@@ -1464,8 +1464,8 @@ |
20 |
clearmem2(); |
21 |
} |
22 |
|
23 |
-extern unsigned char BRRBuffer[32]; |
24 |
-extern unsigned char echoon0; |
25 |
+extern unsigned char BRRBuffer[]; |
26 |
+extern unsigned char echoon0[]; |
27 |
extern unsigned int PHdspsave; |
28 |
extern unsigned int PHdspsave2; |
29 |
unsigned char echobuf[90000]; |
30 |
@@ -1479,7 +1479,7 @@ |
31 |
memset(vidmemch4, 0, 4096); |
32 |
memset(vidmemch8, 0, 4096); |
33 |
memset(BRRBuffer, 0, PHdspsave); |
34 |
- memset(&echoon0, 0, PHdspsave2); |
35 |
+ memset(echoon0, 0, PHdspsave2); |
36 |
memset(echobuf, 0, 90000); |
37 |
memset(spcBuffera, 0, 65536*4+4096); |
38 |
memset(DSPMem, 0, 256); |
39 |
@@ -1822,7 +1822,7 @@ |
40 |
|
41 |
extern unsigned int nmiprevaddrl, nmiprevaddrh, nmirept, nmiprevline, nmistatus; |
42 |
extern unsigned char spcnumread, yesoutofmemory; |
43 |
-extern unsigned char NextLineCache, sramsavedis, sndrot, regsbackup[3019]; |
44 |
+extern unsigned char NextLineCache, sramsavedis, sndrot[], regsbackup[3019]; |
45 |
extern unsigned int Voice0Freq, Voice1Freq, Voice2Freq, Voice3Freq; |
46 |
extern unsigned int Voice4Freq, Voice5Freq, Voice6Freq, Voice7Freq; |
47 |
extern unsigned int dspPAdj; |
48 |
@@ -2621,7 +2621,7 @@ |
49 |
} |
50 |
|
51 |
sramsavedis = 0; |
52 |
- memcpy(&sndrot, regsbackup, 3019); |
53 |
+ memcpy(sndrot, regsbackup, 3019); |
54 |
|
55 |
if (yesoutofmemory) { asm_call(outofmemfix); } |
56 |
asm_call(GUIDoReset); |
57 |
--- zsnes_1_51/src/zstate.c.fortify 2007-02-26 12:14:30.000000000 +0100 |
58 |
+++ zsnes_1_51/src/zstate.c 2007-02-26 12:17:22.000000000 +0100 |
59 |
@@ -99,15 +99,15 @@ |
60 |
copy_func(buffer, &cycpbl, 4); |
61 |
copy_func(buffer, &cycpblt, 4); |
62 |
//SNES PPU Register status |
63 |
- copy_func(buffer, &sndrot, 3019); |
64 |
+ copy_func(buffer, sndrot, 3019); |
65 |
} |
66 |
|
67 |
static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t)) |
68 |
{ |
69 |
//SPC stuff, DSP stuff |
70 |
copy_func(buffer, SPCRAM, PHspcsave); |
71 |
- copy_func(buffer, &BRRBuffer, PHdspsave); |
72 |
- copy_func(buffer, &DSPMem, sizeof(DSPMem)); |
73 |
+ copy_func(buffer, BRRBuffer, PHdspsave); |
74 |
+ copy_func(buffer, DSPMem, sizeof(DSPMem)); |
75 |
} |
76 |
|
77 |
static void copy_extra_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t)) |
78 |
@@ -156,7 +156,7 @@ |
79 |
/* |
80 |
if (buffer) //Rewind stuff |
81 |
{ |
82 |
- copy_func(&buffer, &echoon0, PHdspsave2); |
83 |
+ copy_func(&buffer, echoon0, PHdspsave2); |
84 |
} |
85 |
*/ |
86 |
} |
87 |
--- zsnes_1_51/src/gblvars.h.fortify 2007-02-26 12:12:33.000000000 +0100 |
88 |
+++ zsnes_1_51/src/gblvars.h 2007-02-26 12:12:36.000000000 +0100 |
89 |
@@ -33,9 +33,9 @@ |
90 |
extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh; |
91 |
extern unsigned int tempesi, tempedi, tempedx, tempebp; |
92 |
extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2; |
93 |
-extern unsigned char sndrot, SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea; |
94 |
-extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[32], *romdata; |
95 |
-extern unsigned char curcyc, echoon0, spcnumread, NextLineCache, HIRQNextExe; |
96 |
+extern unsigned char sndrot[], SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea; |
97 |
+extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[], *romdata; |
98 |
+extern unsigned char curcyc, echoon0[], spcnumread, NextLineCache, HIRQNextExe; |
99 |
extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096]; |
100 |
|
101 |
extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, DSP4Enable, spcon; |