30.12.2013 Views

May June 1980 - Commodore Computers

May June 1980 - Commodore Computers

May June 1980 - Commodore Computers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MAY/JUNE. 198O. 4.<br />

9O 90 COMPUTE. I JUNE, <strong>1980</strong>. ISSUE 4.<br />

tion lion with w ith the peeked value generates simpler numbers<br />

(shown in in the last column of the table). This<br />

"trick" " was used in in statement 61120 6 20 in in the (he cursor<br />

subroutine and the resulting values used in in the main<br />

body of of the th e program.<br />

In summary, II feel this s is is an excellent project<br />

for a beginner. The interface is is quickly y and easily<br />

y<br />

put together. It It is is not difficult to 10 modify existing<br />

programs for joystick use. "Old" " PET owners with<br />

disappearing keytops keylOps will appreciate a the saving on<br />

wear and tear. To T o be fair I should say that every<br />

program ram is is not nor suitable e for conversion. When fine<br />

control comrol of movement is is required joysticks may be<br />

difficult to 10 use. Some players with poor hand-eye<br />

coordination may still prefer the keyboard. As for me<br />

It it seems quite e natural to chase and catch some seemingly<br />

elusive demon with my movements under<br />

reflex control by a joystick.<br />

Chuck Johnson<br />

JOYSTICK ATTACHMENT STANDARD<br />

The Atari Joystick J terminates with a DB-9 connec<br />

nnec­<br />

tor; ; six of the nine circuits it s are used as follows:<br />

:<br />

DB-9PIN<br />

FUNCTION<br />

1 Up Switch<br />

2<br />

Down Switch<br />

5435 4 3 2<br />

1 3<br />

Left Switch<br />

4<br />

Right Switch<br />

5<br />

Not Used<br />

6<br />

Push-Button Switch<br />

98769 8 7 6 7<br />

Not Used<br />

8<br />

Ground (common)<br />

9<br />

Not Used<br />

Pin numbers for the DB-25P are marked on the e<br />

connector. User Port pins are on the e bolto bottom m row of<br />

a 12 position edge connector. Properr polarization of<br />

th e edge connector is stro ngly recomme nded.<br />

the edge connector is strongly recommended.<br />

A DB-25P P connector will accept two joystick connee­<br />

connec<br />

IOrs tors; ; the DB-25 may then be wired 10 to a User Port<br />

edge conneClOr connector, , according to the following table:<br />

REFERENCES<br />

JOYSTICK<br />

I. 1. UUPP DOWL DOWN<br />

LEfT LEFT<br />

RIGHT BUTTON<br />

GGROUND<br />

DB-9S<br />

J 1<br />

2 3 4 6 8 PIN DB-25P PIN<br />

9 10 I 11 I<br />

12 22 24 USER PORT PIN<br />

f F<br />

E<br />

D<br />

C<br />

Diodes to E aand f F<br />

A<br />

REFERENCES<br />

1. 1. Kilobaud Microcomputing, Micl"Oco Robert W. Baker, Bakcr, January <strong>1980</strong>.<br />

p. t'l<br />

p. 14<br />

2. 2 . PET User's Group Newsletter, Vol. 0. 0, No.3. p.6, 1978<br />

3. Best of PET Gazette, Gazelle, Chuck Johnston, , p.42, 1979<br />

4. Cursor Magazine, P.O. Box 550, Golcta, Goicla. CA C A 93017<br />

17<br />

5. Dilithium Press, P.O. Box 92. 92, Forest Grove, Grove. OR O R 97116<br />

TABLE<br />

T = PEEK (59471)<br />

- K (59'f71)<br />

POSITION Joystick J 11 Joystick ick 2 T = INT(T/16)<br />

- AND DT T<br />

center<br />

left h!ft right 255 223 239 255 253 254 15<br />

13<br />

14<br />

up 127 247 217 7<br />

down<br />

wn<br />

button buuon<br />

It'll left lip up<br />

righi<br />

ght up left tiown do right down<br />

:(ii 191 63 95<br />

111 III 159<br />

175 t75<br />

251<br />

1 243 245 246 249 250<br />

11 II<br />

3<br />

5<br />

6<br />

9<br />

10<br />

mask T ORO R 15 T ORO R 240 ©<br />

From: PET AND THE DUAL JOYSTICKS<br />

Chuck Johnson<br />

Note that rhat the rhe buttons are wired through diodes<br />

to 10 both the e UPU P anda DOWN W N functions of their joysticks<br />

(pins s E and Ff and pins K & L). When a<br />

button n is pressed, presscd, the e PET data dara lines react as though<br />

the e joysticks were pushed up and down n simultaneously<br />

(an impossible conditionn for r the position switches to<br />

generate). The decoding standard will, w , as we shall see,<br />

interpret crpret this s condition n as a bUlIon button movement. movcme The<br />

diodes act as "one-wayn c~way stn.;c streets" ts"<br />

forr current fl How and<br />

prevent the real UPU P and DOVvN DOWN switches fromm closing<br />

both circuits.<br />

Orientation of thee diodes is very important. t. We \lVe<br />

want current ( to 0 now flow from Ih thee data lines to ground.<br />

Whc Whenn soldering the diodes in placc, place, orient them with<br />

their cathodes ("banded" ends) connecLed connected to the jjoy­<br />

stick suttons to (pins 14 and 22 on the DB-25P).<br />

If thee user is not interested in using g the bU buttons, ltons,<br />

the butlOn button lines f'na mayy be Jc left rt unconnected and the<br />

diodes<br />

oomitted.<br />

miucd.<br />

JOYSTICK DB-9S PIN DB-25P PIN USER PORT PIN USER PORT FUNCTION<br />

USER PORT FUNCTION<br />

PA3<br />

PA2<br />

PA1<br />

PAl<br />

PAD PA0<br />

PA2 and PA3<br />

GROUND<br />

2. UP 1 1 L<br />

2. UP<br />

DOWN 1<br />

2 1<br />

2 L<br />

K<br />

LEfT LEFT<br />

3 3 J<br />

RIG RIGHT HT 4 4 H<br />

BUTTON GROUND 6 8 14 16 Diodes to K and L<br />

N<br />

PA7<br />

PA6<br />

PA5<br />

PA4<br />

PA6 and PA7<br />

GROUND<br />

PA6 and PA7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!