Monday, October 31, 2022

Part 2m: What to do with all that Memory and 8K ALTAIR 680 BASIC?

In the end, I had 8K ALTAIR 680 BASIC taking up about 7.2K of low RAM, the Fantom II monitor using about 32 bytes of the top of RAM leaving about 41K for user program space, more than enough for almost any conceivable BASIC program and it's variables, arrays and strings.

Free memory is calculated as 65536-23986 or 41550 bytes.

101 BASIC Computer Games...

This is what I really wanted to try out. Yes, ALL 101 BASIC Computer Games. But I'm not about to type them in all by hand and then have no way to easily save them, remembering that I don't have any cassette routines in ALTAIR BASIC.

Internet to the rescue. Luckily after 4 decades and the advent of the internet, some people got bored and typed all those programs in for me. All I had to do was get them onto my ETA-3400X with BASIC running.

FTDI USB serial port

Since I couldn't find my real DB25F to DB25M serial cable and DB25M-DB25M adapter, and I had recently purchased a couple of cheap FTDI to USB serial adapters. It was a simple matter of trying to use that to connect my PC to the ETA-3400X using 3-wire serial connection.

All I had to do was remove a few jumpers on the ETA-3400X and connect the TXO on the FTDI adapter to PIA pin 9 and RXI on the FTDI adapter to the PIA pin 2, and the GND wire to any ETA-3400X signal ground. I was able to use those single pin dupont breadboard cables to do this without any soldering.

Low cost FTDI - USB serial adapter.

I installed Tera Term onto my PC, set the speed to 4800 baud, 8 data bits and 2 stop bits. I also set the baud rate jumpers on the ETA-3400X to 4800. I loaded the last saved version of ALTAIR 680 BASIC off the cassette which takes about 100 seconds. Now using the Fantom II monitor's Punch command I am able to send a Motorola S-REC file output of the BASIC ROM to the terminal port. 

MON> P 0000,1C00
S11300000D7600707E18F97E033C000D5046002CDE
S113001031302052454D2048454C4C4F20574F52CB
S11300204C4400FF0120BFFF0000F26E00300100CD
S11300303132330D0D00000000000000000000000C
S113004000000000000000000000000000000000AC
S11300500000000000000000222200FFFF0000005A
S113006000006500610B001AABFFEA607E03C70065
S113007080000000000000001BFD18F318F518F5BF
S113008018F51BFF3E7F00003E7FFFFF0000000AC3
S113009000000000000018F2009E8B0016FC7CFF9C
S11300A0BF00000000000000000000000000000B82
S11300B000006520000080000200001AAB1AB6039D
S11300C00030007E18FC1B0100FA001B001B001B03
S11300D000FB5826030000FEFF7E00000000000025
S11300E00000FC19FFFFFFFFFFFFFFFF031300E009
S11300F0C16F00CB1C00CEEEDEEEDEEEDEEEFF7C4A
.
.
.
S1131B00804FC7520000707E18F9847F7EF865000C
S1131B1003F878202008B00008FD1917000000FD24
S1131B2020303039393939000000000000804FC7B7
S1131B30520053A60028080101BD08AD0820E4396D
S1131B40FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA1
S1131B50F8FEDCDBFEFDEDDFFEDDEDC9D8FEFFD8CF
S1131B609FBC9DD8CEFBFBDACBDBCBEFFBFF8FDC3E
S1131B70FEDEBDFE0EDEFCFFEDCBFBF8FE1D8D9FF1
S1131B80FCFDCDEFFE9ED7DECCDFCBDEFFEDFCDB34
S1131B90EAFF7CCC9CDFFECE8DFFCFDE9EDFFEBF56
S1131BA0CFCEFEFBECDC88DE8BCFBCCEBFECDECE32
S1131BB0DAEF4FDFFBFBFDCC9DCCFCDE9FEFE8FEB4
S1131BC0AEDEDE9DCDEFDCFFDECFADCBDEDF9ECC27
S1131BD0FCDDC9DBBFEBFBAEEDEC8FEE8FFFCEAFD0
S1131BE0FFDBCDDBFE9F8DCECECFC8FDECDECFF884
S1131BF0A103F8A10320F8E40104220103F3191757
S1041C006877
S9
MON>

Punching the ROM out to the serial terminal port.

At 4800 baud with character delay of 0ms and line delay of 10ms this only takes 55 seconds. By using copy-paste I am able to copy this text and save it in a separate file and even add some header text to the file. This becomes the ALTAIR 680 BASIC ROM that will need to be loaded next time the ET-3400 and ETA-3400X is powered up.

To reload BASIC 680 from this file you use the Fantom II monitors Load from paper tape command which is just like the Load from cassette except that you use a parameter of 0. Then you copy the text out of the Motorola S-REC file and paste it into the terminal.

MON>L 0
S9041C006877F8A10320F8E40104220103F3191757
MON> R C=00 B=1B A=00 X=1B00 P=FB58 S=00D2 0F
MON>

Loading ALTAIR BASIC from the serial terminal port using L 0.

The 'S9' at the end of the S-REC file terminates the Load. To start ALTAIR 680 BASIC we just jump to address $0000 using MON>G 0 command then answer the BASIC questions. For maximum memory just hit <Enter> and BASIC will test RAM to find the top of RAM.

MON> G 0
MEMORY SIZE?
TERMINAL WIDTH? 80
WANT SIN-COS-TAN-ATN? Y

42156 BYTES FREE

MITS ALTAIR 680 BASIC VERSION 1.1 REV 3.2
COPYRIGHT 1976 BY MITS INC.

OK
?FRE(0)
-23392

OK

8K ALTAIR 680 BASIC up and running.

To load BASIC programs from the terminal you simply cut and paste them into the terminal window. In order to give time for BASIC to tokenise each line there needs to be an adequate delay between lines. In my case I had to use a value of 750ms for the line delay and 5ms was enough for the character delay. This means loading BASIC programs does slow down a fair bit.

We'll try the 3DPLOT program as it's pretty short.

1 PRINT TAB(32);"3D PLOT"
2 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
3 PRINT:PRINT:PRINT
5 DEF FNA(Z)=30*EXP(-Z*Z/100)
100 PRINT
110 FOR X=-30 TO 30 STEP 1.5
120 L=0
130 Y1=5*INT(SQR(900-X*X)/5)
140 FOR Y=Y1 TO -Y1 STEP -5
150 Z=INT(25+FNA(SQR(X*X+Y*Y))-.7*Y)
160 IF Z<=L THEN 190
170 L=Z
180 PRINT TAB(Z);"*";
190 NEXT Y
200 PRINT
210 NEXT X
300 END
RUN
                                3D PLOT
               CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY



                         *
                     *   *  *
                  *  *   *  *   *
              *   *  *   *  *   *  *
              *   *  *   *  *   *  *
              *   *  *   *  *   *  *
           *  *   *  *   *  *   *  *   *
           *  *   *   *  *   *  *  *   *
           *  *   *   *   *  *  *  *   *
       *   *  *   *    *  *   * *  *   *  *
       *   *  *    *   *    * *  * *   *  *
       *   *   *   *     *   *  **  *  *  *
       *   *   *    *      *    * * *  *  *
       *   *   *     *       *    * *  *  *
       *   *   *      *        *      **  *
       *   *    *       *         *       *
       *   *    *        *           *       *
       *   *     *         *            *        *
       *   *     *          *             *         *
       *   *     *          *               *         *
    *  *   *     *           *              *          *
       *   *     *          *               *         *
       *   *     *          *             *         *
       *   *     *         *            *        *
       *   *    *        *           *       *
       *   *    *       *         *       *
       *   *   *      *        *      **  *
       *   *   *     *       *    * *  *  *
       *   *   *    *      *    * * *  *  *
       *   *   *   *     *   *  **  *  *  *
       *   *  *    *   *    * *  * *   *  *
       *   *  *   *    *  *   * *  *   *  *
           *  *   *   *   *  *  *  *   *
           *  *   *   *  *   *  *  *   *
           *  *   *  *   *  *   *  *   *
              *   *  *   *  *   *  *
              *   *  *   *  *   *  *
              *   *  *   *  *   *  *
                  *  *   *  *   *
                     *   *  *
                         *
OK

All of the 101 BASIC Computer Games can be downloaded from various sites including:

https://deramp.com/downloads/altair/software/basic_programs/Games%20(Creative%20Comp)/

http://www.vintage-basic.net/games.html

Scans only: https://www.atariarchives.org/basicgames/

After trying several programs I found that some have to be edited slightly because of the maximum line length of 72 characters. This was normally easily solved by replacing the PRINT keyword with '?', which is a shorthand version of the PRINT command. Once it's LISTED back on the screen it will display PRINT as normal.

There was also several typo's or misinterpreted characters during OCR scanning in some of the downloaded programs, so I had to check my book and the scanned books on-line in order to verify the correct characters.

And lastly the game I've been waiting to try...


No comments:

Post a Comment

Part 2o: The future of the ETA-3400X

You can find all the work I've done on the ETA-3400X and 8K ALTAIR 680 BASIC, except for the ETA-3400X Gerber files, on the ET-3400 grou...