Sound, ELIZA and bug-fixes

A project log for DL1416SmarTerm LED Computer/Terminal

Old and new come together for an old school intelligent terminal.

Dan JulioDan Julio 02/10/2018 at 21:350 Comments

An opportunity to show the computer in a local maker show provided incentive to make some changes.  All code and documentation changes are in the github repository.  I finally finished adding sound capability by using the Teensy Audio library to provide three new Tiny Basic commands: DRUM, NOTE and WAV.  DRUM and NOTE use the 'drum' and 'waveform' library functions and WAV allows playback of a 44.1 kHz .wav file loaded from the SD-Card.  WAV playback occurs in the background allowing the program to continue.  The PLAYING? command allows a program to see if a wav file is currently being played.  In addition a few bugs were fixed, UPDIR and DNDIR were made to be operable inside a program (to make it possible to store sounds in a different directory than the Tiny Basic program was run from) and Autorun functionality was enabled (Tiny Basic will execute a file called "AUTORUN.BAS" if it exists when it boots).

I also added a bottom panel with speaker connected to the internal LM380-based amplifier connected to the Teensy DAC output.

I toyed with the idea of leaving a Raspberry Pi connected to the terminal input but figured that was asking for trouble in a public installation.  Since the exhibit was stressing the "retro" nature of this computer I had the idea of running ELIZA and after exploring a bunch of ways of getting it running settled on porting the Creative Computing BASIC version (listed included here in files section) of it to C running directly on the Teensy replacing the Terminal's serial communication.  In effect, the terminal is connected to a process running Eliza.  

The code can now be compiled with the "DEMO_MODE" compiler directive to include Eliza.

Perhaps the C port of Eliza might be amusing to include in your own project.  It should be fairly easy to adapt by providing your own versions of the TB_TX_AVAIL, POP_TB_TX, TX_RX_FULL and PUSH_TB_RX macros.