IPS auto-patching of symlinks to ROMs

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
CecilHarvey

IPS auto-patching of symlinks to ROMs

Post by CecilHarvey »

I have a separate directory for translated games where I keep a symlink to the original ROM and an IPS patch with the same name of the link (I use Linux, as you might have guessed :wink:). I found this to be very convenient and storage space-saving.

But 2 or 3 months ago, a new WIP release (and consequently the new 1.50 version of ZSNES) broke this feature. Whenever I start the symlink to a ROM now, ZSNES does not apply the IPS automatically to it. I found that out that by using a "real" file (no symlink) where it still works. Even more, the original ROM where the link led to had a "bugfix" IPS with it, and ZSNES applied this patch instead. Obviously ZSNES follows the symbolic links in linux filesystems. For me this is a bug, can you change it back to how it was?
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

We are not going to be using any old broken code how it was.

However if you provide an example of such a symlink and how you used it, I can look into it and see about fixing it.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Dryer Lint
New Member
Posts: 7
Joined: Tue Jan 02, 2007 12:03 pm

Post by Dryer Lint »

I have the same problem and am using 1.50 as well.

Here is an example:

Let's assume you have game A.zip with two patches A.ips and B.ips.

If you create a symlink to A.zip to "fake" a second ROM B.zip (using "ln -s A.zip B.zip") one would assume that running "zsnes B.zip" results in ZSNES patching A.zip with B.ips.

However, ZSNES still applies A.ips.

It would be really great if you could fix this!
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay I see the problem.

Anyone know how a way to do realpath() without parsing symlinks?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay I committed a fix to SVN. I think this should work. I'd appreciate if you can test and let me know.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Aaron
Lurker
Posts: 157
Joined: Sat Dec 31, 2005 7:26 am

Post by Aaron »

Jeez, Nach. You're so awesome. :B
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Well I just got The Second Reality Project 2 patch for Super Mario World, and thinking of you guys, I figured why not symlink tsrp2.jma to smw.jma to save space and run it like that.
So now I have a good test for it, and I'm making sure this works :)
Just let me know if there's some case I overlooked that is not working for you.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Dryer Lint
New Member
Posts: 7
Joined: Tue Jan 02, 2007 12:03 pm

Post by Dryer Lint »

Thanks for the quick fix!
Works like a charm now.
Post Reply