~/games / breadbin

$ ./breadbin

// A Unix-like OS for the Commodore 64: multitasking, directories on the 1541, pipes, an editor, BASIC and an assembler

Breadbin cover art

Breadbin

what
Unix-like OS for the C64
status
in development
price
free — pay what you want
demo
free, in your browser

6502 8-bit commodore commodore-64 open-source operating-system retro unix vice

download on itch.io →

# screenshots

Breadbin screenshot Breadbin screenshot Breadbin screenshot Breadbin screenshot

# about

A real Unix-like operating system for the Commodore 64

Breadbin turns your C64 (the good old "breadbin") into a small Unix machine. It's a real kernel, not a shell that prints canned output: every command is a separate program loaded from disk and run as its own process.

Play it in your browser

Press ▶ play the demo above, click the screen, type root at the login: prompt and press Return. Then try ls /bin, help or cat /home/readme | grep unix | wc. The browser demo runs on the free MEGA65 Open ROMs (no Commodore ROM) and keeps its disk in RAM, so your changes last until you close the page. For a real 1541 disk, download the zip from itch.io.

What's inside

  • Runs on a stock C64 with a 1541 floppy; an REU or GeoRAM is used if there is one
  • Multitasking: up to 12 programs at once (count > /dev/null & and keep typing)
  • Real directories on the floppy: mkdir, cd .., /dev/console, /dev/null; fsck checks and repairs the disk
  • Pipes and redirection: cat readme | grep unix | wc, >, >>, <, 2>
  • A shell with background jobs, CTRL-Z / fg / bg, $?, && and ||, command history (cursor up/down)
  • Signals: RUN/STOP interrupts the foreground job, RESTORE kills a hung program, kill sends any signal
  • Users with passwords: login, whoami, passwd; colour themes
  • A full-screen editor (edit), an integer BASIC, and a 6502 assembler (as) that runs on the C64: write, assemble and run new commands without leaving the machine
  • More drives: mount 9 /mnt attaches drives 9 to 11 (1541 or 1581), including normal C64 disks that you can read and write; format 9 makes new disks
  • An REU or GeoRAM becomes a RAM disk at /tmp; an REU also keeps a copy of drive 8, so a program loads from the floppy once per session
  • Over 40 commands: ls cat cp mv rm mkdir rmdir pwd stat hexdump head tail more grep wc sort tee echo ps kill jobs sleep free df date uptime uname mount umount format touch theme help clear edit basic as

New in 0.5

  • Files have times: ls -l shows when each file changed, stat shows the modify and change times, and touch updates them
  • A clock that never goes backwards: set it with date 2026-11-02 18:00; until then it starts from the newest time on the boot disk
  • 1581 drives and .d81 images: boot from a 1581 or an Ultimate with breadbin.d81 (3,200 blocks), and mount, format and fsck 1581 disks in drives 9 to 11
  • Tab completion: CTRL-I (TAB) completes a command or file name; press it again to list the choices
  • New disk format (format 2): convert 0.4 disks with tools/mkimage.py upgrade from GitHub

New in 0.4

  • Disk reads about twice as fast: the kernel loads a small routine into the 1541 and the drive sends sectors with it (an SD2IEC falls back to the normal way by itself)
  • A write-back disk cache and sync: writing one byte at a time went from 188 seconds to 12
  • More memory for programs: the user library is shared in the kernel (echo is 256 bytes), the process tables live under the KERNAL ROM, login turns itself into the shell. A session takes 28 pages instead of 43, out of 119
  • as and edit need 40 and 39 pages instead of 66 and 60: keep the editor stopped with CTRL-Z while the assembler runs
  • Shell: $?, && and ||, 2> file, 2>&1, command history; fg and bg act on whole pipelines
  • RESTORE kills a hung program; fsck; the RAM disk uses the whole REU; a jiffy clock that keeps time during disk access
  • New tools: tee, tail and sort, plus many fixes from reading every file again

How to run it

  1. Download breadbin-0.5.zip and attach breadbin.d64 to drive 8 in VICE (or autostart it). With a 1581, or an Ultimate 64 / 1541 Ultimate, use breadbin.d81 instead.
  2. LOAD"*",8,1 and RUN
  3. At breadbin login: type root
  4. Try help, ls /bin, basic /home/hello.bas

On a C64 keyboard the pipe | is SHIFT + minus. Works on a stock C64 with a 1541; an REU is optional. So far it's been tested in VICE; real-hardware reports are very welcome!

Free and open source

Breadbin is free (MIT license). The source code, build instructions and docs (including how the filesystem works) are on GitHub: github.com/kpatr1981/breadbin. If you enjoy it and want to support development, a donation is appreciated, but never required.

Made by

▶ play the demo download on itch.io →

click or Esc to close