Sunday, September 21, 2025

Meshtastic 64 - A meshtastic radio for the Commodore 64


For this project I designed and built a meshtastic radio that plugs directly into the Commodore 64. My goal was to release this at the VCF Midwest show (VCFMW) in Chicago on September 13th and 14th. I barely made it!


meshtastic 64 for the commodore 64
The finished module plugs into the Commodore 64 User Port



The idea

I had heard some things about meshtastic, but I was no expert. As I looked into it, I learned that it is an open source, decentralized, peer-to-peer, text messaging network designed for long-range mesh communication.

This seems to attract people that are either interested in the technology, interested in a decentralized / non-monetized communication system, interested in emergency communication - or any combination. My take was a nerdy 8-bit project to get a 1980s computer on the mesh.

I bought some modules off Amazon and started getting results with the Heltec LoRa V3, so that became my platform.


Prototyping

I then started working on a proof-of-concept version. I wanted to connect using a serial port which the meshtastic supports. I did need to find two IO pins to use and after some investigation settled on pins 45 and 46 of the Heltec.

The meshtastic typically communicates using protobuf commands. I spent some time untangling these, but soon shifted to the SERIAL>MODE>TEXT_MODE setting. This focuses on simply sending and receiving text through the meshtastic primary channel.

Soon I had a proto board which was sized to fit in a reproduction Commodore 64 cartridge shell. The shell's recessed label area is untextured and made a perfect lens over the little display.


 


Coding on the Commodore 64

I worked on a program for the Commodore 64. I chose to write the program in BASIC because it was quick for me to develop with, very retro, and the speed needed for text input and printing to the screen was acceptable. I did much of the programming on an actual Commodore 64, but transitioned to CBM Program Studio on my laptop while traveling.

Initial Programming Setup
First Programming Setup


Interface PCB design

Then I laid out the PCB. I worked hard to get the display lined up with the "window" in the reproduction cartridge cases and position the Heltec so that the USB C would be accessible to the side. I also added a big rectangular cutout to the center of the PCB for an internal battery. I even added some fun LEDs that could be controlled by the Commodore 64.

When I got the boards, they looked great, fit well, but all the connections were mirrored. Ugh!



An ugly twisted wiring of the connector did prove it worked. I experimented with options of soldering the Heltec to the PCB. A cut cross-section of the plastic cartridge shell confirmed a method where the Heltec module was aligned right below the top bezel. So, it was off to design and order round two of the boards.





Refining the program

I worked further on the Commodore 64 code, now having two commodore 64s that could talk to each other. I experimented with PETSCII images for emojis and custom images, however the full PETSCII graphic character set trades off the lower case characters on a Commodore 64.


   


In the end, I favored upper and lower case text communication between the Commodore 64 and others on the meshtastic network. To do this, the program must convert between ASCII and PETSCII. I used the commodore Upper and Lower case character set and provided no support for PETSCII graphics in the standard text messages.

But I couldn't resist getting some PETSCII art in this project, so implemented a separate commodore only PETSCII graphics message and include an editor, eight slots to hold graphics, SAVE and LOAD commands, and even a method to save incoming PETSCII graphics for editing or resending.


Finishing the case

To finish the case design and build, I cut slots for the USB C on the side, drilled holes to mount the antenna on top, and worked on how to get button presses to the front surface of the cartridge shell. My solution used acrylic rods cut to length for use as extended button actuators. I used my drill press to drill corresponding holes in the front bezel for the rods to protrude through. To hold the rods straight and in place, I glued in O-rings inside the shell which worked great and did not muffle the button click.




Race to the VCFMW 2025 show

Like any good hobby project, time was running out. The corrected PCBs arrived just 10 days before the show. I worked on building 20 units to take to the show. A couple of my buddies came to town a day before the show. I quickly finished a manual, a disk with the software, made a table info stand, and then made my buddies fold boxes and label disks. (We did have a nice BBQ dinner first) We completed 19 units for the show - which I was very happy with.





At the Show

The show went great. Many friends brought separate c64s to help test and play with the meshtastic 64 during the show. VCFMW had set up a special meshtastic channel for the show and there were up to 200 nodes all talking at once! The Commodore 64s were right in there, sending and receiving all the messages. Lots of people stopped and discussed the project with me.






Because the meshtastic 64 modules have a built-in rechargeable 1000mAh battery, they can operate independently from the c64 like a typical meshtastic radio. That meant I was able to keep up with the conversations when I wasn't on the show floor - even catching up on overnight messages over my Sunday morning breakfast.


Checking overnight messages at breakfast Sunday morning


Final thoughts

I think the meshtastic 64s worked very well. The BASIC program was able to keep up with the heavy traffic at the show. My tester friends were able to find a few software bugs which were easy enough to fix. We were able to have some fun sending small PETSCII artwork back and forth but it did look like lots of garbage to everyone else.

Overall the response at the show was great - seems others enjoyed seeing this as much as I enjoyed putting it together.








-----------------------------------------------------------------------------------


PS - If you want a fun project, make your own! If you are looking for a prebuilt unit, see this link:

15 comments:

  1. Brother! Congratulations on the breakthrough! Where can I buy a few of these and when? Old ham Commodore 64 dude here. Give us some availability details, pretty please!!

    ReplyDelete
    Replies
    1. Thanks! I added a link to the post where I will be building some of these.

      Delete
  2. Hello, great project! Congratulations! I'm interested on the code to port something similar to z80-based MSX, specially the protobuffer to txt part. Are you going to open source it?

    ReplyDelete
    Replies
    1. Thanks! I’ll be posting the BASIC program to the BIT-Zeal web site. Feel free to list it in an emulator and get what you can out of it. For this version, I didn’t use the protbuff messages. I used the SERIAL>MODE>TEXT_MODE which simply sends and receives ASCII text from the meshtastic module. This is used announce what was received over the primary channel and to send a message over the primary channel. Good luck and let me know if you have more questions when you get into it!

      Delete
    2. Awesome! I'll keep checking the bit-zeal for the software and I'll report back when I finish implementing for z80's MSX. Thank you!

      Delete
  3. Mestastick v3 draws 150 mA while charging the LiPo battery, peaking at 350–420 mA while in use. The CIA limit is flat 100 mA. In my assessment, using the User Port’s 5V line is a critical mistake and will result in many dead, irreplaceable CIA chips.

    ReplyDelete
    Replies
    1. This will not damage CIA chips.

      Yes, this draws more power than originally specified from the 5V line running throughout the c64. Commodore’s specification for the max draw was largely based on the amount of power the original power supply could provide. This is why a modern power supply with 2.5 Amps or more on the 5V line is required as noted on the ordering page.

      Commodore’s own REU also drew more power than the original power supply could support and therefore shipped with a larger power supply.

      Yes, the CIA chips are powered by the internal 5volt line. Without a strong enough power supply, the 5volt line may not be able to provide enough power to everything leading to under powering the chips. This could cause temporary erratic operations until reset with proper power. This under powering would not damage the chips. The only other connections to the CIA are the transmit and receive lines. These are connected to 3.3volt on the Heltec module. The meshtastic 64’s onboard voltage logic level converter takes care of boosting these to 5volts - just like every other WiFi modem.

      This module was tested on multiple c64s during development. At the show, it was running on six or more machines all weekend with no issues.

      As with anything you plug into these old machines, please make your own choices and have fun!

      Delete
    2. For folks who find this comment later, here's the detail:

      While the CIA supply current maximum (as per the datasheet) is 100mA, that limit pertains to heavy current draws on the CIA IO pins. Meshtastic does not power the unit through an IO pin, but rather the power pin (pin 2) on the .156" 12/24 edge connector user port. But, that pin does state (in the C64 Programmer's Reference Guide, page 397 that the power pin supports a maximum of 100mA, which I think is more in line with Goro's comment above. Going above that on that power would not affect the CIA in any case, as the CIA would at most see a voltage drop, as Jim notes, not a failure mode.

      As Jim states, the limit noted on the PRG was more a function of limiting the load on the "just enough" power supply brick CBM used with the 64, not a function of what the trace can support. Looking at the motherboard, the pin 2 trace width is .156/2 = .078, and assuming 1oz Cu/ft2 for the PCB, power calculations show you can safely send 1 Amp of power over that trace the entire length of the PCB with only a 2 degree Celsius temperature rise. 1.5A will increase temp by 5 degrees, while 2A will raise by 10 degrees. I'd recommend folks not draw more than 1A from the user port, to keep things as safe as possible.

      Delete
  4. Fantastic project! Will the PCB files be available for those who might want to build one for themselves?

    ReplyDelete
    Replies
    1. Thanks. I always want to encourage DIY. I'm looking into providing kits or simply the bare boards.

      Delete
    2. Excellent. Building things is in my nature. Either a kit or bare PCB would be perfect.

      Delete
  5. That's incredible, Jim. We're big fans of Meshtastic (and now you)!

    ReplyDelete
    Replies
    1. Hey thanks! Glad you're here. Maybe a little "Digital Detox" in a decentralized, peer to peer, messaging system? ; )

      Delete
  6. Could you share a few more details on how to communicate with the Meshtastic’s CPU? Would love to see a version of this for other RS232 80’ies computers (A*).

    ReplyDelete