Joystick

From DenialWIKI
Jump to navigation Jump to search

Fundamentals

Original "2600 clone" joystick produced by Commodore for the VIC-20 computer.
"Triangular" joystick. The second joystick design produced by Commodore for the VIC-20 computer.

The Commodore VIC-20 uses a simple eight direction, single button digital joystick. The joystick connects to the VIC-20 via the game controller port on the right side of the computer. Commodore designed the VIC-20 and its joystick peripherals to be compatible with the protocol established for the immensely popular Atari 2600 video game system. This means that any Atari 2600 compatible joystick can be used on the VIC-20 and vice-versa.

Gameio.jpg

Commodore produced two “official” joysticks for the VIC-20 computer. While other VIC-20 compatible joysticks were produced for the Commodore 64, only these first two used the VIC-20 design ethos of white and brown (to match the VIC-20’s casing). As with Commodore's paddle controllers, the first (and less common) joystick was almost an exact clone of ones included with Atari 2600 video game console. The similarity of the controllers has lead some collectors to speculate that this might have generated unwanted attention from Atari’s legal department. Whatever the reason, Commodore soon replaced this design with a completely original looking joystick.

An advantage of this new design was that the central fire button could be operated by both left and right handed players equally well. However, the distinctive “triangular” shaft proved to be uncomfortable during long playing sessions. Like the earlier 2600 style joystick, the simple all-plastic design and foil-bubble contacts inside the controller were not particularly durable – meaning many of these controllers wore out quickly.

The Atari-2600 joystick protocol was shared by many other computers and video game systems of the early 1980s. Because of this a third-party joystick industry flourished. A whole range of no-frills to exotic controllers was produced offering features such as improved ergonomics, arcade quality, high durability and also low cost.

An official product number for the Commodore joysticks does not appear on any of the packaging, but in some catalogues the joystick is listed as product number VIC-1311.

The original Atari 2600 joystick, of which the original VIC-20 joystick was a clone
WICO produced a line of high quality joysticks compatible with the VIC-20

Joystick Protocol

On the VIC-20, joystick movements are reflected in two VIA registers by clearing certain bits: 37151, and 37152. They can be decoded like in this example:

1 S=PEEK(37151):POKE37154,127:T=PEEK(37152):POKE37154,255
2 IF (128ANDT)=0 THEN PRINT "RIGHT"
3 IF (16ANDS)=0 THEN PRINT "LEFT"
4 IF (8ANDS)=0 THEN PRINT "DOWN"
5 IF (4ANDS)=0 THEN PRINT "UP"
6 IF (32ANDS)=0 THEN PRINT "FIRE"
7 GOTO 1

The first POKE to register 37154 temporarily switches that pin of the VIA chip to input which is connected to joystick right. After the PEEK of register 37152, register 37154 immediately is reset to its default value so as not to disturb the keyboard scan routine.