View unanswered posts | View active topics It is currently Tue Jun 18, 2019 6:59 pm



Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3  Next
ZSNES 1.51b Experimental Linux Binaries 
Author Message
New Member

Joined: Sat Apr 04, 2009 2:58 am
Posts: 7
Reply with quote
Post Thanks!
THANKS! I was pulling out hair for a moment trying to figure out why sda worked and alsa wouldn't :-), the vendor's emulation repository didn't include the patch.
The pentium-4 build works fine under on my opensuse 11.1 box.


Tue May 05, 2009 5:39 am
Profile
Rookie

Joined: Thu Jan 27, 2005 7:28 pm
Posts: 37
Reply with quote
Post 
Nach wrote:
RedDwarf wrote:
I though about packaging it for openSUSE and saw this patch in the actual 1.51(a) package:
Code:
--- 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);

...makes any sense or better I remove it?

That breaks start up state on subsequent games or on making movies, I have no idea why someone would do that.

I don't remember what happened the last time, but I have looked again at the package.

The compiler outputs this
Code:
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


That the packaging tools interpret this way:
Code:
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

Ok, whoever did that... commenting it without asking probably wasn't a great idea. But it seems to be a problem.

And... I suppose there will be no more 1.x releases. But, since I wanted to put zsnes in /usr/games I found I needed this patch:
Code:
--- 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:


Thu Jun 25, 2009 10:30 pm
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3901
Location: Solar powered park bench
Reply with quote
Post 
RedDwarf wrote:
The compiler outputs this
Code:
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


False positive, due to assembly tricks.

And I never see that warning with my GCCs.

RedDwarf wrote:
And... I suppose there will be no more 1.x releases.

Don't be so certain of that. I've been toying with the idea of putting out an interim release.

RedDwarf wrote:
But, since I wanted to put zsnes in /usr/games I found I needed this patch:
Code:
--- 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:

I'm not sure what that might break...
Sounds like it couldn't go in /use/local/bin anymore...

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Fri Jun 26, 2009 6:09 am
Profile WWW
Rookie

Joined: Thu Jan 27, 2005 7:28 pm
Posts: 37
Reply with quote
Post 
Nach wrote:
RedDwarf wrote:
The compiler outputs this
Code:
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


False positive, due to assembly tricks.

And I never see that warning with my GCCs.

Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".
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.

Nach wrote:
RedDwarf wrote:
And... I suppose there will be no more 1.x releases.

Don't be so certain of that. I've been toying with the idea of putting out an interim release.

RedDwarf wrote:
But, since I wanted to put zsnes in /usr/games I found I needed this patch:
Code:
--- 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:

I'm not sure what that might break...
Sounds like it couldn't go in /use/local/bin anymore...

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.


Fri Jun 26, 2009 1:08 pm
Profile
ZSNES Developer
ZSNES Developer
User avatar

Joined: Tue Jul 27, 2004 10:54 pm
Posts: 3901
Location: Solar powered park bench
Reply with quote
Post 
RedDwarf wrote:
Nach wrote:
RedDwarf wrote:
The compiler outputs this
Code:
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


False positive, due to assembly tricks.

And I never see that warning with my GCCs.

Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".
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 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.

Go review the code yourself, you'll see the memcpy() is fine.

RedDwarf wrote:
Nach wrote:
RedDwarf wrote:
And... I suppose there will be no more 1.x releases.

Don't be so certain of that. I've been toying with the idea of putting out an interim release.

RedDwarf wrote:
But, since I wanted to put zsnes in /usr/games I found I needed this patch:
Code:
--- 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:

I'm not sure what that might break...
Sounds like it couldn't go in /use/local/bin anymore...

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.

I'll look into it.

_________________
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding


Fri Jun 26, 2009 3:33 pm
Profile WWW
Reply with quote
Post 
Nach wrote:
Don't be so certain of that. I've been toying with the idea of putting out an interim release.


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 :)


Fri Jun 26, 2009 7:03 pm
Rookie

Joined: Thu Jan 27, 2005 7:28 pm
Posts: 37
Reply with quote
Post 
Nach wrote:
RedDwarf wrote:
Nach wrote:
RedDwarf wrote:
The compiler outputs this
Code:
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


False positive, due to assembly tricks.

And I never see that warning with my GCCs.

Probably because openSUSE compiles with "-D_FORTIFY_SOURCE=2 -fstack-protector".
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 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.

Go review the code yourself, you'll see the memcpy() is fine.

Well, I would say the memcpy is writing 3019 bytes where there is only space for one byte... but I don't talk assembly.
Since this is the one with the memcpy I suppose you are talking about this one, I trust you there. But then there is also the warning from "SPCRAM[0xFFC0+i] = SPCROM[i];", at line 2764. SPCRAM is supposed to be 0xFFC0 bytes long and the for writes until 0xFFFF. SPCRAM is also really bigger than it seems?

Between, I suppose changing the involved variable declarations to make the compiler think they are... "bigger than what them are supposed to be, but of the size them really are xD"... would not be good, true?


Sat Jun 27, 2009 1:21 am
Profile
ZSNES Shake Shake Prinny
User avatar

Joined: Wed Jul 28, 2004 4:15 pm
Posts: 5615
Location: PAL50, dood !
Reply with quote
Post 
It's not bigger than it seems, but the data is aligned in a specific way and we read it all in one go.

If you change anything about that alignment, you'll break everything.
i.e. Don't.

_________________
皆黙って俺について来い!!
Code:
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)

Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54


Sat Jun 27, 2009 9:25 am
Profile
Rookie

Joined: Thu Jan 27, 2005 7:28 pm
Posts: 37
Reply with quote
Post 
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


Mon Jun 29, 2009 11:48 pm
Profile
Rookie

Joined: Tue Jan 18, 2005 3:50 am
Posts: 22
Reply with quote
Post 
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'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.


Fri Nov 06, 2009 6:18 am
Profile
Reply with quote
Post 
I am sorry for bringing this thread up again, but how do I apply that patch?


I am getting the whole buffer overflow error:
http://pastebin.com/f5fb2f0f5 (the "make" part you may ignore).


I really don't know what to do.


Sat Dec 26, 2009 5:39 am
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
Hi!!!well i need some help!!

1.i download http://zsnes.sf.net/zsnes-1.51b-pentium4.tar.gz
2.i have already the zsnes 1.51 version install do i need it to run 1.51b?or should i remove it first?
3.i haven't remove 1.51 version yet and i just extract 1.51b i wan to use but i don't know how?
4.i have click in the file zsnes and it open but in about it does not say is 1.51b it still says 1.51 so iam not sure if iam using your fix or zsnes (btw i'm too stupid to learn the name of the emulator) 1.51. so what i want is to install 1.51b can you please help?
5.can you fix zsnes so it can read cht the right way?my cht work on zsnes (btw i'm too stupid to learn the name of the emulator) for windows but not on linux i have ubuntu 10.04.


Mon Oct 11, 2010 3:20 pm
Profile
Zealot
User avatar

Joined: Wed Jul 28, 2004 3:31 am
Posts: 1140
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
As I already said in another topic, you probably need to rename your .cht files to work with the Linux version. Case sensitive filenames and all.


Tue Oct 12, 2010 12:39 am
Profile WWW
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
hi,
I can't get ZSNes run in Debian amd64.
I do what says in this thread: http://board.zsnes.com/phpBB3/viewtopic.php?f=2&t=12339
but I only get a Segmentation fault.

If I delete the /usr/lib/ao/plugins-2 dir with its contents, then I can run ZSnes but without sound.
Any Hint?

PS: I can't post in the thread above, it seems to be closed.


Tue Oct 12, 2010 9:29 am
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
hahaha no it does not,i have try all that CHT or cht it don't matter it wont work i have try
chrono trigger(u).cht or chrono trigger(u).CHT and it does nothing so it must have a bug
in there somewhere. and was asking how to install 1.51b so i can try it but no answer for that.


Tue Oct 12, 2010 11:40 am
Profile
Zealot
User avatar

Joined: Sat Jul 02, 2005 2:01 am
Posts: 1076
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
And your ROM is named what, taking any and all spaces, symbols and capitalization in to account? Also, do you have them in the right directory? I'm not 100% sure where they go by default but I'm willing to bet in $HOME/.zsnes (a "hidden" directory in your home).

Also, make sure they haven't got cleared for whatever reason.

_________________
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae


Tue Oct 12, 2010 1:10 pm
Profile WWW
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
ok i have try this the home folder have a folder name .ZSNES but ZSNES wont read it cause is a hidden folder i try to see is ZSNES would read the folder by enabling view hidden folder option in ubuntu but still ZSNES dont know where that folder is. any ideas?


Tue Oct 12, 2010 10:52 pm
Profile
Official tech support dood

Joined: Wed Jan 25, 2006 7:57 am
Posts: 2080
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
it's ~/.zsnes, not ~/.ZSNES. there is a significant difference.

_________________
Why yes, my shift key *IS* broken.


Tue Oct 12, 2010 11:47 pm
Profile
Zealot
User avatar

Joined: Wed Jul 28, 2004 3:31 am
Posts: 1140
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
Is your ROM image "chrono trigger (u).smc" ? If it is "Chrono Trigger (U).smc" then your cheat file must be "Chrono Trigger (U).cht" and not the all-lower-case filename you posted. It does make a difference. (I also checked the source code, the extension must be "cht" and not "CHT")


Wed Oct 13, 2010 1:11 am
Profile WWW
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
my smc is on a zip file and is Chrono Trigger (U).smc i have rename the cht file to match it like this Chrono Trigger (U).cht but still nothing happens i will extract it to see what happens.


Thu Oct 14, 2010 12:10 am
Profile
Official tech support dood

Joined: Wed Jan 25, 2006 7:57 am
Posts: 2080
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
and the cht file is in ~/.zsnes (or whatever you defined the CHEATS path to be)?

_________________
Why yes, my shift key *IS* broken.


Thu Oct 14, 2010 12:39 am
Profile
Zealot
User avatar

Joined: Wed Jul 28, 2004 3:31 am
Posts: 1140
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
Actually, I think it has to match the name of the ZIP.


Thu Oct 14, 2010 1:01 am
Profile WWW
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
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. :(


Thu Oct 14, 2010 1:48 am
Profile
Regular
User avatar

Joined: Wed Sep 22, 2004 3:46 am
Posts: 278
Location: Tromaville
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
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. :(

I notice you are still referring to the folder as ~/.ZSNES. Have you or have you not tried what odditude said?

Quote:
it's ~/.zsnes, not ~/.ZSNES. there is a significant difference.


Thu Oct 14, 2010 2:01 am
Profile
New Member

Joined: Sun Oct 10, 2010 9:20 pm
Posts: 8
Reply with quote
Post Re: ZSNES 1.51b Experimental Linux Binaries
in home folder there is a folder call .zsnes thats all and zsnes wont read it cause is a hidden folder but i believe is not where i put the game or the cht file cause i have try to make zsnes emu to boot almost by now everywhere in the desktop,in the home folder ,change names eliminate (),eliminate space between the name i really don't know what to do anymore.

~/.zsnes i have no idea where to add this? is there a way to configure zsnes to tell him that my cht are there?


Thu Oct 14, 2010 3:30 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 57 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.