Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 3.88 KB

README.md

File metadata and controls

13 lines (7 loc) · 3.88 KB

c64-krv-switcher

Abstract - The C64 KRV Switcher is a device that allows the switching of Kernal ROM or video mode (NTSC/PAL, via the VIC-II² card) via the keyboard rather than having physical switches accessible outside the C64 case.

History - After developing the VIC-II² switcher card with Perifractic, I started searching for ways to toggle the video mode without having to have the VIC-II² DPDT switch protrude from the case. I found Sven Petersen's keyboard switcher project (open source), and also watched Adrian Black's video on toggling Kernal ROMs, and decided to develop my own solution. Sven was a tremendous help in troubleshooting the hardware, and his code (along with Adrian's) was the base on which my version was built.

Hardware - The C64 KRV Switcher is a single board with two smaller boards connected via breakaway tabs. The larger is an L-shaped keyboard wedge that attaches between the C64 keyboard header and the C64 keyboard. On-board is an Arduino Nano which performs the logic for monitoring and switching the Kernel ROM addresses or toggling the VIC-II² video mode. This board also attaches to the C64 reset line and it's EXROM reset line, so two right-angle DuPont headers must be installed on the C64 motherboard for this to work. The rest of the power and ground are drawn for the Arduino via the keyboard header. The second, smaller device is a 24 to 28 adapter, allowing a standard 27512 EPROM to be used to store eight Kernal images. The addressing is switched via the three right angle headers, connecting to the larger keyboard wedge.

Software - The C64 KRV Switcher software polls the keyboard scan of the C64 and waits for a combination of the RESTORE key and a number key to toggle modes. RESTORE + keys 1-8 toggle the address range of the 27512 EPROM to activate that Kernal image. RESTORE + 9 toggles the VIC-II² Switcher Card video mode between NTSC and PAL.

Programming the Arduino Nano - The Arduino Nano needs to be programmed using the Arduino as ISP method. This removes the built-in bootloader for the Arduino Nano, allowing it to boot instantly and begin monitoring the C64 keyboard scans without delay. The method we use is to program a traditional Arduino Uno with the Arduino as ISP program, then connect to the Arduino Nano on the KRV board via the six-pin programming header, and upload the KRV sketch using "Sketch > Upload Using Programmer" with the "Tools > Programmer: Arduino as ISP". This removes the slower, stock bootloader in the Nano and programs with the faster ISP booter. A set of six DuPont jumper wires (M -> F) need to be connected for this programming to work. The six programming header pins on the KRV keyboard wedge's Nano stick up just enough to make contact for programming of the Nano with a new sketch, if needed.

Programming the 27512 EPROM - Programming a 27512 EPROM requires a special piece of hardware (XGecu TL866II Plus is what we use), along with programming software (included with most programmers). But you must first build a BIN file that contains the binary files for each of the Kernal ROMs you want, sequentially. The stock C64 CBM Kernal V3 ROM should ALWAYS be in slot 1 (0000-1FFF), but you can put any other Kernal ROMs you want in the seven other 8Kb slots. We recommend JiffyDOS, but you MUST pay for it (only US$8.00 !). Several other Kernal ROMs are available, some of which are "hybrid" versions of JiffyDOS, so you'll want to start with a clean copy and then patch them. The TL866II Plus programming software lets your write images (BIN files) to specific ranges of the EPROM, but it would be worth your time to build a full 64Kb BIN image for yourself and upload it all at once. A BIN file is just a TEXT file, BUT some of the characters in the binary stream are seen by word processor programs (like WordPad or NotePad) as carriage returns or other formatting characters. You should use a binary file editor (or Hex Editor) to build your full 64Kb BIN file.