Family BASIC Data Recorder

The Family BASIC Data Recorder (HVC-008) is a device manufactured by Matsushita/Panasonic for Nintendo and was released sometime in 1984 only in Japan. The device serves as an addition to the Family BASIC Keyboard to read and write data from BASIC programs created by users. Several Famicom titles also used it to save its own data. The device itself can be substituted with any compact cassette player device or other audio capable devices that plug into the 3.5mm monaural phone jacks.
Example Titles:
- Family BASIC
- Family BASIC V3
- Arkanoid II
- Castle Excellent
- Excitebike
- Lode Runner
- Mach Rider
- Wrecking Crew
Hardware interface
The Family BASIC Keyboard provides two ⅛" (3.5mm) monaural phone jacks which can be plugged into the data recorder. Other expansion port devices may also provide this interface (e.g. Hori SD Station, ASCII Stick II Turbo, etc.). This circuit will provide the same interface on the NES.
Input ($4016 write)
7 bit 0 ---- ---- xxxx xExS | | | +- 1-bit DAC audio to audio cassette +--- When 0, force audio readback to always read as binary 0 (5V)
The audio to the cassette recorder goes through a first-order highpass at 100Hz and is attenuated to 5mVPP at the input to the recorder.
Output ($4016 read)
7 bit 0 ---- ---- xxxx xxAx | +-- 1-bit ADC audio from audio cassette
Because of how magnetic tape works, playing back the tape will produce a signal that is the lowpassed derivative of the original. Then this audio from the cassette recorder goes through a highpass with corner frequency of 800Hz before being discretized. In simulation, square waves of frequency 600 Hz up to the bandwidth of the tape appear to be recovered by this processing.
For an emulator, just play back the same bit stream as it was emitted.
Software
It is not known whether Family BASIC uses Kansas City Standard encoding, Bell 103 or 202, or some other arbitrary home-grown convention for encoding the audio on the tape. Castle Excellent's recorder handling code mostly exists between $8000 and $80FE, and provides save games using the 1200 baud ('CUTS') and bit-reversed variant of Kansas City Standard. Wrecking Crew uses the tape format from the Sharp MZ personal computer.
For homebrew use, Chris Covell wrote a set of KCS -generating and -decoding routines, which could easily be adapted to work with the data recorder.
References
Reverse-engineered schematics by Enri: