Assorted Commodore 64 Notes

Tags:tech

This is a collection of assorted notes of resources I found useful and tips I learned while learning 6502 programming on the commodore 64.

Resources

Easy 6502 (web based intro to writing 6502 assembly)
Official C64 Programmer's Reference Guide
Lemon64 - A forum for discussing the C64 and C64 development

More coming soon!

Development tools

Assemblers

There are many 6502 assemblers available, and all will be able to develop for the C64. They all have strengths and weaknesses. I have picked dasm for now because it is small, has good docs, and is available in the arch user repostitory.

dasm assembler website

Some small dasm tips:

As I've been learning I've been writing a set of dasm macros and definitions to make C64 development more convenient.

My C64 dasm macros/definitions

Emulation

VICE is the go-to C64 emulator. Linux usage: run `x64sc [file.prg]` to load the emulator running file.prg. Use F12 to open the settings menu.

Some small VICE tips:

Development notes

When you LOAD or RUN a program on the C64 it expects a BASIC program starting at address $0801. To make your machine code programs run with RUN (and not have to use SYS) you need a small basic program there to SYS the start of your machine code program. If you're using dasm, There is a macro in my C64 dasm macros/definitions file that adds this. See the readme in the git repo.