Tämä asiakirja on saatavilla myös suomeksi. Dieses Dokument ist auch auf Deutsch erhältlich.

Marko Mäkelä’s old computers: Commodore C2N datassette emulator with RS-232 interface: firmware

Marko Mäkelä wrote the C2N232 firmware in machine language. Everything is driven by interrupt requests, and only 4 bytes of the 128-byte memory is reserved for the execution stack. The rest, 124 bytes, implements the RS-232 reception buffer.

The firmware can be compiled to executable binary code with GNU Binutils, and it can be uploaded to the C2N232 device with AVRDUDE. Many RS-232 interfaces for USB are ridden with bugs that prevent their use in firmware programming. Even properly working interfaces, such as those based on the Prolific PL-2303, are very slow, about 10 bytes per second. Built-in RS-232 interfaces and are about ten times faster, and they work for sure.

Download

c2n232c-5.zip
Updated firmware version 5: source code and compiled code for the C2N232 (AT90S2313, 8 MHz) and the C2N232I (ATtiny2313, 18,432 MHz). This is the first released firmware for the C2N232I. Please read the file avrdude.txt in the archive.
c2n232c.zip
Firmware version 5: source code and compiled code. Supports the cassette motor control signal.
c2n232-4.zip
Source code of firmware versions 1..4 and compiled code of firmware version 4
c2n232.asm
Firmware version 1 source code for avra
c2n232i.s, c2n232i.txt
From June to December 2003, I developed a Commodore serial bus connection for the C2N232. It does successfully emulate a peripheral, such as a disk drive, but for some reason, it fails to work as a controller, i.e., to send commands to a disk drive. You can have a look at the firmware and short notes on how to test it.
c2n232.txt
The wire protocol of the C2N232 serial line
timing.png, timing.dia
Timing diagrams of the custom transfer protocol