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: Looking for Modified Emulators : Esc key friendly  (Read 2225 times)

0 Members and 1 Guest are viewing this topic.

Hippo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:February 28, 2007, 10:07:46 am
  • Building a Cab In Blighty!
Looking for Modified Emulators : Esc key friendly
« on: September 04, 2006, 06:04:39 pm »
Im looking for the modifed version of Project 64 that allows quitting via the ESC key.

All the links I've found in the search are no longer available.

Dammed interwebs..

Brad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:August 03, 2018, 05:43:23 pm
    • www.emuchrist.org
Re: Looking for Modified Emulators : Esc key friendly
« Reply #1 on: September 04, 2006, 06:07:23 pm »

Hippo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:February 28, 2007, 10:07:46 am
  • Building a Cab In Blighty!
Re: Looking for Modified Emulators : Esc key friendly
« Reply #2 on: September 04, 2006, 06:09:28 pm »
Your a Gent, Thanks :)

+1 Virtual Cookie for you.

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:August 03, 2025, 02:34:22 am
  • Insufficient facts always invite danger.
Re: Looking for Modified Emulators : Esc key friendly
« Reply #3 on: September 05, 2006, 07:21:20 am »
AtomicFE also adds support to use ESC to quit for any emulator it launches...

Macarro

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:November 29, 2021, 06:50:38 pm
Re: Looking for Modified Emulators : Esc key friendly
« Reply #4 on: September 05, 2006, 12:17:52 pm »
And MALA too ;)

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Looking for Modified Emulators : Esc key friendly
« Reply #5 on: September 05, 2006, 02:49:16 pm »
I am curious as to how the dev's do this. I have written apps with keyboard hooks, some of my wrappers, but it just seems like it would be inefficient if the FE is monitoring all the keypress or keydown events looking for the ESC key. Wouldn't you think this would effect input speed (minor lag) for the emulator.

John

swindus

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 391
  • Last login:July 28, 2021, 05:52:50 am
    • MaLa - M.A.M.E. Launcher
Re: Looking for Modified Emulators : Esc key friendly
« Reply #6 on: September 05, 2006, 03:29:06 pm »
MaLa uses two different methods to do this:

1. A system hook which catch one defined key and close the running process (emu) like your wrappers.

2. Windows hotkeys. With this method MaLa can convert pressed keys to other keys like ESC -> Alt + X for example or terminate the process or just catch the pressed key so that it never reach the emulator.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefwm_hotkey.asp

I never noticed any negative effects on input speed with this methods so far. Maybe it depends on the used emulator.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Looking for Modified Emulators : Esc key friendly
« Reply #7 on: September 05, 2006, 08:58:37 pm »
GameEx can also use ESC to kill an emu. I have written system wide keyboard hooks myself and it dosn't effect the speed of the emu because you don't need to poll the input at 100% CPU usage. You can sleep() for as long as you want after checking for a keypress and it won't effect the emu. It depends on how you code it I suppose.

BTW You can often re-map keys in an emu's exe using Resource Hacker. For example in VisualBoy advance you can map exit to the ESC key and change menu to ENTER.

Eg.
Code: [Select]
VK_ESCAPE, 40002, NOINVERT, VIRTKEY
VK_RETURN, 40263, NOINVERT, VIRTKEY

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Looking for Modified Emulators : Esc key friendly
« Reply #8 on: September 05, 2006, 09:33:08 pm »
GameEx can also use ESC to kill an emu. I have written system wide keyboard hooks myself and it dosn't effect the speed of the emu because you don't need to poll the input at 100% CPU usage. You can sleep() for as long as you want after checking for a keypress and it won't effect the emu. It depends on how you code it I suppose.

BTW You can often re-map keys in an emu's exe using Resource Hacker. For example in VisualBoy advance you can map exit to the ESC key and change menu to ENTER.

Eg.
Code: [Select]
VK_ESCAPE, 40002, NOINVERT, VIRTKEY
VK_RETURN, 40263, NOINVERT, VIRTKEY

I realize this was just an example, but just an FYI, I believe, buriend in the menu's, you can change EVERY key input for Visualboy Advance. I know you can on the knock-offs such as smoth_vba.

John

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:August 06, 2025, 11:19:38 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Looking for Modified Emulators : Esc key friendly
« Reply #9 on: September 06, 2006, 12:52:11 am »
GameEx can also use ESC to kill an emu. I have written system wide keyboard hooks myself and it dosn't effect the speed of the emu because you don't need to poll the input at 100% CPU usage. You can sleep() for as long as you want after checking for a keypress and it won't effect the emu. It depends on how you code it I suppose.


But is it an external app or gameex itself that is doing it?  Because if gameex is running, even with sleep, all of the resources (including memory space) are still there taking up space.  That is unless you are doing it some way I don't know of. 

That's why we normally use the wrappers.  They have to be resident too, but they are tiny little apps, so they don't take up much space. 

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Looking for Modified Emulators : Esc key friendly
« Reply #10 on: September 06, 2006, 06:00:33 pm »
But is it an external app or gameex itself that is doing it?  Because if gameex is running, even with sleep, all of the resources (including memory space) are still there taking up space.  That is unless you are doing it some way I don't know of. 

That's why we normally use the wrappers.  They have to be resident too, but they are tiny little apps, so they don't take up much space. 

I'm not sure how GameEx polls the keyboard since I didn't write it. But Tom being the smart fellow he is, would be aware that having GameEx running in the background even in a low CPU usage state would still take up memory. I've never noticed it slow down any emu on my cab, but he does use a number of DLL's (some of which are written in C++), so perhaps he's used an external utility to poll the keyboard for ESC. It has quite an advanced key re-mapping feature aswell that can be setup on a per emulator basis. That is you can remap any key to something else. I probably shouldn't really speculate as to how it works exactly, because I don't know.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:August 06, 2025, 11:19:38 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Looking for Modified Emulators : Esc key friendly
« Reply #11 on: September 07, 2006, 08:02:20 am »
I would be interested in learning what he is doing then.  Hopefully it's like you say and he's just using a dll or something or else I've totally missed the boat on some sort of technique. 


Key remapping is actually quite easy.  It's even built into windows.  I've just found it to be "dangerous" so I've never looked into implementing it.  It is a way to solve the problem though, remap "key x" to your escape button and boom no more escape isssues.  The only problem is if the emu in question crashes for some reason, the key might get "stuck" and then the user has no clue how to map it back.  An interesting approach though.