13 lines
1.8 KiB
Markdown
13 lines
1.8 KiB
Markdown
# 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.
|