SIDKick -- the first complete SID 6581/8580-drop-in-replacement that you can build yourself

Related tags

Utilities SIDKick
Overview


.- the first complete SID-drop-in-replacement that you can build yourself -.

SIDKick is a drop-in replacement for the SID sound chips used in C64s and C128s based on a Teensy 4.1. It is able to emulate two SIDs (6581 and/or 8580) and a Sound Expander (offering Yamaha OPL-based FM sound) at the same time. It makes no compromises with regard to quality: the emulation is based on reSID and fmOPL. It also comes with a few extras.

Currently its features include:

  • 6581 and/or 8580 emulation based on reSID 0.16 or reSID 1.0 (configurable)
  • 2nd-SID address at $d400, $d420, $d500, $d420 + $d500 simultaneously, $de00, $df00
  • Sound Expander/FM emulation based on fmOPL (at $df00)
  • paddle/mouse support
  • built-in configuration menu (launch with "SYS 54301")
  • built-in PRG launcher (via menu)
  • 10 different profiles, switchable on-the-fly via an optional button (otherwise via menu), "SAM" will tell you which you selected
  • sound output via Teensy MQS (PWM) or high-quality using a PT8211/TM8211-DAC, filters, and an operational amplifier
  • output available at connectors (stereo) or routed through the mainboard (mono)

How to build a SIDKick:

There are two versions of the PCB which differ only in the placement of components: for C64 longboards (v0.3, left) and C64 shortboards (v0.3s, right). I prepared the latter as the SIDKick+Teensy combination otherwise barely fits below the keyboard in flat C64c cases unless you use low-profile sockets and pin headers.

Both versions fit into a C128; installing in a C128D requires removing a standoff below the power supply and gently lifting it (same as with other dual SID options).

As I only own PAL machines, I have not tested SIDKick in any real NTSC C64 or C128. However, I succesfully tested SIDKick in a C64 with custom clock frequency between 0.93275MHz and 1.03279MHz. Thus it should work fine if the clock frequency value in the firmware code is set accordingly.

Here you can find the BOM and assembly information for SIDKick v0.3 and SIDKick v0.3s Note: if you plan to use the MQS-output only, you can skip all SMD-parts outside of the SID-/Teensy-sockets (C101-109, R101-107, U2, U6).

Firmware Building and Uploading:

Pre-built binaries are available in the release package. Read on for flashing and patching.

The firmware is built with Teensyduino. Note that there are three defines in the code which need to be set properly:

  • when compiling the firmware for C128: #define FIRMWARE_C128
  • choosing the output (MQS vs. DAC): #define audioDevice
  • set folder where you store the SIDKick project: #define SIDKICK_SOURCE_DIR

The compile settings are: "Board: Teensy 4.1", "CPU-Speed: 816 MHz", and "Optimize: Fastest". You may also choose a lower clock frequency of 600 MHz or 720 MHz as long as you adjust TEENSY_CLOCK in the code accordingly. During most tests SIDKick was running at 816 MHz (at lower speeds the emulation might not always be cycle exact).

You can upload the firmware(s) directly from the Arduino IDE or use the Teensyloader to flash hex-files. To upload the firmware you need to connect the Teensy to your PC using USB.

IMPORTANT: if the SIDKick is already installed you must not close the power-from-mainboard jumper (see below) and connect USB at the same time – unless you followed these instructions.

I made a very simple (and not very comfortable to use) command-line tool to patch the firmware-hex-file prior to uploading. Patching is required if you want to add PRGs to the menu launcher. I provide a batch file for Windows, a script for Linux users, and an example PRG-list. Upload the patched firmware afterwards using the Teensyloader.

Prior to flashing the actual firmware, I recommend to run the EEPROM Eraser tool (the second Teensyduino-sketch SIDKickEEPROM). It initializes the SIDKick-configuration stored in the EEPROM of the Teensy.

Recommended Procedure:

  • flash and run SIDKickEEPROM
  • optional: patch SIDKick firmware
  • flash SIDKick firmware
  • install SIDKick into your Commodore as decribed below

Installing SIDKick:

Pay attention to correctly insert the Teensy and the SIDKick as a whole (see backside of PCB for markings) into the SID-socket of your C64 or C128.

You can choose to only emulate a single SID. If you want to use a second SID, or FM emulation, you need to connect additional cables to get the signals to the SIDKick as they are not available at the SID socket:

Installing additional cables in C64

SIDKick pin C64
A5 CPU Pin 12 (required for $d420 and FM)
A6 CPU Pin 13 (required for FM)
A7 CPU Pin 14 (optional)
A8 CPU Pin 15 (required for $d500)
IO1/2 expansion port pin 7 and 10 $de00 and $df00 addresses

Installing additional cables in C128

SIDKick pin C128
A5 CPU Pin 12 (required for $d420 and FM)
A6 CPU Pin 13 (required for FM)
A7 MMU (U7, MOS 8722) pin 47 (required for $d500)
A8 U3 pin 14 (required for $d500)
IO1/2 expansion port pin 7 and 10 $de00 and $df00 addresses

The photographs show various locations where these signals can be tapped, e.g. A5 and A8 are conveniently available on the mainboards (see photo of ASSY 250469) and at the ROMs (not shown on the photos: on the 250469 at the kernal ROM 251913 at pin 5 and 29).

Audio Output

Lastly you need to choose how to output the sound (recall that the firmware determines whether MQS or DAC output is used). You can either use the solder jumper (labelled "MQS DAC" and connect the left-center or center-right to route mono-audio through the mainboard. The better option is to take the output from the pins labelled R GND L (for DAC) or MQS L/R and GNG (for MQS).

Powering the SIDKick

In principle you can power the Teensy from USB, but the USB-connection is only needed for development. SIDKick can be powered from the main board by either closing the solder-jumper or the pin-jumper (close to Teensy pin 1).

Profile-Selection-Button (optional)

There are 5 pads for future extensions. The second from right (from top, on the shortboard version) is currently used to add a push button for switching profiles. You can add a button which pulls this line using a pull-down resistor to ground.

More on the Firmware

The handling of the communication and emulation is pretty much the same as in my Sidekick64-project and earlier experiments (e.g. on paddle/mouse handling) in this framework.

The Teensy is powerful enough to handle the communication and reSID 0.16 and fmOPL. However, reSID 1.0 does not work out of the box: it initializes its filter emulation by precomputing lookup tables (taking too long for instant-on) which exceed the Teensy’s available memory. I have modified reSID 1.0 to work with offline-precomputed tables which can be stored in the flash memory of the Teensy.

I also had to modify the Teensy audio library to provide a polling-like mode: the reason being that the communication with the C64/C128 is handled by an interrupt with is triggered every clock cycle – and this conflicts with the standard handling of audio output.

Disclaimer

Be careful not to damage your Teensy, PC, or Commodore, or anything attached to it. I am not responsible if you or your hardware gets damaged. Keep in mind that the Teensy is typically overclocked. If you don't know what you're doing, better don't... use everything at your own risk.

License

My portions of the source code are work licensed under GPLv3. The PCBs are work licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Misc

Last but not least I would like to thank a few people and give proper credits: toms01 for making me start this project and lots of testing; emulaThor for proof reading and continuous git-care. emulaThor and bigby for even more testing and extensive feedback. androSID for hinting to the opamp; Retrofan for the SIDKick-logo and his font which is used in the configuration tool. And of course, the authors of reSID and the OPL emulation.

There have been previous attempts of making drop-in replacements based on a Teensy which deserve being mentioned, e.g. Teensy-reSID and 6581-SID-teensy. However, both are far from a complete replacement, and, for various reasons, were not suitable as a basis for SIDKick.

Thanks for reading until the very end. I'd be happy to hear from you if you decide to build your own SIDKick!

Trademarks

Teensy is a trademark of PJRC.COM LLC.

You might also like...
A c++ file just to show how can we change color of Background and Text in C++...

A c++ file just to show how can we change color of Background and Text in C++...

Do u wanna create more than one trial account on exitlag? This 'spoofer' is for you!

ExitLag HWID Bypass Do you wanna create more than one trial account on exitlag? So this 'spoofer' is for you! Why? Exitlag limit the trial account cre

You Only Look Twice: Rapid Multi-Scale Object Detection In Satellite Imagery
You Only Look Twice: Rapid Multi-Scale Object Detection In Satellite Imagery

YOLT You Only Look Twice: Rapid Multi-Scale Object Detection In Satellite Imagery As of 24 October 2018 YOLT has been superceded by SIMRDWN YOLT is an

AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows
AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows

AlleyWind AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows. AlleyWind could: Displays a graphic

A faster drop-in replacement for giflib. It uses more RAM, but you get more speed.

GIFLIB-Turbo What is it? A faster drop-in replacement for GIFLIB Why did you write it? Starting in the late 80's, I was fascinated with computer graph

✔️The smallest header-only GUI library(4 KLOC) for all platforms
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

Toolkit for software engineers to Deploy AI Systems Yourself (DAISY). DaisyKit SDK is the core of models and algorithms, which can be used to develop wrappers and applications for different platforms: mobile, embedded or web browsers. Teach you how to code an OS by yourself.
Teach you how to code an OS by yourself.

前言 操作系统,作为人类当前创造出来的最复杂的系统,其蕴含了大量精巧的设计。完全理解操作系统,应该是每一个程序员都想做的事情,但是每当我们想要去学习操作系统,了解其奥秘时,都会被里面 晦涩难懂的设计和一些闻所未闻的名词劝退。即使没有被劝退,非常痛苦的看完一本晦涩难懂的操作系统的书籍后,也会发现自己好

A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average. 20-24% speed increase in use-case testing.

plf_list A drop-in replacement for std::list with (on average): 293% faster insertion 57% faster erasure 17% faster iteration 77% faster sorting 70% f

An Aspiring Drop-In Replacement for Pandas at Scale
An Aspiring Drop-In Replacement for Pandas at Scale

Legate Pandas Legate Pandas is a distributed and accelerated drop-in replacement of Pandas. Legate Pandas enables high-performance, scalable execution

An Aspiring Drop-In Replacement for NumPy at Scale
An Aspiring Drop-In Replacement for NumPy at Scale

Legate NumPy Legate NumPy is a Legate library that aims to provide a distributed and accelerated drop-in replacement for the NumPy API on top of the L

 A simple
A simple "no frills" drop-in replacement PCB for the KBDfans 67mkII / 67lite

67mk_E A simple "no frills" drop-in replacement PCB for the KBDfans 67mkII / 67lite KiCAD PCB files Gerbers for PCB production JLCPCB BOM JLCPCB CPL V

A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average. 20-24% speed increase in use-case testing.

plf::list A drop-in replacement for std::list with (on average): 293% faster insertion 57% faster erasure 17% faster iteration 77% faster sorting 70%

Amiga 1200 keyboard MPU drop-in replacement pcb
Amiga 1200 keyboard MPU drop-in replacement pcb

A1200_keyb_MPU Amiga 1200 keyboard MPU drop-in replacement pcb As the 68HC05 (p/n 391508-01) used in the Amiga 1200 is getting to be very expensive, I

mold is a faster drop-in replacement for existing Unix linkers
mold is a faster drop-in replacement for existing Unix linkers

mold: A Modern Linker mold is a faster drop-in replacement for existing Unix linkers. It is several times faster than LLVM lld linker, the second-fast

Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more

fu2::function an improved drop-in replacement to std::function Provides improved implementations of std::function: copyable fu2::function move-only fu

Implement Ipv4 ServiceId Table(ipaddr,sid) based on INET framework on OMNeT++.

omnet++/inet_Service-Id-Table Implement Ipv4 ServiceId Table(ipaddr,sid) based on INET framework on OMNeT++. Version: OMNeT++ 5.6.2(https://github.c

Memgraph is a streaming graph application platform that helps you wrangle your streaming data, build sophisticated models that you can query in real-time, and develop graph applications.
Memgraph is a streaming graph application platform that helps you wrangle your streaming data, build sophisticated models that you can query in real-time, and develop graph applications.

Memgraph is a streaming graph application platform that helps you wrangle your streaming data, build sophisticated models that you can query in real-time, and develop graph applications.

Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use while playing the game and help you top the leaderboard.
Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use while playing the game and help you top the leaderboard.

WORDament_Solver Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use whil

Releases(v0.21)
Owner
null
A docker image where you can run a judge program and a converter for multiple sequence alignment

genocon2021-docker 本リポジトリでは、ジャッジプログラム(eval.c)と Multiple Sequence Alignment (MSA) 変換プログラム(decode_cigar.py)を同梱した Docker イメージを提供しています。 また、サンプル解答プログラム(sam

Sakamoto, Kazunori 4 Sep 20, 2021
Minimal, type safe printf replacement library for C++

tinyformat.h A minimal type safe printf() replacement tinyformat.h is a type safe printf replacement library in a single C++ header file. If you've ev

Chris Foster 477 Dec 29, 2022
Sqrt OS is a simulation of an OS scheduler and memory manager using different scheduling algorithms including Highest Priority First (non-preemptive), Shortest Remaining Time Next, and Round Robin.

A CPU scheduler determines an order for the execution of its scheduled processes; it decides which process will run according to a certain data structure that keeps track of the processes in the system and their status. A process, upon creation, has one of the three states: Running, Ready, Blocked (doing I/O, using other resources than CPU or waiting on unavailable resource).

Abdallah Hemdan 18 Apr 15, 2022
Documenting the development of a simple first module.

Your First Module This guide will look at writing a complete module, with many common features in a reduced form. This includes the module initialisat

Open Multiplayer 16 Jun 3, 2021
Infocom Z-machine build environment for 25 retro computer systems, preconfigured for PunyInform

Puddle BuildTools (for PunyInform and other libraries and compilers targeting the Infocom Z-machine) If you're into classic 8-bit and 16-bit home comp

Stefan Vogt 44 Nov 25, 2022
A tool for generating build scripts for C++20 projects that use modules.

cpp_module_parser [cmop] A tool for generating build scripts for C++20 projects that use modules. The intent is to provide a backend for premake, for

Alexander Christensen 2 Nov 23, 2021
Tool based in nodes to build GLSL shaders without any programming knowledge written in C using OpenGL and GLFW.

FNode Tool based in nodes to build GLSL shaders without any programming knowledge written in C using OpenGL and GLFW (raylib library). It contains a c

Víctor Fisac 80 Dec 26, 2022
A LKM rootkit targeting 4.x and 5.x kernel versions which opens a backdoor that can be used to spawn a reverse shell to a remote host and more.

Umbra Umbra (/ˈʌmbrə/) is an experimental LKM rootkit for kernels 4.x and 5.x (up to 5.7) which opens a network backdoor that spawns reverse shells to

Marcos S. Bajo 93 Dec 10, 2022
Isocline is a pure C library that can be used as an alternative to the GNU readline library

Isocline: a portable readline alternative. Isocline is a pure C library that can be used as an alternative to the GNU readline library (latest release

Daan 136 Dec 30, 2022
Thor is a DoS(slowloris) tool which can be used against a target.

Thor is a DoS(slowloris) tool which can be used against a target. It does this by continuously sending partial HTTP requests, none of which are completed.

AnonabdulJ 1 Nov 6, 2021