Goto 10 Retro - 03 Dec 2026
I listened to an Antic interview with Mark Barton, the creator of S.A.M., Software Automatic Mouth, and it's one of Antic's more interesting ones, because he revealed that he also created MacinTalk, the speech synthesis software that shipped with the first Macintosh (in fact, the one that was "speaking" when the Mac was unveiled). He went on to say that he ported the Mac speech software to become Narrator on the Amiga, and Steve Jobs was completely fine with that.
There's a video playing both classic Mac and Amiga speech synthesis, asking, "Which sounds better?", which is a trick question, because unless you're comparing the quality of the sound chips, they're going to sound exactly the same.
Around the same time, I saw a video called, "Steamed Hams but it's voiced entirely by Amiga 500's text to speech function".
This was yet another video playing around with the "Steamed Hams" skit from "The Simpsons." For those interested, there are a ton of these "Steamed Hams" videos on YouTube.
I got curious about comparing S.A.M. to this Amiga video (I'll call it), and so I got going on learning how to use S.A.M. on an emulated Atari 800. I wrote an Atari Basic program to reproduce the dialogue for "Steamed Hams." I tried to reproduce some of the oddities in the Amiga video. The result turned out to have much the same speech quirks, as well. Though, the sound quality on the Amiga is, of course, better.
I used a library supplied on the S.A.M. disk, called RECITER. It's S.A.M.'s text-to-speech translator. It takes plain text and converts it. To use it, you put what you want into a string in Atari Basic called SAM$, and then call the Reciter library with USR(8199). Reciter looks for this string variable in Basic's variable table of contents, and translates whatever is in it (so, there's no need to pass the address to it in the USR() call). The speed of the speech, and its tone are set with pokes.
My first attempt at this program used a linear approach, using a line of code to put a string literal into SAM$, and then making the USR() call, then another line creating a wait loop; then another line doing the same thing, with another assignment statement, and another USR() call. This approach went badly. Trying to make changes to fix synching problems this way was a headache.
After some trial and error, I hit on the idea of creating a simple engine to drive the speech.
The system I came up with reads DATA statements that contain the following sequence for each "utterance":
a delay value "before speaking"
a "tone" value (for the pitch of the speech)
a value for how fast it should be spoken
the text of the speech
I put this into a loop that stops when it sees an "END" command in the data.
I did some experiments with wait loops, to see how long one would need to be to wait 1 second. I could then take this standard "wait" value and multiply it by a factor, which is in my "delay" parameter in the DATA statements.
To make things easier on myself, I had the loop look for an "E" command to end a speech parameter set. Some pieces of dialogue were longer than I could put into a single DATA statement (and I had no need to change any of the other paramaters), and so I needed to extend the speech string into another DATA statement. Once it read a piece of dialogue, it looked for another piece of dialogue to add. If it saw an "E", instead, it would "speak" what it had in its buffer, and then "reset" to start reading another speech parameter set.
This approach of using an "engine" vastly simplified my thought process on synching the speech with the video, and allowed me to get the project done a lot faster.
I also downloaded the "Steamed Hams" video, so I could load it into a video editor, look at the timeline, see the speed of dialogue, and the delays between utterances, so I could accurately time these in my program.
Once I was satisfied that I got the video and audio from the program synched well enough, I used QuickTime to record just the audio of S.A.M. (I'm a Mac user), and then replaced the audio in the downloaded video with the S.A.M. audio, in iMovie (the video imagery is completely unedited).
Given the instructions in the manual, I expected that this program would only work on an Atari 800, but I've tested it on an emulated 800XL, and 130XE, and it still works.
I've included the program listing below.
To prevent the screen from blinking on and off (S.A.M. turns the screen off while "speaking"), I just went ahead and turned the screen off at the start, and then back on when the skit is done.
The way I played the program together with the video was I had the skit video paused at the start, and I had everything set up in my emulator, with a "RUN" command typed out in Basic. I would hit "Play" on the video (with its sound off), and then quickly click over to my emulator, and hit Return, right before Chalmers pressed the doorbell at Skinner's house.
10 DIM SAM$(255),SAY$(114):SEC=400 20 RESTORE 150 30 POKE 559,0 40 READ DELAY,TONE,SPEED,SAY$ 50 IF SAY$="END" THEN 130 60 SAM$=SAY$ 70 READ SAY$ 80 L=LEN(SAM$) 90 IF SAY$<>"E" THEN SAM$(L+1)=" ":SAM$(L+2)=SAY$:GOTO 70 100 IF DELAY>0 THEN FOR I=1 TO SEC*DELAY:NEXT I 110 POKE 8209,TONE:POKE 8208,SPEED:A=USR(8199) 120 GOTO 40 130 POKE 559,34:END 140 REM delay before speech, tone, speed, speech, E 150 DATA 0.5,20,72,DING DONG,E 160 DATA 1.5,80,72,CLICK,E 170 DATA 0,70,72,WELL SEYMOUR I MADE IT DESPITE YOUR DIRECTIONS,E 180 DATA 0,64,30,AH SUPERINTENDENT CHALMERS! WELCOME!,E 190 DATA 0,64,35,I HOPE YOU'RE PREPARED FOR AN UNFORGETTABLE LUNCHEON.,E 200 DATA 0,70,72,AAAHH,E 210 DATA 1.9,80,72,BONK,E 220 DATA 1.8,64,72,OHH!,E 230 DATA 1.4,64,72,OH EGADS! MY ROAST IS RUINED!,E 240 DATA 1.9,64,72,BUT WHAT IF.,E 250 DATA 0.9,64,55,I WERE TO PURCHASE FAST FOOD AND DISGUISE IT AS MY OWN COOKING?,E 260 DATA 0.6,64,30,OH HO HO HO HO HO!,E 270 DATA 0,64,69,DELIGHTFULLY DEVILISH SEYMOUR.,E 280 DATA 1.7,80,72,BONK,E 290 DATA 0.5,40,72,AH!!,E 300 DATA 1,40,65,SKINNER WITH HIS CRAZY EXPLANATIONS. THE SUPERINTENDENT'S GONNA NEED HIS MEDICATION. 310 DATA WHEN HE HEARS SKINNER'S LAME EXPLANATIONS. THERE'LL BE TROUBLE IN TOWN TONIGHT.,E 320 DATA 0.1,55,72,SEEEEEEEEYMOOOR!!,E 330 DATA 0,64,40,SUPERINTENDENT! I WAS JUST UH,E 340 DATA 0,64,30,JUST STRETCHING MY CALVES ON THE WINDOWSILL. ISOMETRIC EXERCISE! CARE TO JOIN ME?,E 350 DATA 0,70,45,WHY IS THERE SMOKE COMING OUT OF YOUR OVEN SEYMOUR?,E 360 DATA 0.4,64,55,UH OH! THAT ISN'T SMOKE. IT'S STEAM. STEAM FROM THE STEAMED CLAMS WE'RE HAVING. 370 DATA EMEMEMEMEM. STEAMED CLAMS!,E 380 DATA 0.9,80,72,BONK,E 390 DATA 0.2,64,80,WHEW.,E 400 DATA 1.2,30,72,BOOP BOOP BOOP BOOP,E 410 DATA 1,80,72,BONK,E 420 DATA 0,64,30,SUPERINTENDENT I HOPE YOU'RE READY FOR MOUTH-WATERING HAMBURGERS.,E 430 DATA 0,70,72,I THOUGHT WE WERE HAVING STEAMED CLAMS.,E 440 DATA 0,64,55,D'OH NO. I SAID STEAMED HAMS! THAT'S WHAT I CALL HAMBURGERS.,E 450 DATA 0,70,40,YOU CALL HAMBURGERS "STEAMED HAMS"?,E 460 DATA 0,64,50,YES! IT'S A REGIONAL DIALECT.,E 470 DATA 0,70,70,UH-HUH. UH, WHAT REGION?,E 480 DATA 0,64,50,UUH UPSTATE NEW YORK.,E 490 DATA 0,70,70,REALLY.,E 500 DATA 0,70,35,WELL I'M FROM UTICA AND I'VE NEVER HEARD ANYONE USE THE PHRASE "STEAMED HAMS".,E 510 DATA 0,64,40,OH NOT IN UTICA. NO IT'S AN ALBANY EXPRESSION.,E 520 DATA 0,70,72,I SEE.,E 530 DATA 1,80,72,MUNCH MUNCH,E 540 DATA 0,70,30,YOU KNOW THESE HAMBURGERS ARE QUITE SIMILAR TO THE ONES THEY HAVE AT KRUSTY BURGER.,E 550 DATA 0,64,64,B'OH HO HO HO NO! PATENTED SKINNER BURGERS. OLD FAMILY RECIPE!,E 560 DATA 1,70,60,FOR STEAMED HAMS?,E 570 DATA 1,64,50,YES.,E 580 DATA 0,70,45,YES AND YOU CALL THEM STEAMED HAMES DESPITE THE FACT THAT THEY ARE OBVIOUSLY GRILLED.,E 590 DATA 3.3,64,30,YE. YOU KNOW TH.,E 600 DATA 2.3,64,50,ONE THING I SH.,E 610 DATA 1.5,64,50,'SCUSE ME FOR ONE SECOND.,E 620 DATA 0,70,60,MEH OF COURSE.,E 630 DATA 1,80,72,BONK,E 640 DATA 0,64,72,AAAAAAAAHHH.,E 650 DATA 0,64,40,WELL THAT WAS WONDERFUL. GOOD TIME WAS HAD BY ALL. I'M POOPED.,E 660 DATA 0,70,60,YES I SHOULD BE,E 670 DATA 0,50,70,GOOD LORD! WHAT IS HAPPENING IN THERE?,E 680 DATA 0,64,60,AURORA BOREALIS.,E 690 DATA 0,50,50,AH!,E 700 DATA 0.5,50,60,AURORA BOREALIS? AT THIS TIME OF YEAR! AT THIS TIME OF DAY! 710 DATA IN THIS PART OF THE COUNTRY!LOCALIZED ENTIRELY WITHIN YOUR KITCHEN?,E 720 DATA 0,64,72,YES.,E 730 DATA 1.5,70,60,MAY I SEE IT?,E 740 DATA 1.8,64,60,NO.,E 750 DATA 0,80,72,BONK,E 760 DATA 0,40,72,SEYMOUR! THE HOUSE IS ON FIRE!,E 770 DATA 0,60,40,NO MOTHER. IT'S JUST THE NORTHERN LIGHTS.,E 780 DATA 0,70,50,WELL SEYMOUR. YOU ARE AN ODD FELLOW. BUT I MUST SAY. YOU STEAM A GOOD HAM.,E 790 DATA 3.8,40,72,HEEEEEEELP! HEEEEEEEEEELP!!!,E 800 DATA 0,0,0,END
Setting up S.A.M. to be useable was a process. The directions in the manual said you needed to format a blank disk. You did this by booting your Atari with a standard DOS 2.0S boot disk (this is the only DOS version that is compatible with S.A.M.), and formatting the blank disk with that.
The manual explicitly says you should not do any of this with a booted S.A.M. disk, as the DOS on it is patched to load S.A.M. in a certain way.
Using the standard DOS 2.0S menu, you then write DOS files to your formatted disk. It then said to replace the DOS 2.0S disk with the S.A.M. disk in Drive 1, and to use the "O" option to Duplicate File, with the filespec "*.*" to copy all the files on the S.A.M. disk onto your disk (minus the S.A.M. program) (it said using "J" to Duplicate Disk would not have the desired effect). After this, the disk you're setting up should be in Drive 1. It said to use "N" to write MEM.SAV to it.
You do not need to do the above to run the Steamed Hams program. I've supplied a configured disk for it below. You still need the original S.A.M. disk, though.
Running the program is also a process, because it's necessary to load the RECITER library beforehand.
Here are the disks you need:
S.A.M. disk atr
Steamed Hams disk atr
Here are the steps:
Boot your Atari with the original S.A.M. disk, with the Atari Basic cartridge inserted (or Atari Basic enabled, if on XL/XE)
Replace the S.A.M. disk with the Steamed Hams disk, in Drive 1
Type "DOS", and press Return
Select "L", and press Return (for Binary Load), and type: D:RECITER, and press Return
Select "B" to Run Cartridge, press Return
Type (in Basic) LOAD "D:STMDHAMS", and press Return
Now, type R-U-N in Basic, but don't press Return yet. Bring up your "Steamed Hams" video, turn its sound off, press Play on the video, hit Return on your Atari (just before Chalmers presses the doorbell), and enjoy! :)
More Goto 10 Retro | Headlines
Original: https://www.goto10retro.com/p/steamed-hams-on-the-atari-8-bit