Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How-to: Make ZSNES exit when you press ESC  (Read 8810 times)

0 Members and 1 Guest are viewing this topic.

jaquer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:January 13, 2025, 10:20:49 pm
  • Geek of no Qualifications
How-to: Make ZSNES exit when you press ESC
« on: August 08, 2002, 10:09:21 pm »
Hey guys, I just figured this out yesterday and I wanted to share it with the community in hopes that it helps somebody else.

I wanted to be able to exit ZSNES (one of the best SNES emus out there, IMNSHO), when I pressed ESC, since *all* other emus I use work that way. Well, I posted a request on the ZSNES board, but that led nowhere. Yesterday, armed with a lot of determination I reverse engineered a way to do this, here's the short-yet-semi-techie how-to:

Once you install and configure ZSNES to your liking (resolution, controllers, etc.), open the file ZGUICFGW.DAT using your favorite Hex editor. I like to use UltraEdit. Anyway, open the file and go to position 200. Change the bit there (it should be 00) to 01. What's 01, you ask, well it's a keyboard scancode! Save the file, run ZSNES again and rejoice on its new quick exit key. :D Once you do this though, ESC will no longer work as the menu key, so you need to change that bit back to 00 if you want to reset it. Please note, this works for me on my computer and should anything happen to your computer because you try it, please don't blame me. You're on your own here.

Anyway, for more details, please read the related thread at the ZSNES board. http://board.zsnes.com/index.php?board=5;action=display;threadid=2944

Have phun.
It's pronounced hacker.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:How-to: Make ZSNES exit when you press ESC
« Reply #1 on: August 09, 2002, 05:02:57 am »
izaram, you've made my day :)

I've been trying to do this, and I posted on the ZSNES board too.  I think someone suggested at the time they could add a 'Use ESC to quit' tickbox or something.  But I didn't hold my breath...

I couldn't get HowardC's wrapper to work on this either unfortunately :(

I've been using the '3' (coin) button to quit so far, but I've quit more than a few times while accidentally 'inserting a coin'.

I'll get a hex editor and give your solution a try later, thanks again for your persistance :)

Now I just need some way of quitting Gens...

jaquer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:January 13, 2025, 10:20:49 pm
  • Geek of no Qualifications
Re:How-to: Make ZSNES exit when you press ESC
« Reply #2 on: August 09, 2002, 05:13:07 am »
Hey man, just glad it helps at least one more person. :D

Now, if only I could find an Atari 2600 emu that works with XP.

Dude, we should be thinking about going to sleep soon (2:15 am my time).

Pax.
It's pronounced hacker.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:How-to: Make ZSNES exit when you press ESC
« Reply #3 on: August 09, 2002, 05:56:35 am »
Hehe!  Well my watch says 10:56 am.  But..but that must mean I'm at work ;)

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:How-to: Make ZSNES exit when you press ESC
« Reply #4 on: August 09, 2002, 01:13:11 pm »
Just did this trick, and it worked a treat!!

Just make sure you edit address 200dec (C8hex) and not 200hex.  And put the value 01hex and not '01' text or something.

Also, if you want to use the gui, you can run zsnesw.exe with no commandline options and the gui comes up anyway.  Or just edit the .cfg file :)

Thanks again izaram!!  ;D

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:How-to: Make ZSNES exit when you press ESC
« Reply #5 on: August 09, 2002, 01:50:40 pm »
Way COOL!  I will take a look at it tonight.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 20, 2025, 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:How-to: Make ZSNES exit when you press ESC
« Reply #6 on: August 09, 2002, 08:47:39 pm »

izaram, you've made my day :)

I've been trying to do this, and I posted on the ZSNES board too.  I think someone suggested at the time they could add a 'Use ESC to quit' tickbox or something.  But I didn't hold my breath...

I couldn't get HowardC's wrapper to work on this either unfortunately :(

I've been using the '3' (coin) button to quit so far, but I've quit more than a few times while accidentally 'inserting a coin'.

I'll get a hex editor and give your solution a try later, thanks again for your persistance :)

Now I just need some way of quitting Gens...


Btw nice find Izaram.  I've noticed that emus that have been ported from dos seldom work with my wrappers, which is most unfortunate.  I'm working on an alternate solution though.... Right now I send a message to the application that basically says "windows is shutting down, please close up quickly"  which tricks it into shutting down properly.  I might have to actually kill the process which Will require extensive testing before I release it as it can cause severe problems if not coded properly.

Anyway, I'll keep you all posted...  One question, I've never ran into a need for one but you you think a mouse simulator wrapper might be useful?  You know for apps that don't even have keyshortcuts.  

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:April 28, 2025, 12:29:02 am
Re:How-to: Make ZSNES exit when you press ESC
« Reply #7 on: August 12, 2002, 01:06:55 am »


I've been trying to do this, and I posted on the ZSNES board too.  I think someone suggested at the time they could add a 'Use ESC to quit' tickbox or something.  But I didn't hold my breath...

but I've quit more than a few times while accidentally 'inserting a coin'.


Hehe...why were you inserting coins for credits in a Super Nintendo emulator?? :D

But seriously, thanks for the hex editing tip, man.  I don't understand why every emulator doesn't give you the option of setting hotkeys for EVERYTHING.  The one emulator I've seen that is the best example of letting you control EVERYTHING with self defined hotkeys is VirtualNES.  Probably the best Windoze NES emulator out there.  And like I said, you can completely redefine EVERY hotkey for everything...

Jakobud

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 20, 2025, 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:How-to: Make ZSNES exit when you press ESC
« Reply #8 on: August 12, 2002, 08:30:44 am »
Yeah hardcoded keys piss me off.  They make my job of a universal fe a lot harder.  For any of you emu programmers reading this:

It takes all of 5 minutes to setup a redefinable keys structure in your emu.  Do us all a favor and set that up first thing from now on. :-)


MK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
  • Last login:May 12, 2024, 03:57:02 pm
Re:How-to: Make ZSNES exit when you press ESC
« Reply #9 on: August 12, 2002, 10:50:52 pm »
It's a pity the DOS version of ZSNES messes up my soundcard whenever I use the quick exit function  :'(

I'll stick to File -> Quit until it's fixed...

Thanks for the tip anyway!