Giter VIP home page Giter VIP logo

c64iec's Introduction

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 D3
CLOCK (DIN6 pin 4) to Arduino D4
DATA (DIN6 pin 5) to Arduino D5

Ethernet connected on SPI, with D8 as CS.


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

Server side uses "atftpd" and PC64-files (sort of). There is no way to list available files
from the Arduino side, so a full PC64-implementation is tricky. Directory listing (LOAD"$",8)
is possible by running the "create_listdir" (source in the tools-directory) while in the TFTP
directory and redirecting the output to a file called "list.dir".

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

c64iec's People

Contributors

stefanberndtsson avatar

Stargazers

AiO avatar

Watchers

James Cloos avatar AiO avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.