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: zsnesw key mapping question  (Read 1826 times)

0 Members and 1 Guest are viewing this topic.

reko19

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 218
  • Last login:July 16, 2025, 10:06:10 am
  • I want to build my own arcade controls!
zsnesw key mapping question
« on: May 16, 2008, 12:53:59 pm »
I am trying to figure out default mapping for the zsnesw so that I could program my IPAC accordingly. Default settings found in ziput.cfg are listed below. Some of the keys(i.e. 31, 30, 200, 208) do not correspond to any SDL key codes. What am I missing?

; Keys for Select, Start, Up, Down, Left, Right, X, A, L, Y, B, R
pl1selk=54
pl1startk=28
pl1upk=200
pl1downk=208
pl1leftk=203
pl1rightk=205
pl1Xk=31
pl1Ak=45
pl1Lk=32
pl1Yk=30
pl1Bk=44
pl1Rk=46

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: zsnesw key mapping question
« Reply #1 on: May 16, 2008, 01:51:56 pm »
have you tried just going into the GUI and setting them up? I set my Ipac up for MAME first, then just went into ZSNES and configured my controls in the GUI.

Guess I'm not sure what you're asking.

reko19

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 218
  • Last login:July 16, 2025, 10:06:10 am
  • I want to build my own arcade controls!
Re: zsnesw key mapping question
« Reply #2 on: May 16, 2008, 02:43:32 pm »
this is one way of doing it. i was going to set IPAC using default zsnesw key mapping and was trying to figure out based on config file what it is

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: zsnesw key mapping question
« Reply #3 on: May 16, 2008, 04:04:26 pm »
It has been a while, but cant you simply start the zsnesw.exe (?) file and then go into the keyboard settings menu and see what the settings are set to .... instead of trying to decipher the INI file directly?

northerngames

  • Trade Count: (+18)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2927
  • Last login:April 09, 2016, 04:18:51 pm
Re: zsnesw key mapping question
« Reply #4 on: May 16, 2008, 04:28:03 pm »
yeah your just making it more difficult for yourself for no apparent reason really  :dunno

set your ipac the way you want it and set eveythng else you want to use with your same ipac settings.

you kinda got it going backwards  :dizzy:


unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: zsnesw key mapping question
« Reply #5 on: May 16, 2008, 04:58:13 pm »
Actually I keep the emulator settings as default and simply reconfigure my encoder when I switch emulators.   This allows me to upgrade emulators with new versions without having to remember how to reset all the defaults manually every time.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: zsnesw key mapping question
« Reply #6 on: May 16, 2008, 04:58:59 pm »
yeah your just making it more difficult for yourself for no apparent reason really  :dunno

set your ipac the way you want it and set eveythng else you want to use with your same ipac settings.

you kinda got it going backwards  :dizzy:


That's what I tried to tell him!  :dunno

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: zsnesw key mapping question
« Reply #7 on: May 16, 2008, 06:27:25 pm »
While it's easy to change each emu's inputs, if you keep updating it can be a PITA repetitive.  (One of the reasons I stopped releasing my own version of mame. :-\)  I understand the set and forget (even though I upgrade regularly) mentality.  Plus from the coding point of view I'm sort interested in what's going on: the numbers have to come from somewhere

Very quick skim of the source, looks like the windows version up, down, left, right (200,208,203,205) are VB/VC scancode numbers for the arrow keys, and the other OS compiles use different numbers for the direction buttons.  OTOH, all OS compiles use the same key numbers for the other inputs.  Too many different "scancode"s on google, hmm...

It almost looks like keynumber+1.  Err, like from the table on this page (plus one).  I think that would result in capslock, a, s, leftshift, z, x, slash and backslash?  (Easier for me just to download and test zsnes inputs... Nahhh, not at work. ;)


As others said, it's easier to remap in the emu, save the remapped inputs file somewhere, and just copy it to the new folder when you upgrade. 

But if you want to do it your way, keep posting on what you find; I'll see it I can help even if others keep telling you to do it differently. :)
Robin
Knowledge is Power

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: zsnesw key mapping question
« Reply #8 on: May 16, 2008, 07:20:03 pm »
You know we don't think outside the box.

reko19

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 218
  • Last login:July 16, 2025, 10:06:10 am
  • I want to build my own arcade controls!
Re: zsnesw key mapping question
« Reply #9 on: May 16, 2008, 09:23:47 pm »
unclet was right. the easiest way is to enable GUI in zsnesw, go into config and check the key assignment. thanks everyone for chiming in.
« Last Edit: May 16, 2008, 09:26:34 pm by reko19 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: zsnesw key mapping question
« Reply #10 on: May 18, 2008, 06:53:29 am »
Very quick skim of the source, looks like the windows version up, down, left, right (200,208,203,205) are VB/VC scancode numbers for the arrow keys, and the other OS compiles use different numbers for the direction buttons.  OTOH, all OS compiles use the same key numbers for the other inputs.  Too many different "scancode"s on google, hmm...

They are DirectInput keycodes.