Skip to content

About

A set of frames and supports for installing a Raspberry Pi inside a Commodore-64 case, using Keymmodore-64 as an interfase for keyboard and joysticks.

Resources

Stars

4 stars

Watchers

2 watching

Forks

Repository files navigation

pimmodore small

Important Note regarding the new version:

As of version 5.4.3, BMC64 features native support for Pimmodore-64! The keyboard configuration files (.vkm) have been included in the official release and can be selected directly from the menu. Additionally, Keymmodore-64 (and therefore Pimmodore-64) implements BMC64 new GPIO Machine Signal feature for autoswitching. In order to maintain consistency between BMC64 Machine Signaling and the Keymmodore-64 firmware, some changes have been made regarding LED color coding. Also thanks to the new VICE 3.4 format for .vkm, there are improvements related to the use of Shift for both models of PET keyboards, making them more intuitive to use.

A sleek solution for mounting a Raspberry Pi 3B within a Commodore 64 chassis to run BMC64 emulator, or even any operating system.

Pimmodore-64 uses the Keymmodore-64 keyboard interface (Pi Pico) so the keyboard is 100% functional. It's a perfect setup for running BMC64, THE Commodore emulator for the Raspberry Pi 3 (any VICE version works well too). Functionally speaking, it's like running an original C-64... or C-128, or Plus/4, or PET Graphics, or PET Business. Keyboard will reconfigure itself, allowing you to access all keys, for ANY of the emulated computers.

Also runs perfectly with any Raspberry Pi Operative System, due to having a PC Compatible layout too.

foto Pimmodore small Detalle_trasero-removebg-preview detalle_costado-removebg-preview image

To build a Pimmodore-64, you need:

  • Build a Keymmodore-64 interface first, including the RGB LED.
  • A Raspberry Pi 3B o 3B+.
  • A MicroSD Card.
  • Any power supply greater than 6VDC, with 15 Watts minimum.
  • A Step-down Power converter
  • Panel Barrel connector
  • Rocker switch
  • 2 Joysticks connectors (male DB-9)
  • Male 4-pole 3.5mm plug, male RCA and female stereo 3.5mm plug (optional for analog outputs).
  • HDMI extension cable.
  • 2 USB extension cables (or you can buy a USB 2.0 PC rear panel extension bracket)
  • A 3D Printer or a 3D Printing service.
  • Dupont cables and connectors.
  • Some screws.

Look for the .xlsx file for the detailed BOM.

Printing the STL Files

The pieces are designed with Sketchup to fit any version of the legendary "Breadbin" Commodore-64 case. It won't fit a C-64C (I don't have one to design it). The project is 100% reversible, no need to drill, make holes or even glue. It uses the same mount system designed for the original PCB board.

There are a few options of frames, depending two choices:

  • With or without Composite Video and Analog Audio outputs (useful for a CRT TV).
  • Pico interfase attached to the top part of the case (best option for joystick connected to the Pi), or to the bottom part of the case (best option for joystick connected to the Pico).

Keep in mind even without analog outputs, you can use a VGA monitor using an HDMI to VGA adapter (maybe a 4:3 CRT for a nice vintage look). Remember to buy an adapter with analog audio output. Also you may have to create some custom HDMI modes, as explained in BMC64 page

All pieces are easy to print with a 0.4mm nozzle and a 0.2 mm layer height. For better results, do not flip the pieces, print them as provided. The .3mf file was made for my Bambulab A1, in case you find it useful. There is no need for «Everywhere» support if you 3D Printer is able to do good «bridging» (most printers do). Just use "Normal" support and «Only from the buildplate». The only piece who need "Tree" support is the USB Ports cover, and just because of the top lock arm, not for the square holes. The Pico holder includes a little support, where the board back edge rests, just trim it before placing in.

Flashing and connecting the Keymmodore-64 Pico interface, to the Pi 3B.

At my project Keymmodore-64 you can find detailed information of how to set up a Raspberry Pi Pico as C-64 keyboard interface.

Besides the wiring for keyboard and RGB LED, you need 3 wires from the Pi to the Pico. They are used for sensing what type of computer is being emulated by BMC64. Pimmodore-64 uses the GPIO-MACHINE_SIGNAL feature of BMC64. With that information, the Pico can switch to the corresponding mode, avoiding the manual switch with the C= and Function Keys. As you can see in Keymmodore-64 documentation, those three pins have to be connected to GPIO 9, 10 and 11 of the R-Pi 3B. This is not mandatory, if you don't connect those pins, Pimmodore will boot in "PC Compatible Mode" and you can manually switch to any other Mode from there. If you wire them, Pimmodore-64 will switch to the corresponding Keyboard Mode everytime you power cycle the Pi, or reset the Emulator.

Powering the Raspberry Pi

In order to being "agnostic" to the Power Supply, this project uses a Step Down Power Converter, so you can use almost any Power Brick with more than 6V and 15 Watts, a generic 12VDC with 2A will do. Of course, in case you use a variable Converter, you need to regulate it BEFORE plug into the Raspberry. 5.2VDC will be OK to compensate some drop at the MicroUSB connector. Don't try to use a 5VDC power supply directly, the voltage drop of the barrel connector and switch will result in 4.9VDC or less coming into the Pi, therefore the common yellow ligthing bolt sign will appear, and video and audio stuttering will happen, even with "Raspberry Certified Power Supplies". Believe me, disregarding the Converter and using a 5VDC Power Supply is not advisable, unless you connect it directly, with no switch and no barrel connector in between.

Remember: Do not plug your Raspberry Pi until you have regulated the Voltage output to 5.2V or less first!!!!

Connecting the Joysticks

Unless you have wired the joysticks ports to the Pico interface as mentioned in the Keymmodore-64 project, you can connect them to the Raspberry Pi GPIO pins.

As explained in the BMC64 User Guide, two Atari-like joysticks are supported by the emulator. Here is the wiring according the documentation:

image

Enabling the autoswitching feature

In order to the Pico interface to switch automatically, besides connecting the wires from the GPIOs Pi to the Pico. You need to add "enable_gpio_machine signal=code" at the first line of cmdline.txt file, as explained in the BMC docs

Pimmodore-64 follows the same convention for LED color that BMC64 uses for Machine LED in GPIO Machine Signal options, despite using Machine Code as signaling. However unlike BMC64, it uses white color for PC Mode.

Mode GP18 GP20 GP19 LED Color
C64 0 0 1 Red
C128 0 1 0 Blue
PET Business 0 1 1 Magenta
PET Graphics 1 0 0 Yellow
VIC-20 1 0 1 Green
Plus/4 1 1 0 Cyan
PC Mode 1 1 1 White

Regardless autoswitching being active, manual switching using Keyboard shortcuts is always possible, as explained in Keymmodore-64 project.

Connecting the analog video and audio outputs (optional)

The Raspberry Pi 3B includes analog video and stereo audio output. For that you need to wire a 4-pole 3.5mm plug, to a female RCA connector for video, and a miniplug stereo female connector for audio. BMC64 will output NTSC or PAL-B video standard, according what kind of computer are being emulated. This is optional. You can use your Pimmodore-64 only with HDMI. There is a .stl version or the frame without the analog outputs for that case.

Keep in mind, the 4-pole miniplug has this (strange) pinout:

image

How to set up BMC64 Emulator:

For running BMC64 with the autswitching feature and joysticks, you need the following:

1 - The BMC64 Emulator in the microSD card.

2 - The Kernal ROMs also in the microSD. These are not included in the standard version of BMC64. However you can download from the VICE repository.

3 - Boot and enter BMC64 Menu (as explained below), go to "Keyboard" change Layout to "Commodore"

4 - Still in Keyboard options, go to Mapping and select "Pimmodore" (Thanks aminch for adding Pimmodore support to BMC64).

5 - If you have wired the joystick ports to the Pi's GPIOs, you need to do two things:

  • Go to GPIO Config and select Config #1 (Nav+Joy).
  • Go to "Joyports" and select GPIO Bank 1 and GPIO Bank 2 for Port 1 and Port 2 respectively.

6 - If you have wired the ports to the Pico, do this instead:

  • Go to "Joyports" and select Custom Keyset 1 and Custom Keyset 2 for Port 1 and Port 2 respectively.
  • Go to Configure Keysets 1 below in the same menu, and map Joystick 1 following the instructions.
  • Do the same for Keyset 2.

You need to do steps from 3 to 6 for every computer emulated.

I strongly recommend to read the BMC64 readme file for a good understanding of the BMC64 options.

Entering the BMC64 Emulator Menu

There are two ways to open the Emulator Menu:

  • In PC Mode: Press CTRL and F7
  • In any Emulation Mode: C= and F7

While browsing the Menu, arrow keys move as expected for a C-64, meaning Shift reverses direction. Use Left Arrow Key to go back or exit the Menu. Remember to save for permanent changes before exiting.

How to test your keyboard and Joysticks.

I strongly suggest you to use the Anykey program by T-Pau. It has separate versions of programs for every 8 bit Commodore Computer. Very useful.

Manual (en español).

I've written a short manual in spanish you can find useful to print (or translate), although it hasn't been updated yet.

About

A set of frames and supports for installing a Raspberry Pi inside a Commodore-64 case, using Keymmodore-64 as an interfase for keyboard and joysticks.

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors