Commodore 64 status?

I’m trying to setup C64 on RetroArch but i have a lot of issues.

First of all, half of the games don’t even load. It seems there’s an issue with D64 files. T64 files load fine. Unfortunately, half of C64 games are either of the two.

Secondly, i don’t understand how to swap disks. There isn’t anything in the menu to help on this matter.

Lastly, the virtual keyboard doesn’t do anything. It just appears but it doesn’t work.

Is Vice experimental? There are very few options and trying to load games on a couch setup is a nightmare. Should i just abandon it? Or is there some other better core i could use?

Anyone?

Is there a way to auto load .D64 files at least? Or make the virtual keyboard functional?

Hi,

I was hoping to create a new topic, but as a new forum user it’s seems I’m unable to, so I might add some info here about what’s been posted above and ask a question at the same time.

First, when using the Vice core, providing you’ve load the core, you should be able to select a .d64 file and it will automatically load for you. Apparently .prg files can now also be loaded in the same way, thanks to a recent fix. Your best bet for getting this to work is to download the nightly core, as this will have all of the recent changes to the core. Easyflash files are a great way to run programs on the platform (as they autoload or bring you to menu straight away), they often merge multi disk files into a single cartridge file and significantly speed up load times. Using Launchbox is also a great way to launch these files through retroarch.

For controls the best way to use the emulator at the moment is to use Retropad option with an X-box controller, also you may consider setting up a single hotkey (like a shift key) that turns on the keyboard functions (like fast forward, record, etc) and only map the escape to the joystick to exit. This will give you full use of the keyboard with out triggering any of retroarchs internal functions. The x-box controller can trigger the options menu and virtual keyboard. The virtual keyboard can be a little unresponsive at times with the joystick, but if you have a mouse handy, it generally works well with the mouse buttons. As a tip try to get the cursor exactly over the middle of the virtual key or a little below the center with the arrow, as this usually (but not always) will trigger the key.

Using an low res NTSC shader like 256 or 320, this can help you capture the original look of the c64 on the television, which is particularly important to get things like color bleed just right, which was an important part of how games were colored on the c64, games won’t look the way they used to, or half as good as they should without using the shader.

There is another thread for disc swapping in the forum - you’ll need to set up an m3u file and pay careful attention to the commands that are used to launch disc swapping and loading.


Ok - now for my question. I have an arcade cab which uses an older style keyboard encoder. Unfortunately I’m not able to change the keys on it. At the moment I have up,down, left and right mapped as the main keys for controls and u, i, o, j, k, l, for the buttons

The main thing I’ve noticed, is that if I push back on the controller, I get back and diagonal down movement, if I push up, it triggers both up and run stop (which pauses or exits some games).

I’ve tried to go in and change the controls, but it only gives me a very limited set to play with under the Retropad and doesn’t resolve any conflicted keys. Changing it to direct keyboard mapping also creates other problems and I then can’t use the up, down, left & right anymore for controls and I can’t set it to use numerical pad.

So my question is there a manual way to edit the keyboard in any of cfg files? or is this a hardcoding that can’t be changed?

If it is hardcoded, could the option of mapping the entire keyboard to the retropad be added as feature to retroarch future releases, so we can have more control over the c64 keys and retroapad function?

Apart from this, the Vice retroarch core is one of the best c64 emulators I’ve ever used, no other version of c64 emulators can bring you as close to the original look and feel as this one can.

Looking forward to a response.

1 Like

I’m not sure if this is what you’re asking for, but you can bind a hotkey for “game focus mode” which is basically like keyboard/mouse capture.

Yes - that’s kind of what I’m after. Thing is, if you go and bind the keys it works, but retroarch still recognizes some of functions set to the c64 keyboard and creates two functions in one key. For instance the up key also functions as runstop, but I can’t seem to remove runstop from the up key as a function, even if you set the keybinding.

This kind of leaves me to believe that the Vice keyboard has a hardcoded keyboard set, unless there is config file that can be altered - and if it is there I haven’t found it just yet.

So that’s the question - is there a config file that can be altered (and where can I find it) or is this something that can’t be changed without programming?

and if it can’t, could it be changed in a future edition so the keyboard can be fully edited? The retropad (with keybinding) is pretty much the only way to go for me.

Normally, that stuff is handled in the quick menu > ‘controls’ menu, where you can set the device type to ‘keyboard’, leave the controls menu and then come back (to refresh the menu) and then bind stuff. That’s how dosbox works, at least. I’m not sure if that’s implemented for VICE or not, though.

For my process, I started with keybindings once the core had been loaded and then set up the controls section after running a .d64, then override the core settings. I’ll have one more look, just make sure I haven’t missed anything, but I’m pretty sure everything within both of these two settings should be functionally correct.

Thanks for suggestion though, the Controls function did help with a few other emulators when I first learned about it, so that would’ve been a good place to start.

1 Like

I started hunting in the code for the shift-runstop override but ended up in lots of dead-ends - maybe I’ll strike lucky some day. I do know that it’s not the keyboard mapping … it’s related to the joystick emulation by the cursor keys. If you turn off Retro joy0 in the core options then it will go away.

That’s definetly a start. It’s a tricky one for me, because the keyboard encoder i’m using is made for an older OS, so the remapping software that came with it doesn’t work anymore, so I can’t change the keys over to number pad or shift, x etc. When I turn off Retro joy0, the controls become unresponsive with the current layout.

So a few more questions…

a) How do I manually set the keys as controls (with the retro joy0 off) just for the vice core (can this be done in one of the .cfg files?) the retropad option and then selecting controls was the best option to do this previously.

b) and can this be done without it launching a key on the C64 keyboard? and still keep the option of controlling of the c64 keyboard say through a wireless keyboard (this may not be possible, but I feel it’s worth asking about).

So far if I set the controller to Vice Joystick, Vice Keyboard or none, the controls also become unresponsive.

Ideally if I can manually configure the Vice Joystick to set keys (much like the retropad), then that will probably be the best solution, but I appreciate that it may not be possible to do…yet.

Anyways, thanks for the great replies. I may just have to wait until someone solves the retro joy conflict on the backend.

In the meantime If I figure out a work around, I’ll post it here.

If you guys are having a lot of problems with it, I recommend opening an issue at the github repo. The guy who libretroized the core, r-type, is a good dude, he just doesn’t come around the forums (or our discord/IRC chans) at all.

… unfortunately there has been an issue open on GitHub since December 2017 regarding this issue.

As far as I can tell none of the keyboard mapping files which relate to Vice are applicable to Vice-libretro as the keyboard map is hard-coded in the source, and all the settings which are saved into retroarch config files are exposed in the gui options.

Makes sense - the only way to fix it then is at the code level. One approach would be to pull the code for the existing Vice Keyboard and replace it with something custom built for retroarch. That would probably involve either reverse engineering the existing Vice code or reaching out the original devs, to see if they have any suggestions or code you could use.

A hard-coded keyboard will probably be difficult to fix, a bit like finding a needle in a hay stack to find the register to change, and if you do fix it, it may introduce other problems if there are any dependencies.

…or you could get lucky and it will just work!

Best of luck - I hope there is a solution to be found.

OK … I have now realised what’s going on here. I had assumed that this behaviour had been implemented intentionally as some kind of shortcut which had me looking across the code for something which didn’t exist. In my search I had come across this thread on a C64 forum … https://www.lemon64.com/forum/viewtopic.php?t=33491 - Although it seemed interesting I didn’t realise how relevant that discussion was until now. I was looking for how this ‘shortcut’ had been implemented and thought the discussion about the limitation of the C64 keyboard matrix provided another possible method. Having a fresh think about this issue I suddenly realised that whole issue is explained entirely by the C64 keyboard matrix and that’s exactly what is happening here. This ‘feature’ was never implemented by design - it is a side-effect of the original hardware limitation which is being emulated as it would happen on a real C64. The problem happens because the up key is acting as both a cursor key AND port 2 joystick up at the same time - the keyboard matrix wrongly interprets that combination as shift-runstop.

A ‘solution’ shouldn’t be too much of a problem - the primary issue is to work out how to make everyone happy without regressing any current functionality. Ideally vice should have a mode where the keyboard is fully usable if you want to use it as a computer and a mode where the keyboard emulates controllers. External controllers (usb/bluetooth) should available with either of those modes

You mention that you are using a controller which is currently limited to only emulating the cursor keys - is that correct ?

This ‘bug’ is only triggered when using certain combinations keys where they map to specific combinations of columns and rows on the C64 keymap. I mentioned that the keymap is ‘hard-coded’ - I was referring to the mapping between a ‘standard’ keyboard and the C64 matrix, which shouldn’t be an issue - the keys which retroarch uses for controls are possible to remap in settings->input-> user 1 binds. By remapping the keys you can define the controls to avoid the keyboard matrix column clashes - mapping up to ‘q’ instead of ‘cursor up’ is how I confirmed the issue - by using a key in another column then you don’t get the shift-runstop. Unfortunately if that isn’t an option for everyone then it requires a fix which stops the keypress when used as a controller.

I’ll have a think about all the different usage scenarios and see if I can accommodate every eventuality - if certain options are mutually exclusive then it can be a menu option so that the user can select which suits them - hopefully :slight_smile:

1 Like

At the moment I have up, down, left and right mapped as the main keys for controls and u, i, o, j, k, l, for the buttions. Right now I’m limited to that combination for player 1 (joystick 2 controls).

Key bindings are the first thing I set in retroarch (using the retropad), as I wanted the controls to be consistent across all of the emulators I’m using. It’s been very successful across all of the other emulators i’ve used, with the exception of the Vice Core. I’ve set up a hot key to hold down to activate retroarch keyboard controls (F1, save states etc) so it doesn’t interfere with the keyboard for typing and that’s all working very nicely too.

There are two quick fixes I can think of here:

The first is - set up an option in the Vice core where the C64 physical keyboard controls can be disabled, and are exclusively handled by the virtual keyboard, that way keyboard mappings won’t interfere with the controls when working with keyboard encoding devices and their various ilk.

The second is - to have an option to switch the up, down, left & right keys functions on the keyboard over to the numberpad (have an on off button that can do that).

Re: iPac device (keyboard encoder), If I install a second partition and then dual boot to Windows XP, I could potentially change the keys on my device, using some older software (hopefully). Using a virtual machine doesn’t appear to work, but that’s most likely due to the way Windows 10 interacts with older iPac’s at the hardware level (USB Drivers & protection), and in turn it becomes incompatible with the software configuration tool for the legacy device. In short, it will work as a device, but I can’t change the keys unless I’m using an older version of Windows, which will be a fair bit of effort to set up and something I was hoping to avoid initially.

It sounds like you’ve got the seeds for a half decent fix, I’ll keep an eye on the upcoming core updates and see what happens. :slight_smile: