
The pentium-4 build works fine under on my opensuse 11.1 box.
Moderator: ZSNES Mods
I don't remember what happened the last time, but I have looked again at the package.Nach wrote:That breaks start up state on subsequent games or on making movies, I have no idea why someone would do that.RedDwarf wrote:I though about packaging it for openSUSE and saw this patch in the actual 1.51(a) package:...makes any sense or better I remove it?Code: Select all
--- src/initc.c +++ src/initc.c 2007/08/17 14:20:26 @@ -2621,7 +2621,7 @@ } sramsavedis = 0; - memcpy(&sndrot, regsbackup, 3019); + //memcpy(&sndrot, regsbackup, 3019); if (yesoutofmemory) { asm_call(outofmemfix); } asm_call(GUIDoReset);
Code: Select all
initc.c: In function 'init65816':
initc.c:2764: warning: array subscript is above array bounds
In function 'memcpy',
inlined from 'powercycle' at initc.c:2624:
/usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk will always overflow destination buffer
Code: Select all
I: A function overflows or underflows an array access. This could be a real error,
but occasionaly this condition is also misdetected due to loop unrolling or strange pointer
handling. So this is warning only, please review.
W: zsnes arraysubscript initc.c:2764
I: Statement is overflowing a buffer
E: zsnes bufferoverflow initc.c:2624
Code: Select all
--- src/Makefile.in
+++ src/Makefile.in
@@ -142,8 +142,8 @@
./autogen.sh --recheck
install:
- @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/bin
- @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@prefix@/bin
+ @INSTALL@ -d -m 0755 $(DESTDIR)/@bindir@
+ @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@bindir@
@INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/man/man1
@INSTALL@ -m 0644 linux/zsnes.1 $(DESTDIR)/@prefix@/man/man1
uninstall:
False positive, due to assembly tricks.RedDwarf wrote: The compiler outputs thisCode: Select all
initc.c: In function 'init65816': initc.c:2764: warning: array subscript is above array bounds In function 'memcpy', inlined from 'powercycle' at initc.c:2624: /usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk will always overflow destination buffer
Don't be so certain of that. I've been toying with the idea of putting out an interim release.RedDwarf wrote: And... I suppose there will be no more 1.x releases.
I'm not sure what that might break...RedDwarf wrote: But, since I wanted to put zsnes in /usr/games I found I needed this patch:Code: Select all
--- src/Makefile.in +++ src/Makefile.in @@ -142,8 +142,8 @@ ./autogen.sh --recheck install: - @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/bin - @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@prefix@/bin + @INSTALL@ -d -m 0755 $(DESTDIR)/@bindir@ + @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@bindir@ @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/man/man1 @INSTALL@ -m 0644 linux/zsnes.1 $(DESTDIR)/@prefix@/man/man1 uninstall:
Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".Nach wrote:False positive, due to assembly tricks.RedDwarf wrote: The compiler outputs thisCode: Select all
initc.c: In function 'init65816': initc.c:2764: warning: array subscript is above array bounds In function 'memcpy', inlined from 'powercycle' at initc.c:2624: /usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk will always overflow destination buffer
And I never see that warning with my GCCs.
In configure scripts from autoconf by default "bindir" is "exec-prefix/bin", "exec-prefix" is "prefix" and "prefix" is "/usr/local". So "/usr/local/bin" would still be the default install path.Nach wrote:Don't be so certain of that. I've been toying with the idea of putting out an interim release.RedDwarf wrote: And... I suppose there will be no more 1.x releases.
I'm not sure what that might break...RedDwarf wrote: But, since I wanted to put zsnes in /usr/games I found I needed this patch:Code: Select all
--- src/Makefile.in +++ src/Makefile.in @@ -142,8 +142,8 @@ ./autogen.sh --recheck install: - @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/bin - @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@prefix@/bin + @INSTALL@ -d -m 0755 $(DESTDIR)/@bindir@ + @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@bindir@ @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/man/man1 @INSTALL@ -m 0644 linux/zsnes.1 $(DESTDIR)/@prefix@/man/man1 uninstall:
Sounds like it couldn't go in /use/local/bin anymore...
I don't see "both", unless you're referring to something I don't know about. There's only one line of code in question as far as I know.RedDwarf wrote:Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".Nach wrote:False positive, due to assembly tricks.RedDwarf wrote: The compiler outputs thisCode: Select all
initc.c: In function 'init65816': initc.c:2764: warning: array subscript is above array bounds In function 'memcpy', inlined from 'powercycle' at initc.c:2624: /usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk will always overflow destination buffer
And I never see that warning with my GCCs.
Both are false positives? The 2764 one is just a warning, but I will need black magic to make the packaging tools accept the 2624.
I'll look into it.RedDwarf wrote:In configure scripts from autoconf by default "bindir" is "exec-prefix/bin", "exec-prefix" is "prefix" and "prefix" is "/usr/local". So "/usr/local/bin" would still be the default install path.Nach wrote:Don't be so certain of that. I've been toying with the idea of putting out an interim release.RedDwarf wrote: And... I suppose there will be no more 1.x releases.
I'm not sure what that might break...RedDwarf wrote: But, since I wanted to put zsnes in /usr/games I found I needed this patch:Code: Select all
--- src/Makefile.in +++ src/Makefile.in @@ -142,8 +142,8 @@ ./autogen.sh --recheck install: - @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/bin - @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@prefix@/bin + @INSTALL@ -d -m 0755 $(DESTDIR)/@bindir@ + @INSTALL@ -m 0755 @ZSNESEXE@ $(DESTDIR)/@bindir@ @INSTALL@ -d -m 0755 $(DESTDIR)/@prefix@/man/man1 @INSTALL@ -m 0644 linux/zsnes.1 $(DESTDIR)/@prefix@/man/man1 uninstall:
Sounds like it couldn't go in /use/local/bin anymore...
That would be really awesome, especially if it had the SPC7110 and DSP-3 improvements added. Depending on who's faster, the former may be quite important. And if it had UPS, you could encourage me to write some proper Qt patching software as well :)Nach wrote:Don't be so certain of that. I've been toying with the idea of putting out an interim release.
Well, I would say the memcpy is writing 3019 bytes where there is only space for one byte... but I don't talk assembly.Nach wrote:I don't see "both", unless you're referring to something I don't know about. There's only one line of code in question as far as I know.RedDwarf wrote:Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".Nach wrote:False positive, due to assembly tricks.RedDwarf wrote: The compiler outputs thisCode: Select all
initc.c: In function 'init65816': initc.c:2764: warning: array subscript is above array bounds In function 'memcpy', inlined from 'powercycle' at initc.c:2624: /usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk will always overflow destination buffer
And I never see that warning with my GCCs.
Both are false positives? The 2764 one is just a warning, but I will need black magic to make the packaging tools accept the 2624.
Go review the code yourself, you'll see the memcpy() is fine.
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
I've begun trying to migrate my work in this thread so that it doesn't break the DOS/Linux builds; I am running Ubuntu 9.10 inside Virtual PC and experienced the FORTIFY_SOURCE issue; your patch worked perfectly. I am integrating the patch into mine.RedDwarf wrote:I have not tested them. But RPMFusion, from Fedora, has:
- To fix the bindir/mandir problem: http://cvs.rpmfusion.org/viewvc/rpms/zs ... e&view=log
- To fix the FORTIFY_SOURCE problem: http://cvs.rpmfusion.org/viewvc/rpms/zs ... e&view=log
I notice you are still referring to the folder as ~/.ZSNES. Have you or have you not tried what odditude said?jvhellraiser wrote:forget it, thanks for the help but this is not working i have done every single thing you guys have told me nothing happens i have rename the zip file to match the cht file and nothing i have extract it and put them together in a folder in the desktop try to load from there and nothing
i pass them to the home folder and nothing,i have try to use show hidden files in home folder to see if ZSNES will read from ~/.ZSNES but ZSNES wont find the folder where i put the game and cht file because when i enter the home folder using ZSNES it wont find ~/.ZSNES folder i have erase the space between the game name erase ( ) to see is that was the problem and nothing,is funny because when i use wine with ZSNES it will read the cht files oh well maybe you guys can fix this in someway.
Thanks for all the help guys.
it's ~/.zsnes, not ~/.ZSNES. there is a significant difference.