dirkwhoffmann / virtualc64

VirtualC64 is a cycle-accurate C64 emulator for macOS
https://dirkwhoffmann.github.io/virtualc64
Other
353 stars 33 forks source link

Add paddle support #793

Closed dirkwhoffmann closed 3 months ago

dirkwhoffmann commented 4 months ago

This is a follow-up to #792.

As my initial experiments worked out pretty well, I decided to add paddle support to v5.0.

However, there is one thing I won't support: Multiplayer support, although there are neat games such as this one:

Bildschirmfoto 2024-06-02 um 14 36 05

Paddles often come in pairs, which means that a total of four paddles (two on each port) can be connected to the C64. The game shown above requires a pair of paddles connected to control port 1. However, in VirtualC64, only a single device can be plugged into each control port. Consequently, I can emulate two paddles, one at each port, but not two paddles connected to the same port. Supporting multiple devices connected to the same port would require a complete architectural overhaul of the emulator and the GUI, which I don't plan to do.

All paddle-based single-player games will be supported in v5.0 though.

dirkwhoffmann commented 4 months ago

Paddle support is almost finished. It'll work like this:

Bildschirmfoto 2024-06-02 um 16 32 15

Besides 1350, 1351, and Neos, there will be three new mouse models emulating a paddle:

With the third option, multiplayer games such as the one mentionen above can. be played against oneself (the same paddle controls both players):

Bildschirmfoto 2024-06-02 um 16 31 11

The Translation option controls how the mouse coordinates are mapped to the paddle position. Possible options are Horizontal, Horizontal flipped, Vertical, and Vertical flipped.

Minor TODOs:

dirkwhoffmann commented 3 months ago

All done