C64 keyboard issue

I’m looking to play some C64 roms and downloaded the Vice_x64_libretro.so core. The game requires me to press keyboard keys to start the game (select level, etc). For this particular game (jumpman) I just need numbers 1-5, so remapping the light keys would be ideal, but since the keypad is a keyboard it doesn’t seem to make sense to remap a typed ‘u’ to a typed ‘1’ and so on.

One thought I had was to recompile the keypad code to make the light keys just be 1-5, but that seems like it will work for this game and later I’ll need to make more changes. Is there a better way of doing this per rom?

I did notice that the Core seems to have an overlay keyboard for this very purpose but the controls didn’t seem to work for moving the pointer.

Can the C64 emulator load/make memory dumps? Because if so, a workaround for games that need the keyboard to choose cheats at start time may be to run them with a keyboard, get past the menu, and then save the emulator state, and use that as the game file in the Clockwork Pi.

@Vod1 did you, I am sorry, I just started with VICE this week end. There is no need to recompile anything.

RetroArch provides overrides and remaps which can be stored for each single game. For example having the game galaxian.d64, and I have VICE x64 installed, then you would have:
/home/cpi/.config/retroarch/config/VICE x64/galaxian.opt
/home/cpi/.config/retroarch/config/remaps/VICE x64/galaxian.rmp
The opt is the override, mine looks like this:

vice_Statusbar = "disabled"
vice_Drive8Type = "1541"
vice_DriveTrueEmulation = "enabled"
vice_SidModel = "6581F"
vice_C64Model = "C64MODEL_C64_PAL"
vice_UserportJoyType = "none"
vice_JoyPort = "port_2"
vice_RetroJoy = "enabled"
vice_Controller = "joystick"
vice_mapper_y = "RETROK_ESCAPE"
vice_mapper_x = "RETROK_F1"
vice_mapper_b = "RETROK_n"
vice_mapper_l = "RETROK_KP_PLUS"
vice_mapper_r = "RETROK_KP_MINUS"
vice_mapper_l2 = "RETROK_KP_MULTIPLY"
vice_mapper_r2 = "RETROK_ESCAPE"
vice_mapper_l3 = "RETROK_TAB"
vice_mapper_r3 = "RETROK_F5"
vice_mapper_start = "RETROK_KP_DIVIDE"

vice_JoyPort let’s you define which joy stick port to use for this game, some want port 1, other port 2. vice_Controller must be set to joystick (default is keyboard) else the button to key remapping will not work. Here I have mapped Y button to ESCAPE key, which is Run/Stop on C64. And button X to F1 and so on.

You can create these files either manually or with RetroArch when you go into the Quick Menu while the game is running, change the Options, then in Controls choose Save Game Remap File