Jump to content

NEStopia Controller Problems


zargon33

Recommended Posts

Posted

I've been trying without success for some time now to get Nestopia to save my controller settings. I'm running Windows 7, and I'm having the same problem most people appear to be having. I set up my controllers, works just fine until I exit and start up again, I have to remap them every time.

I've checked that the files are not write protected. I'm also running the program as administrator.

I've written about this in the Nestopia forum as well, but haven't received much help. The emulator rocks, all except for this problem.

Help! If you can, and thanks :)

Posted

Alright, after doing some poking around I found a solution from another user on a different forum, with more specific advice that helped me solve it.

First off, make sure Nestopia is not running. Find your nestopia install directory and right click nestopia.xml and select properties. Make sure that the read-only box is unchecked, so that your can write to the file. THEN do the following:

"Nestopia re-writes the xml file as it exits, so, if you make changes to Nestopia's configuration and then set the xml file's read-only attribute while Nestopia is still running your changes will not be saved.

Make your changes to Nestopia,

Exit Nestopia,

Set read-only attribute on xml file."

After you setup your controllers and exit Nestopia, change the .xml file back to read-only in the properties, and it will stay.

The only problem I'm having now is everytime I exit Nestopia it gives me the "Couldn't save the configuration" popup window, anyone know how to get around that?

  • 4 weeks later...
Posted

Thanks for posting the fix, zargon. Did you ever figure out a way to prevent that pop-up every time you exit nestopia and go back to hyperspin?

Posted

I think your getting that pop up because you changed the file attributes and now it cant save its own configuration.

If your using hyperlaunch do this:

Make a backup of nestopia.xml that you already configured the way you want.

Then rename the backup to nestopia_backup.xml

add these lines just before the "run" or "run wait" command in the

"Nintendo Entertainment System" section of the Hyperlaunch.ahk script.

of course save and compile.

filedelete, %emupath%nestopia.xml

filecopy, %emupath%nestopia_backup.xml, %emupath%nestopia.xml, 1

sleep, 1000 ;gives it time to do its thing before launching nestopia.

Now, Nestopia can rewrite the xml all it wants (no nag) now and you feed it with a pre-configured one everytime it starts up thru Hyperlaunch (only).

This was off memory (and my harddrive is on my cab no internet) so hopefully all the syntax is correct.

Posted

Thanks chillinwater.

I've found that if I exit nestopia by pressing "escape" twice on my keyboard, I won't get the pop-up about not being able to save the configuration. However, if I exit using "alt-x," I get the pop-up.

  • 2 months later...
Posted

Hope I'm not bringing this off-topic but I believe its related to double esc.

For example if you save your game in say "Final Fantasy" at the in game Inn and then double esc, the game will not save.

If you exit the game with alt-x or via the menu then the game saves properly.

I'm willing to bet the controller settings also will not save properly if you double esc. Originally I set them outside of Hyperspin because I thought something in the front end was preventing the settings from saving, now I'm almost certain its double esc.

Edit:

I believe it has something to do with how Nestopia is coded. It probably does an ini/state/etc update when it shuts down, the same way Winamp saves the playlist on close. Since the double esc thing is an external program, AutoHotKey it uses this code:

   Hotkey, %exitEmulatorKey%, CloseProcess

I'm assuming that's something similar to an end process from task manager thus losing all settings on exit using that method.

Edit 2:

I tried removing the line from HyperLaunch.ahk and recompiling only to start getting "Make sure your paths contains a backslash on the end" whenever I tried to run a ROM. File size of HyperLaunch.exe also changes from 207kb to 300kb. I then went back and replaced the file with the original and tried recompiling without modifying the file to come to the same problem.

This means either I don't have the same ahk file that was used to compile the .exe I have now, or they've changed AutoHotKey and broken the script.

Edit 3:

Was using Unicode x86 instead of ANSI x86 [AutoHotKey]. Still curious to why the file jumps 100kbs in size though.

I think LoppyDog already ran into the same problem: http://www.hyperspin-fe.com/forum/showthread.php?t=9678

To quote his new NES code in the AHK script:

;****************************NINTENDO ENTERTAINMENT SYSTEM**********************

else if (systemName = "Nintendo Entertainment System" && executable = "nestopia.exe")
{
   hideDesktop()
Hotkey, $1, NestopiaSave
Hotkey, $2, NestopiaLoad
Hotkey, $Esc, NestopiaExit
   Runwait, %executable% "%romPath%%romName%%romExtension%", %emuPath%, Hide UseErrorLevel
   Process, waitClose, %executable%
}

vs

;****************************NINTENDO ENTERTAINMENT SYSTEM**********************

else if (systemName = "Nintendo Entertainment System" && executable = "Nestopia.exe")
{
   Gui, Color, 000000
   Gui -Caption +ToolWindow +AlwaysOnTop
   Gui, Show, W%A_ScreenWidth% H%A_ScreenHeight%, BlackGui
   Hotkey, %exitEmulatorKey%, CloseProcess
   Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%, UseErrorLevel
   Sleep, 2000
   Gui, destroy
   Process, waitClose, %executable%
   exitapp
}

Edit 4:

I suppose I should have taken "a major work in progress" more literally. Just drop the exit line completely from the script, re-assign the menu to ` instead of esc and then re-assign Exit to esc. Same thing but it saves your settings.

Edit 5:

Picked this up off UG

I got it to work. I added this to the Kill Commands section:

KillBSNES:

sendinput, !{F4}

return

and then I replaced this:

Hotkey, %exitEmulatorKey%, CloseProcess

with this:

Hotkey, %exitEmulatorKey%, KillBSNES

Using the above method I can quit BSNES with the Esc key and it exits clean retaining my save data.

I just have to figure out how to get BSNES to auto load the cart I choose on the HyperSpin wheel. If I get a chance to work on it I will post how to do it.

If anyone else knows how please post the solution :) Thank You.

Credit goes to B2K24. Maybe it will help someone.

  • 1 year later...
Posted

wow this worked great! Thanks Chillinwater!

If your using hyperlaunch do this:

Make a backup of nestopia.xml that you already configured the way you want.

Then rename the backup to nestopia_backup.xml

add these lines just before the "run" or "run wait" command in the

"Nintendo Entertainment System" section of the Hyperlaunch.ahk script.

of course save and compile.

filedelete, %emupath%nestopia.xml

filecopy, %emupath%nestopia_backup.xml, %emupath%nestopia.xml, 1

sleep, 1000 ;gives it time to do its thing before launching nestopia.

Now, Nestopia can rewrite the xml all it wants (no nag) now and you feed it with a pre-configured one everytime it starts up thru Hyperlaunch (only).

  • 3 months later...
  • 10 months later...
Posted

Old thread, new builder.

Dear Chillinwater,

I love you too. (Maybe a little homo, idk... and idc.)

Ive been wrestling this problem for a little while now. Next step is to get the @#$!^!$%'n Select+Start to exit.

Posted
Dear Chillinwater,

I love you too. (Maybe a little homo, idk... and idc.)

I just laughed so hard at work when checking the email alert for this I almost threw up. Then had to explain to my coworkers what I was laughing at.

  • 1 year later...
Posted
I think your getting that pop up because you changed the file attributes and now it cant save its own configuration.

If your using hyperlaunch do this:

Make a backup of nestopia.xml that you already configured the way you want.

Then rename the backup to nestopia_backup.xml

add these lines just before the "run" or "run wait" command in the

"Nintendo Entertainment System" section of the Hyperlaunch.ahk script.

of course save and compile.

filedelete, %emupath%nestopia.xml

filecopy, %emupath%nestopia_backup.xml, %emupath%nestopia.xml, 1

sleep, 1000 ;gives it time to do its thing before launching nestopia.

Now, Nestopia can rewrite the xml all it wants (no nag) now and you feed it with a pre-configured one everytime it starts up thru Hyperlaunch (only).

This was off memory (and my harddrive is on my cab no internet) so hopefully all the syntax is correct.

Sorry to revive a dead topic, I'm new to all of this, I don't actually have Hyperspin, I'm using Steam as a front end for my ROMs. Is there a way I can do this without Hyperlaunch? I just want to kill the NEStopia warning about not being able to change the configuration.

Posted
Sorry to revive a dead topic, I'm new to all of this, I don't actually have Hyperspin, I'm using Steam as a front end for my ROMs. Is there a way I can do this without Hyperlaunch? I just want to kill the NEStopia warning about not being able to change the configuration.

Based on the solution you brought up, you would need to write some sort of launcher/wrapper for nestopia. The code in that post is in ahk. Although as to why you post here when neither hyperlaunch or hyperspin is being used confuses me.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...