Compressed file detection

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
mr_jrt
New Member
Posts: 3
Joined: Tue Sep 21, 2004 12:16 am
Contact:

Compressed file detection

Post by mr_jrt »

Hya, I've been using zsnes for donkey's years now, and I'd just like to thank you guys for producing this software which has provided me with so much entertainment over the years.

That aside, there's a couple of little feature requests I was hoping you'd consider.

The first is the ability to specify a config file on the command line, as I admin a PC with several users, each of which want their own preferences. I've tried altering the current directory before executing zsnes, but it always reads the config file from the app directory.

The second feature is of lesser importance to me as I have a workaround. I compiled a disc with my roms on, and to save space I zipped them. I then created a custom file association (.zsr, "zipped snes rom") that I could use to launch zsnes. The problem is that zsnes determines if a file is zipped not by reading its header, but instead by looking at its file extention.

Knowing some basic assembly, I located the code that performs this detection and simply added the additional file extention (I was too scared to attempt to alter the code substantially and add zip detection, assembly is very easy to break), but maybe it would be better in the long run if zip files were detected by examining the file rather than its name. :idea:

Again, cheers for your work.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I've recently added the following option to NSRT

Code: Select all

-noext     Ignore the extension on the file, and instead uses file type
           detection to determine if and how a file is compressed.
Let me know if NSRT reads your custom files with that switch. If it does, I'd be happy to put that code into ZSNES.[/code]
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
mr_jrt
New Member
Posts: 3
Joined: Tue Sep 21, 2004 12:16 am
Contact:

Post by mr_jrt »

They're just standard single-rom zips, but I tested regardless and yeah, it displays all the rom info fine.
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

You can edit the zsnesw.cfg file to save in a different directory. Open the file up with notepad and look for "SaveDirectory =" without the quotes.
Try out CCleaner and other free software at Piriform
Image
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

mr_jrt wrote:They're just standard single-rom zips, but I tested regardless and yeah, it displays all the rom info fine.
But does it work with every single one of your ROMs?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
mr_jrt
New Member
Posts: 3
Joined: Tue Sep 21, 2004 12:16 am
Contact:

Post by mr_jrt »

snkcube: Yeah, but the problem is that the users have their own preferences for things like video filters and controller setup, which are stored *in* zsnesw.cfg, hence the request.

nach: I ran it across the disc and it picked up ~66% of the roms (and there are quite a few roms on the disc), the rest most likely just don't match the hashes in your database( the disc was compiled based upon goodSNES 0.9996...hey, it was before nsrt was on the radar ;)). I used the command: "nsrt -list2 -noext -r <path>"
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

mr_jrt wrote:hey, it was before nsrt was on the radar ;)
NSRT was around for almost 2 years :?

NSRT 3.0 the big change was out for about a year.

Anyways, sounds good, so I guess I'll try to port my code to C and put it in ZSNES in the near future.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply