Load Game on Startup

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
cmarcus1979

Load Game on Startup

Post by cmarcus1979 »

Is there any way to use command line arguements to skip the intro screen and just go straight to the game?

I'm trying to build a front end for several emulators, and this is the only one I'm having trouble with. For you programmers out there, here's an example of what I'm trying...

Process.Start(Application.StartupPath + "\\ZSNESW\\zsnesw.exe ","ZELDA 3.SMC");

Where ZELDA 3.SMC is in the zsnesw.exe directory.

Thanks in advance for any help..
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

<Nach> http://board.zsnes.com/phpBB2/viewtopic.php?t=11738
<Nach> Is he trying to get a game to skip their intros?
<grinvader> nah
<grinvader> skipping the gui
<Nach> it does skip the GUI if you pass it a ROM
<grinvader> yes
<Nach> so I don't know what that guys problem is
<grinvader> but that's what i understand from what he wrote
<grinvader> me neither
<Nach> maybe he's not passing a valid ROM
<grinvader> zelda3.smc seems pretty valid
<Nach> well, could be he's not passing the right path to the ROM
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

I blame the space in your ROM name.

I curse whoever allowed for spaces in filenames, as a matter of fact. Stupidest thing ever.

PROTIP: _ is your friend.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Ooh, I didn't notice the space. Yeah, then he's missing \" around it.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
cmarcus1979

Post by cmarcus1979 »

Doah! The space... That was it.

Thanks guys!
rchuncleskeleton
New Member
Posts: 9
Joined: Fri Feb 09, 2007 3:05 am

maybe this???

Post by rchuncleskeleton »

there is a great frontend readily available for multiple emulators called MAMEWAH! It requires a little bit of setup but no biggy.

PS: don't curse who ever created spaces in filenames....curse the software you use for not handling it correctly!
doktor_kris
Lurker
Posts: 102
Joined: Sat Feb 25, 2006 7:47 pm
Contact:

Post by doktor_kris »

Word!
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Re: maybe this???

Post by Nach »

rchuncleskeleton wrote: PS: don't curse who ever created spaces in filenames....curse the software you use for not handling it correctly!
Speak for yourself.

I am going to curse whoever invented spaces in filenames, and allowed anything more than 8.3
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Re: maybe this???

Post by Kajuru »

Nach wrote:I am going to curse whoever invented spaces in filenames, and allowed anything more than 8.3
So damn true.

Why would anyone use Street Fighter II Turbo - Hyper Fighting (U) [!].smc when SF2T.smc or SF2Turbo.smc works just as good, is beyond me.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

grinvader wrote:PROTIP: _ is your friend.
Agreed.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Rashidi
Trooper
Posts: 515
Joined: Fri Aug 18, 2006 2:45 pm

Re: maybe this???

Post by Rashidi »

Kajuru wrote:
Nach wrote:I am going to curse whoever invented spaces in filenames, and allowed anything more than 8.3
So damn true.

Why would anyone use Street Fighter II Turbo - Hyper Fighting (U) [!].smc when SF2T.smc or SF2Turbo.smc works just as good, is beyond me.
*nod* NO$GMB also having problem with spaces in file name, even if i enclosed the file name with quotes (")

i must rename all the rom using _
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Re: maybe this???

Post by Kajuru »

Rashidi wrote: i must rename all the rom using _
Download RenameFiles, it easily replaces SPACES with _
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: maybe this???

Post by grinvader »

rchuncleskeleton wrote:PS: don't curse who ever created spaces in filenames....curse the software you use for not handling it correctly!
No. first it's not even "created", it's allowed. I'm not seeing you curse windows for not "handling" A LOT of characters in their filenames. Like * or ?.
Let me preempt the argument a bit.
exoskeleton wrote:oh but it would make it very tough to differentiate between wildcards and actual filenames!
And what do you think blank spaces do ?
They make any kind of CL parsing completely retarded, turning them into backslashed hell.
Backslashes that windows wouldn't even be able to use, with its oh so smart "let's use backslash for directory levels !" stupidity, and have to use an even worse escape sequence, which prevents YET another character from being in filenames.
Fixing one issue by making 2 others. Brilliant.

Code: Select all

-rw-------  1 grin users       6 2008-07-16 19:43 "_spaces_fucking_suck
-rw-------  1 grin users       7 2008-07-16 19:42 *_yeah_they_do
-rw-------  1 grin users      10 2008-07-16 19:47 wtf_r_u_doing?
Curse your inability to find any valid retort to this point.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

It could be worse.. like people wanting bold and italics in a filename... then someone has to die.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Post by Kajuru »

WTF, filename formating? Imagine the TAG hell it would be.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Don't joke about stuff like that.

Code: Select all

/tmp> ls -la \<b\>cool\ stuff\</b\>.txt
-rw-r--r-- 1 nach nach 0 2008-07-17 08:31 <b>cool stuff</b>.txt
/tmp> 
This will appear as "cool stuff.txt" in any HTML rendering application if it isn't escaped. And who do you think even bothers to escape HTML in some program displaying a directory tree?

For example, if you were programming in Qt, and used a QTextEdit to display a full path list of a bunch of files, you'll have a bold file name.

If you used whichever language to display tree contents on a web server, presto, bold filenames.

Nobody bothers checking file names for escaping, since we all know how absurd that is :roll:

Case in point:
Image

Here's some PHP code so you can do it yourself:

Code: Select all

function file_modes($mode)
{
  $mode_str;
  $mode_str.= ($mode & 0040000) ? 'd' : '-';
  $mode_str.= ($mode & 00400) ? 'r' : '-';
  $mode_str.= ($mode & 00200) ? 'w' : '-';
  $mode_str.= ($mode & 00100) ? 'x' : '-';
  $mode_str.= ($mode & 00040) ? 'r' : '-';
  $mode_str.= ($mode & 00020) ? 'w' : '-';
  $mode_str.= ($mode & 00010) ? 'x' : '-';
  $mode_str.= ($mode & 00004) ? 'r' : '-';
  $mode_str.= ($mode & 00002) ? 'w' : '-';
  $mode_str.= ($mode & 00001) ? 'x' : '-';

  return($mode_str);
}

function directory_print($dir)
{
  $dirs = array();

  print "<h3>Contents of: $dir</h3>\n";
  if ($dh = opendir($dir))
  {
    print "<table border=\"1\">\n<tr><td>Permissions</td><td>Owner</td><td>Group</td><td>Size</td><td>Modified</td><td>Name</td></tr>\n";
    while (($file = readdir($dh)) !== false)
    {
      if ($file[0] != ".")
      {
        if (filetype($dir.$file) == "dir")
        {
          array_push($dirs, $dir.$file);
        }

        $stat_results = stat($dir.$file);
        $uid = posix_getpwuid($stat_results['uid']);
        $gid = posix_getgrgid($stat_results['gid']);
        print "<tr><td>".file_modes($stat_results['mode'])."</td><td>".$uid['name']."</td><td>".$gid['name']."</td><td>".$stat_results['size']."</td><td>".date("Y-m-d h:i:sA", $stat_results['mtime'])."</td><td>".$dir.$file."</td></tr>\n";
      }
    }
    closedir($dh);
    print "</table>\n";
  }

  foreach ($dirs as $newdir)
  {
    directory_print($newdir."/");
  }
}

directory_print("/tmp/");
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply