This is about getting a program you are going to write (or indeed have written) in assembler and turning it into a real Commodore 64 cartridge.
use this skeleton .asm file:
; cartridge code appears at $8000
*=$8000
; this is the cartridge header
; this has BASIC inits nopsled'd out
.byte $09, $80, $25, $80, $c3, $c2, $cd, $38, $30, $8e, $16, $d0, $20, $a3, $fd, $20
.byte $50, $fd, $20, $15, $fd, $20, $5b, $ff, $58, $ea, $ea, $ea, $ea, $ea, $ea, $ea
.byte $ea, $ea, $ea, $ea, $ea
; vars in memory
; the ? means they don't get assembled into the image and make a huge blank cart!
; yet you can still refer to them in your program
*=$c000 ; $c000 is an ok place for variables but so is $800
wordVariableExample
.word ?
byteVariableExample
.byte ?
; your code starts here
*=$8025
; ----- PUT YOUR PROGRAM HERE ----- ;
; put this after your program code
; to fill up the image to make an 8k cart
* = $9fff ; fill up to -$9fff
.byte 0
notes:
64tass.exe -a -b yourprogram.asm -o yourprogram.bin
This is important, because it's worth knowing whether your cart works before actually burning it to a real EPROM, right?
x64.exe -cart8 yourprogram.bin
Everyone's favourite EPROM for an 8k cart is the 27c64.
I use the MiniPro TL866 programmer, common on ebay, and it's only 50$!
You USED TO BE able to buy an 8k blank PCB directly from Alphaworks, but I bought the last one! The Alphaworks PCB is excellent because it needed no configuration. I just soldered in a 28 pin socket and plugged my EPROM in. Please solder in a socket and not the EPROM itself!
They come in 2 styles: 8k and 16k. Often they are switchable, so for this exercise you will need an 8k one or one that can be configured to work as an 8k. The Alphaworks PCB is 8k only, which makes life easier.
ebay: search for commodore 64 (blank,bare) cartridge PCB. There also, at time of writing, some alphaworks PCBs on ebay too.
BTW, the schematic for the PCB+EPROM is here http://blog.worldofjani.com/wp-content/uploads/8Kcart_8000.png
The alpha works instruction book explains the PCB and the header that appears at $8000 perfectly
Alphaworks_8k_Cartridge.pdf
Here's a longer version of the alphaworks manual:
http://www.c64zone.alphaworks.com.au/downloads/documents/CartDoc.pdf
Jani explains how to make a cart, but glosses over some of the details, and it seems more geared to VICE users
http://blog.worldofjani.com/?p=879
Commodore 64 memory map
http://sta.c64.org/cbm64mem.html
Check out part 2:
putting a C program onto a 8k cart!