Classic Computer Magazine Archive COMPUTE! ISSUE 54 / NOVEMBER 1984 / PAGE 10

VIC Paddle PEEKS

I own a Commodore VIC-20 and a set of paddle controllers, but cannot find the commands used to incorporate the paddles into my programming.

Brad Mills

Although there are no built-in commands in VIC BASIC for reading the paddles, there are two memory locations you can read. Location 36872 returns a value from 0 to 255 (corresponding to a counter­clockwise rotation) for paddle 1. Paddle 2 is read by location 36873 in the same manner. In BASIC, use PEEK(36872) or PEEK(36873) to read the paddle position. The paddle buttons are read by checking the locations normally used to read the joystick. Paddle 1’s fire button corresponds to a joystick position of west (left). Paddle 2's fire button is synonymous with a right deflection of the joystick. Also, be aware that Atari paddle controllers used on the VIC do not return the full 0–255 range provided by Commodore paddle controllers. Additional information can be found in the VIC-20 Programmer's Reference Guide, or COMPUTE!’S Mapping the VIC.