Sarnoff Collection COSMAC tapes


Last edit Oct 5 2018. Edited by Herb Johnson, (c) Herb Johnson, except for content written by others, who hold their own copyrights. Contact Herb at www.retrotechnology.com, an email address is on that page..

Introduction:

From Feb 2018 forward, The Sarnoff Collection at TCNJ is processing its collection of RCA COSMAC audio cassette tapes, of COSMAC digital programs and related audio content. The purpose of this Web page, is to describe that digitizing and decoding process, and to reference methods used by other to decoding and evaluate the digitized WAV files, back to COSMAC programs, running on emulated COSMAC systems. Other Web pages put this work in context to other RCA COSMAC systems of the early to mid 1970's.

I have an earlier Web page, COSMAC coin-op arcade prototype, about Jan-Feb 2018 work on digitized COSMAC tapes from the Hagley Collection, and some sampled tapes from The Sarnoff Collection. These are audio-cassette recordings of binary programs, run on prototype or product COSMAC systems, developed at RCA in the 1970's.

A Web page prior to the coin-op recovery work as above, is on COSMAC FRED and cassette data storage. That page discusses details about work done from Dec 2017 to Feb 2018, on digitized WAV files of analog audio cassettes from the Hagley Library RCA collection. That Web page also describes and references "FRED 2" RCA COSMAC development systems.

This Web page is a document in progress, on Sarnoff work done from Feb 2018 forward. Some sections are preliminary information pending editing from further correspondence to me, or from online content. It will be updated as progress occurs. There may be errors and omissions. Please contact me if you the reader are aware of any of these deficits. Thank you. - Herb Johnson

Web links

Marcel van Tongren's EMMA 02 Web site
Andy Modla's COSMAC emulator github site
- video about using Audacity
- The extraction program

I have a Web page on audio cassette data storage on many vintage computers. There's links there to specific COSMAC system cassette-data methods.

These Web pages and their links provide historic and technical background on these COSMAC systems and others of the era, and their associated audio tape digital formats. - Herb Johnson

Sarnoff processing of COSMAC audio data tapes

First efforts

It was decided by the Sarnoff, to digitize their tapes with similar methods as used by the Hagley for their tapes: sampling at 32 bits, 96,000 samples a second, to produce WAV files. The Hagley produced a two-track audio file, but each track was almost identical data. It was concluded later, that it's not likely the original COSMAC tapes were recorded in stereo. The Sarnoff used a mono tape recorder/player; it's possible the Hagley used a stereo player and "saw" two channels from the single mono-recorded channel.

As Andy recalled later: "It is very possible some VIP board generated tapes have two channels, because I vaguely remember using a stereo Panasonic recorder, but I am not at all certain and may be confused its use with something else. I think I recall stereo tapes may have presented problems for VIP boards to read back into memory, I can't remember to be certain, and I think monophonic recorders were preferred."

Jan 25th - A tape marked "VIP" was played on a Panasonic recorder, a typical 1980's 90's portable audio cassette recorder with AC power suppply. Digitized by Jonathan Allen at Sarnoff, with a audio/USB dongle and a Mac laptop under Audacity software. Herb Johnson reviewed the WAV file produced. There's low and high frequency audio cycles; the highs are lower in amplitude and have a non-zero average value. HEre's an image of the tape marked "VIP special" and "VIP standard", digitized and discussed in late Jan 2018. Herb had some concern about the tape's MRX2 magnetic coating, a refined version of standard iron oxide; the difference may not be an issue.

It was found that the tape included voice annotations, to describe the recorded content per program. Andy did not recognize the voice on this particular tape. Other tapes in the collection were found to have voice annotations.

Herb examined the frequencies in use, under Audacity's spectral tool. the "pure tone" sections prior to data, appear to be 1925-1950 Hz. The following data sections, seem to have low tones of 700 Hz and sets of high tones at 1600, 1700 and 2100 Hz. There's also consistent frequency activity at 3000 and 3700 Hz. 700Hz and 1950Hz are reasonably consistent with standard VIP frequencies of 800Hz and 2000 Hz to represent 1's and 0's. Here's an Audacity image of the tape waveform.

high-pass filter to equalize 1 and 0 waveforms

Jan 29 from Andy Modla: "I downloaded the two WAV files and looked at them in Audacity Sound Editor. These two are VIP format encoded data. In general the digitized wave forms are noisy and the relevant waveforms have to be extracted and copied into a working file before decoding. The VIP format uses 2000 Hz for zero and 800 Hz for 1. The 800 Hz signal is normal amplitude, but many 2000 Hz signals are much lower in volume and sine waves sometimes do not cross zero (they are below zero crossing). I did not see this issue with the Hagley VIP formatted tapes." - Andy

Andy applied a high-pass filter under Audacity and was able to process a few of the program files as VIP-like encoding. After discussion, it was decided to boost high frequencies with the "tone" control on the Panasonic recorder, and digitize at higher volume without clipping the digitized audio. Meanwhile Andy resolved how to process the prior audio by a digital "high-pass" filter. Andy described this and other Audacity preparations for his decoding of WAV files. For future reference and education, here's the details.

analog and digital processing by Andy Modla

Jan 29-30, Andy Modla: "Using the Audacity Sound Editor, I found a new way to fix the wav file problem with high tones. After extracting the program segment I am interested in running, I create a new file, copy the selection and set sampling to 96000. After selecting the wave form again I run the high pass filter at 2000 Hz with 6dB rolloff. then I "normalize" the selection to remove dc offset and set amplitude to 0 dB. Save and export the selection as signed 8-bit PCM raw data (input to my extraction code tool). Now my extraction program is able to create the byte codes."

"In Audacity to save a signed 8-bit PCM raw file, you have to export your selection. Use File->Export->Export As WAV, then change "save as type" to other uncompressed files. Then pick raw (headerless) and signed 8-bit PCM data. And make sure the project rate is set to 96000 at bottom left corner of main window."

Andy said, "I would agree the digitization of the cassette tapes to WAV files should [continue to] be at 16 or better 32 bits floating point 96000 sampling rate for archival purposes. The reduction to 8 bit signed data is only needed for my byte conversion program tool." - Andy

Herb: Subesquent Sarnoff digitized tapes, played with maximum "tone" (hi-pass) and volume (no clipping of data tones), were processed by Andy without an Audacity high-pass filtering. Visual examination of the waveforms under Audacity, showed much less different in amplitude between low and high frequencies. The zero-crossing (zero average) behavior for low and high frequencies was more consistent.

When pressed for details, Andy said, Feb 6th: "I did not have to use high-pass filter on the most recent files, rather I only did an [Audacity] normalize and set amplitude -4 dB in one step. I had to change phase to get a nextraction to work at all, only one would work." Discussion of "phase" is below. All subsequent Sarnoff tapes were digitized without later high-pass filtering. - Herb

Phase differences among tapes

Feb 3 2018, Andy examined WAV files from two tapes as follows. One tape, one side was "(1) S.572 special.wav" A second tape with two sides were WAV files "(2) S.572.3 side a.wav" and "(3) S.572.3 side b.wav". Andy said, "All the files have 32 bit floating point WAV, 96000 encoding, good. Are these wav files from tapes that were digitized before? I tried to extract first programs on 1 and 3 only, because 2 seemed to be a test tape, not a game program as based on the [recorded human] voice note preceding a program.

After isolating the program data and normalizing it, I kept getting parity errors. Looking at the waveform the 0 bits were improved in amplitude, so it should have converted OK, but it did not. Then I discovered by changing the zero crossing algorithm to look at phase change I got the conversion to work. So the previous WAV files worked when looking for a wave form starting positive [amplitude]. These new files look 180 degrees out of phase, so looking for wave form starting negative worked. I wonder if this phase change depends on the original recording machine or the digital conversion to WAV files? I modified my binary conversion program code to take either phase encoding into account." - Andy

Andy is probably correct to identify the tape-player as establishing "phase". The RCA VIP notes, reference a need to reverse leads to the playback recorder's head, to reverse phase if needed for the VIP's tape-decoding algorithms. -Herb

Verifing binary results

The ultimate proof for the decoded binaries, was to run the programs in emulation. As some tapes were for COSMAC systems as prototypes (Studio 3, Studio 4, various FREDs), emulation is the only running option. Otherwise there's "checksums" in the data, and program binaries can be disassembled and code examined and compared with other COSMAC programs. Andy gave more details about his verifying efforts, past and present.

Andy, Feb 6, 2018: "A lot of the VIP games were published as hexadecimal listings for distribution and verification too. At that time I wrote all my Studio 2 and VIP code using a mainframe time-sharing system so I had listings and a storage repository until RCA distributed my work. Many others at the time used paper and pencil and then saved to tape and had listings printed for verification."

"Also I want to make clear about the checksum used in recording the tapes. There was no traditional checksum used over the entire byte sequences. The only error checking code was the parity bit for each byte. When we recorded tapes we recorded the same program twice in sequence to have a way to verify the code." - Andy

Herb confirmed the tape format with Andy on Feb 6: Herb - From my VIP cassette Web page, from RCA VIP documents: "Bytes always begin with a "1" start bit {S) followed by 8 data bits (0-7}, and end with a parity bit (P). Odd byte parity is used in this code." . Was that your result on these tapes? Andy - "Yes, Odd parity for VIP, even parity for FRED and Coin-Arcade tapes".

Analog and digital processing in EMMA 2

Mar 1 2018, Marcel van Tongeren: The process I use for VIP files [under EMMA 2] is as follows:

- Load [the stereo] wav file into audacity
- Change the wav to ‘mono’ by selecting the filename button just above ‘Mute | Solo’,
and select ’Split stereo to mono'; Close the ‘empty’ mono track
- Select first (or one of the) game sounds, note this should include the leading tone as well. Doesn’t need to be exact as long as it includes a good bit of the leading tone and a bit after the end of the game sound. Here is an example, white part is selected: [image] - Now export the select part to a new wav file, by selecting ‘File/Export/Export Selected Audio’, save as ‘WAV (Microsoft signed 16-bit PCM)’ - Start Emma 02
- Select the previously saved ‘wav’ filename in the Emma 02 VIP ‘Cassette’ field
- Start a VIP in System ROM mode (press ‘C’ while pressing F12 twice’)
- Press ‘0000' in the VIP as start address
(VIP should now show address ’0000’ and value of that address)
- Press ‘B’ and then the number of pages.

On tapes I have done so far, [some voice] mentions the number of pages before the game data. On the first tape [I entered into Emma] mostly ‘B3’. If you don’t know the number of pages, use ‘BF' and after the sound stops look in VIP memory to see how many pages were ‘loaded’, easy to see if you start a VIP with memory initialised to ‘zero’.

In the Emma 02 VIP window, select ‘Specify Location’, type start / end address depending on loaded number of pages (for B3, use 0-2FF), press ‘SAVE’. Specify file name and select either ’binary’ to save as a pure binary file or ‘intel hex’ to save as Intel hex format.

Marcel later added: ...depending on polarity of the sound in the WAV file, you need to change polarity in Emma 02 as well. I think Andy had the same issue as I read on Herb’s page. The first file I got from Flori worked with default polarity, however the S.572.2 wav files needed reversed polarity; only way to find out I think is trial and error. If the loaded file doesn’t run it is probably needed to reverse polarity. To change the polarity: Select Emma 02 menu ‘Settings / Wav File and Real Cassette Settings’ and select ‘Reversed Polarity’.

So far [these methods have] worked for all VIP files! I discovered I can’t save in the pure [ASCII hex COSMAC] text format in Emma 02, I can load those files but not save them. When I finalise the first tape I will store the results and start on a README [description of the contents]. - Marcel

Marcel added: "I think a very interesting comment on Emma 02, is that it is actually able to load tapes directly! I’m very proud of that feature as I haven’t seen it in any other emulator [I've come across]. So you can hook up a REAL tape player to a PC, set Emma 02 in ‘Real Cassette’ mode. Start a [EMMA simulated] computer (like the VIP), press play on the actual player and Bob’s your uncle! Almost like the real thing :). This doesn’t work on OS X, works on Windows and I think Linux. As with the whole wav conversion thing it can be a bit cumbersome, like if the volume isn’t ‘right' it might not load, if polarity is switched it won’t work etc. Still I have converted tapes this way ..." - Marcel

non-VIP format

As Marcel processed the Sarnoff tape archives, he found many tapes were not in VIP format. I discussed with him, how his EMMA 02 emulator could read and write actual audio files, in mid-March 2018. "The VIP, MS2000, MCDS, COMX etc, all have fairly basic tape hardware. Q for out and one of the EFs for in. Emma 02 does the timing like a real computer (well, fairly close I hope). It then reads a WAV file and depending on wave up or down it sets the EF. So the VIP ROM and others, just read the EF flag as set by Emma 02. This is indeed not perfect: I have two methods, one to switch EF on upward or downward wave, the default I believe is on a value. High is one; low is zero, if I remember correct....

"Sampling rate is stored in the WAV file. I use that to calculate the speed Emma 02 uses in ‘reading’ the file. Possibly not all rates are supported and also just PCM format is supported. I thought stereo worked but with the latest WAVs I had to first change them to mono. I think the above is generally used in other emulators. The only thing I have not seen on other emulator,s is the real tape connection that I mentioned a while back.

"I also do the other way around and generate WAV files based on Q switching. The result is very different from a WAV created from a tape as I generate ‘too clean' waves. Still I have managed to load those files into real machines. But not always successful." - Marcel van Tongeren.

On FRED emulation in EMMA 02

So I (Herb) looked over the various documentation available for the FRED-like COSMAC computers. The "FREDs" have some complicated hardware for cassette. The hardware logic, is capturing single cycles to represent 1's and 0's, and building bytes from the serial data., I actually see shift registers and parity circuits and DMA circuits!

In response to Marcel's description of EMMA 02's handling of VIP decoding, "How can you can emulate FRED-type audio without deep hardware knowledge? Marcel responded: "Ok, I don’t know about details of the Fred tape hardware. If it does something special then yes I would need to know and emulate it."

So, by June 2018, Marcel has a preliminary version of EMMA 02 which supports the FRED 2 hardware. It operates on a number of Sarnoff Collection tapes. That is, the emulator reads those audio files and decodes the program data and voices from them. On June 12, he reported as follows.

June 2018, Marcel: "Found some other interesting stuff on the [Sarnoff Collection] tapes, tapes [numbered] 41, 49 and 60. I think there are more. These include games like Acey Duecy, Bowling, Space War, Spot Speedway and Life. All of them did NOT run on my FRED emulator when emulating an 1801. My first thought was they might be 'newer' and as such were using an 1802, still however no luck. With the 1802 I also noticed the use of the BQ branch which I [thought] was not really intended.

"Then I remembered the System 00 CPU, had a look in one of Kevin's [document] scans and afterwards into the System 00 manual linked from Herb's page. I did a fairly quick implementation of the instruction set (rather similar to the 1801 but with some clear differences: one being 0x31 BQ in 1801 and 0x31 BNZ in System 00). Ran some of the games and yes, they run fairly 'ok'. Still some work to be done to get them working properly; I think mainly key handling. I'm not 100% sure they are necessarily using the exact System 00 instruction set but so far it works." - Marcel

recovery of binaries and audio by COSMAC-type

Marcel, with technical help from Herb Johnson and others, and from prior COSMAC tape work, and from original RCA documentation - decyphered both the processor instruction sets and the various perior implementations of what became "CHIP-8". Then he reviewed the multiple binaries produced from the various Sarnoff tapes, and selected best-representatives of each program by each type of COSMAC (FREDs, Studio series, System 00, etc.) and supported pseudo-language (CARDTRAN, FPL, CHIP-8). He created in the following months, an archive folder of these binaries by COSMAC. When Herb Johnson pointed out the audio voice and sound were not part of those binaries, Marcel added WAV files.

By September 2018, those binaries and WAV files were part of Marcel's next EMMA 02 emulator support, available from his EMMA 02 site by October 2018. His site describes the hardware and CHIP-8 varients, the binaries are part of his emulator distribution, and the WAV files are an optional download (to reduce the size of the EMMA 02 distribution). Marcel covers his cassette work, with his own Web page on "tape conversion".

Sarnoff Collection COSMAC tape collection and archive

[Sarnoff digitizing]

note: edited portions in []'s were added for clarity - Herb

Florencia Pierri, Curator of the Sarnoff Collection at TCNJ, Feb 6 2018:

Hi Herb and Andy,

Thank you both for your help in this. Since you were able to get some data, Andy, I'll go ahead and digitize the rest of the tapes using this method, and make all the files (with the appropriate metadata and catalog information) available on Google Drive for you or anyone else to use. Like with the Hagley, we only ask that you follow proper citation protocol when if/when you do end up using the data.

Andy, I know that you have limited time, so I really do thank you for your help in advising us in the digitization process. I know that you did post the Extraction WAV Data tool on Github, but unfortunately, the Sarnoff doesn't have a single full time staff member [to operate your program tool], which is why I kept on pestering you with new files to look at. Hopefully, what we will digitize next week will be of some use to you and others. - Best, Flori

Recommended citation for use, commentary

These files come from data tapes at The Sarnoff Collection at The College of New Jersey (davidsarnoff.tcnj.edu), and are part of the Weisbecker Collection at the Sarnoff. These files are provided for non-commercial purposes, and you are free to use and adapt these files as long as you provide a proper citation that includes the item's [origin and] accession number (for example, The Sarnoff Collection at TCNJ, S.572.24).

...Email Sarnoff curator Florencia Pierri with any questions or comments. With thanks to Herb Johnson and Jonathan Allen for technical support and hardware loans, Andy Modla for technical support, and Leighton Heisey for cataloging help.

- from the Feb 26 2018 README in the Sarnoff Collection tape archive under development.

Digitization and processing

Herb: Throughout February and March of 2018, the Collection cataloged and digitized COSMAC produced tapes. Andy Modla, Herb Johnson, Marcel van Tongeren of the "Emma 2" COSMAC emulator, and Ed Keefe, continued to review and extract binaries from some of the resulting WAV files. Herb and Flori reviewed the data-quality of the WAV files; Herb transscribed some voiced portions. We are also annotating the WAV files with descriptions of the physical tapes and notes about the content.

[Sarnoff digitizing]

In February 2018, Flori discussed her plans for the Collection's COSMAC tapes. Flori Pierri, Feb 22nd: "We're finally getting things ready with the Weisbecker tapes. We've come up with an updated catalog, and we've begun to digitize the tapes, and already have a few of them done. There is some bad news-- not all of the tapes have data on them (this includes one of the Studio IV tapes that Andy was interested in), and at least one of the cassettes has a broken tape which makes it unplayable, and there might be more with this problem. But, I did find more tapes when I was looking for something else, so we have a total of 95 Weisbecker-related tapes, all of which have been [physically] cataloged.

My plan is to digitize them all in [catalogged] numerical order using the standard that we developed in conjunction with Andy Modla, Herb Johnson, and Jonathan Allen. I hope that these files are useful to some of you, and I hope that if you come across anyone that might find these files useful that you get them in touch with me, and I can share the link to the Google Drive folder with them. While we're releasing these files to the public - because we do want our collection to be of use to the general public - we would still like to know who's using them and for what purpose, so I would appreciate you not sending the files to others.

Please let me know if there are any problems with the files (I'm uploading the audacity and the .wav files), or with any other questions/comments. - All best, Flori

Herb: It was later decided that the Audacity files were unnecessary, and are as big as the WAV files; so they will not be retained. Also, some files we digitized as two audio tracks, but as the tapes are monophonic only one digital track has data. For very large digital files, that non-data track was deleted to save space. In further discussion among the participants, we developed ways to document information about the decoded binary programs and their content. These may or may not be carried in the Collection's archives; they will likely be available in other binary archives. This is work in progress. - Herb Johnson

By mid-March 2018, most of about 100 tapes had been digitized; some tapes were broken or unwound from their reel and will be repaired at a later time. Some of the tapes' binaries have been decoded; so discussion turned to how, or who would, decode the remainder, based on their analog format and their content. Flori and Herb started repairs in early May 2018, when splicing tape and empty cassettes arrived at the Collection. Repairs succeeded and by June only a few tapes remain to be digitized and cataloged. - Herb

Visit by Joyce Weisbecker

[Sarnoff digitizing]

I [Herb] happened to be at the Collection in early March 2018, when Joyce Weisbecker, Joe's daughter and the first contracted-for video game programmer, stopped by. It happened Flori was digitizing a tape containing an adult female voice, narrating a FRED demo. "Yep, that's Mom," said Joyce. Jean Ann Weisbecker was her mother, and she narrated tape number 53 in the tape archive, "FRED 2 Demo". Joyce is in this photo, but she's holding another tape.


Contact information:
Herb Johnson
New Jersey, USA
To email @ me, see
see my home Web page.

This page and edited content and photos is copyright Herb Johnson (c) 2018 unless noted. Copyright of other contents beyond brief quotes, is held by authors of that content. Contact Herb at www.retrotechnology.com, an email address is available on that page..