randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
488 stars 59 forks source link

Able to use cartridge freeze #37

Closed Larswad closed 5 years ago

Larswad commented 5 years ago

The final cartridge III works just fine (with keyrah as well). No way to enable the freeze/reset function though which would be very nice (or even better, possibility to map CBM+F5 to freeze).

I am LEAST to say VERY impressed by this bare metal variant of vice. I had low hopes before seeing that it actually is perfectly smooth without judder or tearing. The closest I've gotten to perfect smooth animation is by adding custom resolution using the exact 50.12 Hz rate under windows (nvidia or radeon both worked), with regular vice at 1/1 mode. My raspberry pi attempts has failed miserably with the sdl-based versions out there (custom linux variants). Tried so hard experimenting with custom resolutions on pi to get right framerate, but I couldn't find the right settings (or maybe that specific tv I used didn't like it).

I don't know how you did it becuse you use the standard pi video mode configs without modification of frequency, so my buest guess you slowed down the emulation to 50Hz instead, because it is actually perfectly smooth.

Also, a tip to add in your readme for Keyrah users and keyboards with other nationalities: Switch our the CHARGEN file to one that matches the right keyboard locale.

Another thing: Remove other usb keyboard devices from the pi when using keyrah (it seems to "grab" the first unit it finds and then prefer that for keyboard causing the keyrah not beeing responsive). Or maybe I exceeded the power budget of my supply.

Thanks!

randyrossi commented 5 years ago

Thx for the tips. I will be adding more functions like freeze/reset soon.

I had the same issues with Vice on Rpi (Combian, PiLIzard, etc) and that's why I started this project.

Yes, the emulation has been adjusted to match 50hz rather than the original 50.125 hz. It's mentioned in the README that emulation is going to be slightly off in timing.

BTW: There is no hot plug support for USB, everything has to be plugged in before power turns on and remain plugged in. That's a limitation of the library I'm using. All USB will stop working if you unplug anything.

lroby74 commented 5 years ago

This BMC64 is almost perfect because it's a bare metal , no Linux Os under the hood that steal resources, and frequency is 50 hz for HDMI and 50,125 hz for PAL-composite, with composite is egual to original C64. Today i had a pair of very long plays with Archon, a very fast action game, using same db9 joystick via Keyrah on BMC64 on first play and real C64 with same joystick on second play.. i can't see any difference, no audio/video lag, no input lag.. nothing..

Larswad commented 5 years ago

Just as an update, I commented this in my other issue about the compilation troubles that I closed:

So I implemented it and I'm pretty satisified with the features even if it could have been more flexible in the configuration.

In my menu now: CBM+F1 / F9 = Joyswap / Disabled CBM+F3 / F10 = Hard Reset / Disabled CBM+F5 / F11 = Cartridge Freeze / Disabled

With menu items for enabling / disabled each individually. Maybe it would also be possible to map some shifted keys like CBM+F2, by combining CBM + CTRL + F2.

Kind of the brute and ugly way I did this, since I realize it is better to list the menus based on the keys, and then make it possible to let the user map freely each key to any of some set of common actions. That would also reduce the duplication in the code, especially in the kbd.c file.

randyrossi commented 5 years ago

Cool. I was planning on adding hot key features in the next release. In fact, I want all actions you can curerently assign to USB gamepad buttons to be available for a set of keys and GPIO inputs. Maybe 3-5.

I held back on reset since I wanted to add in a confirmation dialog in there before the thing actually reset. But that would only apply to gamepad buttons I think. There's probably less chance you accidentally do it from the keyboard.

randyrossi commented 5 years ago

Added catridge freeze to cartride OSD which can be mapped to a Cntrl/Commodore + F# key.