Skip to content

stefanberndtsson/c64iec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partial emulation of a C64 floppy drive using an Arduino.

This code emulates a C64 floppy drive to some extent.

Basically, you can LOAD and SAVE files to and from a TFTP server. The data transfer is valid
TFTP traffic. TFTP doesn't handle directory listings, so loading a directory (LOAD"$",8) is
done by having a file "list.dir" which is a prebuilt directory listing in the fake basic code
used from any other C64 floppy (no wildcards and things work).

There is most likely all kinds of timing issues remaining. Overwrite of files ("@0:"-prefix)
is not handled correctly either. No data channels supported apart from the basic LOAD/SAVE.
No fastload support.

Setup
-----

Arduino Nano
ENC28J60-based Ethernet Module
Connection to C64 using DIN6 Serial IEC connector

The IEC is connected as follows:

GND (DIN6 pin 2) to Arduino GND
ATN (DIN6 pin 3) to Arduino D2
CLOCK (DIN6 pin 4) to Arduino D3
DATA (DIN6 pin 5) to Arduino D4

Ethernet connected on SPI, with D8 as CS.


Ethernet Server
---------------

Server (available in the tools directory) is a ruby hack, c64iecd, which is basically a tweaked
version of a TFTP-server. It runs on port 53280.

IP is set using DHCP. No renew is sent, so the lease-time needs to be "long enough". The IP
of the TFTP-server is set using the "next-server" option in the DHCP reply. MAC address is
set to 42:42:42:01:02:03 by default (in an array in c64iec.ino). TFTP-server needs to be on
the same network as the client.


Makefile
--------

The Makefile approach requires a setup version of the Arduino-Makefile project,
found at https://github.com/mjoldfield/Arduino-Makefile.git

The Setup.mk files referenced contains the settings for the Arduino.mk:

ARDUINO_DIR   = /usr/share/arduino
ARDMK_DIR     = /usr/local
AVR_TOOLS_DIR = /usr
BOARD_TAG = atmega328
ARDUINO_PORT = /dev/ttyUSB0

About

Partial floppy emulation using an Arduino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages