C64 Keyboard Layout for the C16

The Commodore 16 is an interesting machine, but the keyboard layout is infuriating. The cursor keys are at an awful place and… and… and… well, it just isn’t the C64 layout I’m used to!

So here’s a patch to the KERNAL ROM to change the C16 key mapping to the C64 one:

At offset 0x2026 of kernal.318004-05.bin (PAL) or kernal.318005-05.bin (NTSC), replace 260 bytes with these:

14 0D 11 88 85 86 87 40 33 57 41 34 5A 53 45 01
35 52 44 36 43 46 54 58 37 59 47 38 42 48 55 56
39 49 4A 30 4D 4B 4F 4E 13 50 4C 5C 2E 3A 5E 2C
2B 3D 3B 2D 5F 1D 2A 2F 31 FF 04 32 20 02 51 03
FF
94 8D 91 8C 89 8A 8B BA 23 D7 C1 24 DA D3 C5 01
25 D2 C4 26 C3 C6 D4 D8 27 D9 C7 28 C2 C8 D5 D6
29 C9 CA DD CD CB CF CE 93 D0 CC A9 3E 5B DE 3C
DB 3D 5D DD 5F 9D C0 3F 21 FF 04 22 A0 02 D1 83
FF
94 8D 91 8C 89 8A 8B A4 96 B3 B0 97 AD AE B1 01
98 B2 AC 99 BC BB A3 BD 9A B7 A5 9B BF B4 B8 BE
29 A2 B5 30 A7 A1 B9 AA 93 AF B6 A8 3E 5B DE 3C
A6 3D 5D DC 5F 9D DF 3F 81 FF 04 95 A0 02 AB 83
FF
FF FF FF FF FF FF FF FF 1C 17 01 9F 1A 13 05 FF
9C 12 04 1E 03 06 14 18 1F 19 07 9E 02 08 15 16
12 09 0A 92 0D 0B 0F 0E FF 10 0C 1C FF 1B 1E FF
FF 1F 1D FF 06 06 FF FF 90 FF FF 05 FF FF 11 FF
FF

Here’s the patched PAL ROM:
kernal.318004-05-kbd64.bin

And the NTSC ROM:
kernal.318005-05-kbd64.bin

(The key formerly known as “CLEAR HOME” is now dead. If you want to assign it a function, replace the first occurence of FF in the patch with the desired PETSCII code.)

And then, you have to add a few stickers to your keyboard!

2 thoughts on “C64 Keyboard Layout for the C16”

  1. Hi, nice modification !

    And the other way ? C16 keyboard @ C64 ? only with kernal modification ?

    Mir gefällt die HELP – Taste ( :

    Reply
  2. Just out of curiosity…why not use CLR/HOME (nee C64 RESTORE) for ESC? It’s the only native key missing from your layout.

    Reply

Leave a Comment