Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#62 define gamedir from the command line

open
nobody
None
5
2008-03-10
2008-03-10
Ben Whitman
No

Hey, I have used zsnes for a long time now and i just recently upgraded to the latest version (from 1.42), and the changes are AMAZING. However, there is one sad change that causes it to no longer work for one particular thing. I have for a long time run ZSNES off of my flash drive as a portable app, and in version 1.42, when you went to open a new game, I believe this is how it worked (correct me if I'm wrong)
1. checked for previous "last directory opened from"
2. if that failed, defaulted to opening the directory where zsnes was located.

this worked out great for using zsnes as a portable app, since the drive letter changes depending on what computer you're on, so as long as the games and saves were all in one folder with the zsnesw.exe, i would open zsnes, click open game and voila, all my games were there and since the save directory was undefined, they defaulted to the same directory and away I went.

Now, I should mention that I am running this off of a U3 "Smart drive", and that I created a pseudo-installer, so that it looks like ZSNES is "installed" on my flash drive. The way the smart drive works is that when you launch the U3 launchpad, it creates a temporary application data folder on the host computer for files that some programs might require to be on the host computer for running. With version 1.51 of ZSNES installed on my flash drive, for some reason it defaults to this temp directory when searching for games. I don't know, maybe it's copying zsnesw.exe to the temp location and launching from there, and that's why it's searching there , but I don't think so. However, once I search for the directory where the games are stored and open a game, the next time I try to open a game while still on the same computer, it remembers the directory where I opened the last game.

Basically, since ZSNES has the ability to remember the last directory it opened from, it would be quite easy to put in a command line to rewrite that value to any directory you wanted, wouldn't it? I mean it should just be a single string variable, shouldn't be too hard to accept a command line to edit it, then you could open it from a flash drive with the command (this would be what it would look like for the U3 drive:

zsnesw.exe -setgamesdir "I:\System\Apps\A385105E-7457-44E5-A323-B1706E6BC203\Data"

which then would allow me to use the U3 start command: appStart cmd="%U3_APP_DATA_PATH%\zsnesw.exe -setgamesdir '%U3_APP_DATA_PATH%\data"

and run it from any computer with ease. Please, if you could just add the ability to edit the default directory from the command line, that would be amazing. I would even make my U3 installer available to anyone who wanted it.

Thanks (and sorry for the long-winded explanation)

Discussion

  • Ben Whitman
    Ben Whitman
    2008-03-11

    Logged In: YES
    user_id=1944448
    Originator: YES

    Nevermind. I found a workaround in the U3 environment. If anyone wants the .u3p, let me know.