So, I've got a willem eeprom programmer, I've got lots of notes about CBM80, a couple blank eeproms, a cartridge to put them on, and I've got a basic program.
I'm missing a key ingredient to my exciting future of cartridge based excitement, how do I get from basic program to a bin file to burn to the eeprom?
I was thinking about it with my electronics and retro projects adviser (I call him Dad), and his thought was to load the program and then peek along the memory to gather the program up. While I think this is possible, it's not a particularly elegant method, and may involve a lot of trial and error to get all the program.
I'm hoping that folks here might have a better method, or even just pointers and thoughts to bring to it.
Post by Leif Bloomquist on Jun 16, 2008 9:41:09 GMT -5
(Did you also post about this at Lemon?)
Putting a BASIC program on a cartridge is slightly odd, but not impossible. I did this on the VIC20 a couple of years ago. It will be easier on the 64 though because BASIC always starts at the same place.
Here's my suggested approach:
1. Save the BASIC program as a .prg, and transfer it to your PC. Find out how many byes long it is.
2. Write a little ML program that does the following:
- Uses CBM80 to Autostart - Call the kernal startup calls that initialize BASIC etc. - Copy memory from $8100 to $8100+<length of your program> to $0800. - Calls the BASIC RUN routine.
3. Make a .bin file that combines your ML program at $8000 and your BASIC program at $8100.
You should strip the first two bytes (load address) off of the BASIC .prg file, but leave it otherwise untouched.
4. For testing, you don't even need to use an EPROM. Just write this .bin file back to the C64 (with loading address). Then LOAD it with ,8,1 and do SYS64738. This will make the 64 think it has the cartridge plugged in.
5. Burn the .bin file to the EPROM (without loading address!) and test.
Here's the source code of my VIC20 project that does this if you want some ideas.