Tämä asiakirja on saatavilla myös suomeksi.
Dieses Dokument ist auch auf Deutsch erhältlich.
The C2N232 is a small RS-232 interface that can be plugged to the cassette port of an 8-bit Commodore computer.
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.
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.
LOAD
, SAVE
, OPEN
).tap
)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.
The following procedures assume that you have a Commodore 64.
c2nload
LOAD
and press RETURN.PRESS PLAY ON
TAPE
.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.
c2nload -c serial.device -m 64 file.prg
c2nload -c com1 -m 64 file.prg
c2nload -c /dev/ttyS0 -m 64 file.prg
FOUND FILE.PRG
.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.
cbmlink
cbmlink
server as described in previous
section, e.g.,
c2nload -c /dev/ttyS0 -m 64 -j 52224
cbmprg/c2n232/c64/plain.prg
.READY.
.cbmlink
can be invoked on the big computer.
cbmlink -c c2n232 serial.device
cbmlink -c c2n232 com1
cbmlink -c c2n232 /dev/ttyS0
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.
cbmlink -c c2n232 serial.device -fw cbmprg/c64/plain.prg
cbmlink -c c2n232 com1 -fw cbmprg\c64\plain.prg
cbmlink -c c2n232 /dev/ttyS0 -fw cbmprg/c64/plain.prg
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.
.tap
files)
be loaded?The faucet
program works for some files.
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.
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.
The firmware can be upgraded via the RS-232 port by using a computer running Unix or Microsoft Windows.
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.
At first you may type the following command to make a back up copy of the old firmware.
cisp
has not been ported to the Amiga
yet.cisp -c c2n232 com1 -s firm-old.s19
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.
cisp
has not been ported to the Amiga
yet.cisp -c c2n232 com1 -e -l firmware.s19
cisp -c c2n232 /dev/ttyS0 -e -l firmware.s19
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?
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.
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.
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:
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.
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.
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.