Building and Hacking on the C64 KERNAL & BASIC with Modern Tools

The original Commodore 64 KERNAL and BASIC source code has been available for a while. It used to be built using Commodore’s assembler of a PET.

I have converted the source to build with cc65:

https://github.com/mist64/c64rom

The repository builds the exact images of last Commodore versions of KERNAL and BASIC including the correct checksums.

The idea of the repository is to use it as the base source for updates and derivatives of the C64 ROM. For this, all KERNAL components have been put into segments at fixed addresses, so that replacing components (like tape or RS232) will keep the overall layout intact and won’t break symbol addresses.

Make sure to read the repository’s README, which contains some interesting information about the ROM checksum algorithm.

Leave a Comment