Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AMF 665/D Analog Computer Simulator

155 views
Skip to first unread message

Mr. Emmanuel Roche, France

unread,
Feb 10, 2014, 4:03:09 AM2/10/14
to
Is anybody out there

who knows the "AMF Educational Computer 665/D" ?

While searching for something else, I found a 40-years old BASIC program that looked interesting. According to what one "Tim Shoppa" wrote in 2000, it is "a simulator for the AMF 665/D Analog Computer": "It has a constant, three adders which also act as scales, two integrators and a meter." That's all the doc.

Interested, I made a search, and found one Web page about it:

http://www.oldcomputermuseum.com/amf_665.html

(Apparently, this man is selling it/one at the moment.)

However, I saw no "Educational" material, like how to use it, and examples of use.

I had a look to the program and, just by indenting it, it looks very clear. See below.

"A solution in searches of a problem..."

Yours Sincerely,
Mr. Emmanuel Roche, France

10 REM AMF665D.BAS by Emmanuel ROCHE
20 '
30 REM ANALOG CLARK BAKER 8/72 DSAA
40 '
50 DATA "P1","P2","P3","N1","N2","N3","I4","I5","I6","J4", J5","J6"
60 DATA "A7","A8","A9","B7","B8","B9","C7","C8","C9"
70 DATA "A1","A2","A3","A4","A5","A6","B1","B2","B3","B4","B5 ,"B6"
80 DATA "C1","C2","C3","C4","C5","C6","I1","I2","I3","J1","J2","J3"
90 DATA "M1","M2","M3"
100 DATA "1","2","3"
110 DIM I$(27),M$(3),O$(21)
120 DIM A(18),B(3),C(3),I(6),J(2),M(3),O(21)
130 FOR X=1 TO 21
140 READ O$(X)
150 NEXT X
160 FOR X=1 TO 27
170 READ I$(X)
180 NEXT X
190 FOR X=1 TO 3
200 READ M$(X)
210 NEXT X
220 PRINT "ANALOG SIMULATOR"
230 '
240 REM ***NEW(**
250 FOR X=1 TO 21
260 LET O(X)=0
270 PRINT "ENTER COMMAND";
280 NEXT X
290 PRINT
300 INPUT C$
310 IF C$="NEW" THEN 240
320 IF C$="STOP" THEN 2190
330 IF C$="ENTER" THEN 400
340 ID C$="DELETE" THEN 400
350 IF C$="LIST" THEN 780
360 IF C$="RUN" THEN 880
370 PRINT "ILLEGAL COMMAND: ";C$
380 GOTO 290
390 '
400 REM ***ENTER*** AND ***DELETE***
410 PRINT "CONNECTION";
420 INPUT O$,I$
430 IF O$="END" THEN 290
440 FOR O=1 TO 21
450 ID O$(O)=O$ THEN 490
460 NEXT O
470 PRINT "NO OUTPUT TERMINAL: ;O$
480 GOTO 410
490 FOR I=1 TO 27
500 IF I$(I)=I$ THEN 540
510 NEXT I
520 PRINT "NO INPUT TERMINAL: ";I$
530 GOTO 410
540 IF C$="DELETE" THEN 720
550 IF O(O)<>I THEN 580
560 PRINT "ALREADY CONNECTED: ";O$;"-";I$
570 GOTO 410
580 IF O(O)=0 THEN 610
590 PRINT "TERMINAL USED: ";O$
600 GOTO 410
610 FOR O1=1 TO 21
620 IF O(O1)<>I THEN 650
630 PRINT "TERMINAL USED: ;I$
640 GOTO 410
650 NEXT O1
660 IF O<13 THEN 700
670 IF INT((O-13)/3)<>INT((I-1)/6) THEN 700
680 PRINT "FEEDBACK LOOP: "9 O$;"-";I$
690 GOTO 410
700 LET O(O)=I
710 GOTO 410
720 IF O(O)=I THEN 750
730 PRINT "NOT CONNECTED: ";O$;"-";I$
740 GOTO 410
750 LET O(O)=0
760 GOTO 410
770 '
780 REM ***LIST***
790 PPINT
800 LET P=1
810 FOR X=1 TO 21
820 IF O(X)=0 THEN 850
830 PRINT P,O$(X);"-";I$(O(X))
840 LET P=P+1
850 NEXT X
860 GOTO 290
870 '
880 REM ***RUN***
890 LET T=0
900 LET C1=0
910 LET F1=0
920 FOR X=1 TO 21
930 IF O(X)>=25 THEN 970
940 NEXT X
950 PRINT "NO METER, NO OUTPUT."
960 GOTO 290
970 FOR X=1 TO 18
980 LET A(X)=0
990 NEXT X
1000 FOR X=1 TO 3
1010 LET E(X)=0
1020 LET I(X)=0
1030 LET I(X+3)=0
1040 LET P(X)=0
1050 LET M(X)=9999
1060 FOR Y=X*3+10 TO X*3+12
1070 PRINT "FEEDBACK LOOP, SORRY"
1080 LET A(O(Y))=1
1090 NEXT Y
1100 NEXT X
1110 FOR X=1 TO 3
1120 FOR Y=1 TO 3
1130 IF E(1)=Y THEN 1240
1140 IF E(2)=Y THEN 1240
1150 FOR Z=1 TO 6
1160 IF A(Y*6-6+Z)=1 THEN 1240
1170 NEXT Z
1180 LET E(X)=Y
1190 FOR Z=Y*3+10 TO Y*3+12
1200 IF O(Z)>18 THEN 1220
1210 LET A(O(Z))=0
1220 NEXT Z
1230 GOTO 1250
1240 NEXT Y
1250 NEXT X
1260 IF E(3)<>0 THEN 1280
1270 GOTO 290
1280 FOR X=1 TO 6
1290 IF O(X)=0 THEN 1330
1300 PRINT "CONSTANT";
1310 INPUT C
1320 GOTO 1340
1330 NEXT X
1340 FOR X=1 TO 3
1350 FOR Y=1 TO 3
1360 IF O(X*3+9+Y)=0 THEN 1410
1370 PRINT "ADDER CONSTANT #";X;
1380 INPUT C(X)
1390 LET F1=-1
1400 GOTO 1420
1410 NEXT Y
1420 NEXT X
1430 FOR X=1 TO 2
1440 FOR Y=1 TO 3
1450 IF O(X*3+3+Y)=0 THEN 1490
1460 PRINT "INTERGRATOR CONSTANT #"9 X;
1470 INPUT J(X)
1480 GOTO 1500
1490 NEXT Y
1500 NEXT 1540
1510 IF F1=0 THEN 1540
1520 PRINT "ADDER NUMBER TO CHANGE";
1530 INPUT C1
1540 FOR X=1 TO 12
1550 IF O(X)=0 THEN 1650
1560 LET O=O(X)
1570 IF X>3 THEN 1600
1580 LET K=C
1590 GOTO 1640
1600 IF X>6 THEN 1630
1610 LET K=-C
1620 GOTO 1640
1630 LET K=J(INT(X-7)/3+1)
1640 GOSUB 1950
1650 NEXT X
1660 PRINT "TIME STEP";
1670 INPUT T1
1680 PRINT "STOP TIME";
1690 INPUT T4
1700 PRINT
1710 LET T2=T1/100
1720 FOR T3=1 TO 100
1730 FOR X=1 TO 3
1740 LET A=E(X)
1750 LET B(A)=(A(A*6-5)*10+A(A*6-4)+A(A*6-3)-A(A*6-2)-A(A*6-1)-A(A*6)*10)*C(A)
1760 LET K=B(A)
1770 FOR Y=1 TO 3
1780 IF O(A*3+9+Y)=0 THEN 1810
1790 LET O=O(A(3+9+Y)
1800 GOSUB 1950
1810 NEXT Y
1820 NEXT X
1830 IF T3=1 THEN 2030
1840 FOR X=1 TO 2
1850 LET J(X)=J(X)-(I(X*3-2)*10+I(X*3-1)+I(X*3))*T2
1860 LET K=J(X)
1870 FOR Y=1 TO 3
1880 IF O(X*3+3+Y)=0 THEN 1910
1890 LET O=O(X*3+3+Y)
1900 GOSUB 1950
1910 NEXT Y
1920 NEXT X
1930 NEXT T3
1940 GOTO 1720
1950 IF O>18 THEN 1980
1960 LET A(O)=K
1970 RETURN
1980 IF O>24 THEN 2010
1990 LET I(O-18)=K
2000 RETURN
2010 LET M(O-24)=K
2020 RETURN
2030 PRINT T;
2040 LET T=T+T1
2050 FOR X=1 TO 3
2060 IF M(X)=9999 THEN 2080
2070 PRINT "","M";M$(X);" =";INT(M(X)*1000)/1000;
2080 NEXT X
2090 IF C1<>0 THEN 2120
2100 PRINT
2110 GOTO 2140
2120 PRINT TAB(65);
2130 INPUT C(C1)
2140 IF T<T4+T1 THEN 1840
2150 PRINT "NEW STOP TIME";
2160 INPUT T4
2170 IF T4<=T-T1 THEN 290
2180 GOTO 1840
2190 END

s...@swtrocketry.com

unread,
Feb 12, 2014, 5:59:39 AM2/12/14
to
Hi Emmanuel,

When I try to run it I get an error on line 70.
As you can see, there is a " missing.
As far as I am concerned it is `zo helder als koffiedik´ to me.
This is Dutch, meaning is is as clear as coffee drab.
I like analog computers.
The first computer I worked on in 1967 was one.
So far I don't understand a bit about it.
But I will study it. Who knows what might happen...

Henk Siewert
Message has been deleted
Message has been deleted

jamb...@gmail.com

unread,
Feb 18, 2014, 12:02:37 AM2/18/14
to
Mr. Roche,

Thank you, This is just what I needed! Short explanation: I got a great deal of pleasure simulating a 50 year old analog computer within a simulation of a 38 year old microcomputer. Long explanation: I have had in my possession since 1976 or so a paper tape of MITS BASIC 4.0, which I decided I wanted to decode, load and run. Yes, I know that this BASIC is available on the Internet, but I wanted to run *my* paper tape. I built a webcam paper tape reader, and successfully created a byte-for-byte image file, which I was able to load and run in the Simh altairz80.exe simulator. Since the simulator has no front panel, I had to load the bootstrap loader from a separate small image file instead of toggling it in with switches. Once the bootstrap loader was in "memory," I redirected the console to the BASIC paper tape image file, so it loaded BASIC just as if it had been coming from a Teletype--first and second-stage loaders, then blocks with checksums. The final part of the project was to run a meaningful program under that BASIC, and you have filled the need with the AMF 665D Analog Computer Simulator.

I had to make some changes to get it to run, but noted those changes in comments. There is one part I do not understand which is in lines 1052-1100. I think that section is only a feedback loop safety check, and does not affect proper operation. It seems like a conditional statement might be missing, but I couldn't figure out what it should be. If you have a chance to check your sources and find a missing statement, I'd be interested to know about it.

I also added some built-in examples, so that the program can do something useful immediately on startup. The commands EX1 and EX2 load the connection lists for first and second-order systems, respectively. The LIST command will show the connection list, and the RUN command will start the show. Be sure to clear the list with the NEW command when changing examples. The comments explain how to enter the parameters. I found it quite easy to produce nice graphs by copying the simulator's output screen, then pasting the values into a spreadsheet.

The program runs under MITS BASIC 4.0 as well as under CP/M MBASIC.COM (version 5.21) within the Simh altairz80.exe simulator. I hope others can have as much fun playing with this as I have.

NOTE: Some of the source code may be hidden as "quoted text". Click on the link to get the full listing.

AMF665D1.BAS

10 REM AMF665D.BAS by Emmanuel ROCHE
11 REM ADAPTED TO MITS BASIC 4.0, JIM DUNLAP, 02/17/2014
12 REM ORIGINAL CODE AND CORRECTIONS MARKED BY "REM ==="
13 REM EXPLANATION COMMENTS MARKED BY "REM +++"

13 REM === CHANGED SINGLE-QUOTE COMMENTS TO 'REM' FOR MITS BASIC.
20 REM
30 REM ANALOG CLARK BAKER 8/72 DSAA
40 REM
41 REM === LINE 50, ADDED DOUBLE QUOTE BEFORE J5.
42 REM +++ LABELS FOR OUTPUT CONNECTIONS O$
45 REM +++ OUTPUT NODE INDICES
46 REM +++ 1 2 3 4 5 6 7 8 9 10 11 12
50 DATA "P1","P2","P3","N1","N2","N3","I4","I5","I6","J4","J5","J6"
52 REM +++ 13 14 15 16 17 18 19 20 21
60 DATA "A7","A8","A9","B7","B8","B9","C7","C8","C9"

65 REM === LINE 70, ADDED DOUBLE QUOTE AFTER B5.
66 REM +++ LABELS FOR INPUT CONNECTIONS, I$
67 REM +++ INPUT NODE CONNECTION NUMBERS
68 REM +++ 1 2 3 4 5 6 7 8 9 10 11 12
70 DATA "A1","A2","A3","A4","A5","A6","B1","B2","B3","B4","B5","B6"
72 REM +++ 13 14 15 16 17 18 19 20 21 22 23 24
80 DATA "C1","C2","C3","C4","C5","C6","I1","I2","I3","J1","J2","J3"
82 REM +++ 25 26 27
90 DATA "M1","M2","M3"

95 REM +++ LABELS FOR M$
100 DATA "1","2","3"

102 REM === CHANGED INTEGRATION ITERATION LOOPS FROM 100 TO NITER
103 REM === 100 IS MORE ACCURATE BUT *VERY* SLOW, 10 IS A LITTLE
104 REM === LESS ACCURATE, BUT MUCH FASTER. SET NITER TO SUIT YOUR NEEDS.
105 NITER = 10

108 REM +++ LABELS FOR INPUT, OUTPUT AND METER CONNECTIONS
110 DIM I$(27),M$(3),O$(21)
111 REM +++ THE FOLLOWING ARE MOSTLY GUESSES
112 REM +++ A: ADDER INPUT STATES (INSTANTANEOUS VALUES)
113 REM +++ B: ADDER OUTPUT STATES
114 REM +++ C: ADDER MULTIPLIER COEFFICIENTS
115 REM +++ I: INTEGRATOR INPUT STATES, AFTER IMPLIED NEGATION
116 REM +++ J: INTEGRATOR OUTPUT STATES
117 REM +++ M: METER STATES
118 REM +++ O: OUTPUT-INPUT CONNECTION LIST
119 REM +++ ARRAY INDEX IS OUTPUT NODE, VALUE IS INPUT NODE
120 DIM A(18),B(3),C(3),I(6),J(2),M(3),O(21)

128 REM +++ READ OUTPUT, INPUT AND METER LABELS.
130 FOR X=1 TO 21
140 READ O$(X)
150 NEXT X
160 FOR X=1 TO 27
170 READ I$(X)
180 NEXT X
190 FOR X=1 TO 3
200 READ M$(X)
210 NEXT X

220 PRINT "ANALOG SIMULATOR"
230 REM
240 REM ***NEW***
250 FOR X=1 TO 21
260 LET O(X)=0
270 REM === PRINT "ENTER COMMAND";
280 NEXT X
288 REM === MOVED 290 TO 292. MOVED 'PRINT "ENTER COMMAND";' FROM 270 TO 290.
290 PRINT "ENTER COMMAND";
292 PRINT
298 REM +++ GET COMMAND STRING
300 INPUT C$
302 REM +++ SET CONNECTION LIST FOR EXAMPLE 1.
305 IF C$="EX1" THEN GOSUB 6000: GOTO 290
306 REM +++ SET CONNECTION LIST FOR EXAMPLE 1.
307 IF C$="EX2" THEN GOSUB 6200: GOTO 290
309 REM +++ CLEAR CONNECTION LIST FOR NEW PROBLEM.
310 IF C$="NEW" THEN 240
318 REM +++ QUIT AMF665D SIMULATOR, RETURN TO CP/M OR BASIC 4.0.
320 IF C$="STOP" THEN 2190
328 REM +++ ADD CONNECTIONS, OUTPUT, INPUT; E.G., 'N1,I1'
329 REM +++ ENTER 'END,0' TO FINISH
330 IF C$="ENTER" THEN 400
332 REM === LINE 340, CHANGED 'ID' TO 'IF'.
340 IF C$="DELETE" THEN 400
350 IF C$="LIST" THEN 780
360 IF C$="RUN" THEN 880
370 PRINT "ILLEGAL COMMAND: ";C$
380 GOTO 290
390 REM
400 REM ***ENTER*** AND ***DELETE***
410 PRINT "CONNECTION";
420 INPUT O$,I$
430 IF O$="END" THEN 290
440 FOR O=1 TO 21
442 REM === LINE 450, CHANGED 'ID' TO 'IF'.
450 IF O$(O)=O$ THEN 490
460 NEXT O
462 REM === ADDED QUOTE AFTER 'TERMINAL:'.
770 REM
780 REM ***LIST***
782 REM === LINE 790, CHANGED 'PPINT' TO 'PRINT'.
790 PRINT
800 LET P=1
810 FOR X=1 TO 21
820 IF O(X)=0 THEN 850
830 PRINT P,O$(X);"-";I$(O(X))
840 LET P=P+1
850 NEXT X
860 GOTO 290
870 REM
880 REM ***RUN***
890 LET T=0
900 LET C1=0
910 LET F1=0
920 FOR X=1 TO 21
930 IF O(X)>=25 THEN 970
940 NEXT X
950 PRINT "NO METER, NO OUTPUT."
960 GOTO 290
970 FOR X=1 TO 18
980 LET A(X)=0
990 NEXT X
1000 FOR X=1 TO 3
1010 LET E(X)=0
1020 LET I(X)=0
1030 LET I(X+3)=0
1040 LET P(X)=0
1050 LET M(X)=9999
1052 REM *** A CONDITIONAL STATEMENT SEEMS TO BE MISSING FROM THE
1053 REM *** CODE BELOW. LOOKS LIKE IT IS SUPPOSED TO SET THE
1054 REM *** ADDER INPUT STATE TO 1 TO PREVENT RUNAWAY UNDER SOME
1055 REM *** UNKNOWN WIRING CONFIGURATION. I COMMENTED IT OUT
1056 REM *** UNTIL I FIGURE OUT HOW ITS SUPPOSED TO WORK.
1057 REM +++ O(13:15) -> A7, A8, A9, B7,..., C9, ADDER OUTPUTS
1060 REM *** FOR Y=X*3+10 TO X*3+12
1070 REM *** PRINT "FEEDBACK LOOP, SORRY"
1080 REM *** LET A(O(Y))=1
1090 REM *** NEXT Y
1100 NEXT X
1110 FOR X=1 TO 3
1120 FOR Y=1 TO 3
1130 IF E(1)=Y THEN 1240
1140 IF E(2)=Y THEN 1240
1150 FOR Z=1 TO 6
1160 IF A(Y*6-6+Z)=1 THEN 1240
1170 NEXT Z
1180 LET E(X)=Y
1190 FOR Z=Y*3+10 TO Y*3+12
1200 IF O(Z)>18 THEN 1220
1210 LET A(O(Z))=0
1220 NEXT Z
1230 GOTO 1250
1240 NEXT Y
1250 NEXT X
1260 IF E(3)<>0 THEN 1280
1270 GOTO 290
1280 FOR X=1 TO 6
1290 IF O(X)=0 THEN 1330
1292 REM *** LINE 1300 CHANGED 'CONSTANT' TO 'STEP MAGNITUDE'
1300 REM *** PRINT "CONSTANT";
1302 PRINT "STEP MAGNITUDE";
1310 INPUT C
1320 GOTO 1340
1330 NEXT X
1340 FOR X=1 TO 3
1350 FOR Y=1 TO 3
1360 IF O(X*3+9+Y)=0 THEN 1410
1365 REM *** CHANGED 'ADDER CONSTANT' TO 'ADDER COEFFICIENT'.
1370 REM *** PRINT "ADDER CONSTANT #";X;
1372 PRINT "ADDER COEFFICIENT #";X;
1380 INPUT C(X)
1390 LET F1=-1
1400 GOTO 1420
1410 NEXT Y
1420 NEXT X
1430 FOR X=1 TO 2
1440 FOR Y=1 TO 3
1450 IF O(X*3+3+Y)=0 THEN 1490
1455 REM *** LINE 1460, CHANGED 'CONSTANT #"9' TO CONSTANT #";
1456 REM *** CHANGED 'INTEGRATOR CONSTANT #'
1457 REM *** TO 'INITIAL CONDITION, INTEGRATOR #'.
1460 REM PRINT "INTERGRATOR CONSTANT #";X;
1465 PRINT "INITIAL CONDITION, INTEGRATOR #";X;
1470 INPUT J(X)
1480 GOTO 1500
1490 NEXT Y
1495 REM *** LINE 1510, CHANGED NEXT 1540 TO NEXT X
1500 NEXT X
1510 IF F1=0 THEN 1540
1520 PRINT "ADDER NUMBER TO CHANGE";
1530 INPUT C1
1540 FOR X=1 TO 12
1550 IF O(X)=0 THEN 1650
1560 LET O=O(X)
1570 IF X>3 THEN 1600
1580 LET K=C
1590 GOTO 1640
1600 IF X>6 THEN 1630
1610 LET K=-C
1620 GOTO 1640
1630 LET K=J(INT(X-7)/3+1)
1640 GOSUB 1950
1650 NEXT X
1660 PRINT "TIME STEP";
1670 INPUT T1
1680 PRINT "STOP TIME";
1690 INPUT T4
1700 PRINT
1702 REM === LINES 1710, 1720, CHANGED HARD-CODED 100 TO VARIABLE NITER
1703 REM === TO EASILY ALLOW ADJUSTING NUMBER OF LOOPS PER TIME STEP.
1710 LET T2=T1/NITER
1720 FOR T3=1 TO NITER
1730 FOR X=1 TO 3
1740 LET A=E(X)
1742 REM *** LINE 1750 IS TOO LONG FOR MITS BASIC 4.0. BROKE IT UP.
1750 REM *** B(A)=(A(A*6-5)*10+A(A*6-4)+A(A*6-3)-A(A*6-2)-A(A*6-1)-A(A*6)*10)*C(A)
1752 B(A)=A(A*6-5)*10+A(A*6-4)+A(A*6-3)
1754 B(A)=B(A)-A(A*6-2)-A(A*6-1)-A(A*6)*10
1755 B(A)=B(A)*C(A)
1760 LET K=B(A)
1770 FOR Y=1 TO 3
1780 IF O(A*3+9+Y)=0 THEN 1810
1782 REM *** LINE 1790, CHANGED O(A(3+9+Y)) TO O(A*3+9+Y)
1790 REM LET O=O(A(3+9+Y))
1792 LET O=O(A*3+9+Y) : REM CORRECTED
1800 GOSUB 1950
1810 NEXT Y
1820 NEXT X
1830 IF T3=1 THEN 2030
1840 FOR X=1 TO 2
1850 LET J(X)=J(X)-(I(X*3-2)*10+I(X*3-1)+I(X*3))*T2
1860 LET K=J(X)
1870 FOR Y=1 TO 3
1880 IF O(X*3+3+Y)=0 THEN 1910
1890 LET O=O(X*3+3+Y)
1900 GOSUB 1950
1910 NEXT Y
1920 NEXT X
1930 NEXT T3
1932 REM +++ UNCOMMENT LINE BELOW FOR DIAGNOSTIC PRINTOUT.
1935 REM +++ GOSUB 7000
1940 GOTO 1720

1945 REM +++ FILL IN STATE ARRAYS WITH INSTANTANEOUS SIMULATION VALUES.
1950 IF O>18 THEN 1980
1960 LET A(O)=K
1970 RETURN
1980 IF O>24 THEN 2010
1990 LET I(O-18)=K
2000 RETURN
2010 LET M(O-24)=K
2020 RETURN

2030 PRINT T;
2040 LET T=T+T1
2050 FOR X=1 TO 3
2060 IF M(X)=9999 THEN 2080
2070 PRINT "","M";M$(X);" =";INT(M(X)*1000)/1000;
2080 NEXT X
2090 IF C1<>0 THEN 2120
2100 PRINT
2110 GOTO 2140
2120 PRINT TAB(65);
2130 INPUT C(C1)
2140 IF T<T4+T1 THEN 1840
2150 PRINT "NEW STOP TIME";
2160 INPUT T4
2170 IF T4<=T-T1 THEN 290
2180 GOTO 1840
2190 SYSTEM
2192 END

6000 REM +++ EXAMPLE 1, FIRST-ORDER SYSTEM
6001 REM Y/U = 1/(s+1)
6002 REM AT 'STEP MAGNITUDE' ENTER '1'
6003 REM AT 'ADDER COEFFICIENT # 1' ENTER '1'
6004 REM AT 'INITIAL CONDITION, INTEGRATOR # 1' ENTER 0
6005 REM AT 'ADDER NUMBER TO CHANGE?' ENTER 0
6006 REM AT 'TIME STEP' ENTER '0.1'
6007 REM AT 'STOP TIME' ENTER '5'
6008 REM THIS IS AN EXTREMELY SIMPLE SYSTEM, USEFUL FOR TROUBLESHOOTING.
6010 O(2) = 5 : REM P2-A5
6020 O(7) = 27 : REM I4-M3
6030 O(8) = 2 : REM I5-A2
6040 O(13) = 19 : REM A7-I1
6199 RETURN

6200 REM +++ EXAMPLE 2, SECOND ORDER SYSTEM
6201 REM TRANSFER FUNCTION: Y/U = Wn/(s^2 + 2*z*Wn*s + Wn^2)
6202 REM WHERE s IS LAPLACE OPERATOR, Wn IS NATURAL FREQ,
6203 REM AND z IS THE DAMPING RATIO.
6204 REM A CLASSIC EXAMPLE USES Wn: 3.1416, Z: 0.707.
6205 REM LOAD THIS EXAMPLE WITH THE COMMANDS 'EX2', THEN 'RUN'.
6206 REM AT 'STEP MAGNITUDE' ENTER '0.9870', THIS IS Wn^2)/10.
6207 REM AT 'ADDER COEFFICIENT # 1' ENTER 1
6208 REM AT 'ADDER COEFFICIENT # 2' ENTER '4.4429', THIS IS 2*Z*Wn.
6209 REM AT 'ADDER COEFFICIENT # 3' ENTER '9.8696', THIS IS Wn^2.
6210 REM FOR BOTH INITIAL CONDITIONS ENTER 0
6211 REM AT 'ADDER NUMBER TO CHANGE?' ENTER 0
6212 REM AT 'TIME STEP' ENTER '0.1' TO GIVE 0.1 SEC PER STEP.
6213 REM AT 'STOP TIME' ENTER '5' TO GIVE A 5-SECOND RUN.
6214 REM YOU SHOULD BE REWARDED BY A LIST OF TIMES AND METER VALUES.
6215 REM NOTE: 'STEP MAGNITUDE' IS DIVIDED BY 10 BECAUSE
6216 REM THE I1 INPUT HAS 10X BUILT IN.
6230 O(4) = 19 : REM N1-I1
6235 O(7) = 4 : REM I4-A4
6240 O(13) = 23 : REM A7-J2
6245 O(10) = 25 : REM J4-M1
6250 O(11) = 14 : REM J5-C2
6255 O(19) = 20 : REM C7-I2
6260 O(8) = 8 : REM I5-B2
6265 O(16) = 21 : REM B7-I3
6299 RETURN

7000 PRINT "DIAGNOSTIC PRINT"
7050 PRINT "A ARRAY, ADDER INPUT STATES"
7060 FOR U=1 TO 18
7070 PRINT U; A(U)
7080 NEXT U
7090 PRINT

7100 PRINT "B ARRAY"
7110 FOR U=1 TO 3
7120 PRINT U; B(U)
7130 NEXT U
7140 PRINT "C ARRAY"
7150 FOR U=1 TO 3
7160 PRINT U; C(U)
7170 NEXT U
7180 PRINT "I ARRAY"
7190 FOR U=1 TO 6
7200 PRINT U; I(U)
7210 NEXT U
7220 PRINT "J ARRAY"
7230 FOR U=1 TO 2
7240 PRINT U; J(U)
7250 NEXT U
7260 PRINT "M ARRAY"
7270 FOR U=1 TO 2
7280 PRINT U; M(U)
7290 NEXT U
7999 RETURN
8000 END

Mr. Emmanuel Roche, France

unread,
Feb 18, 2014, 6:30:14 AM2/18/14
to
Hello, Jim!

Ho, boy! Yet-another thread! My life is pretty "hectic" at the moment, with "Real Life", various "works in progress", CP/M 1.3, Intel 8008 stuff, and now Analog Computers!

> Thank you, This is just what I needed!

? You are the welcome!


> Short explanation: I got a great deal of pleasure simulating a 50 year old analog computer within a simulation of a 38 year old microcomputer.

Are you sure that you are not a simulator? (Just kidding!)


> Long explanation: I have had in my possession since 1976 or so a paper tape of MITS BASIC 4.0, which I decided I wanted to decode, load and run. Yes, I know that this BASIC is available on the Internet, but I wanted to run *my* paper tape. I built a webcam paper tape reader, and successfully created a byte-for-byte image file, which I was able to load and run in the Simh altairz80.exe simulator. Since the simulator has no front panel, I had to load the bootstrap loader from a separate small image file instead of toggling it in with switches. Once the bootstrap loader was in "memory," I redirected the console to the BASIC paper tape image file, so it loaded BASIC just as if it had been coming from a Teletype--first and second-stage loaders, then blocks with checksums. The final part of the project was to run a meaningful program under that BASIC, and you have filled the need with the AMF 665D Analog Computer Simulator.

Well, the advantage, since you did not play with a rarity like us, is that you had plenty of copies of "MITS BASIC 4.0" to compare with so, apart from wanting to run the code of your own paper tape, it was just a matter of assembling all the parts in the correct order -- thing that you did.

Regarding the "AMF 665D Analog Computer Simulator", sorry to nit-pick you, but the official name was/is 665/D.

According to my researches, AMF was standing for "American Machine & Foundry (Company)". At the time (1966? Hence the "665", in which case the "5" would be the 5th version?), one educational project named "ECCP" (Engineering Concepts Curriculum Project) decided to produce a curriculum for the youngsters, and one "branch" of this project was to introduce them to "leading edge" stuff of the time: Analog Computers... Apparently, AMF made 4 versions of this "Educational Computer", named: 665, 665/B, 665/C, and 665/D.

So, what I found is a simulator of the last version. The author of this simulator is still alive. I found a Web page where he talks about his computer experience but he does not even mention Analog Computers...


> I had to make some changes to get it to run, but noted those changes in comments. There is one part I do not understand which is in lines 1052-1100. I think that section is only a feedback loop safety check, and does not affect proper operation. It seems like a conditional statement might be missing, but I couldn't figure out what it should be. If you have a chance to check your sources and find a missing statement, I'd be interested to know about it.

I found it in a DECUS archive. In case you have not found it, here it is:

http://pdp-11.trailing-edge.com/rsts11/rsts-11-038/index.html

What would be needed is a real AMF 665/D and an electronician to explain us why the program behaves this way. Unfortunately, nobody I wrote to answered my messages... So, we are left with what is available on the Internet (unless we buy one on eBay): Images. Making yet-another search, I found 2 of interest:

http://www.earlycomputers.com/images/amf/amf-ec-i003.png

showing the "front panel" and, indeed, "It has a constant, three adders which also act as scales, two integrators and a meter.", as "Tim Shoppa" wrote in 2000.

The 3 adders are aligned horizontally, on the top. The 2 integrators are on the left side. So, the "meter" should be the "constant" at the bottom? (What is the purpose of the "Remote Operation" plug?)

(By the way, I saw that you changed "Constant" by "Step Magnitude". If it was the general case, I would agree. But, in this particular case, it is a simulator of a precise, historically dated hardware, so the names used inside the program should match those used outside on the Analog Computer...) (Once we will fully understand the "ins and outs" of this particular program, you will be free, of course, to make a general version, and rename it ANALOGC.)

I know nothing about Analog Computers, but I was surprised that each input of this Analog Computer had 3 plugs? I was thinking that electrical current was Positive and Negative? (However, I notice that, each time, the 3rd line is named "X 10".)

This was the Front Panel. For electronician, something more informative should be:

http://www.earlycomputers.com/images/amf/amf-ec-i014.png

which is the schematics of this AMF 665/D Analog Computer. Alas, the resolution is so low that I cannot decipherate it... (and, anyway, the schematics seems to be reversed?)

Else, maybe it would have explained the purpose of this loop?


> I also added some built-in examples, so that the program can do something useful immediately on startup. The commands EX1 and EX2 load the connection lists for first and second-order systems, respectively. The LIST command will show the connection list, and the RUN command will start the show. Be sure to clear the list with the NEW command when changing examples. The comments explain how to enter the parameters. I found it quite easy to produce nice graphs by copying the simulator's output screen, then pasting the values into a spreadsheet.

Explanations, explanations!

In my 30 years of experience programming computers, I have always been surprised that someone did not understand something that was obvious to me.

So, the only solution that I can see to this problem: Explanations, explanations, and... explanations! (Apparently, there are never enough explanations...)

I congratulate you, of course, for "adding some built-in examples". This is exactly what I asked for.

The only problem is that you just provided the (improved) program, but did not provide the "examples of use" that I asked for...

Ok. So, since it is written: "ECCP Approved" on the Front Panel, I made yet-another search, and found the following:

"Preparing myself to teach "The Man-Made World" [TMMW] was much more difficult than my earlier experience of getting ready to teach the PSSC course. Besides learning a new body of knowledge, I also had to learn how to use analog and digital computers. But the hard work was very worthwhile because, for the first time in my teaching career, my students and I were engaged in analyzing and solving real world problems that required application of science and math concepts. Our understanding of physics and calculus concepts was internalized as we modeled the behavior of physical systems using analog computers."

Bloody Hell! Exactly the kind of stuff that would make a nice demonstration of the use of this "Educational Computer"!

So, yet-another search, this time for "The Man-Made World", and I found hundreds of references... (One problem with education is that education professionals spend their time writing about education... While I am interested in "The Real World".) (Who is, as far as I know, analog, not digital.)

So, trying to summarize: there are hundreds of papers, out there, about the history of the ECCP. In general, they tend to say:

"One of the biggest mistakes that was made in the mid-1970's was for NSF to discontinue funding for summer workshops. For ECCP, it meant that significant numbers of teachers could not be trained. Since very few high-school teachers had background in engineering studies, the ECCP program stopped growing and peaked with an annual enrollment of about 100,000 students. The obvious lesson is that we must budget for continued professional development of teachers."

Conclusion: Explanations, explanations, explanations!

(Where did I heard this?)

There were several books published with the title "The Man-Made World". Apparently, the last one was published in 1972. Because it was covering all the engineering fields, it is a huge book. Only a few pages are dealing with Analog Computers. I am in the process of locating and getting some from Public Libraries, in order to retype the relevant pages.

"Work in progress..."


> The program runs under MITS BASIC 4.0 as well as under CP/M MBASIC.COM (version 5.21) within the Simh altairz80.exe simulator. I hope others can have as much fun playing with this as I have.

Well, since it is a BASIC program just dealing with an internal array, then it is almost universally portable. In addition, the 2 BASICs that you used are based on the one in which the simulator was written... So, it is no surprise that it ran!

As for having "as much fun" as you, me thinks that a little bit more than the (improved) source code is needed...

At least, you proof-read the program, and pointed to one not understood loop. Many thanks.

James Dunlap

unread,
Mar 5, 2014, 8:52:42 PM3/5/14
to
Emmanuel,

Sorry for the delay in my reply. I had not checked the gmail account in a while and did not realize you had responded. I'll check my profile in this group and see if I can put in a better email address. I, too, have been very busy, so I have not spent much time on this project recently.

Thank you for taking the time to review my effort on the AMF 665/D Analog Computer simulation. Thank you for the front panel layout--it matches the photograph I had found from one of the Internet computer museums. I was especially delighted to find your link to the original source, and think it may hold the answer to an unsolved problem between lines 1052 and 1100.

As you noticed, my interest in this project has been to get a non-trivial program to run in my paper tape-based BASIC simulator, and I have not been been careful with historical accuracy of the AMF 665/D. Since I have added so many comments and changed code, I think I shall treat this as a derived work and rename it, as you suggested. The original your link pointed to was called ANALOG.BAS. I believe your submission was AMF665D.BAS, so I think I shall use ANLSIMn.BAS, where n can take on a version number if it continues to evolve.

I am thinking about (and probably will) come up with a working example that will include the physical problem statement, the math problem statement, simulation setup and expected output. I believe this will be a text document instead of being embedded in the source code, but I may be able to provide BASIC code that could be included in or merged with the simulator code to ensure an error-free connection list setup.

Here are a few additional comments.

>The 3 adders are aligned horizontally, on the top. The 2 integrators are on >the left side. So, the "meter" should be the "constant" at the bottom? (What >is the purpose of the "Remote Operation" plug?)

The "CONSTANT" connections are outputs that provide a constant voltage, determined by the potentiometer, that you can connect to adder and integrator inputs. In the mathematical sense, they are "step inputs" to the simulation.

You can connect the meter to the constant, adder or integrator outputs to monitor the simulation over time. In the BASIC program, there are actually three meters you can configure with the connection list.

I have not studied the schematic, but I believe the "Remote Operation Plug" allows an external electrical signal to reset the system to initial conditions and start the analog simulation. Back in my school days, we had an analog computer connected to a Digital PDP-8. A digital program on the minicomputer could start the analog simulation, then through its analog-to-digital converter, could read the analog voltages as the simulation progressed.

>I know nothing about Analog Computers, but I was surprised that each input >of this Analog Computer had 3 plugs? I was thinking that electrical current >was Positive and Negative? (However, I notice that, each time, the 3rd line is >named "X 10".)

Each adder output voltage is the sum of its six voltage inputs multiplied by a constant set on the potentiometer labeled "COEFFICIENT". Little plus and minus signs on the front panel indicate that three inputs are non-inverting and three are inverting. For the inverting inputs, the voltage is negated before being added. Also, the "X 10" means that voltage on that input is amplified by 10 before being summed.

Each of the two integrators has three summing inputs. One of which is an "X 10". Also note that both integrators have a little minus sign in the block diagram on the front panel, that indicates a voltage inversion.

The reason that there are so many inputs and outputs is that you can only hook one wire to a connecting point.

With analog computers in general, the adders perform arithmetic while the integrators perform calculus. With the right wiring, this little computer can generate a time-varying voltage that is the solution to a 2nd order differential equation. Such an equation might describe problems as varied as ballistic projectiles and electronic filters.

I'll let you know when I get an example and explanation worked up.

Thanks for your comments and encouragement.

Jim.


0 new messages