
Type d
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

Flash ROM board that replaces the ROMs on longboard C64s with 3 24-pin ROM sockets
C64-rom-326298 is an open-source printed circuit board by thorpej, from the thorpej/c64-rom-326298 repository on GitHub. It is a 2-layer board of 75.7 × 33.4 mm with 14 parts on 58 nets, routed with 329 tracks and 53 vias.
Its parts include 5 connectors, 3 switches, 2 capacitors and 2 ICs. It belongs with the FPGA and CPLD boards of this library.

This is a module that replaces the 3 mask ROMs in a Commodore 64 with a single parallel NOR flash ROM chip that's extremely reliable and still, as of October 2023, being manufactured. Why would you want to do this? Well, sometimes these old MOS mask ROMs fail, and when they do, you have to replace them with a newer part. And to do that, you will probably have to use some sort of adapter to fit a newer EPROM or EEPROM chip into the socket. Well, if you're going install an adapter anyway, why not just do it once?
In addition to improved reliability, this module draws less power and produces less heat than the original mask ROMs. Furthermore, because the flash ROM is a larger capacity (128KB) and reprogrammable, it can also hold 3 alternate ROM images for each ROM in addition to the standard ROM image (for a total of 4 each). 3 sets of DIP switches are provided to select between the ROM images.
While originally designed for my 326298 Rev A board, this will work in the other Commodore 64 longboards that have 3 24-pin ROM sockets.
This work is licensed under the Creative Commons Attribution ShareAlike 4.0 International license.

The theory of operation of the module is quite simple. Each of the 3 mask ROMs are connected to the system address bus (A0-A12 for the BASIC and KERNAL ROMs, A0-A11 for the Character ROM), the system data bus, and their own individual chip select, which are controlled by the PLA. The module intercepts all of these signals at the ROM sockets.
The 128KB flash ROM is divided into 3 segments:
These segments are selected by decoding the mask ROM chip selects and mapping them to the A15-A16 address inputs to the flash ROM:
Within each segment, 2 DIP switches control the upper 2 bits of the offset within the segment:
Because A12's behavior is dependent on which ROM segment is selected, the decoding logic intercepts it and adjusts it as necessary.
The decoding, segment selection, and image selection logic is implemented in a GAL22V10. The logic equations can be found in gal-files/c64-128k-rom-mux.gal. You can read the comments in that file for a more detailed explanation of what's going on, but here are the basic rules:
The module has pins that make the following connections to the mask ROM sockets on the C64 board:
Building the module is pretty simple. I've used all through-hole parts to make it easier to assemble for the casual hobbyist. You only need a few parts. Most of the parts can be purchased from Jameco Electronics, a small business located in the San Francisco Bay Area that's been serving the elctronics hobbyist community for decades. Alas, there are a few items on the list that Jameco doesn't have, so I've provided links to the parts on Mouser, as well, at least for one parts that Mouser carries (alas, Mouser does not carry all of these parts, either).
You must use sockets for the ICs for two reasons:
(I suppose you could solder the GAL to the board after programming it if you really wanted to, but really it's best practice to put it in a socket, in my opinion.)
You will also need a programmer to program the GAL and the flash ROM chip. I use a TL866II Plus, which can program both the Lattice and Atmel / Microchip versions of the 22V10. You want to program the 22V10 with the file gal-files/c64-128k-rom-mux.jed. I do not supply ROM images for the flash chip. You'll need to provide those yourself, either by dumping your existing ROMs or by getting ROM images another way (e.g. from zimmers.net).
If the mask ROMs are not socketed in your Commodore 64, then you need to de-solder the orignal ROMs and install the DIP-24 sockets mentioned in the parts list above. Do this first!
When assembling the board, you want to get the downward-facing pin headers that insert into the ROM sockets as vertically aligned as possible. One way to doing this is to insert the pins into a breadboard, set the board down on top of the pins, and hold the board flat as you tack a couple of the pins to the board to keep it still while you finish the rest. Other option is to insert the header into the board, tack one pin to the board and then, while heating that one solder joint, carefully moving the header around until it is perfectly perpindicular. Just be careful not to burn your fingers!
Next, place the chip sockets on the PCB, flip the PCB over, and solder the sockets to the PCB from the bottom side.
Next, populate the ceramic capacitors and resistor array and solder them into place.
Finally, populate the 3 2-position DIP switches with the "ON" position being towards the flash ROM socket and solder them into place.
I've provided a small command line tool, mkflashimg.sh, to make it easy to assemble a flash ROM image. It's a shell script that should run just fine on Linux, NetBSD/FreeBSD, macOS, and maybe even Cygwin. Here is an example of how to run the tool:
dhcp-194:thorpej$ ./mkflashimg.sh -k kernal.901227-02.bin -k kernal.901227-03.bin -k JiffyDOS_C64_6.01.bin -k JiffyDOS_C64_6.01.bin -b basic.901226-01.bin -c characters.901225-01.bin c64-rom-326298.bin
$KERNAL_0='kernal.901227-02.bin'
$KERNAL_1='kernal.901227-03.bin'
$KERNAL_2='JiffyDOS_C64_6.01.bin'
$KERNAL_3='JiffyDOS_C64_6.01.bin'
$BASIC_0='basic.901226-01.bin'
$BASIC_1='empty'
$BASIC_2='empty'
$BASIC_3='empty'
$Character_0='characters.901225-01.bin'
$Character_1='empty'
$Character_2='empty'
$Character_3='empty'
Write flash image to 'c64-rom-326298.bin' (y/n)? y
-rw-r--r-- 1 thorpej staff 81920 Dec 14 16:13 c64-rom-326298.bin
dhcp-194:thorpej$In this example, I've put the original rev 2 KERNAL for my machine in KERNAL slot 0, the rev 3 KERNAL in KERNAL slot 1, and JiffyDOS in slots 2 and 3 (so that no matter the setting of the "0" bit of the KERNAL selector switch, if the "1" bit is set, I will always get JiffyDOS). Once you've assembled the flash ROM image, use the programmer of your choice to write it to the flash ROM chip.
And that's it! Just pop the programmed flash chip and GAL into the sockets, set the DIP switches to select the ROM images of your choice, insert the module into the C64, and enjoy!
There are other ways you can use this board, too! For example, if you buy a JiffyDOS ROM chip, a switch is provided to let you select JiffyDOS or the stock KERNAL. If you want to install such a switch, all you need to do is tack the wires from the switch to the appropriate DIP switch solder pads on the board; if either the DIP switch or external switch for that position is set to "on", then that switch position will be "on". It's up to you to decide if you want to drill a hole in your precious Commodore 64 to do this!
If you have any questions about the board, you can reach out to me on Twitter (@thorpej) or Mastodon (@thorpej@mastodon.sdf.org). You can also check out my YouTube channel, which has this and other retrocomputing related content.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | Conn_01x12_Pin | Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_Vertical | J1, J2, J5 |
| 3 | SW_DIP_x02 | Button_Switch_THT:SW_DIP_SPSTx02_Slide_9.78x7.26mm_W7.62mm_P2.54mm | SW101, SW102, SW103 |
| 2 | 0.1µF | Capacitor_THT:C_Disc_D3.8mm_W2.6mm_P2.50mm | C101, C102 |
| 1 | 4K7 | Resistor_THT:R_Array_SIP7 | RN101 |
| 1 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3 |
| 1 | Conn_01x04_Pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J4 |
| 1 | GAL22V10 | Package_DIP:DIP-24_W7.62mm_Socket | U102 |
| 1 | SST39SF010 | Package_DIP:DIP-32_W15.24mm_Socket | U101 |
The 13 most common of 14 parts.

google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards


hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!



Twotoz/C5VRX
Ultra-minimal, zero-CPU 5.8 GHz analog FPV video receiver using ESP32-C5 Wi-Fi 6 PHY MODEM_DIAG, BitScrambler WBFM demodulation & resistor DAC CVBS


It measures 75.7 × 33.4 mm and has 2 copper layers, 1.6 mm thick.
14 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the thorpej/c64-rom-326298 repository on GitHub, at the commit this page was made from: the board is design-files/c64-rom-326298.kicad_pcb and its schematic design-files/c64-rom-326298.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask thorpej before reusing the design.