QUEST Super ELF, ELF II Cassette tape support

This document last edited Dec 15 2012

QUEST Super ELF Tape Interface

Image taken from both the article below and from the Quest Super ELF documentation. Extracted and edited by Herb Johnson Dec 2012. A copy of this document can be found in the files archives at the Yahoo group "cosmacelf" as of 2012. See the linked document for discussion of audio tape cassette formats. - Herb Johnson

The following emailed note accompanied some of the Quest Super ELF documentation on the cosmacelf site. Quote: "All information regarding the Super Elf developed and copyrighted by Quest Electronics is hereby released to the public domain for noncommercial use only. No commercial use of this software and related material including manuals and applications is permitted without the express written consent of Quest Electronics. - Roger Pitkin 11/12/10" - end quote

[superelf tape image]

Super ELF Cassette Format

"Super ELF Cassette Format" article from Questdata COSMAC Club magazine, pages 13-14. A copy of this document can be found in the files archives at the Yahoo group "cosmacelf" as of 2012. OCR'd by Herb Johnson Dec 2012.Here's the original document. I do not know if the content below was produced by Quest Electronics and therefore is subject to the copyright statement above. - Herb

The Super Elf Super Monitor and Super Basic use the following cassette format.

This approach allows automatic loading into memory since the starting address is on the tape. A test can be made to see if there is enough space in memory for the file prior to loading because the file also contains the mmmber of bytes. Each byte includes a parity bit which is used for error checking. The rate of recording and playback is apprmclmately 1200 bytes per second with a 1.79 MHz clock. Reliable operation has been achieved (with a recommended recorder) at 2000 bytes per second using a 3.0 MHz clock.

The read software used ln the Super Monitor and Super Basic allows starting the recorder with the cassette fully rewound. The plastic leader/tape splice does not cause problems and it is not necessary to advance the cassette past the leader prior to starting In fact there are no level adjustments or tape positioning required (when using one of the recommended recorders). Just load, set volume and tone to max and go. This format is self clocking and insensitive to speed variations of over +/-15%.

The Format Consists of:
1. A 10 second leader of all 'ones' terminated with a zero bit.
2. Data bytes.
3. A 5 sec trailer of all 'zeros'.

The Data Section Consists of:
1. Starting address 2 bytes Hi/Low. (0000 TO FFFF HEX)
2. Number of bytes 2 bytes Hi/low. (0000 TO FF00 HEX)
3. Data bytes 8 bits with the most significant (MSB) first with an added parity bit. (For a total of 9 bits). Even parity is used, i.e. the sum of the ones in the data plus the parity bit is always an even mumber.

DATA 0111 01 01 PARlTY=1 (6 '1's)
DATA 0011 00 11 PAR1TY=0 (4 '1's)

A bit is defined as a high level followed by and equal length low level. A zero bit is three times the length of a one bit. The end of a bit is the beginning of the next bit.

The following bit times are for a 1.79 MHz clock. The effects of other clock frequencies are discussed later.

1. A ONE bit has a 206 microsec ON time and a 609 to 627 microsec OFF time.
2. A ZERO bit has a 618 microsec ON time and a 609 to 627 microsec OFF time. See the comment below.

The standard Super Elf with a 1.79 MHz clock and either Super Basic or the Super Monitor uses this format. If your system uses a different clock frequency, make the following changes to

For Different Clock rates, Solve this equation: VALUE = 8 X clock rate in MHz - 1.3

Round off VALUE, convert to hexadecimal and patch into location 8193 in the Super Monitor Vl.1 or 2.0; and location 2947 in Super Basic 1.4; QKOC is the location in the cassette read routine.

Super Elf owners may ignore this section. Non Super Elf owners must use the listed cassette read routine and may need to use the schematic for read hardware. Elf II owners usually can successfully read with their own hardware. The following table lists the changes required for the different sense lines.

     EF1 EF2 EF3 EF4
QKl6   34 35 36 37
QK1D   3C 3D 3E 3F
QK2C   3C 3D 3E 3F
QK41   34 35 36 37
QK48   3C 3D 3E 3F
QK53   3C 3D 3E 3F

Where QK is the Quarter K of memory in which the cassette read routine is loaded. NOTE: Do not load the read routine in a page which will be written into by the read routine.

If you have trouble reading you may have the signal inverted (all recorders are not the same even the same brand and model). This software usually but not always accepts either normal or inverted data, it depends upon the amount of distortion introduced by the recorder. The following table inverts the data.

     EF1 EF2 EF3 EF4
QKI6 3C 3D 3E 3F
QK1D 34 35 36 37
QK2C 34 35 36 37
QK41 3C 3D 3E 3F
QK48 34 35 36 37
QK53 34 35 36 37

To use the cassette read routine (non Super Elf owners only), follow the following instructions.

1. Load program per this load listing. QK refers to your page of memory where you want the program to reside:

2. Branch into the program from register O into location QK00. If you wish to branch into the program from any other register (but not register 2 or 5) then change the "90" instruction at location QK00 to "9P" where P ls the same as the register designation which you are using. Then branch into QK00.

3. After starting the program, load the cassette at the beginning, start recorder in playback with maximum volume and treble on the tone control. There is a 10 second leader and then the low address of the current location of memory being loaded off the cassette will be displayed. The rate is about 1200 baud. At the end of loading, an "AA" will show up on the display (If you have a hex display at output port 64).

4. If a parity error is detected, an "EE" will be displayed (on the hex display). Check the program for Loading errors and try re-running the playback. Also check your hardware setup. Future articlw will be discussed:

a. The Elf II format and how non Elf II owners can read Elf II cassettes.

b. The Super Elf write/read software source listings.

QK00 90B3 E2B5 B2F8 72A2 F812 A5F8 0D86 F83E
QKIO A3D3 F808 A6A7 3616 96FF 013B 223E 1927
QK2O 302E F800 FC01 3B2C F8EE 306F 3E24 8632
QK3O 3797 7EB7 2630 1687 F633 2897 3O11 F8OA
QK40 B436 4196 FFO1 3B5O 3E44 9432 4124 3041
QKBO 943A 3E3E 53D5 B8D5 A8D5 B9D5 A929 99FC
QK60 01B9 D558 8852 6422 1B29 993A 62F8 AA52
QK70 6400

Commentary on Super ELF cassette

Richard cpd1861 posted in cosmacelf on Dec 2:

"1. A ONE bit has a 206 microsec ON time and a 609 to 627 microsec OFF time."

"I think the 609 to 627 microsecond OFF time is wrong. It should probably be similar to the 206 microsecond ON time, judging from what I see in the WAV files. But I would like to confirm this by looking at a recording that definitely comes from a Super Elf." - Richard

Elf II cassette standards

[giant board cassette schematic]

Chris Wardell posted in cosmacelf on Dec 2012: "The cosmacelf files section contains a "Giant Board HTML" folder that has the Netronics documentation for the [Neutronics brand] "Giant Board" which is [the add-on board which] added cassette I/O to the ELF II. You will find the schematic which includes the cassette circuits and the binary code for the monitor program that includes cassette read and write routines." Currently that link is . More information was founds at at an ELF archive at this Web link. The ELF II schematic there suggests the ELF II ran the 1802 at 1/2 the 3.58MHz crystal in use. Since 1802 instruction time determines cassete timing, this is important.

One of those documents (the HTML document) describes the cassette as follows: "CASSETTE: Serial data transfer from the processor to a cassette tape utilizes the Q output on the 1802. A program located in the ROM A10 will set and reset the Q producing signals similar to the Kansas City standard. It is important whether or not your tape recorder inverts the polarity of the output compared to the input signal. This is not important for music, but is extremely important when transferring data. Most of the machines we have checked do not invert the data. However, we have heard reports that even the same brand may change from run to run. It is largely a function of the tape head connections." Either "connect J1 and J3 leaving J2 open"; or "disconnect J1 and J3, and connect J2".

Monitor source code says "Netronics ELF II monitor program from the Giant board...based on the Popular Electronics EHOP and ETOP monitor programs published in the original COSMAC ELF articles." A snip of the write code, slightly modified by me for clarity, is below. Entry to the routine is at WRITE+1, the SEP R3 amounts to an 1802 "return" from subroutine. LIkewise entry to the READ routine is at READ+2 (or RE2), return at READ. If I'm correct, this VIC II 1802 is clocked at 1.79MHz, or .559 microseconds per clock, or 4.47 microseconds per instruction/memory cycle of 8 clocks. MOst 1802 instructions take 2 instruction/memory cycles.

000303 0064                  ;  WRITE - Write data to the cassette tape
000304 0064                  ;
000305 0064                  ;   DF=0, write a 0 to the tape
000306 0064                  ;   DF=1, write a 1 to the tape
000307 0064                  ;
000308 0064 D3               WRITE:  SEP R3              ; (return) Modulate the Q line to write 1's & 0's on tape
000309 0065 7B                       SEQ                 ;  (entry)   Shorter pulse widths are 0's
000310 0066 F81D                     LDI H'1D            ;   Longer pulse widths are 1's
000311 0068 3B6D                     BNF WR9
000312 006A F807                     LDI 7
000313 006C 1D                       INC RD
000314 006D 52               WR9:    STR R2
000315 006E FF01             WR10:   SMI 1
000316 0070 336E                     BDF WR10
000317 0072 3964                     BNQ WRITE		;amounts to "return" branch
000318 0074 7A                       REQ
000319 0075 02                       LDN R2
000320 0076 306E                     BR  WR10 

000391 00B8                  ; READ - Read data from the cassette tape
000392 00B8                  ;
000393 00B8 1D               READ:   INC RD
000394 00B9 D3               RE1:    SEP R3              ; (return point)
000395 00BA F80D             RE2:    LDI H'0D            ; (entry point)
000396 00BC 35BC                     B2  *               ; Wait for *EF2 to go low
000397 00BE 35B8             RE6:    B2  READ            ; Return if *EF2 is low
000398 00C0 FF01                     SMI 1
000399 00C2 33BE                     BDF RE6
000400 00C4 3DC4                     BN2 *               ; Wait for *EF2 to go high
000401 00C6 30B9                     BR  RE1      ;amounts to "return" branch

[giant board cassette schematic]

Issue 20 of Ipso Facto, found in the file archives, has an article by Keenneth Mantei titled "ELF II Cassette I/O" of Dec 1978 which says: "By studying the Newtronics monitor program or putting an oscilloscope on an Elf II, some bit/byte details can be seen. One cycle of 2400 Hz (0.43 mS) represents a "1" bit. One cycle of 800Hz (1.25mS) is a "0" bit. the pre-program header is a continuous tone of "1" bits. Each of the 8-bit program bytes "0" start bit, the 8-bit byte [from most to least signifigant bit], and a parity bit. the parity bit is "1" if there are an even number of "1" bits in the byte, "0" if odd." The byte 3B needs a 0 parity bit, 3A a 1 parity bit.

This is NOT not not the Kansas City standard. The KC standard uses different many cycles per bit, at different frequencies, and with a different "frame" (start/data/end bits).

Herb Johnson
New Jersey, USA
follow this link to email @ me

Copyright © 2012 Herb Johnson except for content as per source described herein.