Since I started with Emma 02 I have come across different old tapes or cassettes with SW for miscellaneous 180x computers. Converting these tapes to binaries can be rather difficult, so on this page I have collected all my experiences and included links to pages including additional information.
First problem is to figure out what tape format is used or in other words what SW and what computer can actually 'read' the tape. If the label indicates a computer it is going to be easy, if not it can be rather cumbersome.
I think the first format designed by Joseph Weisbecker was the FRED 1 '5.2/6.2 Tone' format. This format uses tones with different frequencies to identify '1' or '0' values. A 5.2 KHz tones represents a '0' and 6.2 KHz tones represents a '1'. Every tone is 5 ms and is followed by a silence of 5 ms.
In February/March 1973 the FRED tape format was changed to the 'PM (Pulse Mode) System'. This format was introduced due to the fact that the 5.2/6.2 Tone format was rather slow and not reliable enough. The PM System uses 3.3 KHz tones and identifies '1' or '0' values based on number of cycles (or pulses). A '1' is represented as 5 cycles of the 3.3 KHz tone followed by a 1.2 ms silence and a '0' is represented as 2 pulses.
Both FRED tape formats used specific HW to handle the tape I/O. All 1802 computers that included tape support actually used the CDP1802 for the tape I/O via one of the EF flags for input and the Q flag for output. In this way by toggling the Q flag (to save data to the tape) and reading the EFx flag (to load data from the tape) any format could be used by changing the SW.
I believe the VIP format is likely the first 1802 format designed. You can find a detailed description on Herb Johnson's site: COSMAC VIP Cassette tape support. I have not investigated all details about the different formats as Emma 02 (by emulating the CDP1802) can read any of these formats as long as the original SW that was used to create the format is available and running. Again Herb has a very detailed description of different formats he has analysed on his site: Computer Data Cassette Formats.
Besides inspecting the format in a tool like audacity or listening to the sounds a trial and error approach could work in Emma 02.
Tapes to 'wav' files
Probably the most common way to convert tapes is to first generate a wav file by recording the sounds on a modern PC. I have to admit I have never actually done this myself but here is a short description by Dennis Heijmans from his COMX Club site.
When the wav file is created it needs to be converted to a binary file.
I find the easiest way to do this is to load the wav file into an emulator, my choice of emulators is of course Emma 02 but any emulator including tape I/O support could be used. For Emma 02 a signed 8 or 16 bit PCM wav file is required, any sampling rate is supported but I would recommend to keep it low (22 or 44KHz) to keep the file size smaller. Herb has advised to use high frequencies by using the treble tone control on the cassette recorder. I have also had best results with mono files. If you have any different format audacity will be able to convert it to PCM and mono.
In Emma 02 select the computer that you expect supports the generated wav files, start up the computer and use the tape features of that computer to load the wav file. The Emma 02 help pages describe the loading features for all emulated computers. This could be a BASIC PLOAD command in a COMX or some key combinations in the VIP.
Alternatively there are conversion programs available for specific tape formats, here are some that I know of:
- Andy Modla's FRED 2 PM System and VIP Format Extract-WAV-Data
- Elftools for ELf II and Super Elf formats
Tapes directly to/from Emma 02
In Emma 02 (windows and Linux versions only) it is possible to load a tape directly into the Emma 02 emulator or save directly to a tape. This feature is called 'Real Cassette Support'. To use the Real Cassette Support first make sure a tape player is connected to the audio in (line in or microphone) of the PC. Also check that the connection used is set as the default 'Recording' device in the windows 'Sound' control panel.
In the main Emma 02 window select the 'Disable / Enable real cassette loading' button (small cassette icon) to show a green 'v'. A green 'v' indicates real cassette loading is enabled, a red 'minus' indicates real cassette loading is disabled and wav file loading will be used instead. After starting the emulated computer, start the tape recorder and use the applicable load command on the emulated computer.
The input volume can be seen on the green and red 'vu meter'. Best results will be achieved if the vu meter does NOT go into red. If it does, lower the cassette player volume or audio input level (via the recording device properties in the windows sound control panel)
If loading does not work or gives tape errors, try changing one of the settings as described in the Real Cassette Settings chapter of the Emma 02 help pages.
If the tape or wav file is of good quality loading into Emma 02 should work more or less directly. However if not I have found these enhancing methods from Andy can be very useful:
- Use the audacity 'effect' options to normalise to remove DC offset and set maximum amplification level -4.0 dB.
If the WAV file has problems with low amplitude 2000 Hz high tones, do the following steps in Audacity.
A) After selecting the wave form, run the High pass filter at 2000 Hz with 6dB rolloff.
B) Next normalise the selection to remove DC offset and set maximum amplitude to 0 dB.
Herb explained to me that a primary feature of high-pass emphasis, is to eliminate zero-crossing errors from low-frequency 60Hz or "rumbling" from numerous sources.
Here is an example of a procedure I have used successfully to convert VIP wav files to binaries:
- Load 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 one of the game sounds, include most of the leading tone and some silence after the game sound. Here is an example where the white part is selected for export:
- 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 (the VIP should now show address ’0000’ and the value of that address)
- Press ‘B’ and then the number of pages you want to load. 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