Skip to the content
2 layers59.1 × 60 mm1541-rePico, the printed circuit board in 3D

replacement of analog-part of Commodore 1541-Floppy devices based on Pi-Pico(2)

Size
59.1 × 60 mm
Copper layers
2
Thickness
1.6 mm
Parts
46
Nets
85
Pads
308
Tracks, vias
532, 71
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
8 Mar 2025
Updated
3 Nov 2026

Overview

1541-rePico is an open-source printed circuit board by fook42, from the fook42/1541-rePico repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 59.1 × 60 mm with 46 parts on 85 nets, routed with 532 tracks and 71 vias.

It is built around the SN74LVC4245APW and BSS138. Its parts include 20 resistors, 11 connectors, 9 transistors, 3 ICs and 1 capacitor. It belongs with the RP2040 boards of this library.

Main components

2

README

README.md

1541-rePico

replacement of analog-part of Commodore 1541-Floppy devices based on Pi-Pico(2)

preface/credits

this project was derived from the original 1541-rebuild from Thorsten Kattanek (https://github.com/ThKattanek/1541-rebuild) ! parts of his code were taken from there and adopted for Raspberry Pico and modified to handle disk images differently. Thanks!

the C64/C16 selector-programm was developed and implemented by PeiselUlli !

thanks to BensonRSI for adding debugging documentation, dev-containers and github-magic !

Features

latest version:

  • software: 1.7.3
  • hardware: 1.7.0

Hardware

single board, size 59mm x 60 mm

  • Raspberry Pico2 socket/solder-pads
  • VIA 40pin socket
  • levelshifter (BSS138 & 74LVC4245) for stable signals
  • connectors for
    • I2C Display
    • SPI SD-Card adapter
    • Rotary-Encoder + Switch (KY-040 compatible)
    • Write-Protect-Signal
    • passive Buzzer

one size fits for all 1541 models.

how to build

-> interactive BOM

-> step-by-step guide

Software

Pico2 Firmware
  • mounting of D64 & G64 & PRG Files
  • 35 & 42 track image files supported
  • read and write access for both D64 & G64
  • sd-card hotswap feature (refresh of directory content)
C64/C16/VC20 Image Selector
  • browsing through sd-card content via "virtual disk-image"
    • subdirectory support
    • 4 way scrolling
    • usage of joystick for browsing possible
  • highlighting and selecting of different file-types (D64,G64,PRG,Folder)
  • shows TXT files onscreen
  • simple mounting and also fastloading of selected entry
  • supports C64-PAL, C64-NTSC, VC20 and C16 computers

how to build

prepare tools (linux)

text
sudo apt install cmake libusb-1.0-0-dev build-essential pkg-config python3 xxd gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib acme

pico-sdk

from : https://github.com/raspberrypi/pico-sdk

  • clone this repo
  • create a environment variable called "PICO_SDK_PATH" which points to this repo
  • place a "export PICO_SDK_PATH= " at the end of your .profile script
  • then cd into this repo-folder and initialize the mbedtls submodule (picotool mentiones this)

all in one:

text
git clone https://github.com/raspberrypi/pico-sdk.git
export PICO_SDK_PATH=$(pwd)/pico-sdk
echo "export PICO_SDK_PATH=$PICO_SDK_PATH" >> ~/.profile"
cd pico-sdk
git submodule update --init lib/mbedtls

picotool

from : https://github.com/raspberrypi/picotool

  • clone this repo
  • install the picotool as described in README.md and BUILDING.md file there
text
git clone https://github.com/raspberrypi/picotool.git

build steps

make sure submodules are initialized and up-to-date (like NoOS-Fat-lib)

text
git submodule update --init
git pull --recurse-submodules

prepare build-folder / configure Ninja for build the cmake project

text
cd firmware
mkdir build
cd build
cmake .. -D BUILD_MENUPRG=OFF -D COMPRESS_MENUPRG=ON -D PCB_VERSION=17

optional cmake variables are:

VariableValuesDescription
BUILD_MENUPRGON*/OFFlet ACME compile the provided menu.asm-code. Otherwise the shipped, precompiled "menu.prg" will be used.
BUILD_SELECTORPRGON*/OFFlet PETCAT convert the boot-selector basic code to PRG. Otherwise the shipped, precompiled "selector.prg" will be used.
COMPRESS_MENUPRGON*/OFFuses dali binary compression to generate a smaller menu-prg object
PCB_VERSION0..17*defines which PCB version is used -> enables specific code features according to pcb-layout (like sound output)

(* is default)

now trigger a build

text
make -j

howto flash

connect your pico2 via USB cable and use picotool to flash the firmware

text
picotool load -t uf2 1541-rePico.uf2 -x -f

debugging with OpenOCD

prerequisites

  • CMSIS-DAP Compatible Debugger (e.g., Raspberry Pi Debug Probe, STLink, or SEGGER J-Link) get binaries for a pico here : https://github.com/raspberrypi/debugprobe
  • OpenOCD installed ( built in devcontainer or with "build_openocd.sh")
  • gdb-multiarch for GDB debugging ( preinstalled in devcontainer )

setup

  1. Connect your debugger to the Pico using the SWD pins:

    • SWCLK → GPIO 24 (or pin 20)
    • SWDIO → GPIO 25 (or pin 21)
    • GND → GND
  2. Ensure the debugger is connected via USB to your development machine

starting OpenOCD

Start OpenOCD in a terminal:

text
openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg

OpenOCD will listen on port 3333 for GDB connections.

debugging in VS Code

VS Code launch configurations are available:

Pico Debug (Cortex-Debug) - Integrated debugging with OpenOCD

using Cortex-Debug (recommended)

Press F5 or select "Pico Debug (Cortex-Debug)" from the Run menu. This will:

  • Start OpenOCD automatically
  • Load your firmware
  • Break at main()
  • Allow step debugging, breakpoints, and variable inspection
using external OpenOCD
  1. Start OpenOCD in a terminal (see above)
  2. Select "Pico Debug (Cortex-Debug with external OpenOCD)" from Run menu
  3. VS Code will connect to the running OpenOCD instance

useful GDB commands

When debugging, common GDB commands include:

text
continue         # Resume execution
step             # Step into function
next             # Step over function
break <func>     # Set breakpoint at function
break <file>:<line>  # Set breakpoint at file:line
print <var>      # Print variable value
display <var>    # Show variable on each step
backtrace        # Show call stack

troubleshooting

"Device not found":

  • Check CMSIS-DAP debugger is connected
  • Verify SWD pin connections
  • Try openocd -d for debug output
  • Connect the USB for the targetdevice, then the USB for debugprobe ( to keep correct order of /dev/ttyACMx )

GDB connection failed:

  • Ensure OpenOCD is running on port 3333
  • Check firewall settings

documentation

project documentation

t.b.d.

supported disk formats

currently D64 and G64 are supported as for reading and writing.
as bonus, PRG files can be loaded by an on-the-fly routine that creates a valid D64 image out of it.

additionaly a small tool conv_x64 is provided that allows easy conversion from one to the other on you linux-pc.

Pictures

impressions of current setup and PCB can be found here.

Links

Parts

46
QtyValueFootprintReferences
1610kResistor_SMD:R_0603_1608MetricR5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20
9BSS138Package_TO_SOT_SMD:SOT-23Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9
21.8kResistor_SMD:R_0805_2012MetricR1, R2
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
11MResistor_SMD:R_0603_1608MetricR4
147µFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
1BuzzerBuzzer_Beeper:MagneticBuzzer_StarMicronics_QMXBZ1
1Buzzer ConnectorConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ8
1Conn_01x01_PinConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ5
1Conn_01x05_PinConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ3
1Display ConnectorConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ1
1Display PowerConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1EXT_5VConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ6
1PicoRPi_Pico:RPi_Pico_SMD_THU1
1RESETButton_Switch_THT:SW_PUSH_6mm_H5mmSW1
1RESET_1541Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ7
1SD Card Module ConnectorConnector_PinSocket_2.54mm:PinSocket_2x08_P2.54mm_VerticalJ4
1SD PowerConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ9
1SN74LVC4245APackage_SO:TSSOP-24_4.4x7.8mm_P0.65mmU2
1VIA6522Package_DIP:DIP-40_W15.24mm_Socket_LongPadsIC1
1VIA_PIN_1-20Connector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalP1
1VIA_PIN_21-40Connector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalP2

More from fook42/1541-rePico

1
  • 2 layers59.1 × 60 mm1541-rePico, the printed circuit board in 3D

    1541-rePico

    fook42/1541-rePico

    replacement of analog-part of Commodore 1541-Floppy devices based on Pi-Pico(2)

    44 parts17GPL-3.0

Similar boards

  • 2 layers130.4 × 76.6 mmGb stream cart, the printed circuit board in 3D

    Gb stream cart

    Staacks/gbinterceptor

    Capture or stream Game Boy gameplay footage via USB without modifying the Game Boy.

    80 parts542
  • 2 layers262.5 × 107.9 mmEconopet, the printed circuit board in 3D

    Econopet

    DLehenbauer/econopet

    Mainboard replacement for Commodore PET/CBM series machines

    305 parts19CC0-1.0
  • 2 layers100 × 96 mmCopico, the printed circuit board in 3D

    Copico

    thomasshanks/copico-board

    CoPiCo PCB KiCad

    55 parts7MIT
  • 2 layers86 × 54.1 mmHatBoard, the printed circuit board in 3D

    HatBoard

    synthkore/drivepackhw

    drivePACK's schematics and PCB

    50 parts2
  • 2 layers87.5 × 70 mmGbpunk, the printed circuit board in 3D

    Gbpunk

    kaybarkbark/gbpunk

    RP2040 Based Gameboy Flash Cart

    92 parts1
  • 2 layers101.5 × 83 mmPrototype, the printed circuit board in 3D

    Prototype

    alttpo/cart-prototype

    SNES prototype cart for 3v3 experimentation

    40 partsMIT
  • 2 layers6502-schematic, the printed circuit board in 3D

    6502-schematic

    lolakkalol/6502-computer-project

    A 6502-based computer project! Explore the docs » View Demo Programs · Report Bug · Request Feature

    57 parts
  • 2 layers100 × 100 mmTfr905h, the printed circuit board in 3D

    Tfr905h

    strickyak/tfr9

    The TFR/9 Single Board Computer for Hitachi 6309E or Motorola 6809E CPUs (TFR/901)

    35 parts12MIT

Questions

How big is the 1541-rePico PCB?

It measures 59.1 × 60 mm and has 2 copper layers, 1.6 mm thick.

What parts does the 1541-rePico use?

46 parts, built around the SN74LVC4245APW and BSS138. 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.

Where can I download the 1541-rePico KiCad files?

From the fook42/1541-rePico repository on GitHub, at the commit this page was made from: the board is hardware/1541-rePico.kicad_pcb and its schematic hardware/1541-rePico.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the 1541-rePico design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).