A Go module for controlling Commodore 64 Ultimate devices over the network. It provides client libraries for the device's REST API and utilities for working with C64 assembly, BASIC, disk and CRT images, streams etc.
go get github.com/c64uploader/go-ultimateSee the Go package documentation by clicking the badge above or follow the examples below.
Functionality is organized into the following client services:
client.Machine: Control power, reset, and read/write RAM over DMA.client.Runners: Upload and run programs (.PRG, .CRT) or play music (.SID, .MOD).client.Drives: Mount disk images and control emulated floppy drives.client.Files: Query file metadata and create blank disk images.client.Configs: Read and write device settings.client.Keyboard: Inject text into the C64.client.Streams.AVISession,client.Streams.Audio: Stream video and audio, multiplex to AVI format, or plain audio.client.Debug: Read and decode C64 state: screen, sprites, registers, memory.client.Raw: Send binary commands to the TCP port 64 socket for lower latency than the REST API.
The library also provides utilities for working with 6502 code, BASIC, and C64 hardware:
c64.Assemble: Compile 6502 assembly to PRG files.c64.Disassemble: Disassemble 6502 machine code to assembly.c64.NewRAMCartridge,c64.NewRawCartridge: Build CRT cartridge images.c64.NewDiskImage: Build D64 or D71 disk images.c64.DecodeBASICProgram: Convert tokenized BASIC to source code.c64.ParseT64: Parse .T64 tape archive files and extract PRG entries ready for upload.c64.Screen: Read and decode live screen text from the C64.c64.Sprite: Access sprite position, color, and bitmap data, render to images.c64.DecodeBitmap: Render bitmap data to images.
The project includes a command line tool c64ctl for accessing go-ultimate capabilities. Install it with go -C tools/c64ctl/ install or run it directly using go run github.com/c64uploader/go-ultimate/tools/c64ctl@latest.
To enable shell completion, use source <(c64ctl completion bash).
See CONTRIBUTING.md for details on how to contribute to this project.
