
Unicorn
yanghu/unicorne
A one-piece 40% ortho keyboard design inspired by crkbd, Kyria and Ferris.

CBM 1541 disk drive emulator running on Raspberry PI pico
Pico1541v2 is an open-source printed circuit board by johnnyegel, from the johnnyegel/Pico1541 repository on GitHub. It is a 2-layer board of 86.4 × 66.9 mm with 54 parts on 63 nets, routed with 460 tracks and 358 vias.
It is built around the SRV05-4 and MMBT3904. Its parts include 7 connectors, 5 capacitors, 5 switches, 4 resistors and 2 ICs. It belongs with the RP2040 boards of this library.
A cycle-accurate Commodore 1541 disk drive emulator running on the Raspberry Pi Pico 2 (RP2350).
Unlike high-level IEC drive emulators (such as standard SD2IEC devices), Pico1541 provides true hardware-level emulation. It models the MOS 6502 CPU and dual MOS 6522 VIAs in sub-cycle lockstep at 1 MHz, alongside a custom PIO-based magnetic track surface. As a result, Pico1541 is compatible with custom fastloaders, custom DOS routines, and sophisticated multi-stage copy protection schemes that execute code directly inside the drive.
nib2g64)racc6502v4, a dedicated micro-instruction 6502 CPU core executing in sub-cycle lockstep with dual 6522 VIAs at 1 MHz..D64: Standard 35-track and 40-track Commodore disk images (dynamic on-the-fly GCR encoding/decoding)..G64: Raw GCR track bitstreams with custom sector interleave and variable speed zones..PRG: Mount standalone PRG files as virtual single-file disks on the fly.CD: commands on IEC channel 15 to allow navigating SD card folders and disk images using standard Commodore 64 file browsers such as fb64.nib2g64 and nbz2nib) for converting raw .NIB and compressed .NBZ disk captures into standard .G64 format with automatic seam detection, alignment, and weak-bit sanitization.Pico1541 actively strives for cycle-exact 1541 hardware behavior. However, full compatibility remains an ongoing development effort:
.G64 images. Weak byte ranges (represented by 0x00 bytes in .G64) mutate pseudorandomly on each revolution without generating false SYNC pulses. This allows copy-protected games relying on weak bits (such as Bruce Lee and Paperboy) to pass protection checks and boot. Advanced multi-revolution density-drift protections may still behave unpredictably..D64, .G64, and .PRG. Raw .NIB format images cannot be processed directly on the microcontroller due to memory constraints; users can convert .NIB and .NBZ captures to .G64 using the bundled nib2g64 tool (see below) or external utilities prior to loading.Pico1541 divides responsibilities cleanly across the RP2350's two Cortex-M33 cores:
┌────────────────────────────────────────┐ ┌────────────────────────────────────────┐
│ Core 0 — Drive Manager │ │ Core 1 — Hardware Emulator │
│ (Embassy Async / pico1541-manager) │ │ (Cycle-Exact / pico1541-emulator) │
├────────────────────────────────────────┤ ├────────────────────────────────────────┤
│ • MicroSD FAT32 Driver (SPI) │ │ • 6502 CPU Core (racc6502v4) @ 1 MHz │
│ • Internal Flash LittleFS Storage │ │ • Dual 6522 VIAs (Timers, Handshake) │
│ • D64 / G64 / PRG Handlers │ │ • PIO Magnetic Surface Engine │
│ • On-the-fly GCR Track Encoder │ │ • Hardware DMA Ping-Pong Streaming │
│ • SSD1306 OLED UI & Keypad Task │ │ • Physical IEC Bus Line Polling │
│ • SD2IEC CD: Command Interceptor │ │ • Stepper Motor & Head Position Logic │
└───────────────────┬────────────────────┘ └───────────────────┬────────────────────┘
│ │
└─────────── Shared Track Buffer ───────────┘
(Double-buffered GCR)Communication between cores occurs via atomic flags and shared double-buffered track memory (DualCoreTrackBuffer), ensuring Core 1 never suffers jitter or interrupt latency from SD card I/O.
Pico1541 interfaces with the 5V Commodore IEC bus using an open-collector inverter (7406 or 7405) with 1kΩ pull-up resistors on the 3.3V side. Ready-to-order KiCad PCB schematics and Gerbers are located in hardware/kicad/Pico1541v2/.
| GPIO | Function | Description | Connection |
|---|---|---|---|
| GPIO 19 | DATA_RX | IEC Data In | Inverted from IEC Pin 5 (DATA, 1kΩ pull-up) |
| GPIO 20 | DATA_TX | IEC Data Out | Drives 7406/7405 Open-Collector to IEC DATA |
| GPIO 21 | CLK_RX | IEC Clock In | Inverted from IEC Pin 4 (CLK, 1kΩ pull-up) |
| GPIO 22 | CLK_TX | IEC Clock Out | Drives 7406/7405 Open-Collector to IEC CLK |
| GPIO 26 | ATN_RX | IEC Attention In | Inverted from IEC Pin 3 (ATN, 1kΩ pull-up) |
| GPIO 27 | RESET_RX | IEC Reset In | Inverted from IEC Pin 6 (RESET, 1kΩ pull-up) |
| GPIO 4 | I2C0_SDA | OLED Display SDA | SSD1306 I2C Data |
| GPIO 5 | I2C0_SCL | OLED Display SCL | SSD1306 I2C Clock |
| GPIO 6..9 | BUTTONS | Tactile Buttons | Short to Ground (Up, Down, Enter, Back) |
| GPIO 11 | SD_DET | MicroSD Card Detect | SD Socket Card Detect Switch |
| GPIO 12 | SD_MISO | MicroSD Data Out | SPI1 MISO (DAT0) |
| GPIO 13 | SD_CS | MicroSD Chip Select | SPI1 Chip Select (CD) |
| GPIO 14 | SD_CLK | MicroSD Clock | SPI1 SCK |
| GPIO 15 | SD_MOSI | MicroSD Data In | SPI1 MOSI (CMD) |
| GPIO 2 | PIEZO | Piezo Speaker | Head Stepper Sound Simulation |
| GPIO 10 | ACT_LED1 | Activity LED Pin 1 | Dual-color Activity Indicator |
| GPIO 3 | ACT_LED2 | Activity LED Pin 2 | Dual-color Activity Indicator |
| GPIO 16 | RGB_RED | Status RGB LED Red | Drive State Indicator |
| GPIO 17 | RGB_GREEN | Status RGB LED Green | Drive State Indicator |
| GPIO 18 | RGB_BLUE | Status RGB LED Blue | Drive State Indicator |
[!IMPORTANT] Commodore DOS ROMs are proprietary and copyrighted. This repository does NOT contain any Commodore ROM files. To use Pico1541, you must supply a legally obtained 16 KB (16,384 bytes) binary dump of a 1541 DOS ROM (such as
1541-II.251968-03.bin, original1541-c.bin, or a licensed JiffyDOS 1541 ROM).
The ROM file must have an exact size of 16,384 bytes (0x4000 bytes).
This is the standard and recommended installation method. The build system packages the ROMs into an internal LittleFS flash partition on the Pico 2, making the drive completely self-contained.
mklittlefs on your system:
mklittlefs is accessible in your PATH (mklittlefs --version).flash-fs/roms/ directory in this repository:
cp /path/to/1541-II.251968-03.bin flash-fs/roms/.bin or .rom files here—such as standard 1541-II DOS, 1541-C, and JiffyDOS—to switch between them on device).build.rs) will automatically pack flash-fs/ into a LittleFS image (fs.bin) and link it into flash memory.When multiple ROMs are bundled into the flash filesystem, you can switch between them on the fly:
Main Menu -> Settings -> Select ROM/settings/boot_rom.txt in persistent flash, reloads the emulator memory buffer, and resets the 6502 drive emulation.Pico1541 is built with Rust. Install the stable Rust toolchain via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shAdd the bare-metal target for the RP2350 (Cortex-M33):
rustup target add thumbv8m.main-none-eabihfInstall elf2uf2-rs for easy USB drag-and-drop flashing (when the Pico 2 is in BOOTSEL mode):
cargo install elf2uf2-rs --lockedAlternatively, install picotool or probe-rs if you prefer flashing via SWD/JTAG debuggers.
Clone the repository and enter the project directory:
git clone https://github.com/johnnyegel/Pico1541.git
cd Pico1541Make sure you have placed your 16 KB DOS ROM in flash-fs/roms/ before building.
Build the optimized release firmware:
cargo build -p pico1541-rp2350 --target thumbv8m.main-none-eabihf --releaseelf2uf2-rs -d target/thumbv8m.main-none-eabihf/release/pico1541-rp2350cargo run -p pico1541-rp2350 --release directly from within the crates/pico1541-rp2350 directory).If you are using a Raspberry Pi Debug Probe or SWD debugger with probe-rs, you can flash using:
cargo flash-swdnib2g64)While Pico1541's microcontroller firmware natively supports .D64, .G64, and .PRG formats, raw .NIB captures cannot be held entirely in the RP2350 RAM alongside the active emulation buffers. To make working with .NIB and .NBZ images seamless, Pico1541 includes host CLI conversion tools located in tools/:
0x00) so the firmware's magnetic surface engine can simulate non-deterministic flux at runtime..nib and .nbz files.# Convert a single .nib or .nbz to .g64
cargo run -p nib2g64 -- game.nib -o game.g64
# Batch convert an entire folder of disk images
cargo run -p nib2g64 -- /path/to/disks/Connect a standard 6-pin DIN serial cable from the Commodore 64 / 128 serial port to the DIN connector on the Pico1541 hat. Ensure the ground reference is shared.
Pico1541 uses a 4-button navigation scheme:
.D64, .G64), or mount a .PRG.Once an image is mounted, use standard Commodore commands on your C64:
LOAD "$",8
LIST
LOAD "*",8,1
RUNfb64):Pico1541 includes built-in SD2IEC protocol command snooping. When using tools like fb64:
CD:DIRNAME, CD:_, CD:←) are automatically intercepted on command channel 15.Pico1541/
├── crates/
│ ├── pico1541-emulator/ # Pure 6502 and dual 6522 VIA emulation engine
│ ├── racc6502v4/ # Cycle-accurate micro-step 6502 CPU implementation
│ ├── pico1541-manager/ # Async Embassy manager, disk formats, GCR, UI logic
│ ├── pico1541-rp-common/ # Shared hardware drivers (PIO, SPI, Display, Audio)
│ ├── pico1541-rp2350/ # Firmware entry point for Raspberry Pi Pico 2 (RP2350)
│ └── pico1541-common/ # Common definitions, events, and inter-core buffers
├── flash-fs/ # Root filesystem packed into on-chip LittleFS partition
│ └── roms/ # Location to place 16KB DOS ROMs for compile-time embedding
├── hardware/ # KiCad schematics, PCB layouts, and Gerber files
│ └── kicad/
│ └── Pico1541v2/ # Hardware Revision 2 interface hat (RP2350)
├── tools/
│ ├── nib2g64/ # Standalone NIB/NBZ to G64 converter CLI tool
│ └── nbz2nib/ # Standalone NBZ decompressor CLI utility
├── scripts/ # Tracing, logic analysis, and code generation scripts
├── COMMERCIAL_LICENSE.md # Commercial manufacturing terms
└── LICENSE.md # Firmware license (PolyForm Noncommercial 1.0.0)This project is made available under multiple licenses:
racc6502v4):
Licensed under the GNU General Public License v3.0 (GPL-3.0).| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | M | MountingHole:MountingHole_2.5mm_Pad_Via | H1, H2, H3, H4, H5, H7, H8, H9, H10 |
| 6 | Fiducial | Fiducial:Fiducial_1mm_Mask3mm | FID1, FID2, FID3, FID4, FID5, FID6 |
| 4 | 1k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R1, R2, R3, R4 |
| 3 | 100n | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C2, C4, C5 |
| 2 | 1k | Resistor_SMD:R_Array_Convex_4x0603 | RN3, RN4 |
| 2 | ~ | Symbol:Symbol_CC-Noncommercial_CopperTop_Small | CC1, CC2 |
| 1 | 10k | Resistor_SMD:R_Array_Convex_4x0603 | RN1 |
| 1 | 10u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C3 |
| 1 | 330 | Resistor_SMD:R_Array_Convex_4x0603 | RN2 |
| 1 | 47u | Capacitor_SMD:CP_Elec_5x4.5 | C1 |
| 1 | 74LS06 | Package_SO:SO-14_3.9x8.65mm_P1.27mm | U1 |
| 1 | Button1 | Button_Switch_SMD:SW_SPST_Omron_B3FS-100xP | SW2 |
| 1 | Button2 | Button_Switch_SMD:SW_SPST_Omron_B3FS-100xP | SW3 |
| 1 | Button3 | Button_Switch_SMD:SW_SPST_Omron_B3FS-100xP | SW4 |
| 1 | Button4 | Button_Switch_SMD:SW_SPST_Omron_B3FS-100xP | SW5 |
| 1 | DIN-6 | Pico-1541 Footprints:DIN-6-240deg | J7 |
| 1 | Display/Keys | Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical | J3 |
| 1 | LED_ACT | LED_THT:LED_D5.0mm | D2 |
| 1 | LED_STAT | Pico-1541 Footprints:LED_D5.0mm-4_RGB_CorrectStaggered_Pins | D1 |
| 1 | MMBT3904 | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | Micro SD Card | Pico-1541 Footprints:MicroSD_HPJF | J4 |
| 1 | OLED | Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_Vertical | J6 |
| 1 | OLED/Key_Hat | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J5 |
| 1 | Piezo | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | LS1 |
| 1 | RaspberryPi_Pico | Module:RaspberryPi_Pico_SMD | A1 |
| 1 | Reset | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx83-2LFS | SW1 |
| 1 | SRV05-4 | Package_TO_SOT_SMD:SOT-23-6 | U2 |
| 1 | SWD | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | Serial | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
The 49 most common of 54 parts.

yanghu/unicorne
A one-piece 40% ortho keyboard design inspired by crkbd, Kyria and Ferris.

Manawyrm/Gigaset-Debug-Adapter
Gigaset-Debug-Adapter can be used with many Gigaset DECT phone models to access the internal UART. It's basically a 1.8V USB->UART converter, with switchable strapping logic and 3V step-down converter.



VIPQualityPost/polarizer-illuminator
15W USB PD powered microscope illuminator with electrically controlled liquid crystal polarizer for removing specular reflections.

IM-TechieScientist/custom-stlink
A custom STLink compatible debugger using STM32F103 designed using KiCAD


It measures 86.4 × 66.9 mm and has 2 copper layers, 1.6 mm thick.
54 parts, built around the SRV05-4 and MMBT3904. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the johnnyegel/Pico1541 repository on GitHub, at the commit this page was made from: the board is hardware/kicad/Pico1541v2/Pico1541v2.kicad_pcb and its schematic hardware/kicad/Pico1541v2/Pico1541v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask johnnyegel before reusing the design.