A livecoding demo for the C64
Find a file
2025-07-28 16:19:38 +02:00
editor Fix bug in editor's CSI dispatch causing errors on some unknown keys 2025-07-28 16:19:38 +02:00
host Add working emulator preview build method 2025-07-28 12:38:56 +02:00
user-side-compiler Fix USC bug causing necessary loads to be skipped at IBLOCK starts 2025-07-28 15:37:13 +02:00
.gitignore Merge branch 'main' into integration 2025-07-25 13:07:30 +02:00
asdf-paths.lisp Make editor more easily started and used via Roswell-installed Lisp 2025-07-28 15:45:32 +02:00
README.md Documentation and mini fix for editor 2025-07-28 16:03:24 +02:00

C64 Livecoding demo

Livecoding a Commodore 64 in a language compiled on a modern PC written via an editor running on a VT220.

Editor

In a real hardware setup, the editor, which is integrated with the compiler, runs the show. In this setup, running it is simple. Running it interactively is almost as simple.

To first enter an environment in which the editor can be easily loaded, enter Lisp using the command ros run -- --load asdf-paths.lisp. Then load the editor by typing (asdf:load-system "editor"). The editor can now be started by typing (editor:main "/dev/<the tty device>") where <the tty device> is the terminal you wish to have the editor run on. This is most likely /dev/ttyUSB0, but may be something like /dev/pts/3 if you're testing without a real VT220. If the host program is likely to change during the editor process's life time, add :refresh-asm-functions-p t to the call to EDITOR::MAIN, after the terminal path. This will ensure it reads the host program's listing before each compile to find the addresses of built-in functions.

The editor should now run. Keybindings will eventually be listed, but for now the source code is the canonical list of bindings.

The editor will, when the compile command is issued, perform a compilation, write statistics and IR to standard output, save both the source code and 6502 binary to the current working directory, then attempt to upload the code to the C64 via a serial device on /dev/ttyACM0. This path should ideally not change, but if the need arises, it can be changed simply be changing the variable USC::*C64-TTY*. In the event this transfer fails to begin, for example if the serial device is missing, a warning is printed to standard output, but the editor does not display anything. Saved files are unaffected by a failed transfer.