C2N232 Frequently Asked Questions

Tämä asiakirja on saatavilla myös suomeksi.

Dieses Dokument ist auch auf Deutsch erhältlich.

1. What is a C2N232?

The C2N232 is a small RS-232 interface that can be plugged to the cassette port of an 8-bit Commodore computer.

1.1 What does the name C2N232 stand for?

The name C2N232 is composed of two parts: C2N and 232. The C2N is the original model name of the Commodore tape deck, also known as the datassette. The number 232 refers to RS-232, the dominating standard for asynchronous serial communication.

1.2 Which Commodore models are supported?

The device can be connected to all Commodore 8-bit computers that are equipped with a cassette port. The Commodore 264 series requires an adapter, as the connector is different.

The device can also be used with other 8-bit computers. The driver software supports the Tangerine Oric-1 tape format.

1.3 Which programs are related to the C2N232?

c2n
emulator for the original Commodore tape format (LOAD, SAVE, OPEN)
c2nload
fastloader that loads and starts in less than 10 seconds and loads the actual program at 38,400 bits per second
faucet
loader for low-level tape images (.tap)
cisp
allows the built-in firmware of the C2N232 to be reprogrammed
cbmlink
enables remote control of Commodore computers and copies memory contents, files and disks
cbmconvert
converts between different Commodore file formats

1.4 How is the RS-232 interface wired?

The RS-232 connector is a female 9-pin D-sub connector, designed to match the IBM PC/AT style serial connector.

Normally, an extension cable is connected to the RS-232 end of the C2N232. Three wires are strictly needed: pins 5 (ground), 2 (transmitted data) and 3 (received data). On a 25-pin connector, these signals can be found on the pins 7, 3, and 2, respectively. The connector on the C2N232 is wired as a DCE, that is, a null modem cable must not be used.

2. Basic Usage

2.1 How is the software started up?

The following procedures assume that you have a Commodore 64.

2.1.1 The easiest way: c2nload

  1. Hold the SHIFT key down and press STOP, or type LOAD and press RETURN.
  2. The Commodore responds with the message PRESS PLAY ON TAPE.
  3. On the big computer, start the transfer as follows. You may want to adjust the file name, the name of the serial device and the computer model.
    Commodore AmigaOS:
    c2nload -c serial.device -m 64 file.prg
    Microsoft Windows:
    c2nload -c com1 -m 64 file.prg
    Unix:
    c2nload -c /dev/ttyS0 -m 64 file.prg
  4. The Commodore blanks the screen.
  5. The Commodore responds with the message FOUND FILE.PRG.
  6. Press the C= key immediately or hold it down until the FOUND message flashes on the screen, so that the computer will not miss the rest of the program, as the C2N232 ignores the motor control signal. Do not press the space bar, or the computer may skip the rest and look for the next program header.

If the program is started with a SYS command, you can supply the SYS address with the -j switch.

2.1.2 The most versatile way: cbmlink

  1. Load the cbmlink server as described in previous section, e.g., c2nload -c /dev/ttyS0 -m 64 -j 52224 cbmprg/c2n232/c64/plain.prg.
  2. Finally, the Commodore reports READY..
  3. Now cbmlink can be invoked on the big computer.
    Commodore AmigaOS:
    cbmlink -c c2n232 serial.device
    Microsoft Windows:
    cbmlink -c c2n232 com1
    Unix:
    cbmlink -c c2n232 /dev/ttyS0
  4. You may want to save the cbmlink server to disk or to create a Commodore 128 boot sector to avoid using the slow tape protocol in the future. Note that in the current version of cbmlink, the -fr and -fw options do not translate character sets nor remove directory name prefixes or file name suffixes. You may want to rename the file to upper case first, for example, C64 SYS52224. The Commodore 64 server program can be copied to disk as follows.
    Commodore AmigaOS:
    cbmlink -c c2n232 serial.device -fw cbmprg/c64/plain.prg
    Microsoft Windows:
    cbmlink -c c2n232 com1 -fw cbmprg\c64\plain.prg
    Unix:
    cbmlink -c c2n232 /dev/ttyS0 -fw cbmprg/c64/plain.prg

2.2 Aren't the tape routines slow?

Yes, but the tape protocol is only needed for loading the c2nload fastloader, for a few seconds. The transfer speed of actual programs is limited by the RS-232 to 38,400 bits or approximately 3,840 bytes per second.

2.3 Can low-level tape images (.tap files) be loaded?

The faucet program works for some files.

2.4 Is the C2N232 supported by any terminal program?

Unfortunately, with the current firmware, the C2N232 can only be controlled via the RS-232 interface. In the future, new firmware and sample code will be released that allow the C2N232 to accept commands from the Commodore side.

2.5 The software does not function properly in Windows!

Are you sure that the hardware FIFO of the serial interface has been enabled in the Device Manager?

You can find the Device Manager via the Control Panel. There, double click on the icon System in order to open the window System Properties. Finally, click on the tab Device Manager. In Windows 2000, there is no such tab in the window. Instead, you must select the tab Hardware and click on the button Device Manager.

A list of device drivers appears. Under Ports (COM & LPT), double click on the serial device where the C2N232 is connected.

A window Communications Port (COMx) Properties appears. Click on the tab Port Settings, select Hardware flow control and click on the button Advanced to open the window Advanced Settings for COMx. Make sure that the check box Use FIFO buffers is activated.

All other settings should be configured properly by the C2N232 software. Should the software still fail, click the button Defaults in the window Advanced Settings or the button Restore Defaults in the tab Port Settings in the Communications Port Properties window.

3. How is the firmware upgraded?

The firmware can be upgraded via the RS-232 port by using a computer running Unix or Microsoft Windows.

3.1 How must the board be wired?

Four active signals (RxD, TxD, CTS and RTS) must be connected and the RESET line of the AT90S2313 microcontroller (pin 1) must be wired to ground (pin 10 on the microcontroller, pin 5 on the RS-232 connector, or pin 1 of the card edge connector), and power must be supplied to the board.

There are two jumper wire pads on the production version of the board. One is almost under the microcontroller, and it can remain closed at all times. The other is located next to the cassette port connector. This RESET switch of the AT90S2313 is the jumper that must be closed in order to upgrade the firmware.

3.2 How is the software side started up?

At first you may type the following command to make a back up copy of the old firmware.

Commodore AmigaOS:
Sorry, cisp has not been ported to the Amiga yet.
Microsoft Windows:
cisp -c c2n232 com1 -s firm-old.s19
Unix:
cisp -c c2n232 /dev/ttyS0 -s firm-old.s19

Now you should either remove the RESET jumper of the AT90S2313, or power off the C2N232 for a short moment. After that, you can upload the new firmware with the following command sequence.

Commodore AmigaOS:
Sorry, cisp has not been ported to the Amiga yet.
Microsoft Windows:
cisp -c c2n232 com1 -e -l firmware.s19
Unix:
cisp -c c2n232 /dev/ttyS0 -e -l firmware.s19

3.3 cisp: failed to enable the programming mode

Did you forget to pull RESET to ground and power the C2N232 on? Are the RS-232 wires connected properly? Does your Unix box support CTS/RTS handshaking?

3.4 detect: device is locked

As the RESET line is not in the control of the cisp software, it is difficult to cure this misfeature. Most notably, the AT90S2313 will refuse to co-operate after a firmware upload with cisp -l. In order to verify the firmware, you will need to power the C2N232 off and on, or maybe alternatively disconnect and connect the RESET jumper.

4. Where can I get a C2N232?

Contact Marko Mäkelä unless you want to build a C2N232 yourself according to one of the circuit board layouts. The adapters (over 100 units) have now been sold out, but Marko may produce more of them, if there is enough interest. For the latest production run, the price—including shipping to anywhere in the world—was 20 €. You may want to acquire an extension cable as well, unless you have a laptop computer that you can place next to the cassette connector of your Commodore computer.

4.1 How does the C2N232 look like?

[The top side of the C2N232 circuit board]

Have a look at our picture gallery for more pictures. Marko sells the devices without case, but you can do what Nicolas Welte did. He adapted a DB9-to-DB25 case for the C2N232 and glued the bottom side of the cassette connector to it:

[A DB9-to-DB25 adapter with two notches sawn on one side][The bottom side of the C2N232 tape connector glued on the case]

4.2 Where do I get the software?

From the C2N232 home page.

File name Purpose Systems
c2nload A small auto-starting fastloader for the C2N232 Commodore AmigaOS, Microsoft Windows and Unix-like systems; all Commodores that can load from tape
c2n Tape deck emulator front-end for the C2N232 Commodore AmigaOS, Microsoft Windows and Unix-like systems
cbmlink File transfer and remote management of Commodore computers Commodore AmigaOS, Microsoft Windows and Unix-like systems
cbmlink-cbm.zip cbmlink server programs Commodore PET series, B series, VIC-20, 64, 128, and 264 series

All Commodore-side programs have been written in 6502 assembler, while everything else is C. For the convenience of Amiga and Windows users, precompiled executables have been supplied. Users of Unix-like systems must fire up their C compilers.

4.3 Where do I get the firmware?

The C2N232 firmware page contains the firmware source code and some documentation. If you modify the code, you will need GNU Binutils to translate it.

The cisp program for transferring firmware to the AT90S2313 microcontroller, also available from the firmware page, has been tested on FreeBSD, Linux and on Microsoft Windows. You may also be able to use other software instead.

Acknowledgements

Juha Kouri and Turo Heikkinen assisted me in making the prototype circuit boards and in measurements. Nicolas Welte helped me in obtaining some rare components.

Nicolas Welte and Wolfgang Moser have suggested improvements to this document.


Marko Mäkelä