【文章标题】:Usbsid-Pico:将真实的Commodore 64音效桥接至现代USB设备

【文章正文】: For many of us retro enthusiasts, the Commodore 64’s MOS Technology SID chip (6581 and 8580) is regarded as one of the most iconic sound chips in audio history. 对我们这些复古爱好者而言,Commodore 64搭载的MOS Technology SID芯片(6581和8580型号)堪称音频史上最具标志性的声音芯片之一。

(Modern) Software emulation gets close, but nothing truly replaces the analog filters and warm distortion of real vintage hardware. (现代)软件模拟已非常接近,但始终无法真正替代真实古董硬件那模拟滤波器的温暖失真。

I am LouD (short for loudness) and I created USBSID-Pico to bridge real SID silicon directly to modern workstations, phones, and media players over USB (CDC/WebUSB/WebSerial), MIDI, ASID and in the future possibly WiFi and Bluetooth. 我是LouD(响度缩写),创造了USBSID-Pico项目,通过USB(CDC/WebUSB/WebSerial)、MIDI、ASID协议(未来可能支持WiFi和蓝牙)将真实SID芯片直接接入现代工作站、手机和媒体播放器。

Powered by the Raspberry Pi Pico microcontroller series (rp2040 and rp2350), the board acts as a flexible controller for up to two (and soon four) physical SID chips or modern hardware replacements. 该设备基于树莓派Pico微控制器系列(rp2040和rp2350),可作为灵活控制器驱动最多两颗(即将支持四颗)物理SID芯片或现代硬件替代品。

What follows is my journey (as far as I remember) and attempt at creating a project build log detailing the start and evolution from early prototypes to the open-source hardware powering the retro audio experience for (at least some) enthusiasts today. 下文将记录我的开发历程(尽我所能回忆),尝试以项目构建日志的形式,详述从早期原型到如今为(至少部分)爱好者提供复古音频体验的开源硬件的演进过程。

The before 前传

For as long as I can remember I have been interested in how things work. 自我记事起,就对事物运作原理充满好奇。

From the first Commodore 64 my parents bought, the first XT PC we owned at home, to the first Pentium PC I bought when I was a teenager, up until today (and beyond) where I work as software engineer. 从父母购买的第一台Commodore 64,家里的第一台XT电脑,到青少年时期自购的首台奔腾电脑,直至如今(及未来)我成为软件工程师的职业生涯。

Tech fascinates me, so when I have the option I like to pry it open, find out how it works and put it back together with “improvements” not caring (at first) if it still works. 科技令我着迷,只要有机会就喜欢拆解设备,研究原理后重组并加入”改进”——最初甚至不在乎是否还能正常运作。

I’m not much of a musician but do like to listen to all kinds of music, including chiptunes of course ;-) 虽非专业音乐人,但热衷欣赏各类音乐,芯片音乐自然不在话下;-)

Inspired by my older brother who repairs Commodore 64s among other things, a new project idea popped into my head. I wanted to see if I could create a SID playing device to listen to the SID tunes I already listened to on my computer and maybe even play them through a real SID chip. 受擅长维修Commodore 64的兄长启发,我萌生新项目构想:打造能播放电脑中SID音乐的设备,甚至通过真实SID芯片发声。

Around February/March of 2024 I came across a github repo that let you create a SID player based on a Raspberry Pi Pico called SIDPod. 2024年2/3月间,我发现名为SIDPod的GitHub项目,可通过树莓派Pico构建SID播放器。

I liked how simple it seemed to use a microcontroller to play SID files so of course I had to build it. 这个微控制器播放SID文件的方案简洁迷人,自然要亲手实现。

SIDPod testbuild SIDPod测试版

The way of adding more SID files to SIDPod’s flash made me try and add an SDCard to the already great design, this resulted in SIDPod-SDCard. 受SIDPod闪存加载机制启发,我在优秀设计基础上加入SD卡支持,诞生了SIDPod-SDCard。

SIDPod-SDCard testbuilds SIDPod-SDCard测试版

In early April 2024 still not satisfied by the results I found ESP32-SIDView. 2024年4月初仍不满足,继而发现ESP32-SIDView项目。

This seemed like a nice replacement SID player for SIDPod with the added benefit of supporting real SID chips! 这似乎是SIDPod的理想替代方案,更妙的是支持真实SID芯片!

Building one was the logical next step, but since I did not own any real SID’s at that time I had to find one. 制作原型顺理成章,但当时缺乏真实SID芯片需另寻途径。

SIDKICK-pico was the first SID replacement I found, no schematics, but orderable. 首款发现的替代方案是SIDKICK-pico,虽无原理图但可订购。

Having some hobby level experience in hardware reverse engineering I recreated a schematic and figured out the Pico to DIP-28 pinout so I could use it on a breadboard. 凭借业余硬件逆向经验,我重建原理图并破解Pico转DIP-28引脚定义,终可在面包板测试。

ESP32-SIDView testbuild ESP32-SIDView测试版

Not being satisfied with the spaghetti you can see in the picture above, I had to tidy things up a bit. 难忍图中杂乱线材,决定稍作整理。

ESP32-SIDView tidy testbuild ESP32-SIDView整洁版

Having some issues getting ESP32-SIDView to work, I contacted its developer tobozo through GitHub. We exchanged countless messages about this project on GitHub. We later moved to a different platform and continued talking (and still do) about his and my project(s), coding, cats, daily life etc. This one GitHub issue lead to a - if I may say so - great digital friendship. ESP32-SIDView调试遇阻时,通过GitHub联系开发者tobozo。我们在GitHub上就此项目交流无数,后转至其他平台持续讨论(至今仍在继续)彼此项目、编程、猫咪及日常生活。这段GitHub际遇缔造了——容我自夸——美妙的数字友谊。

In the meantime I also found SidBerry. A linux based console application for playing SID tunes via the Raspberry Pi’s (not Pico) GPIO pins. 同期发现SidBerry——基于Linux的控制台应用,通过树莓派(非Pico)GPIO引脚播放SID音乐。

RPI breadboard extension with SKPico 树莓派面包板扩展配合SKPico

SidBerry with Raspberry Pi is what in early May of 2024 eventually led to the creation of FTDI USBSID, my first try at creating a USB controlled SID device. To do this I used a FTDI FT223HL breakout board I already owned for reverse engineering. 2024年5月初,树莓派+SidBerry组合最终催生FTDI USBSID——我的首款USB控制SID设备尝试,使用现有用于逆向工程的FTDI FT223HL分线板实现。

Somewhere in between I acquired a v0.1 SIDKICK-pico and 2 half broken MOS6581’s. 期间还入手了v0.1版SIDKICK-pico和两颗半残的MOS6581芯片。

FTDI USBSID FTDI USBSID原型

Creating your own hardware supporting board meant also creating software support. 自制硬件支持板需同步开发软件支持。

Reminiscing about that, here are the links: 追忆往昔,相关链接如下:

The project 项目正篇

Using the FTDI breakout board came with a lot of limitations. FTDI分线板存在诸多限制。

It wasn’t a microcontroller, so all the GPIO writes and input/output switching had to be done in the driver and using the FTDI ecosystem wasn’t really something I enjoyed. 非微控制器架构导致所有GPIO读写与输入输出切换都需驱动层实现,且FTDI生态体验欠佳。

By the end of May 2024 having had enough of these limitations is what led up to creating USBSID-Pico, or actually called PicoUSBSID at that time. A perfboard version with support for a single SID. 2024年5月底,受够这些限制后着手创建USBSID-Pico(当时称为PicoUSBSID)——支持单SID芯片的洞洞板版本。

PicoUSBSID single SID version PicoUSBSID单SID版

Halfway through June of 2024, I added dual SID support to the same perfboard. 2024年6月中旬,在同一洞洞板实现双SID支持。

PicoUSBSID dual SID version PicoUSBSID双SID版

With the continued support and encouragement of tobozo (thanks m8) the first actual USBSID-Pico v0.1 board came to life that lead up to the first v1.0 board. 在tobozo持续支持鼓励下(感谢老兄),首块USBSID-Pico v0.1实体板诞生,最终演进为v1.0版。

What followed has been an incredible journey of creativity, acquiring new skills, improving existing skills, learning new things and making new friends (and enemies?). 随后经历充满创造力的非凡旅程:掌握新技能、精进既有能力、学习新知并结识新友(树敌?)。

I talked to and met so many new people and 与众多新朋友交流面谈…(原文未完)

🔗 知识库双向关联