Premier Issue
Feb. 1982

**************************
THE NATIONAL IMAGINATION
COMPUTER CLUB
**************************

515 W. Shady Lane Barrington, Illinois 60010

Welcome to the National Imagination Computer Club. Through this newsletter we hope to broaden your views of the APF Imagination machine and its future capabilities.

We invite you to write us and tell us of your experiences with your machine, so that we can share them with other club members.

We also invite you to share programs whether they be BIG or little, just plain fun or serious. I'm sure the other members will find them both helpful and enjoyable.

Also write to us about problems so that through our network of club members we can get them answered for you.

And don't forget to tell us about your new ideas as to what you would like to see in the newsletter, and what you like and don't like about your machine.

Send all thoughts, ideas, programs, and answers to:
THE NATIONAL IMAGINATION COMPUTER CLUB
515 W. Shady Lane
Barrington, IL. 60010

1

Bad Bugs

If you get an orange screen or garbage at the top when loading your tapes, it may be caused by a long leader on the cassette tape. Simply wait two or three seconds after you press the play button when loading the tape before hitting the return key.

If you have an anoying buzz on the computer console speaker after you have loaded the tape, simply insert the command POKE 24578,54 in the first line of the program. When you run the program the noise should stop for good. (or at least till you load another tape)

Arrays: The manuals all say that the maximum number of dimensioned variables in an array is 99. In reality the maximum number of dimmensioned variable for single or dual arrays is 999. Note*: The character length for a string variable is still 99 though.
DIM A(200), B(150,50), C(1,800) are all good legitimate statements

Also when working with string variables, if you dimension a single variable then you have the number dimensioned + 1. Example: Dim A$(5) will give you one variable with 6 characters When dimensioning a set of strings the second number gives the number of characters exactly, (you don't add one to it)
Example: DIM A$(4,6) will give you 5 strings with exactly 6 characters each.

If ybu have trouble with the cartridges when you gut them in the Basic interpreter socket on the computer console, pull the "U" console connector out and insert the cartridge in the MP1000

2

PROGRAMMING NOTES:

Many questions have been asked regarding the high resolution graphics. Therefore, I will attempt to answer some of the questions here. First of all there are two modes of high resolution graphics. The first is 128 x 192 dots, and the second is 256 x 192 dots. Both modes divide the screen into 384 boxes, composed of 32 x 12 matrix, like so:

Each box will contain a shape which is made by you. Therefore the first thing you have to do is make the shapes. Then simply by putting the shapes in the right boxes on the screen you will make a picture or object.

Lets work with mode 1 first (124 x 192). Each shape is composed of 16 rows of 4 dots, like this:

Each dot can be one of 4 colors. To define the color of the dots in each row you have to send the computer a number corresponding to the code for the combination of colors in each row. You would do this through a poke statement. For instance, if you wanted the dots in row 1 to be: BLUE YELLOW RED RED
you would need to poke location 512 with the number 159, like this:
POKE 512,159 Now, how did we get 159 and how did we know where to put it?

3

The place in memory wher the shapes are stored is composed of 32 rows of 16 boxes. Each box has a number between 512 through 1023, and each row defines a shape. Therefore row 0 is shape 0, row 1 is shape 1, and row 6 is shape 6. (the computer numbers the rows from 0 through 31 instead of 1 to 32) Each box in the row corresponds to 4 dots. For example:

Since Box 1 of row 0 is 512 and there are 16 boxes in a row, the first box in row 6 would be:

512 + (6 x 16) = 608

The box corresponding to the row of dots in the example would be 613. Therefore we would poke location 613. The formula for that location is:

512 + (row number x 16) + (row of dots in shape - 1)
613 = 512 + (6 x 16) + (6 - 1)

4

Now we know what location to poke into, but how do we know what number to put in that location?

First of all, each dot can have 1 of 4 colors. Each color has a number which are:

	GROUP 0		No.		GROUP 1
	green		 O		white
	yellow		 1		aqua
	blue		 2		purple
	red		 3		orange

There are two color sets, which means you can choose from the 4 colors in group 1 or the four colors in group 0. But you can not have colors from both sets at the same time on the screen. After you decide what your shape will look like, and the colors of the dots in each row, you simply plug the numbers (corresponding to the colors used) into this formula:

(A x 64) + (B x 16) + (C x 4) + D
A= the number of the color corresponding to the first dot
B= the number of the color corresponding to the second dot
C= the number of the color corresponding to the third dot
D= the number of the color corresponding to the fourth dot

Therefore if we wanted the colors of the four dots in our example to be:
GREEN BLUE RED YELLOW
the formula would read:
(0 x 64) + (2 x 16) + (3 x 4) + 1 = 45
This means that to define the row of dots in our example we would use the command POKE 613,45.

5

After all the dots in our shape have been defined, we need to put the shape on our screen.
We do this with another poke statement. To find the numbers used we must first know the following:

The screen is divided into 12 rows of 32 boxes. These boxes are numbered 0 through 383. like this:

To find the location of the 12th box in row 5 would mean using this formula:
(row number x 32) + (box number in the row - 1) = Box location
Therefore in our example:
(5 x 32) + (12 - 1) = 171
so the location of the box in question is 171. next we have to decide which color group to use, either 0 or 1. The shape is then plotted to the screen with the following formula:
POKE box location, shape number + (64 x color group)

6

Therefore to plot the shape that we defined earlier (row 6 in the shape table) to location 171 on the screen we would use the command POKE 171,6

To change the colors to the other group (group 1) we would just have to add 64 to the row number and the command would be POKE 171,70.

Example 2:
We are going to plot blue and red stripes on the screen.

10 POKE 8193,60
20 POKE 8194,158 : REM this gets you into the 128 x 192 mode
30 REM set the colors of the dots in shape 6
40 FOR I = 0 TO 8
50 POKE 608+I,255 : REM first 8 rows contain all red dots
60 NEXT
70 FOR J = 9 TO 16
80 POKE 608+5,170 : REM last 8 rows contain all blue dots
90 NEXT
100 REM put shape 6 in all 384 boxes on the screen
110 FOR K = 0 TO 383
120 POKE K,6
130 NEXT
140 A$=KEY$(0):IF A$=""THEN 140

The last command contains instructions that will keep the display on the screen until you press a key on the keyboard.

To get back to the normal mode type POKE 8193,52 return then type POKE 8194,30 return.

Try replacing the 6 in line 120 with 70 for different colors.

7

PROGRAMS

CRAPS PROGRAM SUBMITTED by Ken Whitmare

1 SHAPE= 15:CALL 17046
2 FOR I=0 TO 7
3 FOR P=l TO 100:NEXT
4 COLOR=1
5 HLIN I,31-I,I
6 HLIN 1,31-1,15-I
7 VLIN 1,15-I,I
8 VLIN I,15-I,31-I
9 NEXT I
11 POKE 24578,54
15 CALL 17046
16 PRINT"CRAPS"
20 INPUT"TRY AGAIN (1=YES)",Z:IF Z=1 THEN 22:STOP
22 PRINT(6*RND(1)+1):B=INT(6*RND(1)+1)
25 PRINT"POINT IS",A+B
29 FOR P=1 TO 500:NEXT
30 IF A+B=7 THEN PRINT"WINNER":GOTO 20
40 IF A+B=11 THEN PRINT"WINNER":GOTO 20
50 C=INT(6+RND(l)+l):D=INT(6+RND(1)+1)
55 PRINT C+D,
60 IF A+B=C+D THEN PRINT"WINNER":GOTO 20
70 IF C+D=7 THEN PRINT"YOU CRAPPED OUT":GOTO 20
75 FOR P=1 TO 500:NEXT
80 GOTO 50

8

More Programs submitted by Ken Whitmare

Graphics Programs

1 CALL 17046
2 POKE 24578,54
10 SHAPE=l5
12 FOR A=O TO 7
15 COLOR=A
18 FOR P=l TO 100:NEXT P
20 HLIN 0,31,8
25 FOR B=0 TO 7
30 COLOR=B
35 FOR P=1 TO 100:NEXT P
40 VLIN 0,15,15
50 NEXT A
55 NEXT B
60 GOTO 10

1 CALL 17046
2 POKE 24578,54
10 SHAPE=15
15 FOR C=0 TO 7
20 COLOR=C
25 FOR A=0 TO 15
30 HLIN 0,31,A
31 NEXT A
32 FOR B=O TO 31: COLOR=7
35 VLIN 0,15,B
41 NEXT B
43 FOR P= 1 TO 100:NEXT P
45 NEXT C
60 GOTO 10

NATIONAL "IMAGINATION" COMPUTER CLUB

(FACTORY SPONSORED)

1982 MEMBERSHIP APPLICATION

Expires 12-31-82

PURPOSE: KEEP OWNERS AND PROSPECTIVE OWNERS INFORMED ON A NATIONAL BASIS ABOUT
         THE FANTASTIC CAPABILITIES OF THE NEW 23K APF IM-1 CONPVPEB

INFORMATION FURNISHED: LATEST PRODUCT DEVELOPMENTS TO ENHANCE AND EXPAND THE
                       CAPABILITIES OF THE NEW 22 APF IM-1 COMPUTER. KEEPING
                       UP VITH LATEST DEVELOPMENTS AND PROBLEMS FROM ALL SOURCEs,

OWNER EXPERIENCES: BUGS - IMPROVEMENTS - EXPANSION IDEAS - PROGRAM EXCHANGE ETC.


APPLICANT

NAME________________________________STREET ADDRESS________________________________

CITY________________________________STATE_________________________________________

PHONE NO._____________________

INCLUDE ANNUAL FEE $15.00. MAKE CHECK PAYABLE TO JOE BADGER, NICC (NATIONAL "IMAGINATION
COMPUTER CLUB)

AS A CLUB MEMBER YOU WILL BE ENTITLED TO A SPECIAL CLUB PRICE ON MANY ITEMS. THIS
CLUB PRICE WILL NOT BE NO LESS THAN 15X ON ALL PROGRAMS. YOUR SAVINGS SHOULD EASILY
PAY YOUR 1982 CLUB MEMBERSHIP FEE.

A MONTHLY COMPUTER CLUB LETTER IS ISSUED, STARTING FEBRUARY 1982. IF NEW INFORMATION
IS IMPORTANT ENOUGH WE VILL ISSUE MORE FREQUENT LETTERS.


			MAIL TO:   CLUB PBESIDENT
           			   JOE BADGER
           			   515 W. SHADY LANE
           			   BARRINGTON, IL 60010
          			   PHONE: 312/382-5244

10

"Snoopy"
GRAPHICS & MUSIC
PROGRAM EXAMPLE

1     CALL 17046
2     PRINT "GRAPHICS BY THE APF MACHINE"
3     FOR P=1 TO 300: NEXT P
10    SHAPE =15: COLOR =2
20    POR Y=0 TO 31
40    VLIN 0,15,Y
50    NEXT Y
60    REM    ...AIRPLANE...
70    COLOR =1
80    HLIN 25,28,6: HLIN 25,28,7: HLIN 7,14,8: HLIN 20,28,8: HLIN 7,25,9: PLOT 7,10: HLIN.15,20,10
90    REM    ...WING...
100   COLOR =3
110   HLIN 8,14,]0
120   REM ...WHEEL..
130   COLOR =6
140   HLIN 10,11,12
150   REM    ...ENGINE...
160   COLOR =6
170   HLIN 5,6,8: HLIN 4,6,9: HLIN 5,6,10
180   REM ...HEAD...
190   COLOR 14
200   HLIN 15,20,3: HLIN 15,20,4: HLIN 11,20,5: MLIN 11,20,6: HLIN 16,18,7
210   COLOR =O
220   PLOT 16,4: HLIN 18,19,4: HLIN 18,19,5: PLOT 10,6
230   COLOR =3
240   HLIN 16,18,8
250   REM    ...PROP...
255   FOR P=l TO 200
256   IP P=200 GOTO 310
260   COLOR =7
270   PLOT 4,8: PLOT 4,10: PLOT 4,7: PLOT 4,11
280   COLOR =2
290   PLOT 4,7: PLOT 4,11: PLOT 4,8: PLOT 4,10
295   NEXT P
300   GOTO 250
310   PRINT : PRINT : PRINT "MUSIC BY THE APF MACHINE"
315   FOR P=1 TO 200: NEXT P
320   CALL 17046
500   FOR N=1 TO 32: PRINT : NEXT N
520   POKE 40960,2: POKE 40961,0
530   PRINT : PRINT "I'VE BEEN WORK-ING ON THE"
540   PRINT "RAIL-ROAD."
550   MUSIC "100/51/51230001000"
5(10  PRINT "ALL, THE LIVE-LONG DAY."
570   MUSIC "400410203000000"
580   PRINT "I'VE BEEN WORK-INC ON THE"
590   PRINT "RAIL-ROAD."
600   MUSIC "100/51/512300010"
610   PRINT "JUST TO PASS THE TIME A-WAY."
620   MUSIC "33302020302000000"
630   PRINT "CAN'T YOU HEAR THE WHIST-LE": PRINT "BLOW-INC"
640   MUSIC "2002+12321000/5000"
690   PRINT "RISE UP SO EARLY IN THE MORN."
660   MUSIC "404411223000000"
670   PRINT "CAN'T YOU HEAR THE CAP-MI#R: PRINT "SHOUT-INC?"
680   MUSIC "/6000/71/71/6/500010000"
690   PRINT "DI-NA YOUR HORN!"
700   MUSIC "3040302010000000"
710   GOTO 1

11

REVISED EXAMPLES IN APF BASIC
LANGUAGE REFERENCE MANUAL

PAGE 10

PRINT A,B
PRINT A;B
PRINT A;TAB(10);B
PRINT USING A$,B






PAGE 15

EXAMPLE
10 SHAPE=15
20 FOR I=0 TO 7
30 COLOR=I
40 HLIN I,31-I,I
50 HLIN I,31-I,15-I
60 VLIN I,15-I,I
70 VLIN I,15-I,31-I
80 NEXT I
90 GOTO 90

PAGE 11

EXAMPLE
50 DIM B$(5), D$(5)
100 DATA 37, BILL,8,SAM
200 READ A,B$
300 RESTORE
400 READ C,D$
500 PRINT A,C,B$,D$
600 GOTO 50

PAGE 16

EXAMPLE
10 L=7
20 P=22
30 A=L*32+P+512
40 POKE 40960,A/256
50 POKE 40961,A-INT(A/256)*256


PAGE 12

10 DIM A$(9) BQ(1)
20 A$="ABCDEFGHIJ"
30 PRINT A$
40 PRINT A$(4)
50 B$=A$(3): Print B$

PAGE 20

AUDIO RECORDING

PRESS AUDIO RECORD AND PLAY/SAVE KEYS

PAGE 13

EXAMPLE
5 DIM A$(10), B$(10)
10 PRINT USING A$,1$
20 A$="5552332"
30 B$="77665"
40 MUSIC A$,B$
50 GOTO 5

12

23K APF IM-1
PROGRAMMING EXAMPLES

HOW TO USE MULTI PRINT & TAB STATEMENT.

HOW TO USE READ; DATA AND IF, THEN STATEMENTS.

13

HOW TO USE MULTI READ, DATA STATEMENTS.

HOW TO USE "INPUT" STATEMENT.

14