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.

1 thought on “Building and Hacking on the C64 KERNAL & BASIC with Modern Tools”

  1. I am hopin that you can help me. All documentation I can find (i.e. Commodore 64 Programmers Reference Guide) says that the RDTIM and SETTIM KERNAL Calls uses Register A for the MSB. I have testet this in VICE emulater as well as the Commander X16 emulator and it seems that Register A is actually LSB (The byte that is changed most often). Can you confirm that the Programmers Reference Guide is wrong?
    Thanks in advance

    Reply

Leave a Comment