gunit Posted August 30, 2020 Posted August 30, 2020 WinVice - C64 - Ipac2 - Controls I am currently back working on my Bartop Arcade and i'm going through each emulator making sure all the controls are setup correctly. I have hit a wall with the Commandore 64! I have gone into WinVice and setup the Joystick controls and one fire button which is working fine however I need to map other buttons like Enter, Spacebar,1 etc in order just to get to start the game or play certain games. I have a custom ipac2 keymap setup but I can't see anyway to map these to the C64 common buttons used ? I can see a file called "win_pos.vkm" which I can edit the keys for example "1778 /* Esc - Run/Stop */" but don't understand how I assign that to a different key on my Ipac keys setup ? So I guess my questions are:- 1) I have a totally of 16 Buttons on my bartop, what C64 keys should be mapped to this ? 2) How do you map the C64 keys most needed to my custom Ipac2 keys ? I hope someone can help me as I really can't seem to find much inforamtion on google that helps Thanks Gav
gunit Posted September 1, 2020 Author Posted September 1, 2020 Come on you Commodore 64 lovers, someone must of sorted it - After the C16 this was my next computer I owned, such a classic!
colt374 Posted September 1, 2020 Posted September 1, 2020 Hi Gunit, Like you I'm in the middle of trying to add a C64 collection to my arcade cabinet which I have just recently upgraded with a whole new build of Hyperspin on a new PC running Windows 10, (previously on an old win 7 machine). Funnily enough, I didn't realise till just now that I've been re-adding the systems in the same order that I experienced them as a kid.... first Arcade, then Atari 2600, and now I'm onto C64. So I'm about to figure out how best to configure my controls to work with the C64, and similar to you I have an Ipac setup but am using both an ipac2 and an Ipac 4 on a four player control panel, so i have a lot of buttons to use. There's four "Player select" buttons, six multi-function buttons, 7 buttons for player's 1 and 2, and 4 buttons for players 3 and 4. So 32 buttons all up. Oh and two on the side for pinball emulation but they're probably not going to be practical for c64 use, except maybe Pinball Construction Set. My point to all that info is that even with all these options I never had much luck figuring out a good control configuration for c64 emulation on my arcade cabinet with my previous pc build. I'm basically starting fresh here so I'm getting my new game collection sorted and working with RetroArch in the coming weeks. After that I'll be free to do some experimenting to see what keys need to be configured and what works best. I will post any results I get here if nobody else jumps in with some better ideas. To be clear, all my buttons connected to my Ipacs are configured as standard keyboard letter and number inputs. (i.e player 1 button 1 is the letter A, button 2 is B, Player two up stick direction is H, etc) As such I figure the best way to set up the cabinet is to map these keys inside the emulator itself to the most commonly used c64 keys. I'll have to forgo playing games that need lots of typing or figure out some sort of hotkey config that can paste in commonly used text for certain games. Or maybe use a wireless media keyboard that i have here, but that's an imperfect solution. For a bit of brainstorming, I'm going to list what I think is the main keys needed to configure for most games : Back-Arrow Run-stop C64 Return Restore Space F1-F8 Shift Ctrl CLR Shift * Some other possibilities, maybe using Ipac 'shifted' buttons or a hotkey program of some sort. Maybe even programming some Autohotkey scripts. Hmm, there's a thought. Load "*",8,1 Load "$",8 List Run Anything else I'm missing? it's been a year or so since I've last played some c64 so there may be factors I'm not thinking of here. Phew, that was long-winded. Sorry about that. Short answer to your two questions, imho : 1. Refer to list above, and 2. Configure the keys in the emulator to match what your ipac controls are mapped to instead of mapping the ipac controls to c64 keys.
gunit Posted September 1, 2020 Author Posted September 1, 2020 I have been trying to configure the keys in WinVice-2.4-x64. Joystick setup was pretty straight forward but the keyboard config has nothing - see the images below:- Nothing I can see in game either to change keys - at a loss to be honest unless you can figure out the correct code in the "win_pos.vkm" file to amend to a key of your liking. I found answers to what the 4 numbers meant in the code but could not find anything on changing one key to another. I thought WinVice was the best emulator for C64 but maybe due to the complexity of setting the controls up it is not?
dark13 Posted September 1, 2020 Posted September 1, 2020 There's no easy way out, C64 needs LOTS of keys. Try Vice core in RetroArch, the advantage is you can remap keys per game basis and you have an on screen virtual keyboard. Yeah, configuring each games with the needed keys will be a nightmare. Automatizing infopanels creation from .csv files for HTPCs themes (look at infopanel tutorial.zip on the ftp in dark13 folder) PNGs to SWFs automatized flash scripts Hyperspin Wheelset automatized template (photoshop's variables + batch) Aeon nox 4.13 W.I.P. hyperspin skin
colt374 Posted September 1, 2020 Posted September 1, 2020 8 hours ago, gunit said: Nothing I can see in game either to change keys - at a loss to be honest unless you can figure out the correct code in the "win_pos.vkm" file to amend to a key of your liking. I found answers to what the 4 numbers meant in the code but could not find anything on changing one key to another. I thought WinVice was the best emulator for C64 but maybe due to the complexity of setting the controls up it is not? Haha! I hear you! Just last night I started looking at exactly the same thing. For experimental purposes I got the latest version of Gamebase64 up and running on one of my other Pc's as I know how that works and it's been my C64 emulation method of choice for years. I then found you can now use it to launch games via a frontend, including hyperspin, and it looks like it MAY be a viable and less painful option for me personally. So I'm going to give that a try. Here's the details if you want to take a look. https://www.bu22.com/wiki/exporting_gamebases_to_other_frontends. But then then I went to remap keys in VICE.... and ran into exactly the same thing you did. Ye gods, what a nightmare! It looks so daunting! (CCS64 seems to have an easier method of mapping keys but it's a paid emulator so I'm not touching that if I can help it). So I'm doing some research to try and figure out how to make a vkm file and I think I've got it. There is a table in the files that show the keyboard matrix and you use that to map each key. The comments in the files are pretty confusing and don't explain this, but there's a table in there that you use as reference to map each key individually, and there's another table to show it's "shifted" state. (i.e. Would shift be pressed or not on a C64 keyboard) So you use these to list each key you want to remap to a C64 key. Here's the format you use (which they don't explain at all) [Key to Map] [Bit Y] [Bit X] [Shift state] I'll try and explain this in my own obscure fashion. So here's the table's. Sorry, they're not coming out very straight when pasted here but I've done my best to line it up. You can find it in the files anyway. : # C64 keyboard matrix: # # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 0 |Bit 1 |Bit 2 |Bit 3 |Bit 4 |Bit 5 |Bit 6 |Bit 7 | # +-------+--------+----------+---------+-------+-------+---------+-------+---------+ # |Bit 0 | DEL | Retrn |C_L/R | F7 | F1 | F3 | F5 |C_U/D| # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 1 | 3 # | W | A | 4 $ | Z | S | E | S_L | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 2 | 5 % | R | D | 6 & | C | F | T | X | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 3 | 7 ' | Y | G | 8 ( | B | H | U | V | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 4 | 9 ) | I | J | 0 | M | K | O | N | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 5 | + | P | L | - | . > | : [ | @ | , < | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 6 |PND | * | ; ] |HOME| S_R | = | A_UP | / ? | # +-------+--------+----------+---------+-------+-------+---------+---------+ # |Bit 7 | 1 ! |A_LFT| CTRL | 2 " |SPCE| C= | Q | R/S | # +-------+--------+----------+---------+-------+-------+---------+---------+ # Shiftflag can have the values: # 0 key is not shifted for this keysym/scancode # 1 key is shifted for this keysym/scancode # 2 left shift # 4 right shift # 8 key can be shifted or not with this keysym/scancode # 16 deshift key for this keysym/scancode # 32 another definition for this keysym/scancode follows # 64 shift lock # 256 key is used for an alternative keyboard mapping So as an example, (this is straight out of the vkm file), to map the F1 key on your keyboard to the F1 key of a C64 keyboard, you would add the line that shows the F1 key, then you find the f1 key in the table and add the vertical bit number and then the horizontal bit number that lines up with it, and then finally the state you want the shift key to be in. Like this : F1 0 4 8 i.e Key to map is F1, Bit Y is 0, Bit X is 4, and the Shift flag is 8 which is 'key can be shifted or not' There's also some keywords in there for some specific keys such as your shift keys, but they work the same except have a ! in front of them. !LShift 1 7 (e.g. left Shift on your keyboard equals Bit Y and X for 'S_L' in the table. So this is as far as I've got so far and next I'll try and figure out the joystick mapping when I get some spare time after work over the next few days. 8 hours ago, dark13 said: There's no easy way out, C64 needs LOTS of keys. Try Vice core in RetroArch, the advantage is you can remap keys per game basis and you have an on screen virtual keyboard. Yeah, configuring each games with the needed keys will be a nightmare. Yeh Dark, there's not a chance I'd want to try that with the thousands of games in Gamebase64 (There's 26900 entries in there!) Not that I'd ever want to actually put all those into Hyperspin. Even for the 50 'classic' games listed in there it'd be way too painful. That's why i want to figure out setting up the vkm file instead. "We can rebuild him... We have the technology."
dark13 Posted September 1, 2020 Posted September 1, 2020 40 minutes ago, colt374 said: Yeh Dark, there's not a chance I'd want to try that with the thousands of games in Gamebase64 (There's 26900 entries in there!) Not that I'd ever want to actually put all those into Hyperspin. Even for the 50 'classic' games listed in there it'd be way too painful. That's why i want to figure out setting up the vkm file instead. "We can rebuild him... We have the technology." You don't need to remap EVERY game, you can make a general mapping with most used keys and then create per game configurations for those games needing lots of keys like Airborne Ranger. Moreover with a key you can pop a virtual keyboard on screen and have great zoom options to eliminate borders. Moreover you can configure everything from RA's GUI so its' really easy. Automatizing infopanels creation from .csv files for HTPCs themes (look at infopanel tutorial.zip on the ftp in dark13 folder) PNGs to SWFs automatized flash scripts Hyperspin Wheelset automatized template (photoshop's variables + batch) Aeon nox 4.13 W.I.P. hyperspin skin
colt374 Posted September 1, 2020 Posted September 1, 2020 9 minutes ago, dark13 said: You don't need to remap EVERY game, you can make a general mapping with most used keys and then create per game configurations for those games needing lots of keys like Airborne Ranger. Moreover with a key you can pop a virtual keyboard on screen and have great zoom options to eliminate borders. Moreover you can configure everything from RA's GUI so its' really easy. Ah, fair enough. That's good to know. I am going to see how I go using Gamebase64 first though to see if i can avoid messing manually with other romsets. I'll do whatever I can to save my time and make this as easy as possible. I'm not gong to be surprised at all if it doesn't work out that way though.
gunit Posted September 2, 2020 Author Posted September 2, 2020 Interesting read:- https://www.lemon64.com/forum/viewtopic.php?t=47412
gunit Posted September 3, 2020 Author Posted September 3, 2020 More info found regarding buttons, just need to work out how i remap to my ipac setup :) Set1Button1Slots=Enter Set1Button2Slots=N Set1Button3Slots=Space Set1Button4Slots=Y Set1Button5Slots=Alt,J Set1Button6Slots=Alt,W Set1Button7Slots=Alt,L Set1Button8Slots=Alt,S Set1Button10Slots=Caps Lock Set1DPadUpSlots=Arrow Up Set1DPadRightSlots=Arrow Right Set1DPadDownSlots=Arrow Down Set1DPadLeftSlots=Arrow Left The alt keys you will find in WinVice in the menus, check there to see if you need them. Caps I think acts as Run/Stop. Y & N are for the trainers/cracks Space is for a second fire button, eg. throwing a grenade in Commando.
gunit Posted September 3, 2020 Author Posted September 3, 2020 I might have just solved the issue, check this out:- http://elbeaus.com/c64/C64kbd.html
colt374 Posted September 3, 2020 Posted September 3, 2020 Hey thanks for all the info, and that was an interesting read on lemon 64. I couldn't find where to see all the alt keys in the menus though. To make sure we're looking at the same menus, I'm using the latest stable version of Vice... gtk3vice3.4. I did see that elbeaus page but forgot to mention it in my earlier post. I couldn't find the Restore key in his list though? And where did you get that setbutton list you have up there? I'm using pre-2015 ipacs and I have to program the keys through the Ipac app. Having an ipac 2 and 4 connected at the same time seems to confuse the thing so i'm loathe to try and do that on the fly, but that seems to be what your planning on doing right? Also i've got to find an easy way to map a key to quit out of vice back to Hyperspin. How are you doing that one? Btw did you see you can also turn on the 'Enable keyboard debugging in the status bar' option in settings to help with testing? Incidentally i have given up on trying to taunch games through gamebase and am just going to launch VICE direct through rocketlauncher. I am having trouble with the VICE module for that but found this info about a fix if you find it useful : http://www.rlauncher.com/showthread.php?6630-WinVICE-3-4-module-error&p=46648#post46648
gunit Posted September 3, 2020 Author Posted September 3, 2020 Hi, I'm using WinVice 2.4 x64 + Hyperspin 1.5.1 + RocketLauncher 1.0.1.10 I have built a 2 player Bartop Arcade with Ipac2. Currently all consoles, arcades, computer systems are pretty much fully working and I am now going over each one to make sure the controls are all setup correctly, so far Mame, Retroarch and Mess are complete and I am now onto Winvice for the C64. Here is my custom setup for the Ipac2:- The idea was to try and continue the key setup but as you are aware I can't see how i'm going to do this with keyboard systems. I'm hoping I can still use 16 buttons to cover most of the keys needed to play C64 games. However from testing numerous games in the Winvice I have come to this pattern of keys below that are needed to run without a keyboard:- (notice some games require a different key to function for start etc which is strange) Start / Select Game = Spacebar / Esc / Enter / Caps Lock / F / F7 Exit = Alt X / Alt F4 Player 1 = F1 Player 2 = F3 / F7 P1 Up = ArrowUp P1 Down = ArrowDown P1 Left = ArrowLeft P1 Right = ArrowRight P2 Up = W P2 Down = S P2 Left = A P2 Right = D P1 Fire 1 = Spacebar / F P1 Fire 2 = Spacebar / I P2 Fire 1 = I P2 Fire 2 = ? The below is the big issue and ideally needs to be removed from the games as you really need to have a keyboard to get past these screens before you can even play the game:- Skip Crack screen Y / N = ? Skip title Screen Y/N = ? High Score or Training game H/T = ? Enable or Disable Fastloader E/D = ? Load or Reset Highscore L/R = ? Starting Level 1-4 = ? 1 for Game-Intro. 2 for game = ? Change disk = ? Hopefully this gives a bit more detail of what i'm trying to achieve, would appricaiate any help
gunit Posted October 1, 2020 Author Posted October 1, 2020 Thread has gone a bit dead so I'm hoping that someone with a solution might be able to help. (With the ipac shift/marcos I can assign alot more buttons.)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.