Projects

Hardware projects

DC2N

To filter my blog entries on this subject click here.

For a long time I have been contributing to the preservation of C64 tapes, through the study of commercial turbo loaders, in an attempt to automate the verification of data integrity of tape backups: this includes productivity and educational software along with 8 bit computer games.

Since 2006 I’ve also provided collectors and enthusiasts with “DC2N”, which stands for Dumping C2N, the hardware to make digital backups of tapes without the interference of the operating system or file system of a host computer.

As well as providing the DC2N hardware, I’ve kept focus on the development of software to automate the verification of data integrity, TAPClean (a fork of the opensource version of FinalTAP), and of the front-end software that, together with TAPClean, provides the ultimate tape image inspection/auto-repairing solution: TAPClean Front End.

This device can be used for three purposes:

  • make backups of PET, Commodore 64/128, Vic20, C16/+4, Spectrum, BBC, and MSX tapes (including using both signal edges, a.k.a. halfwaves);
  • record from a PET, C64/128, VIC20 (with a third party adapter C16 is supported as well); and
  • playback v0 and v1 TAP files to PET, C64/128, VIC20 (with a third party adapter C16 is supported as well).
DC2N version 1 just finished dumping a tape by Luigi Di Fraia

DC2N version 1 just finished dumping a tape

Due to the increasing difficulty to acquire suitable SD cards for use with the DC2N in order to dump tapes, I worked at version 2, 3, 4, and version 5 of the DC2N.

  • DC2N2 uses micro SD/SDHC cards as storage media;
  • DC2N3 uses USB flash drives;
  • DC2N4 simply communicates to a PC/MAC through a USB connection (a host application is used to save data to disk);
  • DC2N5 is essentially similar to DC2N2 but runs on a faster micro-controller that also offers more room for future expansion.

DC2N version 2

This device can be used for three purposes:

  • make backups of PET, Commodore 64/128, Vic20, C16/+4, Spectrum, BBC, and MSX tapes (including using both signal edges, a.k.a. halfwaves);
  • record from a PET, C64/128, VIC20 (with a third party adapter C16 is supported as well); and
  • playback v0, v1, and v2 TAP files to PET, C64/128, VIC20 (with a third party adapter C16 is supported as well, which is the one that would benefit from the support of v2 TAP files).
DC2N2 mini dumping a tape by Luigi Di Fraia

DC2N2 mini dumping a tape

Stress tests carried out in January 2014 with a SanDisk 16 GB SDHC clearly show that it is possible to reliably make dumps of tapes that use turbo loaders even when sampling “half waves”!

DC2N version 3

DC2N3 is a backup-only solution that creates PET, Commodore 64, VIC20, Commodore 16/+4, Spectrum, BBC, and MSX tape backups on USB flash-drives. Although the functionality to playback tape images into supported Commodore home-computers was developed, it is not practical to fit the tape port connector on the current assembly so that feature is not available.

DC2N3 prototype fully assembled by Luigi Di Fraia

DC2N3 prototype fully assembled

DC2N version 4

DC2N4 is a backup-only solution that creates PET, Commodore 64, VIC20, Commodore 16/+4, Spectrum, BBC, and MSX tape backups on PCs running Windows or Linux (OS X might follow if I manage to access a suitable build environment).

DC2N version 4 by Luigi Di Fraia

DC2N version 4

DC2N4 GUI client by Luigi Di Fraia

DC2N4 GUI client

DC2N version 4 Low Cost

DC2N4-LC is a low cost alternative to DC2N4 which uses a standard USB Serial connection to a PC.

DC2N4 Low Cost fully operational by Luigi Di Fraia

DC2N4 Low Cost fully operational

DC2N4 GUI client running under Windows 10 64-bits

DC2N4 USB serial GUI client running under Windows 10 64-bits

DC2N USB serial native client under Windows 10 64-bits

DC2N USB serial native client under Windows 10 64-bits

DC2N version 5 Low Cost

DC2N5-LC is the last member of the DC2N family, based on a 32-bit ARM MCU, and is a low-cost alternative to DC2N version 2.

This device can be used for three purposes:

  • make backups of PET, Commodore 64/128, Vic20, C16/+4, Spectrum, BBC, and MSX tapes (including using both signal edges, a.k.a. halfwaves);
  • record from a PET, C64/128, VIC20 (with a third party adapter C16 is supported as well); and
  • playback v0, v1, and v2 TAP files to PET, C64/128, VIC20 (with a third party adapter C16 is supported as well, which is the one that would benefit from the support of v2 TAP files).
DC2N5-LC from the tape port edge

DC2N5-LC from the tape port edge

C2N Emulator

This device connects to a Commodore 64/VIC 20 tape port and to a PC through a USB cable. It offers 2 modes of operation:

  1. playback a TAP file (version 0, 1, or 2) from a PC into a C64/VIC20
  2. record the write signal from a C64/VIC20 to a DMP file on a PC

C16 is supported as well by means of a third-party adapter, which I won’t be supplying myself.

C2NEmu: first assembled prototype

C2NEmu: first assembled prototype

Unlike audio equivalents, this device fully supports the motor signal, which is not just fundamental at the “FOUND” message or at a Credits screen. There are a number of games whose tape loader requires data playback to stop for a fairly large amount of time at given points: this device takes care of that, without manual intervention.

Tape Port Monitor

The tape port monitor is a little device that sits between a C2N and either a C64 or DC2N and ‘spoofs’ the signal coming from a tape being played back, displaying it on an OLED display.

Tape Port Monitor connected to a C64

Tape Port Monitor connected to a C64

As part of the spoofing process this device is also capable of intercepting the CBM ROM and Turbo Tape 250 filename upon seeing the relevant signal. Any intercepted filename is shown on the display as well.

Tiny C2N Monitor

To filter my blog entries on this subject click here.

The Tiny C2N Monitor is a low-power and small-size version of the Tape Port Monitor. It is meant to be attached to a C2N and act as a man-in-the-middle just like the Tape Port Monitor does.

Tiny C2N Monitor and DC2N4-LC join forces when the commandline client is used by Luigi Di Fraia

Tiny C2N Monitor and DC2N4-LC join forces when the DC2N4-LC commandline client is used

USBhost-64

To filter my blog entries on this subject click here.

USBhost-64 adds USB host capabilities to the Commodore 64 in order to connect Mass Storage Devices to it and read/write files from/to them. In its parallel version it is definitely one of the fastest non-DMA transfer methods available at present, if not the fastest.

Possible applications include data logging to disk, data streaming from disk for animations, access to large data stores, cross-development and so on and so forth.

USBhost-64 by Luigi Di Fraia

USBhost-64

In terms of access to the new functionalities I wrote a driver in assembly language, one in C, and an extension for the BASIC interpreter on top of the assembly driver, called USB-BASIC.

USB BASIC by Luigi Di Fraia

USB-BASIC

Finally I wrote a few field applications for USBhost-64 in order to show what is possible to do with it. Namely a disk dumping tool that creates D64 images, a tape dumping tool that creates cassette ROMs in DMP format, a tape mastering utility to write TAP files back to tapes, a slideshow/slow-motion hires player, and more recently I am working at a Commander-style tool, USB Commander.

IECHost

To filter my blog entries on this subject click here.

The IECHost device is an IEC bus master that can control Commodore drives such as the 1541 and 1541-II, and possibly other Commodore devices interfaced via the IEC bus such as printers and plotters.

If I were asked to point to something similar to IECHost that already exists out there, in order for people to better understand what IEChost is, I’d mention ZoomFloppy. In fact, the IECHost firmware might be adapted to run on the ZoomFloppy hardware itself, but that’s something I will look into at a later time.

RTC Module

This is yet another project for the Commodore 64 and similar home computers that provides access to a real time clock/calendar via the User Port.

RTC module with a 4kB memory expansion

RTC module with a 4kB memory expansion

The project was initially meant to be integrated in the serial version of USBhost-64 (which will eventually be the case) but I decided to also develop and build the interface as an independent device.


Here are a few screenshots for the handling software under GEOS:

The RTC module also includes a 4kB EEPROM that is easily accessible from the C64 for both read and write purposes:

One use case for this memory expansion would be the storage of persistent data such as Hiscore Tables!

Misc hardware projects

Over the course of the last few months I’ve extended my embedded framework to support a number of external devices for positioning, contact-less temperature sensing, and display:

GPS integration by Luigi Di Fraia

GPS integration

ARM board and new display by Luigi Di Fraia

ARM board and new display

Software projects

Graphix serie

Graphix is a plotting software for bivariate expressions. It was initially coded on the Amiga 500 with an isometric engine at its core. After that I moved to perspective rewriting the engine on a PC. I also wrote a quite complex mathematical expression parser with “pretty print” capabilities.

Graphix 3.5 sample picture by Luigi Di Fraia

Graphix 3.5 sample picture

Graphix 3.5 sample picture by Luigi Di Fraia

Graphix 3.5 sample picture

Graphix 3.5 sample picture by Luigi Di Fraia

Graphix 3.5 sample picture

Graphix 3.5 sample picture by Luigi Di Fraia

Graphix 3.5 sample picture

After the custom engine version, I did some tests with OpenGL too, retaining my parser.

Graphix 2006 by Luigi Di Fraia

Graphix 2006 based on OpenGL and GTK+ 2.x

TAPClean Front End

TAPClean is a console utility whose key features are:

  • Detects and retrieves information about TAP and DC2N DMP file contents.
  • Tests and reports on the integrity and condition of the files.
  • Performs structural corrections and optimizations.
  • Develops a library of all detected files as their binary equivalents and allows content exporting.
  • Allows conversion to audio format (.AU or .WAV) so TAPs may be played out and recorded back to cassette tape.

TAPClean Front End is built using GTK+ 2.x and is not just a front end program as its name suggests. It incorporates unique features not found in TAPClean, such as:

  • Interactive report of the tape contents with graphical breakdown
  • Hex monitor, Disassembler, and CBM BASIC untokenizer for PRG files
  • TAP editor
  • TAP splitting tool
  • TAP repair tool for CBM files (fully automated but manual tweaking is available too!)
  • Graphical TAP/DMP analysis tool
TAPClean FE - Interactive report by Luigi Di Fraia

TAPClean FE – Interactive report

TAPClean FE - Disassembler by Luigi Di Fraia

TAPClean FE – Disassembler

TAPClean FE - Automatic TAP split tool by Luigi Di Fraia

TAPClean FE – Automatic TAP split tool

TAPClean FE - Graphical Analysis tool by Luigi Di Fraia

TAPClean FE – Graphical Analysis tool

Integrator 2012 and The Last Ninja Construction Kit

To filter my blog entries on this subject click here. This is the post where this all started a while ago!

Integrator 2012 is one of my latest works: a GTK+ 2.x based, hence cross-platform, viewer targeting those games that were designed using John Twiddy’s “Integrator”. The ones I am aware of are: The Last Ninja, LN2, LN3, Vendetta and Time Machine.

Not much of the original C64 software came to us through time, but a “Bug Free PDS Ninja III Editor” that’s almost surely based on original work done by John.

Quoting from The Last Ninja Archives: John Twiddy wrote an editor (he called it the integrator) that let Hugh [Riley] pick up the individual background elements like trees and bushes and drop them into place on screen. It also worked out the best colour combination for each element when they overlaid each other. John then designated which pixels were foreground and cut those bits out of the ninja sprite as it went past.

The above is consistent with the fact that the “Bug Free PDS Ninja III Editor” has an option for importing objects (it is possible to grab them from multicolour pictures) and combine them as part of the screen design. Actually we don’t know whether John did the rest manually or he wrote additional editors in order to complete the game design, such as designation of foreground (= sprite clipping masks), definition of events, boundaries that confine movements and trigger events, etc.

The Last Ninja Construction Kit extends Integrator 2012 and is set to be the one-stop shop for all the above mentioned activities: my aim is to make it extremely usable and intuitive. Being a cross-development tool running on modern development systems not only it offers the ability to browse what was done back in the 80’s and 90’s, but also produce new designs that could be used for a new C64 game (and consequently other platforms too).

The Last Ninja Construction Toolkit: main window by Luigi Di Fraia

The Last Ninja Construction Kit: main window

The Last Ninja Construction Toolkit: panel editor by Luigi Di Fraia

The Last Ninja Construction Kit: panel editor

The Last Ninja Construction Toolkit: object import browser by Luigi Di Fraia

The Last Ninja Construction Kit: object import browser with object preview

The Last Ninja Construction Toolkit: object grabber by Luigi Di Fraia

The Last Ninja Construction Kit: object grabber for capturing new objects

The Last Ninja Construction Toolkit: boundary editor by Luigi Di Fraia

The Last Ninja Construction Kit: boundary editor

The Last Ninja Construction Toolkit: foreground editor by Luigi Di Fraia

The Last Ninja Construction Kit: foreground editor (for sprite clipping)

The Last Ninja Construction Toolkit: connection editor by Luigi Di Fraia

The Last Ninja Construction Kit: connection editor

The Last Ninja Construction Toolkit: sprite position editor by Luigi Di Fraia

The Last Ninja Construction Kit: sprite position editor

The Last Ninja Construction Kit: working at a new design!

The Last Ninja Construction Kit: working at a new design!

C64 Dither 2

To filter my blog entries on this subject click here.

The “C64 Dither” tool was coded as a by-product during the design of new graphics for Integrator 2012, but it eventually became useful for generic graphic conversion activities. It too is based on GTK+ 2.x, hence multi-platform.

C64 Dither 2: Monkey Island 2 SE dithered by Luigi Di Fraia

C64 Dither 2: Monkey Island 2 SE dithered for the Commodore 64

Lure of the Temptress: outside of the smithy

Lure of the Temptress: outside of the smithy

Lure of the Temptress: outside of the smithy dithered by Luigi Di Fraia

Lure of the Temptress: outside of the smithy dithered for the Commodore 64

D64 Browser

D64 Browser is a GUI application built on top of GTK+ 2.x and my own libd64fs library that handles D64 images. Initially thought as a component for Integrator 2012, this tool too became part of my standalone tools.

D64 browser by Luigi Di Fraia

D64 browser

D64 Browser: PRG export by Luigi Di Fraia

D64 Browser: PRG export

Char map control for filenames by Luigi Di Fraia

Char map control for filenames

C64 Hires to Charmode

This one is a tool I wrote in order to convert one of my designs (not the one depicted below!) to char-mode. The design itself was already done with char-mode in mind but on a non-native graphic editor.

C64 Hires 2 Charmode (logo by DMD)

C64 Hires 2 Charmode (logo by DMD)

C64 Hires 2 Charmode - Resulting fontset

C64 Hires 2 Charmode – Resulting fontset

Commodore 64 Intros

Here are a few of the intros I wrote in assembly language for the Commodore 64 starting in the year 2014. Rigorously oldskool style!

Beam Racer

My first ever intro and my favourite one🙂

Haunted

An excellent char-mode logo by DMD finally in motion!

Ambigram

Ambigram is one of those intros that require understanding what the theme is about in order to be fully appreciated😉

If you watched the video/ran the intro and you’re still wondering what this is about, check my notes on this production.

Border Mania

My first attempt at opening side borders on a Commodore 64 and my first attempt at creating a new logo.

Other Commodore 64 works

I wrote a number of things for the Commodore 64 over time, but I guess it’s worth mentioning at least the ones below.

SPUTM-like implementation (also referred to as SCUMM mock-up)

It’s by no means complete, but a number of components to recreate SPUTM on a Commodore 64 are ready. I’ve put together a demo involving a location and a few objects from “Monkey Island 2, LeChuck’s Revenge”.
I converted and edited all graphics myself and obviously wrote the code too🙂

SCUMM mock-up progressing

SCUMM mock-up progressing

Here’s a video of the current state of this effort: