Assorted Commodore 64 Notes
This is a collection of assorted notes of resources I found useful and tips I learned while learning 6502 programming on the commodore 64.
ResourcesEasy 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!
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:
- With the `-E2` flag, dasm is able to output errors in a format understood by the acme text editor.
- If you specify your output file to have a .prg extention, you can then load that into a C64 emulator directly.
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
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:
- VICE has a built in machine-code monitor that can be used for debugging. With "native monitor" on, it will show up in the terminal you ran VICE from rather than in the emulated window.
- Disable CRT emulation, your eyes will thank you.
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.