0911-87

SO PRENTO"L TE

D PRINT

July 1987

S64 sO v” z6 PRIHT Mode fine oo. 28 PRINT L.1,S.T.ingr..”

26 PRIHT "L. I ze Lh 36 PRINT ”L.1.5.T ring...

"Lal...

inG...

Price $1.50

A A NR AAA INCA SD IDO

LIST REETING GF JUNE 14, 1987

The meeting was heid as scheduled ot the home of Harvey Roit in Palisy Streog, L.I. ond started at 2 Pi.

There vill be no meetings during the months of July and August, although neusietters wili still be published. The nest meeting will be on Sept. 13 ognin et Harvey Roit’s home.

The editar uas asked to put on the newsletter, neor the stamp, the additional wording of “FIRST CLRSS- fated fateriai- DO WOT DELAY”. Hopefully this will isprove delivery uhen mailed out.

It sas a pleasant surprise to neve Cedric Bastiaans attend the meeting es he had been living in Holland for the past 8 or 10 months. He uns able to give us a first hand report of the status of Sinciair in Heliend, which uns n din prospectus. Good luck to Cedric in

Harrisburg, PE.

lt uns noted thot Computing is no lo wos the lost issue.

By the next meeting in Sept., LIST tape #8 for the TS20he/Spectrum uili be ovailobie, es well as 751000 tape ES Also at the next meeting Stoney fciurreyg vill be prevailed upon to demonstrate the ins and outs of programming an the RL.

he English angone ine Za r to be published. June

Joe Weumon, our editor, wonte to inform you that the USYS TS Bulletin Board is nou back on from TPA to SAN (Eostern) weekdays, and fros SPR Fridey to GAR fanday. The number is 201-521-0535. 300 Baud only, 34148, ond tha board uill suppart BOTH DL and 2058 callers. IF you wish to reach Joe during 885 hours,try 201-289-5699,

Eood neus towards our survival is that Computer Shopper, starting in the July 1987 issue, has in addition to fark Fendrick’s coluan, o second one by Mike 0'Erien. If you hod to pick one subscription to o magazine I neartity recommend that it be Computer Shopper

{in addition to Tine Designs- Bü.1, Hezir showed us the HL mother boords thot ore now ovoiinbia for $20. He will comment in the

neusietter on it. Hazir is also trying to arrange another “hardware session” during the sumaer right in the aod scientist's laboratory. Igor- find him a fresh broin ond estro limbs.

Coming up in the fall ve will hove a meeting devoted to the topic of using modems with our systems. finybe we con get our Modem Moven, Herb l., to ignú his expertise since he hos sore “ring time” then Sugar Roy Leonard.

Cedric B. giso showed us the RAG keytop replocement jobels. Good glue- poor print for legends Oniü,

- Harvey R.

Table of Contents

item

Words from the editor

Still more keyboard mania! Strangely speaks the Spectrum

Letters

Try this Electrical tip Contributor info. GL Tor joy

| an gs fi

Som (n ft —

l _ _

"*

Notice LIS Ting

A FEW WORDS ON A FEW THINGS FROM THE EDITOR WELCOME to the first issue of

L.1.5.T.ing edited by mel I hope í Bae? done a good jobi At the present time, 1 have chosen to be editor of the Summer issues of LISTing.

However, if all goes well and my work on LISTing is liked I will probably continue to edit future LisTings.

One thing you probably noticed is that 1 used my new found editorial Powers to rename this newsletter Listing. I decided to try this as many LIST members still seem to call the newsletter LISTing even though previous issues had said LIST on the masthead. What do you think? Let us ali know send a card with your opinion of whether the newsletter should continue to be called LISTing or whether it should be called just LIST.

Another change I noticed is the QL and a QL entire issue. Colummizer have

Just

sure hope you've layout. I have Used a printer to produce this GUILL and my Guill been used to produce the inside pages The exceptions are the front page, set up Cappropriately enough? by FRONT FAGE extra. Also, the GL joystick article was not prepared by me- I'm not sure on which machine it was produced. Ün your card, also let me know what you like better- the inside columns produced by Guill, ar the front page style. This newsletter is for your benefit, so come on and let me know how it can better benefit you!

Mentioning benefits- unfortunately John F. had forgotten to include information on how you can obtain BASICODE Cas mentioned in his article in this issue). I will have that information for the next issue.

Onto another subject- Í nave heard from Quantum Computing regarding a statement made in a pravinus issue. The statement was that ‘Frank promised a substantial discount to LIST members

but as of this date he has not honored this commitment’. Quantum says that for a LIST member to get a discount

has to De placed! you are a LIST

order state

Tron tnem, an When doing so,

member, and request the discount. Speaking of discounts, Variety S, 325 W. Jersey Street, EZD, abeth, NJ O7ZOZ, is another elisa able source of 2065 and GL hardware and software. Discounts are also offered to LIST members, as are discounts on package deals, multiple Purchases (perhaps group purchases?), and free delivery is usually available

avaliable to the midtown Manhattan area. Joe Newman Editor etc.

STILL MORE KEYBOARD MANIA!

nat follows 15 my review of the 1520623 keytops that RMG ENTERPRISES of 1419 1/2 7th Stree Oregon City, OR 97045 is marketing ($3.00 PPD.3.

The first disappointment for me was to find that THESE KEYTOPS ARE NOT FOR THE KEYS GF A FULL-TRAVEL KEYBOARD as I have been trying to promote with my Keyboard mania series of articles. Instead, they are a replacement for the original 152063 keytops and thusly lack the legends which are printed on the overlay, such as EDIT and DF FN.

The quality of the merchandise is very impressive. I did not test the adhesive quality, but the liner carries the name FASSON, one of the most prominent adhesive manufacturers in the country; i have always had good

very good results with any of their products.

Then the printing is extremely scufítresistant; 1t withstood my

continued rubbing with an ink-eraser, which aS you know contains glass particles mixed in with the rubber!

So from these two plus points, anyone using the RMG keytops should be

pleased. The legends themselves, however, are an entirely different matter. They could have been better. First of all, the keytops are quite a bit SMALLER IN SIZE than the computer keytops. They are therefore still not very readable. An exception are the

eight graphic characters; these are larger than the originals.

It is apparent that the RMG keytop artwork is the result of an amateur ¿(copyright 1985 by Glen Ten-Eyck and

DAGE 3

LISTing

Cricket DUSS} One notices

keywords are not always on

line level; “print” for insta

= higher line level than

Also, why is one of the D

keytops made wider than the ú

But these are minor grawba

are fully Compensated

professiona product Quality resistance expected Superior adhesion. therefore recommend these keyt ¿Dels o annyone no is in nee: of “pin ti original,

and wrod

SPECTRUM

Still the miliston

computing is the ut iessness of toreign recorded p for TS computers. You just load them into your computer! you had a printed listing you handpick through ihe whole ihing iranslate

it for rekeyiro, pretty debasive for one ati modern life.

In Europe this incommunicance

among Came head in 19232 landís radio authority, NOS being Dutch initials, Broadcast programs popular computers beginning in as part of a show on home tronics. Listeners awaited for Pours St i for their instruments and then captured the radicis output onto a cassette tape. The cassette was then played into the computer to load the programs. As new machines came onto the market, NOS

Pome computers

= [h bes

Ow] sJ “i

| P Lf nn rn

ih

is

added broadcasts to accomodate them. By 13922, things got out of hand. Radiotlme Was Expensive and each transmission served only a small segment of the sas. NOS thereupon developed a markable scheme by which a single ens sion may be captured by all listeners, who then on their own translated the recording into their seperate BASIC dialects. This system is NOS— BASICOBDE-2, BASICODE for short. To realize the transformation, listeners bought from NOS a special tape

containing translaters for machines in Europe.

It occurred to computerists that if a SAS ICODE could be transformed into a native BASIC one, the reverse should be true. NOS did indeed work out translation programs from native BASICS back into EASÍCODE and put these on its special cassette. Listeners offered Programs for broadcast and it was better to let them translate into BASICODE rather than dialects of BASIC. Thus BASICODE shows Tiourish.

Computerists, with tne two-way translation programs in hand, quickiy

many common

program

send in stuff written in umpteen

did NOS’s

found another application Tor BAS ICODE: the transfer of foreign BASIC programs inte native ones. Which is to say, a foreign computerist would convert his program into BASICODE, put it into tape, and give the tape to the native computerist. The native fellow would then convert the program into his own BASIC. via BASICODE .

EASICODE consists of an ordinary audio Cassette and an instruction book . The cassette has the

translation different

Grams of about twenty The common ones

Er og it} computers:

in the US. among them are Apple II, Commodore 64, VIC-20, CoCo, TS-2000, and TRS-S6 I and III (some of these are called in BASICODE by their averseas aliases, like “Spectrum” instead of YTS-Z2000" 13.

The flipside has simple EASICODE programs with which to practice. About half are ali-Dutch and the others are multilingual with English

option. The instructions are which is no problem if your

as one in Dutch,

father has a sympathetic brother or you routinely pay your own way on dates. Otherwise, you’ll have to

confine to the English sections at the back of the book. There 15 a common introductory section, followed by sections for each machine represented on the cassette. The book is very Plainly and carefully written, yet you really do have to read it and pay attention to it, lest your translated programs end up as ASCII salad.

ás noted before, in Europe

| LISTing

computerists enjoy BAS ICODE to exchange programs of various dialects among themselves. In the 11.5. we cannot do this because very few computerists have the BASICODE tape or have even heard ú it In fact,

FASICODE seems to have recognition only in the New Yori City ares, possibly because its residents are more sensitive to. their Dutch heritage.

With no one around to swap programs with, what can you, as = TS adherent, do with BEASICODE? On the Spectrum BASICODE installs Two incredible features. The lesser one is that the Spectrum screen is resized to a 42 column display with hign-iegioility type. This display is remarkably easy

on the sight, even to short-eyed folk, £

and it can be toggled back to the 32 column mode at will. The 32/42 column switch works independantiy on the TS

printer as welli!

Furthermore, you can lift out of f

intermixed with TS codel Which is to say, you can take a listing for Apple, TRS-SO, or other MS computer, and key

its code directly into the Spectrum with Virtually no preliminary translationil And the program then resident in your Spectrum will edit,

Save, and run ¿just like an ail native

TS program!! Because many TS and MS operations accomplish the same thing, you frequently have a choice af feature to key in as you read the listing!!!

The prospect before us on our Spectrum mundulus is absolutely awsome . You can now expiolt all those foreign magazines and books which you

heretofore had to pass up -— watch. Figure 1 is a listing from Compute, December 1385. it’s for a Memo-Diary program written in MS-BASIC. Although alterations are presented for the Apple, C-£4, etc., none are offered for the TS Ordinarily you would have to manually massage the code into TS

BAST CODE the code or this 32/42 form before typing it in. But now you switch and meld it into your own sit down and type in right from the programs. The immediate example lethbook with BASICODE active on the with the 40 column minimum many Spectrum! telecom services impose. Figure = is this Memo-Diary as Here’s the freaky thing. Only the keyed into the Spectrum. No chocolate UPPER screen is in Z columns. When mess! There's little translation you bring a line down to edit it, the involved; it’s almost very and true LOWER screen remains in 32S column figure 1 itself! The only major mode! Fut the line back, list it, and alteration is the line numbers poofi you're back in 42 colunns!! BASICODE reserves lines 1-999 for its That is the lesser incredible internal routines and your program feature Before going any further, do must begin at least at 1000. So as change into some old pants, pants you you type you mentally add 1000 to the can throw away instead of trying to line numbers and GOTO /GOSUE launder. Fleas=e, go. destinations.

Ready? The greater imbelievabile You notice something Odd as you feature is that you can type directly type. The TS keystroke and edit into the Spectrum a program in mechanism is fully in force, but the EAS 1CODE . What 3001 1s this? line parser is not. You could, im BASICODE, to cool you to the drift, is fact, key in rubbish and the Spectrum a Core of MS-Ef C, quite close to the will accept the line! (Hey, you ARE dialects of Apple Li and TRS-S0. Here typing in Microsoft BASIC, aren't

We must be even mannered about life

and all due respect to MS-BASIC for whet it isi = tank of turds. Never-the-less, most other computers

build their systems upon it.

EASICODE actually “extends” for us Spectrumites the TS-BASIC to accept many features of ME-BASIC. You can

actually type into the machine MS code

you? 3

Since you will ultimately run the keyed in program directly and not put it through the transiator, you really don’t need most of the code below line 1000. You just put in the T3 functions themselves instead OT cailing BASsICODE routines. However, get used to the

the until you

PAGE 3

LISTing

BASICODE, leave its code alone; it certainly doesn't hurt. In the same Vein, many of the calculations for writing programs intended for later conversion into BASICODE, as stipulated in the instructions, may be Set aside.

Now don't forget that you always enjoy the TS special functions, especially the color-3raphics-sound, for program embellishment!

After the program 15 typed in, Safety Save and run it. Chances are you'll trip with either a "variable not found” or "nonsense in error. Real Microsoft initializes all variables to null or zero and dimensions undeclared arrays to 11 elements. The TS implementation does not. âs a first fixup add headend lines to initialize variables and arrays. For a “nonsense” report examine the syntax. There may be a conflict between a TS and a MS operation. By-the-way, during the run

do a

you'll get the usual TS error messages- bui they ll be triggered by MS faultsii

Chill out, man, does this whole thing really work? Or is it so much stoopstomping? Figure 3 is a freeze

frame of the Memo-Diary in action as it runs off of figure “Z. Right on your Spectrum.

Feel why you needed those olg pants?

LETTERS

Dear List: Now that I have my GL hooked up te

my Sears RGE monitor I need to change the screen display width. The cursor is about 4 columns off of the screen

in monitor mode.

My problem is two fold. Florida TV

experts CHARGE and CHARGE. I could probably do it myself if I knew what to look for and do to the monitor. I do not wish to go into this blind so, someone, help please! What do I look for and dot?

Thanks,

Marinus W. Heusevelt

Lantana, Florida X Mr. Heusevelt and others with screen

adjustment there 15 an Side door. mounted this. control

problems- on the Sears RGB H-CENTER control in the You must use the tool inside the door to adjust Other monitors have this on their back panel...usually a tool is required to reach it- the tool being a long, thin plastic Screwdriver like device. These are available in sets , from stores like Radio Shack. But be careful- the control can easily be bent on its circuit board. Remember- all projects you undertook (even if mentioned here in Listing? you do at YOUR OWN RISE.

Dear LIST:

Do you microdrive yet lights stops with

have a fix for that won't read the LED and an error code?

the QL or write, runs until it

Is the Doug

Dewey capstan fix with Magic glue a fix for the new read/write condition on a new drive?

Fashtoon’s note on the Well, this 15 a common all nmo-interference Cu and RTTY programs using a computer program to decode incoming signals. Tt is not the fault of the program, but due to the selectivity of the receiver being too broad to get a quiet channel. A good ham receiver with a filter set to 100 to 500 cycles will have no problem. The average receiver, even ham grade, without filters, has a bandwidth.of 2 to generally set fo SSB and hoping to be okay for code or RTTY. The shortwave receiver that the average persan might hook up to a computer will probably have a selectivity of 6 EC or so and be quite noisy. The easiest cure is to buy or build an audio filter since the computer program is fed from the audio output of the receiver. A typical filter box is the Heathkit ACTIVE AUDIO FILTER HD-1415. Some of -the computer interfaces for ham Cu and RTTY programs also filter the audio so as to have a quiet channel. On a CW program strings of E's and T's are a sure sign of a noise problem. Often reducing the RF gain and turning up the volume to max (i.e. setting loudness with the RF gain) will work

Now about N. RTTY program.

complaint about

extra = KE

PAGE 4

Letters in lieu of filtering or with a wide filter.

The reason Packet is only on the vhf bands is because cf the noise in the bands. AMTOR is supposed to be usable in the HF band but filtering and good signals are still necessary. Packet is ideal for a satellite and a mailbox operation. This has the least moise of all.

Sincerely,

Bob Howard, WASDLI

West Covina, CA

# Bob and to others who seem to have a runaway microdrive- the capstan 15 often the source of the problem. You can take a light and shine it into the faulty drive’s slot. You will be able to see the rubber capstan on the left. If the capstan is pushed up against the top of the üL case, it 15 most likely causing the problems. It may be possible to reach a small thin implement into the slot and push the capstan back down. This may not soive the problem, and if it does, there is no guarantee the capstan won't rise up again. Opening the GL Case and carefully adding a drop of glue to the capstan shaft should hold it in place.

Just BE CAREFULi if pushing the capstan down does not solve the problem, contact At Computer Response

or the dealer who sold you your GL. If you determine replacing the drive is necessary and you wish to do it yourself on an out of warranty üL, your dealer should be able to supply you with a microdrive unit. The cost should be between +40 and $60.

Thanks for your comments on Nazir's comments.

"Keep up the good work” -Stan Nagrod, Mamaroneck, NY

"Congratulations on the new format Tor LIST. IL makes the newsletter so readable that this old guy’ can finally read iti”

-Rae Clough, Levittown, NY

"The new LIST is a pleasure to read at last!” -Bob Howard, West Covina, CA

“I have been very pleased with the Magazine. ..good quality”

LISTing

==. A. Ball, Cambridge, MA

“Prini quality on LIST continues to be

very goodi” -Joan Kealy, El Paso, TX

LONG ISLAND SINCLAIR TIMEX GROUP

a is = f ü

TIPS

FROTECTING YOUR PROGRAMS AGAINST LILco

If you live on Long island, as many of our club members do, then you probably find yourself in the same boat as me.

Dur electricity supplied by LILCO is so erratic, I hate to work on

programs, because if if it 15 windy, or if it 15 dark out, Winter, Spring, or Can, and often does, causing the computer The other day it little and, of course, the electricity blinked off and on three times in two hours. I got so disgusted, I gaved up on the program I was working to debug.

itis raining, er if it is sunny, or or if it is Summer, Fall, the electric blink momentarily to crash.

was raining a

But I didn’t give up on computing. I decided to add a big capacitor (1000 mfd 50 v) across the power supply leads hoping this little extra charge

could power the computer seconds, if necessary. 50 only tested this modification hy flipping the power (AC) switch on and off rapidly and it did power the computer for this short duration. Thankfully LILCO has kept the power coming steadily during the time Í have been using the computer- for about three days (at time of writing!. But I know this is only a false indication that we have reliable power. 50 the next time LILCO blinks on me, l hope my modification will keep me computing.

for a Tew far Í have

The details for this modification, if you choose to try it, are 45

follows. Add the capacitor, cbserving the correct polarity, by soldering each capacitor lead to its respective wire.

This may be accomplished by stripping a small amount of insulation from each wire about 2.5 inches apart and soldering the leads to each wire. © O Soroen E Sonne _ i -Thomas Skapinski

NOTICE

CONTRIBUTING TO LISTing

We are always looking for interesting articles, programs, reviews, etc. to keep our membership informed and entertained. Articles submitted for publication are accepted

on the following basis: - maintain

13 YOU the writer the full copyright and can resell, lend, or give away your work as you wish.

a]

23 WE are granted the right to publish your material, in the original issue in which it appears. Reprints te.g.- to supply orders for back issues) will

include your material as part of its original issue. We are not allowed to sell your material in any other way,

without your express written consent. We can’t ifor now pay you for your

material, but you will receive a copy

of the issue in which it is published,

even if you are not a member. You may get more than one issue and you will definately earn the respect and

appreciation by your grateful pears.

TO SUBMIT MATERIAL- It is prefered that items are submitted as a QUILL or EDITOR text file ifor the QL), with no control codes inserted in the text- 1.8.— no change of typestyles or underiining, etc. This way the editor of LiSTing will be able to process the text using a QL Guill Columnizer. GL submissions may De on microdrive cartridge (returnable or 5.25” dsdd

disk. Other submissions are preferred typed, double spaced. 2068 and TS1000 word processor files will be allowed shortly (when they can be uploaded into the editor's QL)... .a notice will be placed inte LISTing when this becomes possible. if you include diagrams, photos, etc. please keep

them sharp and preferably in black and

white as these will reproduce the best. Submissions may be sent ta: L. L S: T FD Box 436 Centerport, NY 11721-0435 + OR + Joe Newman, Editor of Lisling 325 W. Jersey St., #2D Elizabeth, NJ 7202 Include SASE if you wish for items to pe returned

PAGE &

LISTing

1568 G

1578 IF P>

1588 END

1598 PRINT “READ: EVENTS FILE (x,

1608 INPUT PS

1610 IF LEFTS(PS$,1)="Y" THe.. 6309

1629 STOP 1638 D9$=D9$+"/" 1649 D9$=D9$+RIGHTS(STRS(Y8+19

1718 MMS=LEPTS (MMS+"XX", 3)

1728 IF M=@ THEN 1760

1738 IF M<l OR M>12 THEN 1678

1748 PRINT MS$(M)

175@ GOTO 1818

1768 FOR J=1 TO 12

1778 IF MMS<>M$(J) THEN 1796

1788 Meg

1798 NEXT J

1800 IF M<l OR M>12 THEN 1676

1819 PRINT "DAY"; “`

1828 INPUT D

1839 IF D<1 OR D731 THEN 1670

1846 DOg=RIGHTS(STAS( 10841), +2) +" /. Á

1850 e: (STR$ (108+D ktt ; a ` 18689 Y=Y8 1865 IFD8$=D9$ANDFL=1THEN1880 1876 IF D8$>=LEFT$(D9$,5) THEN 1899 1888 Y=Y8+1 1899 GOSUB 2158 1999 IF LEN(LLS$)<=@ THEN 1928 19198 PRINT "(";wS(W);")" 1928 RETURN "4 C=1 `oSUB 3010

al F Leone *s(255)

1 ` 2890

5

INEER ING SCHOOLS

at 2 FOR UN OFFICE r. x dl GG

eae Š E

MONTA ONE-TIME ¿Ar ü MOH AY Sð

Dar 14 TUE HIST ta 2 MEETING

DETÐIL RECENT ADVANCES SEMINAR THURSDAY Mag! 1522 FLOORPLANS

23 FUT ENT z > SEMINAR t FICK UP STAR SES

2G FUTURE EVENTS eae ENT ADVANCES SERINAR

i. SEE FUTURE EVENTS R 206 IQ

3: acer bene? SAT SUPRGC IN BIG IEM-kT 4. SEARCH FOR EVENT PREPARE TALK ON IS-FEST

5. GUIT BEADL INE FOR JUNE EY PEP TECE

ay TH LIST ARTICLE ELIG is

. DONNELLY QL QL FOR JOY PAUL J

The UK QL joystick ports are, as is usual with Sinclair

machines, non-standard. Fortunately, for those of us with USA QL's Sinclair has provided "standard" Atari stvle sockets on our version. The Atari nine pin D-stvle pinout is the

accepted universal arrangement for switch type joysticks, for all but a few computers and video games.

There are two nine pin ports on the QL. Addressing these is treated briefly in the manual which accompanies the machine(page 27 in the "Concepts" section», with the following explanation,

Mode Key Key CTL1 CTEZ2 up 1 F4 down 4 F2 left < F1 right > F3 fire 'space' F5

The KEYROW command, on page 30 of the Keywords section, explains how to look at the keyboards rows and columns, in order to determine which key, or keys, you have just pressed down. The keyboard connectors J11 and J12, have 9 and 11 pins respectively, and are composed of the same "tin stripes on plastic" with which Sinclair users have struggled for many

years. The official nomenclature for the Joyports refers to them as J3 and J4, and they are connected in parallel with some of the pins on J11 and J12. A partial schematic is

provided in Figure 1, below. The section shown on the left of the figure is the original QL Schematic and uses the UK pinout for the J3,4 connectors. The sketch on the right is a blowup of one of the switch contacts.

Pollur

a š = q

Figure 1

it IAS page } OOO š 1.

4 A In n 8 li Eo] 8 ESA! s. =

While the QL's two ports are "standard" Atari for simple switch type joysticks, they are far from complete imp- lementations of the type of port found on an Atari 2600 Video Computer System(VCS), or "Atari Game" as it has become know. The VCS uses all 9 pins to provide dual analog ports as well as the simple 4-way-and-fire found on the QL. In this article, we will delineate the pinout found on the QL and describe the basic functioning of the port, through examples.

JOYSTICK CONNECTOR WIRING

© © © © BROWN GREEN BLUE WHITE

UP DOWN LEFT RIGHT RIGHT LEFT BOWE UP

The ‘standard’ colour codes for the jo and socket; if the colours differ tor your particular "stick, you'll kavo bo aci eq a s.

Fig. 2

The basic pinout is as shown in Figure 2. The numbering System shown on the figure is based on an aftermarket socket which I had on hand , and may not correspond with the systems used on some "Atari" joysticks. Note that 'common' refers to either KBDO or KBD1(the KEYROW contacts O & 1), while ground is system ground, and is connected to the case shielding. Referring back to Fig. 1, the KB lines are normally held high and have isolation diodes, as well. The 8 data linestin this case only D7 is shown), have pull down resistors.

The chart below expands on the simple one provided in

the manual, by combining data found in several sections of the book, and our observations, in one Place.

page 8

OTI 1 KEP YROWC 1) 1 CTL2OKETROWCO) J Mode Key Value DATA| key Value DATA Pin CTLI Dec Hex | CTL2 Dec Hex No up A 4 4 D2 F4 1 1 DO 1 down Ý 128 80 D7 F2 8 8 D3 2 left < = 2 D1 F1 2 2 D1 3 right > 16 10 D4 F3 16 10 D4 4 fire "space" 64 40 D6 FS 32 20 D5 6 \ 32 20 D5 5 4 4 D2 = "ENTER" 1 1 DO 4 64 40 D6 = “ESC” 8 8 D3 7 128 80 D7 = Common KBD1 = > - KBDO - = += 8 Ground n/a 5 For some reason, the left and right functions give the

Same values for both strobes, while the other directions do not seem to have any Fixed relationship. Note too, that there are three additional values which can be returned from

the keyboard, and not from the Joystick ports. Finally, we should point out that, because each "direction", or value, represents a different data bit(DO through D7), it is

possible to monitor for multiple occurances, all at the same time. That is, we can poll the jovports and Simultaneously read that the stick is being pushed up and to the right, while the "fire" button is being hit. Specifically, for CTL1 a value of 84(decimal), or 54 hexadecimal indicates that condition.

Let's look at the byte returned by control port *1(CTL1). There are 8 bits of data Placed on the port bus. They are arranged as follows

Action BYTE D7 D6 D5 D4 D3 D2 D1 DO

NONE 0 O” O O 0 0 O O O

ENTER 1 0 O O O: 0 O O 1

< LEFT 2 (8) 0 O 0 O 0 1 O

q UP 4 0 (01 0.0-6 100.0

"ESC' 8 0 O O O 1 9o -0 0

3 RIGHT 16 D= D. O 1 Or «0% “ðar

XA 32 O O 4110 «GF, 0 O: va

FIRE t ` '* 64 0 1 0 0 O 0.0 O

y DOWN 128 1 0 O 0 0 0 O 0 So, the combination of "up', 'right' and 'fire'; which could easily be required in a typical video game, shows

up on the co- processor bus as:

page q

ACTION HEX DEC DO D1 D2 D3 D4 D5 D6 D7 UR; F 84 54 0: 4 O 1 0 1 O O

while it is possible to write a jovport polling routine which looks for discrete values for each possible combination of switch closures, it soon becomes clear that the number of program steps required to do so will make the final user program both cumbersome and frightfully slow. AS you can see by the stick-sketch below(Fig.3), there are no less than 18 possible legal combinations for jovstick moves. Covering them all would require at least the same number of procedures, or subroutines. This is the way a number of TS1000 and 2068 public domain games were written, and one of the primary reasons why they had either such limited response(since only the "pure" 5 swiches were monitored), or were too slow(too many conditional tests required»).

CTL2

UORRDERE 2

CTL.1

y]FNE TeT* fel]

Figure 3

The QL, however has some very powerful “logical operators" which are built-in, and which can help provide a much more elegant solution to the problem of multiple switch closures(see page 35 in the Concepts section of your QL manual). Since we want to monitor the bits contained in the byte returned by KEYROW, we should look for an operator which performs some 'bitwise' function. The "&&" operator, or. "bitwise and", is a good candidate for a Simple SuperBASIC procedure to call our specific routines. In fact, we can execute all legal moves with but 5(and not 18) procedures.

The program listing(No. 1) attached to this tutorial illustrates the use of the bitwise and operator. While the program itself doesn't do much, the procedures can be easily adapted to your own programs. For comparison, listing 2, is an excerpt of a joystick test program, written using discrtet values for the various possible responses. It should be fairly evident that fewer procedures are required with Listing No.1.

page 40 © 1987 P. Donnelly

Listing # 1 25 BAUD 1200 3U OPEN#7, serihe i 40 LIST #7 100 REFeat joy2 110 j2-KEYROW(0) 120 js2 130 DEFine PROCedure js2 140 IF j2&&1 THEN up 150 IF j2882 THEN left 160 IF j2 && 8 THEN down 170 IF j28816 THEN right 180 IF j28832 THEN fire š 190 END DEFine js2 L Joystick Tests 200 DEFine PROCedure up 210 PRINT "up"! 220 END DEFine up 230 DEFine PROCedure down 240 PRINT "down"! 250 END DEFine down 260 DEFine PROCedure left 270 PRINT "left"! 280 END DEFine left 290 DEFine PROCedure right 300 PRINT "right"? 310 END DEFine right 320 DEFine PROCedure fire 330 PRINT “fire”! 340 END DEFine fire Note: In Listing # 2 both methods of Listing # 2 scanning are used. 10 OPEN #4, CON 120X100A0X0 32 635 GO TO 680 1190 IF BS=-="L" THEN LIL 100 CLS:CLS #4: AXES b40 ON j2-3 ul E ` 1200 IF BS: "B" AND BS: , “L” THEN SETUP 110 SETUP me, 650 ON j2-10 : di Dead Code 1210 END DEFine SETUP 2 DEFine PROCedure AXES Web = y 115 LINE 50.0 TO 50.5: LINE 0,50 TO 5,50 660 ON j2:17 : ur 15 Procedure ÁLFIA 116 LINE 95,50 TO 100,50: LINE 50,95 TO 50,100¿20 IF j2-64: PRINT., ”FOURC4 " 1240 IF F=0 AND L=0 THEN CZ 118 END DEFine AXES 690 L = NOT(L): ARROWS 1250 TURNTO ANGL 130 PENDOWN: F=1: L=0 700 IF j2=4 PRINT#4, “FIVE (5)" 1260 MOVE M 140 M=3: ANGL=0:X=50:Y=5U 710 IF j2-128 PRINT#4, "SEVEN( 7)" 1270 Y=Y+M=SIN(RADCANGL)) 150 choose 720 END SFlect 12580 X-X+MxCOSC(RADCANGL)) 170 DEF1ne PROCedure ul 730 END DEFine jov2 1290 AT#4,1,0:PRINT#4, X;"” "¡Y 180 ANGL=135: ALPHA 740 DEFine PROCedure choose 1300 END DEFine ALPHA 190 FND DEFine ul 750 CLS CLS #4: AXES 1310 DEFine PROCedure BRUSH 200 DEFine PROCedure ur 760 PRINT#4, "Choose either port‘1 or2)"; 1320 SELect ON F 210 ANGL=45:ALPHA 770 INPUT#4, C 1330 ON F=0 220 END DEFine ur 780 CLS CLS #4: AXES 1340 AT#4,7,0: PRINT #4, "PENUP " 230 DEFine PROCedure dr 785 POINT 50,50 1350 PENUP 240 ANGL=315:ALPHA 790 SELect ON C 1360 REMark 250 END DEFine dr e B00 ON c=1 js1 1370 ON F=1 260 DEFine PROCedure dl _ a lí $10 ON c=2: js2 1380 AT#4,7,0: PRINT #4, "PENDOWN "270 ANGL=225 ”ABPHA w. 820 ON C=REMAINDER choose 1390 PENDOWN 280 END DEFine dl 830 END SELect 1400 END SELect 290 DEFine PROCedure fire s: 840 END DEFine choose 1410 END DEFine BRUSH 300 AT#4, 4,6: PRINT#4, "FIRE!" 4 850 DEFine PROCedure js1 1420 DEFine PROCedure ARROWS 310 PAUSE 20: AT#4, 4,6: PRINT#4, 860 REPeat jssl 1430 SELect ON L 320 LET F=NOT(F) 870 joy1 1440 ON 1-0 330 BRUSH 580 END REPeat jss1 1450 AT#4,7,8:PRINT#4,"\/" 340 END DEFine fire 890 END DEFine js1 1460 ON L=1 350 DEFine PROCedure up 900 DEFine PROCedure js2 1470 AT#4,7,8:PRINT#4,"/\" 360 AT#4, 2,7: PRINT#4, "UP" on oe 910 REPeat jss2 1480 END SELect 370 PAUSE 20: AT#4, 2,7: PRINT#4, 920 joy2 1490 END DEFine ARROWS 380 ANGL=90: ALPHA 930 END REPeat jss2 1500 DEFine PROCedure BLINK 390 END DEFine up 940 END DEFine js2 1510 FOR I = 1 TO 4 400 DEFine PROCedure down K 950 DEFine PROCedure joy1 1520 INK 7: POINT X,Y 410 AT#4, 6,6: PRINT#4, "DOWN" T. R 960 IF INKEY$ = "Q" THEN choose 1530 INK 2: POINT X,Y 420 PAUSE 20:AT#4, 6,6: PRINT#4, 970 j1=KEYROW(1) 1540 NEXT I 430 ANGL=270 ALPHA 980 SELect ON jl 1550 INK 7 440 END DEFine down š 990 ON jl=1 :AT#4,8,0: PRINT#4, "enter" 1560 END DEFine BLINK 450 DEFine PROCedure left ` 1000 AT#4,8,0: PRINT#4, " w 1570 DEFine PROCedure CZ 460 AT#4, 4,1: PRINT#4, "Left 1010 LET L=NOT(L) 1580 FILL 1 470 ANGL=180 : ALPHA T z 1020 ARROWS 1590 CIRCLE X,Y,1.5 480 PAUSE 20: AT#4, 4,1: PRINT#4, 1030 ON j1=2 : left 1600 INK 2 490 END DEFine left I 1040 ON j1=4 up 1610 CIRCLE X,Y,1.5 500 DEFine PROCedure right K ° 1050 ON j1=6 ul 1620 INK 7 510 AT#4, 4,10: PRINT#4, "Right 1060 ON j1=7 : REMark 1630 FILL O 520 ANGL=0 : ALPHA M » 1070 ON j1-8 : PRINT#4, "ESC" 1640 END DEFine CZ 530 PAUSE 20: AT#4, 4,10: PRINT#4, 1080 ON j1=16 : right 1700 DEFine PROCedure BIG 540 END DEFine right I 1090 ON j1=20 ur 1705 CLOSE #4 I 550 DEFine PROCedure joy2 1100 ON j1=32 : PRINT#4, "N" 1710 OPEN #4, CON_240X256A0X0_32 560 IF INKEYS ="Q" THEN choose 1110 ON j1=64 : fire 1720 PAPER #4,0:1NK#4,6:CSIZE#4,3,1 570 LET j2= KEYROW(O) 1120 ON j1=128 down 1730 WINDOW 100,100,256,0 580 REMark Á 1130 ON j1:130 : dl 1740 END DEF ine BIG 590 IF j2&&l THEN up 1140 ON j1=144: dr 1750 DEFine PROCedure LIL GOO IF j2&&2 THEN left 1150 END SELect 1760 CLOSE #4 610 IF j2&&8 THEN down 1160 END DEFine joy1 17764 OPEN #4, CON 120X100A0X0 32 620 IF j28816 THEN right 1170 DEFine PROCedure SETUP 1750 PAPERRG4,O: INKR4,6:CSIZE #4,1,0 630 IF j28832 THEN fire 1180 PRINT "BIG OR LITTLE": INPUT B$ 1790 WINDOW 512, 256.0,0 "pg" z 15060 CLS 3, Paws 171 ao e ld ISI FR ie ro

0 REMark se

10 REMark this program

t up for EP44

is a demo only

A E HHB iM IH WHIP MV I MON DSO H ld]

SE TOTES

MEXT MYL SS

MEET I NG— SECOND KIM? S BQUT I QUE, 21 ST Æ

NO LONG ISLAND

INFO.

E . CNYC LIST GROUP > MONDAY OF AUGUST, MISS PARK AVE. SOUTH BETWEEN 22ND ST., Z FM

LIST MEETING IN AUGUST.

CALL MYLES C. FOR INFO: 212-427-0179

= Pi

HH DLL rd JD ms |

ew a, st et at watt ed bb s

List MEMBERS— ORDER YOUR QL Now FROM

VARIETY SALES,

FoR ONLY “s£ 1 791 OFFER

GOOD TILL AUGUST 15 AD 8/0 fo: shipping. Cay for more info! VARIETY SALES, 325 W. JERSEY ST., #2D, ELIZABETH, NJ 07202 201-527-0535

SEND $1 FOR CATALOG

w wa una a EN aS NC |

LIST P.O. BOX 438

TO:

DATED MEETING

SEMNA ahoH lga SA A AAA

RECEIVE $2.

OO CREDIT! SUFFORTING-2062 & Gio

13

mir: | ` Se —=,- + CENTERPORT, N.Y. 11721-0438 —_ — +

Jan-8 Dot Lamber 3310 Clover Dr 3 Ceda Raw ics I

FIRST CLASS MAIL

NOTICE— DO MOT DELAY !

H t £ O E han 1141 08140916) 001008 ipu hik MMM 1111414161 nape DPN DUO DOGDOUIDAD BOPPE INI PE 000010001 Bit PA PADCE ODEDA PHI TT PPOCOPOR BEATA MN HH BHI HIHI

RO Cee ETT A) Ce Us hat Se Of UHI Ee eae