AirMouse for Light Gun Games

Since I built my Bartop Arcade I have been wanting to play Duck Hunt. I knew the original Light Gun could not work with the Raspberry Pi on RetroPie. I came across that you can use a mouse, which wouldn’t be fun. I knew the Arduino Pro Micro (and a couple others) could emulate a Keyboard or Mouse. There was a video about a year ago on the Element 14 Presents Youtube channel “NES Zapper on Retropie”. It is the same concept with a little different components. The Pro Micro board is a cheaper option than the board he used there. The boards based on the ATmega32U4 have a built in USB inferface on the ATmega chip, where the more common Uno Nano, and Pro Mini do not support being used in this way.

Using that as the base idea, I found various info on making an Air Mouse using a GY-521/MPU-6050 module attached to the Pro Micro board. I had found a video by “Asiq’s Theory” on Youtube with a basic Air Mouse using this setup along with code. I can no longer find the channel or video though.

I didn’t have either the GY-521/MPU-6050 board or a Arduino Pro Micro so I had to get them in to try this project out. I have plenty of Arduino Unos and Nanos around, but I hadn’t purchased any Pro Micros. The boards are similar but I usually use an Uno for prototyping then I can directly do that to a Nano without any code changes, where the Pro Micro with the different ATmega model is slightly different as well as slightly more expensive. I had been wanting some Pro Micro boards for keyboard projects in the past, but I never got into anything with them to this point. Once they arrived I took built it up on breadboard to test operation.

I ended up looking for a decent 3d model to use as a light gun model. I couldn’t find something that I could print reasonably for the amount of effort I wanted to put into this project. Really I don’t see this getting much use, mostly a little Duck Hunt now and then, maybe a few other games. I did end up finding a model I could use as a basis that had a completely different intended use. https://www.thingiverse.com/thing:2560577 I can print it as two parts now without any support. It feels pretty good to hold it. I went with some larger buttons I had in my stock with snap on caps.

I did my initial modifications included taking away parts from the model and slicing it in half. I also cut an opening for the usb cable as well as areas inside to hold the electronics. I did that work in Tinkercad. It works well enough for modifying things, but I wouldn’t want to use it to start it from scratch. I am looking for another program to use that I can get familiar enough to make items from scratch though. I first made a blue printed prototype half. It worked out fairly well, the Pro Micro fit in the area I made for it and the MPU-6050 board fit great as well. I put the 6050 forward in the gun expecting better readings of the motion, I am not sure if it makes much difference. That first half is basically a hollow shell, then I had to go on and make the other half “hold” everything. For the buttons I used my calipers to measure the button dimensions and built a placeholder model that I was able to use to give proper placement in the frame. It let me build up the back support and I slightly over sized the button “caps” so I could use them as holes to cut into the model. I also made a mock up of the MPU-6050 board so I could model in posts to hold it in place. I cut in recessed screw holes in the right side as well. For the prototype gun also had 3 opens in the shell that were from the original model that I then had to fill in so I printed them as extensions off of the right side on it. The screws I used used pointed screws to go into the left side making holes as I put them into it. That is holding that prototype together quite well so far.

After the first one was done, I decided I would make another for the second cabinet in Grey. For this one I reworked the left side with the holes filled in. I also setup to put in threaded inserts into it. This was the first time I used them, and I wasn’t sure what size to make the holes. They went in, but not very well and I ended up giving them more support and hold with glue so they hopefully won’t pull out. Otherwise the inserts are working well. They are very cheap and not well made though. For the Grey gun I tried to line up the usb cable coming in more to the center of the Pro Micro holding area. I placed it in a cut out to hold a zip tie as strain relief in the cord area. I didn’t make enough room for the “head” of the zip tie though, so when I put it in I cut out a smaller square deeper into the shell so that it would slot the whole way in and I could properly close the gun. It worked out very well. Still I have had to make my own custom cables to get enough room in there for the cable and the Pro Micro. I may rework the model a bit more to see if I can get a standard MicroUSB cable inside instead of soldering up a minimal one of my own.

Grey Model

The 3d model is posted here: https://www.thingiverse.com/thing:5805908

The electronics are mostly the Pro Micro and MPU-6050 board. The additions are the two momentary switches with pull down resistors wired to ground to prevent false presses. As an added feature I put in a green 5mm LED with an appropriate current limiting resistor in the tip that glows when pressing the trigger button. The device is a motion sensitive mouse using the accelerometer feature of the GY-521/MPU-6050 module. The Trigger button is the Left Mouse Button, and the other button is the Right Mouse button. So it isn’t like the old Light Gun where the game knows where the gun is pointing. It is based on relative motion, and so Duck Hunt has an onscreen cursor. It isn’t the same, but it still is fun. Those Ducks are tricky even with a cursor. To keep the gun relatively lined up, between rounds I point the gun to the upper right corner of the screen making sure the cursor has moved the whole way up there.

For the base code and initial wiring I used info from a post and YouTube video by “Asiq’s Theory”. I think it was under 50 lines of code. It was about the bare minimum to get one of these MPU-6050s working and that was very helpful to me to break down what changes I needed to make.

The exact code for one gun doesn’t work for the second one as each MPU-6050s seems to be slightly different. That is as far as “standing still” status. If that is wrong, then the cursor will constantly drift in either up or down or left or right. So a couple numbers are changed to kill the drift. I think for the one I had to do a +3 to the X (which is left/right) and the other a +4.

Asiq’s code had been based on a different orientation of the MPU module, so I adjusted for that and the code also included pauses and would freeze the cursor when pressing the button. It made it pretty good for an air mouse on a computer, but bad for tracking Ducks on the screen. This means these are not very good mice,

The Air Mouse can be pulled into about any pc and used, but as it is constantly tracking the action of pressing the buttons tends to move the cursor even if you are quite careful. You could make a more proper Air Mouse with the same components and a bit different code on the Arduino board. I have thought of making it so that if one of the buttons was held down as it was plugged in that it would make it behave differently. Still this is was to be a relatively quick project that I don’t expect to use all that heavily.

Parts:

This project uses an Arduino Pro Micro and a GY-521 Accelerometer Gyroscope Module. There are two buttons with 10k pull down resistors on them. There is also a single LED with a 1k Resistor to limit the current on it. Those bits of information are on the Code below as to what they are and what pins they goto. The resistor values aren’t critical. You could use 20k for the pull downs and possibly higher, you could use something a bit lower than 10k for the pull downs but the lower you go the more current that is drawn when pressing the button. For the LED resistor you can go as low as 330 Ohm for the LED and be safe with most any standard LED, I also commonly use 1.5k and sometimes higher for LED current limiting resistors.

Arduino Pro Micro clone: https://www.amazon.com/HiLetgo-Atmega32U4-Bootloadered-Development-Microcontroller/dp/B01MTU9GOB/

GY-521 Module: https://www.amazon.com/HiLetgo-MPU-6050-Accelerometer-Gyroscope-Converter/dp/B00LP25V1A/

12x12x7.3mm Tactile Push Button: https://www.amazon.com/TWTADE-Momentary-Tactile-Button-12x12x12mm/dp/B07CG7VTGD/

Resistors, 1k an 10k: https://www.amazon.com/EDGELEC-Resistor-Tolerance-Multiple-Resistance/dp/B07QJB31M7/

LED, hopefully you have a couple, or you can pick them up on Amazon etc too.

All links are current as of posting this in 2/4/23 none are affiliate links or anything.

Below is the code for the Arduino Pro Micro Line 78 and 79 are where the drift adjustment numbers are Currently the “+7” on Line 78 and the “-1” on 79. I am referencing “Test code” that Ashiq mentioned, again I can’t find that source to get it. I guess Ashiq’s video was deleted or channel on Youtube or something, if someone finds it let me know so I can reference it properly. That code would return numbers from what are the gx and gz values. Using those values as a starting point, I guess I had something around a constant 400 and 100 respectively out of the 6050. The point of Line 78 and 79 are to get us a result of 0 if the Air Mouse is not in motion. Changing the divide by 150 will change the speed at which the mouse will track and possibly throw off your adjustment values at the end by a number or two. You may notice the Serial.print at the end there, that returns the vx and vy values that are created on line 78 and 79. So if you open the Arduino (or other) serial monitor set to the 9600 and to the serial port the Pro Micro is showing up as and look at those numbers you can use that as your Test code to get an idea of what changes you need to make be it to the 400 or 100 or the minor fine tuning numbers at the end of those lines. The goal is to get the values to 0 when the gun is not being moved. If you make the “dead zone” area to large you can’t make fine movements, which makes aiming even more difficult. These motions are relative, and not to “scale”, so at the start of a round you point at the screen, but to get the cursor to move the way you want you likely end up pointing in a very different place by the end. You can quickly move to aim at the center again and over correct to get the cursor more inline with where you are pointing. It is hard to describe. I enjoy it for a few rounds of Duck Hunt, for longer round games it may not be as much fun. I don’t know for sure as I haven’t played other games with it to this point.

Air Mouse Code for the Pro Micro is below:

#include <Wire.h>
#include <I2Cdev.h>
#include <MPU6050.h>
#include <Mouse.h>

/*
  Name: Prototype Arduino Pro Micro AirMouse
  Author: Markeno
  Created: 3/7/2020
  Version .99
  Based on a sketch posted by "Asiq's Theory".

  Feature:  USB 2 Button AirMouse for RetroPie Gun

                     +-----+
        +------------| USB |-------------+
        |            +-----+             |
    D1  | [ ]1/TX/INT3            RAW[X] |    
    D0  | [ ]0/RX/INT2            GND[X] |    
        | [ ]GND                  RST[ ] |    
        | [ ]GND                  VCC[X] |    
    SDA | [X]2/INT1    ___         21[ ] |   A3
    SCL |~[X]3/INT0   /   \        20[ ] |   A2
    A6  | [X]4       / PRO \       19[ ] |   A1
        |~[X]5       \Micro/       18[ ] |   A0
    A7  |~[x]6        \___/   SCLK/15[ ] |     
        | [ ]7/INT6           MISO/14[ ] |     
    A8  | [ ]8                MOSI/16[ ]~|     
    A9  |~[ ]9                  SS/10[ ]~|   A10
        |                                |    
        +--------------------------------+  
		
		Based on: http://busyducks.com/ascii-art-arduinos
		
		Gy521 2=SDA 3=SCL, RAW to GY521 VCC in (didn't want to work from the PRO Micro VCC pin), GND to GND 
		4 Left Mouse Button, 10k Pulldown to Ground, press to VCC
		5 Right Mouse Button, 10k Pulldown to Ground, press to VCC
		6 Additional Wire, for an LED in the tip when the main trigger was pressed.
*/

MPU6050 mpu;
int16_t ax, ay, az, gx, gy, gz;//Variable for the Accel and Gyro Data
int vx, vy;// X and Y axis variables

const int button1 = 4; //For Left Mouse Button
const int button2 = 5; //For Right Mouse Button
const int fled1 = 6; // For Tip LED

int responseDelay = 10;
// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time Button was updated
// constants won't change:
const long interval = 100;           // interval at which to change button states (milliseconds)
// Variables will change:
int btn1State = LOW;             // ledState used to set the LED
int btn2State = LOW;             // ledState used to set the LED

void setup() {
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(fled1, OUTPUT);
  
  Serial.begin(9600);
  Wire.begin();
  Mouse.begin();
  mpu.initialize();
  if (!mpu.testConnection()) {
    while (1);
  }
}

void loop() {
	
  //Get the Acel and Gyro Data as 6 values
  mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

  vx = ((gx - 400) / 150)+7 ; // (Grey Gun +3) (Blue Gun +4)"-400" because the X-Axis Left/Right of gyroscope give values about -400 while it's not moving. Change this value if you get something different using the TEST code, checking if there are values far from zero. "+3" added due to value around -3..
  vy = (-(gz - 100) / 150)-1 ; // (Grey Gun 0) (Blue Gun -1)"- 100" same here for the Y-Axis Up/Down. may need to "-1" "+1" etc due to some drift still.

  vx = vx / 2;
  vy = vy /2;
  
  //Create a small -1,0,1 DeadZone for the Y-Axis
  if (vy>=-1 && vy <= 1)
  {
    vy=0;
  }
 
  //Create a small -1,0,1 DeadZone for the X-Axis
  if (vx>=-1 && vx <= 1)
  {
    vx=0;
  }
  
  int buttonState1 = digitalRead(button1);
  int buttonState2 = digitalRead(button2);

  // check to see if it's time to blink the LED; that is, if the difference
  // between the current time and last time you blinked the LED is bigger than
  // the interval at which you want to blink the LED.
  unsigned long currentMillis = millis();

if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;

    if (buttonState1 != btn1State) {
      if (buttonState1 == HIGH) {
        Mouse.press(MOUSE_LEFT); //5
        digitalWrite(fled1,1);// Light LED
      }
      else
      {
        Mouse.release(MOUSE_LEFT);  
        digitalWrite(fled1,0);// Light LED Off
      }
    btn1State = buttonState1;
    }

    if (buttonState2 != btn2State) {
      if (buttonState2 == HIGH) {
        Mouse.press(MOUSE_RIGHT);
      }
      else
      {
        Mouse.release(MOUSE_RIGHT);  
      }
    btn2State = buttonState2;
    }

/*
    if (buttonState2 == HIGH) {
      btn2State = HIGH;
      Mouse.press(MOUSE_RIGHT);
      delay(100);
      btn2State = LOW;
      Mouse.release(MOUSE_RIGHT);
    }
*/

  }

  Serial.print(-vx);
  Serial.print(-vy);
  Serial.print("\n");
  if (millis() - previousMillis >= 20) {
  Mouse.move(-vx, -vy);
  }
 
}

Note: the “X” in the Pro Micro Ascii diagram denotes something is wired to that pin, below the diagram is described what is going to those various pins.


There are far better options out there. You could use a regular mouse, but that certainly wasn’t remotely the same. You could buy an Air Mouse, the feel is not the same either. There are units you can get similar to the Wii motion bar that will work with Retropi and use a Wiimote in a gun holder. Those should track much better because it is real tracking and not relative acceleration. With the Air Mouse solution it just knows it went right or left or up or down, you don’t even have to be facing the right direction. Still it is not a very expensive solution.

Addendum: MPU-6050 Test code. This is some Test code I had on file for the MPU-6050 this is NOT the Air Mouse code, that code is the Section Above here. I believe this is the code I used to get my baseline “stationary” values to put in the Air Mouse Code The 400 and 100 in the Air Mouse Code above. To use the code, again open the Arduino or other Serial Monitor set to 9600 and the Serial Port that the Pro Micro is connected to. I could be wrong and that may not be what this is. It has been sitting there a long time.

// MPU-6050 Test Code.  This is NOT the Air Mouse Code!
// (c) Michael Schoeffler 2017, http://www.mschoeffler.de

#include "Wire.h" // This library allows you to communicate with I2C devices.

const int MPU_ADDR = 0x68; // I2C address of the MPU-6050. If AD0 pin is set to HIGH, the I2C address will be 0x69.

int16_t accelerometer_x, accelerometer_y, accelerometer_z; // variables for accelerometer raw data
int16_t gyro_x, gyro_y, gyro_z; // variables for gyro raw data
int16_t temperature; // variables for temperature data

char tmp_str[7]; // temporary variable used in convert function

char* convert_int16_to_str(int16_t i) { // converts int16 to string. Moreover, resulting strings will have the same length in the debug monitor.
  sprintf(tmp_str, "%6d", i);
  return tmp_str;
}

void setup() {
  Serial.begin(9600);
  Wire.begin();
  Wire.beginTransmission(MPU_ADDR); // Begins a transmission to the I2C slave (GY-521 board)
  Wire.write(0x6B); // PWR_MGMT_1 register
  Wire.write(0); // set to zero (wakes up the MPU-6050)
  Wire.endTransmission(true);
}
void loop() {
  Wire.beginTransmission(MPU_ADDR);
  Wire.write(0x3B); // starting with register 0x3B (ACCEL_XOUT_H) [MPU-6000 and MPU-6050 Register Map and Descriptions Revision 4.2, p.40]
  Wire.endTransmission(false); // the parameter indicates that the Arduino will send a restart. As a result, the connection is kept active.
  Wire.requestFrom(MPU_ADDR, 7*2, true); // request a total of 7*2=14 registers
  
  // "Wire.read()<<8 | Wire.read();" means two registers are read and stored in the same variable
  accelerometer_x = Wire.read()<<8 | Wire.read(); // reading registers: 0x3B (ACCEL_XOUT_H) and 0x3C (ACCEL_XOUT_L)
  accelerometer_y = Wire.read()<<8 | Wire.read(); // reading registers: 0x3D (ACCEL_YOUT_H) and 0x3E (ACCEL_YOUT_L)
  accelerometer_z = Wire.read()<<8 | Wire.read(); // reading registers: 0x3F (ACCEL_ZOUT_H) and 0x40 (ACCEL_ZOUT_L)
  temperature = Wire.read()<<8 | Wire.read(); // reading registers: 0x41 (TEMP_OUT_H) and 0x42 (TEMP_OUT_L)
  gyro_x = Wire.read()<<8 | Wire.read(); // reading registers: 0x43 (GYRO_XOUT_H) and 0x44 (GYRO_XOUT_L)
  gyro_y = Wire.read()<<8 | Wire.read(); // reading registers: 0x45 (GYRO_YOUT_H) and 0x46 (GYRO_YOUT_L)
  gyro_z = Wire.read()<<8 | Wire.read(); // reading registers: 0x47 (GYRO_ZOUT_H) and 0x48 (GYRO_ZOUT_L)
  
  // print out data
  // Serial.print("aX = "); Serial.print(convert_int16_to_str(accelerometer_x));
  // Serial.print(" | aY = "); Serial.print(convert_int16_to_str(accelerometer_y));
  // Serial.print(" | aZ = "); Serial.print(convert_int16_to_str(accelerometer_z));
  // the following equation was taken from the documentation [MPU-6000/MPU-6050 Register Map and Description, p.30]
  // Serial.print(" | tmp = "); Serial.print(temperature/340.00+36.53);
  Serial.print(" | gX = "); Serial.print(convert_int16_to_str(gyro_x));
  Serial.print(" | gY = "); Serial.print(convert_int16_to_str(gyro_y));
  Serial.print(" | gZ = "); Serial.print(convert_int16_to_str(gyro_z));
  Serial.println();
  
  // delay
  delay(1000);
}

Samsung 940MW TV Fix No Power

I recently picked up this old Samsung SyncMaster LCD TV. With my Retro Computer and Electronics hobby I felt it was worth trying to get working again. It had a paper on saying that it didn’t work, but I tried it anyways and it wouldn’t power on at all. I had come across that it can be possible to fix old lcds due to bad capacitors. I figured it was worth a shot so I brought it home.

The positive to this tv is that it has about any video hookup I may want.

Composite and S Video, and Headphone output. I have the cover plate off but I have it.
DVI, VGA with Audio in, EXT (RGB) on a SCART connector in the US?, And component, some Antennna thing..

The SCART really interested me as I have made the RGBI to RGB Converter for my Commodore 128 that I setup to use with a SCART to HDMI box. I will possibly be able to connect directly from my RGB unit with the SCART cable I already created. I am not familiar with the Antenna hookup on this TV though, I was initially going to first test this with my Timex Sinclair 1000 as it is an Analog TV, but I don’t have a connector for that port.

So the initial power on test had done nothing already (days ago so yes if it was just powered on the capacitors lkely have a charge and well it can be dangerous to open then). This is also not an LED backlight so it has a High Voltage section in the power supply to power the backlights, so be careful… So I started by opening up the case to see what I would find.

Bad Capacitors on the Power Supply Board.

Looking at it I saw 3 obviously bulged capacitors on the power supply board. I looked at the other capacitors and didn’t see any that were an obvious problem. I looked at the control board with it’s surface mount caps all looking fine. I then pulled the board and desoldered the old capacitors. I pulled the 4th one there that was the 820 like the one bulged one as it was suspect because the other one was. I also pulled the next closest one there to the right to check it out.

Yep Bad.

The 3 bulged ones were bad as well as the other 820 there even though it had not bulged. That fifth one off to the right tested out fine. So I went looking for replacements online, I can get them, and get them rather reasonably from the looks of it. Certainly worth investing in a screen didn’t have anything tied up in.

Still I didn’t want to go spending money on them and have them come in and it not work. So I dug through my spare parts. I found 2 exact replacement 1000uF 10v 105 degree ones. The other two the 820uF 25v ones I didn’t have. Now those two are in parallel, and this was just to test if they were why the TV wouldn’t work, so I went with a single 2200uF 25v capacitor. I don’t recommend it, while it may be just fine even in the long run, this was just to see if it would get the TV working.

Temporary Fix

So I thought, lets close this for safety 🙂

A little bit didn’t fit 🙂

So I turned it over and plugged it in. As soon as it was plugged in, the power light blinked. I powered it on and it went right to the no longer broad cast Analog TV tuner. Oddly no audio though, I expected to hear static. I couldn’t change the Source either to any of the ports. So I hooked up a Commodore 64 to see what would happen. Below you can see the results.

Success 🙂

As soon as I turned on the Commodore 64 I was able to change to the AV Source and it worked fine, the audio was there as well. I still have my S Video cable only at my one desk. I did see what looked like artifacts on the graphics around the shock towers (or what ever those are on the screen upper left). I need to make up a second SVideo cable for my Commodores. I did recently get one in that I want to add to my RGBI to RGB converter for my Commodore 128 80 Column mode.

Now I just need to get in the 820uF capacitors, well I will get a few of the others as well as I don’t know if they will hold up very well and I have to make an order anyways. Just a bit of cleanup and it should be good to go then. I look forward to trying out the SVideo input and seeing if it looks any less artifact like around those towers. I also look forward to seeing if the SCART connector will work with my Commodore 128’s RGBI output for the 80 Column mode.

The new capacitors came in. Below I have marked the ones I replaced. I picked up most of the ones Jameco had available.

So what did I find with them. Well originally those four main ones in the middle there were bad, with the 3 bulged and the 1 that was not bulged. Those were just junk.

The remaining ones I replaced were probably fine. I replaced that one off to the left, as it looked to be the same manufacture as two that had failed. It looked to be perfectly fine. The others that were replaced appeared to be fine as well. I was in there, I had them and I didn’t care to just put the old ones back in.

I did have to substitute some values. The 820uF capacitor value wasn’t available. There were 2 in parallel, so they add up to 1640uF. I ended up replacing them with a 680uF in parallel with a 1000uF to give a capacitance of 1680uF. My understanding is they should preform the same as the 820s would have been. The last three that I replaced were some 330uF capacitors, they checked out fine.

Some Testing with my C64 Mini. The TV doesn’t have HDMI, so I used an adapter to VGA in this case and also connected it to my 12″ bench monitor to compare the output. It works great with that adapter to VGA, but when I tried the DVI port, the image was going off the screen and only washed out and purple looking. I think it may be the adapter box as everything else appears fine. Last night I connected it up to one of my real Commodore 64s via Svideo, and it worked, but was washed out. The cable didn’t have a resistor on it, so that may have been why, I am going to make a second SVideo cable for the Commodore 64 and try it with the resistor on the line there.

I also tested it out with my Composite modded Timex Sinclair 1000 (US Model ZX81) (mod information on another post here). The results were very good. I am quite happy with it. I hope to be able to use this TV for a number of older computers and systems with the connections it has available on it. It is a lot more portable and compact than my Sony 19″ PVM that I have yet to find or build a desk to get it setup.

I decided to hookup my Commodore 128 to the TV as well to test it out. There was some disappointment in that this TV has a SCART connector, and I had made a RGBI to SCART converter that I connect to a SCART to HDMI adapter for using the 80 Column mode (See my other post on that). I was hoping that I could just no use the SCART to HDMI unit and go directly to the SCART input of the TV. Unfortunately the TV doesn’t see the input on the SCART port. This TV detects if a signal is present and then “allows” you to change to that port, if it doesn’t see on you can’t even select the port with the Source or Menu options. So I hooked up the Composite 40 Column mode to the Composite input and used the SCART to HDMI box (with a HDMI to VGA adapter yet) to connect to the RGBI 80 Column mode. The RGBI looks quite good even after all of the conversion. The Composite is not to bad. I do want to see about getting a good picture on the SVideo though. I am going to modify my RGBI to to SCART converter box to break out the SVideo signal as well, as it currently only has a pass through for the Composite video for the C64/40 Column output.

Timex Sinclair 1000 Part 1: Multi Region Composite Mod

I recently picked up a Timex Sinclair 1000. I first tried connecting it to my LCD TV which does have an analog tuner, but I couldn’t get the signal on it. I then dug out my VCR from the storage area and connected to that. That worked just fine. I am not sure why the TV wouldn’t take it directly. The signal looked pretty good too. I really didn’t care to use the 1000 on the TV all the time though, and not with the VCR all the time either. I went on and looked into a Composite Video modification for it. The modification is done with the same little transistor circuit as the Atari 2600, which I have done before. This is only when the system has the later ULA 2C210E chip such as mine, the earlier ULA 2C184E does not generate quite a standard video signal, so that requires a different circuit. I don’t know if any of the Timex models have the early ULA chip or not. The Timex Sinclair 1000 is a rebranded Sinclair ZX81. The RF Modulator is different for the US Timex model (and the US ZX81 which they did sell some of), there are a few other differences. The Timex 1000 came with 2k of ram rather than 1k like the ZX81 came with and outputs to 60hz NTSC video while the UK model does 50hz PAL video output.

I used Tynemouth Software instructions on the Composite Mod. Found here: http://blog.tynemouthsoftware.co.uk/2016/11/ts1000-multiregion-composite-video-mod.html

I used the stripboard circuit from TheFutureWas8bit Atari 2600 mod:

https://www.thefuturewas8bit.com/2600_comp_mod

I also used info from GadgetUK164’s video: https://youtu.be/5OQuJ-GMwF4

Although in his video he had the OLD ULA chip, and the simple Transistor circuit didn’t work properly for him, he went on to make the more complex circuit later on. His initial bit was using the transistor circuit such as I ended up with.

I found good schematics for the ZX81 here with other useful info. This is where I ended up getting information as to what the various extra Modulator connection labels were.

http://fetrmartin.free.fr/ZX81/

I would post the schematics and other bits from the sources, but that is their material, this is how I used their material, you would need to build the transistor circuit from TFW8bit, or you can buy the board they sell which would simplify matters.

I went with a little different approach than I initially intended. I was going to leave the RF Modulator in but disconnected, that didn’t work out. There wasn’t much room, and I couldn’t remove the capacitor and resistor(?) and wire from the RCA jack easily, and I couldn’t get the strip board to fit reasonably with the Modulator still in the box. In the end I removed the internals of the RF Modulator and installed the new circuit inside.

I want to note that with the ZX81 and the US Timex 1000 (and I guess the ZX81 US kit), the pins used for the RF Modulator are different. It uses the “USA” marked pins, it uses 3 of them.

For the US model, it uses 3 wires instead of 2 for the UK versions. USA3 (Not FR3) is the far left wire, that is apparently the Video in signal although I don’t know where it comes from exactly, as that is not the direct pin from the ULA video output. The next USA2 is actually +5Volts. Then USA1 is the last and it goes down to the Channel 2/3 switch. That switch actually switches between Ground and +5Volts ( I use that later as Tynemouth did).

For the Composite signals, I actually removed the RF Modulator board etc:

Modulator bits, the board, with the 3 wires, and the Capacitor and resistor, and the output wire on the right.

Here is the board installed, it is built as TFW8bit’s stripboard, although on a larger piece of board so it would stay solidly in the modulator box.

Composite Video circuit.

Above you can see the wires used. Originally the modulator of course used USA3, USA2, and USA1. In this case I am only using USA2, which is now the third wire not the middle one going in. The first is going to FR3, which is actually Ground, yes the modulator chassis is ground as well, but I didn’t care to solder to it, and had the opening for the third wire. The middle wire goes to UK2 which is the video directly from the ULA chip pin, and not the round about way that USA3 apparently gets it.

First I tested this out and it worked great. Here it is via the Composite input on my little LCD monitor I keep on my bench.

Success.

There is a second modification though. The channel switch is no longer needed, and it can be re-purposed for something else. Tynemouth used it as a NTSC/PAL switch, which is a simple change. This involves R30, which goes to the one pin on the ULA, and to ground. It is a 10 ohm resistor that when pulling that pin to ground causes the system to operate in NTSC 60hz video mode. When it is disconnected from ground the ULA sets the system to run in PAL 50hz mode. To do this I reused “USA1” which goes to the switch center pin already.

USA1 ready to use.
The Grounded side of R30 lifted from the board.

Next the Switch needs a bit of a change. As I mentioned earlier the switch changes USA1 from Ground and +5Volts. We don’t want to wire R30 to +5Volts. To do this you could remove pad from the circuit board, or you could trim the wire from the switch and ensure it was insulated. I didn’t want to alter the board, so I altered the switch.

Next I installed the switch and tested it. Be aware, I made a mistake installing the switch..

So, some may notice I installed the switch to the wrong side of the board. So this won’t work in the case now. I realized this shortly after putting all of the tools away, but before I was going to reinstall the board.. So I desoldered the switch again and installed it to the bottom of the board like it should be. When I put the switch on, I reinstalled the old paper label they used to insulate it, and to beef it up a bit, and cover the hole from the old pin that went into the +5Volt pad, I put a little piece of Kapton Tape, you can’t see the tape in the photos though as it is under the original paper label.

Switch installed properly..

I then retested it. I have another bit I am looking to do with this board and that is to put in a 16k ram upgrade on board based on Tynemouth’s post on it, and that again GadgetUK has done a video on. It really is not going to be anything new, while the Composite mod, I did a little differently.

I haven’t tested the keyboard on this unit, I did order in a replacement keyboard for it, and if I don’t need it I will keep the original on it for now.

To finalize the upgrades, I have used a little Brother Label maker to update the Labeling on the case. They are stickers so it can easily be removed. They stick very well, so they should hold up fine. For this one I purchased some White on Black Background labels. I use these labels for various projects, and have been using them for years with good success. (Note: be careful with leaving batteries in these Brother Labelers, they drain batteries when off apparently and then the batteries leak. I have had it happen to the labeler at work, and my personal one here at home.)

The computer did come with the 16k Ram Expansion, but the expansion doesn’t work. So there is a Part 2 Post where I install 16k Ram Internally on this computer. I had looked at repairing the 16k Ram Expansion, and the one capacitor was bad on it, but replacing that did not correct the problem. They are rather complex boards, and while I wouldn’t mind repairing it, I am was not sure where to start. I thought of stripping out the 74 logic chips to test and such, but that is about all I could do. The internal 16k ram upgrade is quite easy though with the right ram chip and a few wires. It is also cheaper to source that one (32k which we only use half of) ram chip than the very specific odd chips in the ram expansion. I don’t have to damage the mainboard or anything to do the ram upgrade it is fully reversable. I mostly have to swap the onboard ram socket and do the few wires onto the new chip.

Update on the 16k Ram Expansion: I did end up getting a RAM Tester in early 2023. I pulled all of the the Ram ICs from the 16k Expansion, half of the ram chips had failed, maybe when that cap failed it made a surge? Or it lost the 12V power and that burned those out running without it? The 74 Logic ics were all good. I will not be repairing the Ram Expansion as I don’t need it and can not use it. I did fully strip the PCBs of ics to test them, I don’t know if there would be some project I may reuse it for in the future. I did damage one trace but it is repairable and could easily be rebuilt if I wanted to.

Commodore 64 New Powersupply 2

This is just a little follow up to my C64 power supply post. Since I built that supply I have acquired a second Commodore 64 and I wanted to be able to hook up both. I decided to build a second supply based basically on the same design as the first. You can review the earlier post from the link below:

https://hobbytronics.home.blog/2019/02/11/commodore-64-new-powersupply/

I used the same case, same Meanwell 5Volt DC Supply, another salvaged IEC power port and switch. With a fuse. This time I didn’t have a spare transformer around so I had to order one. The new transformer is a Jameco 105524 9 Volt power supply. I wasn’t happy that it really didn’t arrive with useful info on what wire was which. I went back to Jameco’s listing for it to look up the wiring, which while the information was there, it was not posted in a clear manner. They have a scanned transformer diagram with 1-6 marked on it, then below it typed text saying what the various wires are by the “colors” of the wires. So go by the wire colors. It turned out that the 4 wires I needed were the same color as the other transformer (which only had 4 wires as it was a 110 to 9.5V only transformer). The new transformer was larger, I guess because of the 230V supply support? It still fit into the case I used previously. I also still mounted the transformer and Meanwell supplies to a piece of raw circuit board material. I did run a ground wire down to the one bolt on the transformer. Still it was grounded already due to the Meanwell case being grounded as well as the copper on the circuit board material.

The thing I still didn’t do that should have been done is grounding the metal screws and metal screen on the top of the case, if the Hot wire every pulled and contacted to the screen that would not be a good thing if it was then touched.

This time I did use crimp terminals on the wires going into the Meanwell screw terminals. The last time I didn’t have them around, and I think if they are tight they are a little safer that way. The other supply they are just bare stripped wire in the terminals which is ok, just make sure they are tight. Just Never Solder wires and put them into screw terminals, that may seem like a good idea, but it is dangerous because they will work loose over time as the solder is soft and tends to shift under the pressure.

I again did not include a “Computer Saver” or “C64 Saver” overvoltage protection circuit. The Meanwell does have overvoltage protection, but it won’t kick in until well after the damaging 5.4 Volts DC level has been hit..

The new supply. Sorry for the poor picture quality..

The screen is a little smaller this time around, it didn’t need that much of a vent. I thought it looked better that way than with the larger screen. I put the fuse on the bottom, as having it in the lid, I couldn’t put the nut on it before. The Hot/Line/Live wire goes first to the switch, then the back of the fuse holder from there, then through the fuse back over to the Meanwell supply terminal where the Transformer is also connected to it.

I wanted to do a power led… I forgot to. This thing is very tight, it would take a good bit for me to get the board loose so I could get back at the screw terminals.. I have to take the 5 screws out holding the board down, pull the fuse holder out the back, and feed in some of the output wire cord to lift that end of the board.. I am not wanting to risk pulling any of the rather short wires out of the crimp terminals, or making them loose and dangerous later on. I may go back and do it at some point. I would like them on both supplies. Basically some wires and a resistor to an LED off of the 5Volt output..

Here you see the new supply on the left with fuse holder on the bottom.
Another view of the back and top. The new one is a fraction darker plastic, be great a few shades darker though.
Here is the top front view of the supplies. The new one on the left again. I added the metal sticker I had ordered as well.

Above you see the finished supplies side by side. The metal stickers that I ordered from “marstickers” on Ebay turned out amazing. I believe they sell them on Etsy as well, as I found the listings there, the pricing is similar. That is also who I ordered the reproduction Commodore 64 Gold case badges form for my second C64. These are cut metal foil sticker, mirror finish. They came with a backer and clear top piece that holds them into position to get them placed properly.

A few little things, make sure the supply isn’t a bit under voltage at the connector. If the wire is too long (and possibly too thin), you get some voltage drop on the cable and that can be bad for the operation of the computer. I went with a wire around 4′, but some people go longer. So I get a slight bit over 5Volts (5.1V max) on both of my supplies at the power connector.

The wire I used is virtually the same diameter as the pins. It while is stranded wire, it is not very flexible and doesn’t have many strands in it. It is not perfect, flexing it too much will likely cause it to break. Still, it is real copper and is stranded, and a good diameter for the power lines.

The 5Volt 3Amp Meanwell supply should be 15Watts
The 9Volt 1.5Amp transformer should be 13.5Watts.

28.5Watts/110Volts = 0.259 Amps. Then the fuse should be rated at 125% of that. So 0.259*1.25=0.3238 Amps for the fuse at 110Volts

28.5Watts/220Volts = 0.1295 Amps. Then 0.1295 * 1.25 = 0.1619 Amps for the fuse at 220Volts

If you figure the Meanwell’s 77% efficiency that should move it to .366 Amps at 110Volts and .183Amps for 220Volts.

You should get the closest Amp fuse that is above the value calculated. Probably 400mA if you can find one at 120Volts or 200mA at 220Volts if that is your voltage there. If the rating is to close, then the inrush surge when plugging in could blow the fuse. You want to use normal (fast) acting fuses not “Slow Blow” fuses.

I am no professional at calculating fuse values. I believe that is correct though. The trick is you are figuring the Wattage usage of the supply at the top safe level of it (at the supplies efficiency level), so that you can then relate that power usage to the 110/220 AC, as that directly translates back to there.

The C64 won’t be drawing 28.5Watts out of the supply ever, unless something is wrong.

The factory supply (output) should be 16.5Watts 5Volt 1.5Amp (7.5Watts) plus 9Volts 1Amp (9Watts). So I expect the C64 won’t end up drawing more than that.

Factory supplies seemed to have 120mA or 200mA fuses on the AC line for 220Volt supplies. That seems to indicate they went with higher numbers, but they had 7805 regulators. With the 7805 to give out 1.5 Amps at 5 Volts actually used 1.5Amps at the input voltage, 9-14Volts probably. So they were using more nearing 21Watts (at 12Volt input) at full load. Well as the load increases the input voltage to the 7805 should in theory drop to close to 9Volts. Figuring that 120mA would be right for 21Watts.

The Meanwell has over voltage protection, I did not include a fuse on the 5Volt DC after it. If you did, you would want a 1.5Amp fuse probably there as the Commodore 64 should not pull that much safely anyways although it may blow before the protection on the Meanwell trips, although the Meanwell may still trip faster than the fuse will blow.

Power connector. You can see the wires aren’t tiny compared to the pins, 2 strands are also removed to get them to fit.

This is just what I did, I have not included any wiring diagrams or detailed parts list. It is a rather simple build really. The Meanwell gets the direct 110Volt AC to it, along with ground. The Transformer gets the same direct110Volt AC. Everything else is sending the right wire to the output on the Din power connector hta goes to the Commodore 64. This same setup could be used for a Commodore 128, swapping in the proper power connector, as the 9Volt AC transformer I used and and the 5Volt Meanwell supply I used can handle the additional current load. While this is a simple supply working with AC mains from the wall outlet isn’t a safe thing to do if you don’t know what you are doing. Like I mentioned above, the metal screen and the metal screws that hold it on SHOULD be wired to Ground for safety, if built into a metal case or having any external metal should be grounded, such as the screw heads. The enclosure’s metal corner screws are electrically isolated so they aren’t a problem in this exact case. I expect if I go back and add the Power LEDs that I will be grounding the metal screens in my case. I have been building supplies off and on for a couple decades and have a few years of electronics training having worked with open chassis and vacuum tube electronics back in school. Doing a supply like this is something you should really look at carefully if you go to make one of your own.

There is a simpler way than to work directly with the AC directly and wiring things up. You can get a good quality 5Volt DC AC Adapter, and if you look carefully you can find some 9 Volt “AC” adapters (often used for older security systems I think, but what for in them I don’t know, but you can still find them). Then you can take an extension cord (even a 2 wire one if both Adapters are 2 prong plugs, be sure it is heavy duty enough though), plug those two adapters into the extension cord and hide that inside an enclosure, cut the cords and wire in a cord with the Din power connector for the C64. Jan Beta had has done just that, it is likely a safer project. Retro Recipes has as well.

I have also added a power LED to the top of this second unit.

Pi1541 in 1541 Case & Tapuino – Part 3 : Schematics and a bit

I wanted to post the final Schematics for the Pi1541 Option B+SRQ and Bare Tapuino here.

Gerber Files for the board can be downloaded from here:

https://github.com/Markeno76/CommodorePiTap

Below is the Bare Tapuino schematic. It is basically a Tapuino using a bare ATMEGA328 instead of an Arduino Nano etc as the base. The ATMEGA is burned with the Arduino Uno boot loader. It can be programmed by pulling it or on the board. The required connections are available on the board by the Reset pin plus and other headers. That is why the Reset pin is there, to make that easier. I didn’t route a regular ICSP header though. It was hard enough to route this board for me, and I believe the other header with the required pins would have had to been unplugged for it to succeed. There has not been any firmware update for the Tapuino in a good while either. The design is a combination of the schematics from the Tapuino Github. The C2CON header is for the secondary Cassette for recording from it. I did not use that, although I do have the header in there on my board I have no connector anywhere to accomplish it. Because I am not using that feature, I really don’t need the 4052N on my board. That is what it is for. The 4052N can be bypassed by putting two jumpers in its place. The first jumper goes from Pin1 to Pin3 on it (Write Signal). The second bypass jumper goes from Pin12 to Pin13 (Read Signal). The Tapuino is a Tapuino 1.5 plus the Read and Write LEDs from the Tapuino Mini 1.02, and then using a bare Atmega instead of a Arduino Nano or Mini etc. I could not find schematics for the later Tapuino versions, I guess someone else made them to sell and has not released them. I didn’t care for a buzzer or speaker attached to hear the playback, so I was fine without that. I really do not have the Read or Write LEDs on my board at this time as they were added later. I might add them, but I am not sure it is worth the trouble. I would have to take my control panel apart to get them installed, my thought is to place some surface mount LEDs just behind the mesh. The other thing I would like is there was another firmware out there that had some “graphical” look to the Tapuino LCD display, I would really prefer that. I can’t find it anywhere, it was posted on a German blog I believe, but only pictures of it, no code etc.

The other note on the 4052N is that the 74HTC4052N does not work, but a 74HC4052N does work on the Tapuino.

Being a “Bareduino” base, there are other components on the schematic that are not typically on a Tapuino. That is because most are based on using one of the Arduino boards as a base. It was a good excuse for me to make a Bareduino.. I figured why waste an Arduino Nano or something like that if I was making a board anyways.

Pi5141 Option B + SRQ and TFT LCD Passthrough header.

The above is the Pi1541 Schematic. It is Option B plus with the addition of including the SRQ signals. They will be required for some updates to the firmware to take advantage of.

The TFT LCD Passthrough is probably less useful to most, it is actually a traditional Mini Din PS/2 Port. That is what my little 7″ Composite LCD came with as a connector. I decided to put it into the Tapuino. It was originally for use on my workbench to test my Commodore 64. It supports 2 inputs, the default is the one connected to the Pi’s Composite video output. The second input is out the back of the 1541 case and can be connected to the Commodore 64 Composite Video output. The board footprint and setup is actually setup so as to allow putting a Second Serial Din port side by side with the first one. If that was the case, then the TFTLCD header would be wired over to the back of the Serial port and the Serial Din would be installed instead of the PS/2 style Mini Din.

The 7″ LCD though lets me use this device as a stand alone device with the Pi, or with the Commodore as a reasonably portable LCD. There is also a jack on the back of the 1541 for an Audio Input with a switch beside it. If the switch is flipped toward the jack it will output the audio from the external jack to the internal amp and speakers, if it is switched the away from it then the audio is connected to the Pi’s audio output instead. This lets me play the Pi sounds through the internal speakers. The speakers are actually Mono, the rear jack is mono too. The Pi audio output is mixed down to mono with a resistor to prevent them back feeding into each other and damaging the Pi’s audio output. The alternate is that I can again connect up the Commodore 64’s Audio Output to the internal speakers.

The MicroSD Cards are both accessible from the front, the one on the left being the Pi’s card slot, which is extended with a MicroSD extender. The one on the right being the Tapuino’s card. This lets me remove them to add or remove files easily. The other thing it allows me is to swap the card in the Pi. I can then use the Pi for more things like running Raspbian on it, I can then output that to the internal speaker and the 7″ LCD. It can alternately access the HDMI Port on the side of the case (again with an extension going to the Pi itself). I can also put in a card with RetroPi on it, which again can run on the internal speaker and 7″ LCD or alternately output through the HDMI. I can then connect up controllers to the USB ports that are accessible on the side as well.

There are plenty of variations on the design possible. My point was to reuse this case I couldn’t otherwise make use of due to the failed read write head on the unit. The transformer I had left was for 220Volt input, so that wouldn’t have been of use to me either. I wanted to do something with it that would fit in with my C64, and there was just way to much extra space to not make more use of it. I liked the idea of doing a Bareduino project as well.

The Cassette cable worked out really well to. It is basically wired up as a passthrough Pin 1 to Pin 1 from the Din to the Card Edge connector. The Card Edge end is bolted into a DB15 (Gameport type not HD15 VGA (which is DB9 sized)) shell. I later painted it with a Green “Top” mark and lines and a Red “Bottom” mark so that I know which side should be up. I also inserted a bit of plastic to work as a Key into the slot in the connector. I had done that before and it fell out, so i wanted to have a visible mark as well. The wire is part of a very flexible Cat5 cable (yes old Cat5 not Cat5e) that I came across, I pulled out the extra 2 wires to make it more flexible as well. The ends have some heat shrink on them to build them up slightly and provide some strait relief.

Above you can see both the 7″ LCD and the little OLED on the drive face both display the Pi1541 output. So it can be used with or without the 7″ attached. The Pi controls are there on the left side, the 3 buttons and the 2 way momentary toggle switch. The Red LED is the Pi1541 activity light. The Green led on the left in the factory location is the Pi1541 power LED, it lets you know the Pi’s power is turned on. The other Green LED on the front panel is actually the Power LED for the internal audio amp. The Red tipped knob is the volume control and On/Off for the Audio Amp. The 4 buttons on the right are the Tapuino controls with the small LCD on the right being the Tapuino display. The Tapuino is powered completely by the Commodore 64 Cassette port. So the main power for the Pi does not need to be on for the Tapuino to work. That is partly why there are 2 schematics. There are two 5Volt power sources, the one that Pi uses is the internal Meanwell power supply where the Tapuino section receives the power it uses from the Cassette port, they are not wired together. They do share a common ground, which they share through Serial connection anyways.

I have used this unit for Raspbian as well as Retro Pie as well. My general intention is to use it just as a Pi1541 though most of the time. Originally I figured I would use it for Retro Pie a bit as well, but I have since built a Bartop Arcade to run Retro Pie instead. I really didn’t feel like disconnecting it from the Commodore desk and moving it to the living room to connect to the TV and such just to play some old games (other than Commodore games that is).

I have been thinking of putting a button on GPIO3 for a safe shutdown and startup button for the Pi when using Raspbian or Retropie like I did with my Bartop Arcade build. I just don’t at this time know where I would want to put the physical button. I could reuse one of the Pi1541 buttons, I could assign Safe Shutdown to another GPIO Pin that they happen to already be connected to. Still that would then not work as a wake up button as GPIO3 is the only one that will wake it.

Commodore 128 80 Column RGBI to SCART to HDMI.

I have been wanting to get a working display for the Commodore 128 80 Column mode. Looking into it, certainly get an old compatible CRT Monitor, either a Commodore RGBI monitor or apparently a CGA monitor potentially. Well they are old and they are expensive, and quite expensive to ship. There a couple more modern LCDs, including some NEC Multisync 70 series monitors. They are apparently around, but they are old and somewhat expensive too. If I get a display I would rather have confidence that it will last for a fair while. That and I am pretty cheap I guess.

I looked at options, the Monochrome Composite 80 Column mode is easy. Just make up a cable with the DB9 and a regular RCA plug on the other end. I want color though.

There are some CGA(RGBI) to VGA converters that people make to sell. They convert the Digital CGA signal to an Analog RGB signal, that is close to VGA. The frequency is at the CGA 15khz though instead of 31khz like VGA though. So most monitors don’t accept the 15khz signals (NEC Multisync 70 series is one of the few again, and the 60 series that I have doesn’t). Then you need a second unit that then takes that 15khz to a 31khz VGA signal.

I found a circuit design for a CGA/RGBI to Analog VGA. This is the first part, and you need a secondary converter to take the 15khz signal to the standard VGA 31khz. The GBS-8200 is a popular solution to take the signal to 15khz. I found another solution, which is a SCART to HDMI converter that Adrian Black posted about on his Youtube channel. I picked one up, an a donor cable to make up a proper cable for it.

I took the RGBI converter diagram and came up with a bit of a hybrid of it. I had tried an earlier wiring up to see if my Multisync 60 series monitor worked, it didn’t. So I am making up up circuit I found. There was a report by another site that said they didn’t like that circuit, and preferred another circuit for the process.

The draw back of these RGBI converters is that while they are full 16color output, they output Dark Yellow in place of Brown. It is not a fault of the circuit, it is because that is how CGA/RGBI worked, the Monitors actually handled the color replacement. To do the Dark Yellow to Brown replacement requires including the 74LS138N ic. When it gets the “Dark Yellow” signal, it injects just a little bit into the “Green” pushing the visual output from Dark Yellow to Brown through R1 below.

Update 2/5/23: Today I was looking to revise this project to a PCB Design. In looking at, it I and thought the Sync Invert was incorrect on the schematic. I was wrong, it was correct so I have switched the schematic back to the original from 2019. I have no promise I will complete a PCB design, but if I do I will be posting it up on Github or another site. I am thinking of making the pcb to fit into the same case I used for the prototype if possible. To make it more useful for IBM CGA I plan to put a power jack on it, the Commodore AV Port will be a pin header row or something, so it will be optional. There will be the optional Audio Jack coming from the Commodore AV Port, as well as an option for the Monochrome 80 Column Composite output (because I can), Commodore 40 Column Composite as well as Commodore 40 Column SVideo output. I am making the PCB Design in KiCad at this point. I want to see how that works. I had used Eagle back at the time of making this project initially. I have recently used EasyEDA as part of the Super Game Boy project, as Joe had build it in there. I wanted to see how KiCad compares. The schematic is nearly finished in KiCad, but the one in Eagle as seen below looks “neater”. I am finding some issues with KiCad not having footprints I would like to be ready to use, but we will see once I start having to work them out and find parts.

Progress on the 2023 PCB Design. See my other posts on the progress there. V1.3 files are now released, see “Part 4” post for the links.

https://hobbytronics.home.blog/2023/02/07/commodore-128-80-column-or-cga-rgbi-to-rgba-15khz-vga-adapter-part-2/

https://hobbytronics.home.blog/2023/02/27/commodore-128-80-column-rgbi-cga-to-rgb-analog-adapter-part-3/

https://hobbytronics.home.blog/2023/03/12/commodore-128-rgbi-cga-to-analog-rgb-part-4-a-new-case/

Here are some pictures of the unit built up on some protoboard and reusing a section of board with a HD15 VGA connector on it. There are a couple of things I will be doing with the board, first I will be installing a 150 Ohm resistor on the board (R9). Currently in the second picture you can see an old 150 Ohm resistor in there for testing. I was making sure that 150 Ohms wasn’t too much and that it brings the current usage down to what I consider should be a safer level. Initially I had been using a higher value resistor and the circuit wouldn’t work. The SCART box needs enough voltage on Pin16 “Blanking” which switches it over from Composite Video to RGB Video mode. With too low a resistor I wasn’t happy with the current draw. I am going to be powering this board from the Commodore 128’s AV Port. I didn’t want to risk damaging the computer by pulling to much power through the port. With the 150 Ohm it had lowered it to a better level. The other changes I will be making also involve the AV Port connector. I want to be able to connect up for both 80 and 40 Column video modes, with the AV Port plugged into the box for power, I can’t get to the 40 Column signals. I am going to add another RCA jack for the Composite Video, I will also add a SVideo port somehow later on, so that will be an option for 40 Column mode. The a RCA port was the Audio out coming in from the AV Port originally when the first pictures were taken (in the end I moved the Audio to the side, and made that port 40 Column Composite Video). The Audio also goes into the “vga” jack and is sent to the SCART converter to go into the HDMI signal from it. I could have hard wired in the SCART Cable instead of including the VGA port. I wanted to give myself other options with the box though. That is also why there are some jumpers on the schematic. They are there on the board, but they are not easy to see as they are a bit under the wires in the pictures below. The jumpers can allow to switch from Combined Sync mode (CSync), to the VGA Split Sync (HSync & VSync). The second Jumper is the Inverter jumper for CSync/HSync line, with it one way the CSync is inverted, with it the other way it is not inverted. This gives options to potentially connect to other devices, like the GBS8200, maybe some Multi Sync VGA monitor if I come across one. The only concern I have with either of them, is that I am sending Audio to the VGA port to Pin 4. If the Monitor or the GBS board do anything with Pin4 they could damage the SID or be damaged themselves. The other alteration on the VGA pin out is Pin 9 has the “Blanking” voltage wired into it, old VGA cards (very old I guess) sometimes had a 5Volt output on that pin, so as I am feeding it with something under 5Volts it shouldn’t do anything, but that doesn’t mean something won’t be wired to it. I have seen diagrams of people thinking Pin 9 on the VGA port should be Grounded, which that would be bad.. certainly it wouldn’t be a good thing to do.

So after a lot of checking of my wiring, I finally connected it up to the Commodore 128, and well it worked. That was great because I couldn’t get it to work 100% on the breadboard. I though the issue might be the variation of the XOR Gate IC I was using, so I had ordered in some replacements, so it was either that or all of the slop of the breadboard wiring. There is that “Saturn’s Rings” looking interference there going across centered around the Light Blue line. That was a visible thing on the display. I didn’t have that specific issue in the breadboard circuit. The point to point wiring isn’t the best either, so maybe that has something to do with it. I have yet to try it on another monitor though. Still I am pretty happy with it, and soon I will be able to close the box up and make use of the 80 Column mode when I want to. The color correction on the Brown seems to be working, the text at the top is in “brown”. At the least I can say it looks closer to Brown than Dark Yellow to me. The other colors look reasonable to me as well.

Success.

Below here is the SCART to HDMI Converter I am using. I found it on a video by Adrian Black where he was recommending this model specifically over the other similar priced models. He said that Heatsinks needed applied to the two chips inside though.

Below you can see the two heatsinks I installed. I hope they are enough, the little one in the lower right is fine, but the main chip heatsink is smaller than the one Adrian was using. I don’t know how hot these get with use. If they “sort of work” without them, I would hope that they will be just fine with these. They are the type that come with some 3m tape applied.

Two Heatsinks Installed for reliably.

Above I have put together a diagram of the Output of the circuit I built and how it is wired to the VGA port and then how that wires over to the SCART Cable. For a GBS8200 or proper Multi Sync VGA monitor you would just use a regular VGA Cable. I would feel better if you used a minimal VGA cable, which is R,G,B, Ground, C Sync/H Sync and V Sync. I find that the thin modern VGA cables now only have those wires in them. I have had older ones that were about as small but did have all of the wires in them. I am putting in a jumper to disconnect the Audio from the VGA port for safety. When the jumper is moved to the other position the audio then goes to the RCA port on the side (the Red one not the Yellow one).

Here is the Analog RGB side. The RCA port there is now wired to the
Commodore AV Port Composite Video (40 column output). I painted it yellow to reflect what it is.
Here is a top view once it was finished. The Additional RCA on the side is now wired to the Audio Out from the SID via the Commodore AV port and is Red to reflect it is an Audio port. Below you will see an additional “jumper” that is not on the schematic labeled “<Audio” that is a 2 position jumper that either passes the Audio to the “VGA” port or to the Red RCA Port depending on the position it is set to.
Above I put on text for the 4 jumper locations and functions. SCART blanking is connected or disonnected, Audio is to the VGA Pin4 or to the Side RCA. Then CSync Inverter or non inverting. Finally CSync or HSync (such as if I had a compatible MultiSync Vga Monitor)

I certainly look forward to using this setup for my Commodore 128. I added the label below, it is printed on an inkjet printer with standard paper. I then used some tape to mask off the top of the box, and sprayed it with Locktite Spray Adhesive 200 Middleweight bonding spray. I let it slightly dry before putting the paper inplace so that it would not bleed into the paper. It is sticking perfectly, I guess I will see how long it holds up. I may have put some clear packing tape over it before cutting it out, but I didn’t have any. I have used the process for some cartridge labels as well.

A few References:

https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-scart

https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga/ultimate

https://groups.google.com/forum/#!msg/comp.sys.cbm/ARbaCb8n9Sg/B0UPWvrKOaUJ

Nothing above is exactly what I ended up with, but that is what I based my converter off of. I used H2Obesssion’s CSync and SCART info, and then the other for the Digital to Analog and Brown fix. I would really have liked H2Obession’s “Ultimate” circuit to have worked out. There were reasons it did not work in my case, mostly I think it was the SCART Blanking. If I make another, I was thinking of trying it again.

The unit does work for me, it may not startup the Sync signal quickly enough and I have to reset the Commodore 128 to get the display to show.

The design can be adapted for IBM CGA use. The only difference there is the source of the 5Volt power as there is no Commodore AV port to supply it. Certainly a DC power jack could be added instead for a 5Volt DC power input.

Commodore 64 Breadbin #2 Referb : 326298 Part 2 Case Repairs

Well I am getting back to the second Breadbin repair and cleanup as I finished up another couple projects I had put it on hold for.

I did get one of Birt’s C64 Case Saver kits to repair the damage to the case:

https://www.soigeneris.com/commodore-64-caser-saver-repair-kit

I didn’t think I could do much with the tab, and with the two cracked screw standoffs, I figured it was worth while to get it. I will have to say I am very happy with the fit and quality of the parts. I attached them with some JB Well 4400psi Epoxy.

I am doing another coat of paint on the lower portion of the case, partly in hopes of a sturdier finish, but also due to that crack that showed at one of the Din ports in the back. I had glued it, then I used some Epoxy on the inside to help it as well. I then used the White Putty in the crack to help blend it out.

With the top I cut the broken portion of the case tab off. It was the narrow one. I then installed Birt’s replacement tab. It was a perfect fit. Per his recommendation I did slightly round its edges and the two remaining tabs. I also put his parts on to reinforce the cracked screw standoffs in the top. I again used the White Putty on the outside of the crack in the right front corner of the case to help blend it out for the paint. While I had the epoxy, I decided to reinforce the inside of that crack with it as well.

The paint turned out really well. I put on about 3 coats on it. Krylon Fusion All in One Matte River Rock.

I ordered in some reproduction badges for the top of the case. Well I went with the “gold” model type labels. This thing is an odd machine, and the reproduction badges are great, but the way they are made is a bit different so it was not going to look exactly original from close up. So I am happy to make this rather neglected, and somewhat unique 64 look a bit more unique.

I have just finished replacing the electrolytic capacitors on the board. That will be posted in Part 3. The modulator was quite a pain this time around.

I still need to look at the * key and see if I can get it to be more responsive. The two “repaired” plungers are a bit off, the height is just a little wrong. I am going swap them out and keeping them as future spares. I need to open the keyboard to check out the * key anyways, I might as well switch them. I may redo them with epoxy sometime and try to adjust the height a bit more. I don’t know if that will be Part 4 and hopefully end up with it finished up.

Bartop Arcade Build Part 2

This is part 2 of the Arcade. The first post has the Arcade in a good working condition. This will cover some of the final touches.

I did a bit more work on the Marquee. I am in no way a graphic artist. I had downloaded some logos to do the initial graphic. I found some better ones to use and made some other changes to it. I then printed it out on my inkjet printer onto 3 sheets just like the previous test one I did on a black only laser printer. It turned out pretty well, I couldn’t do a full color graphic though. I think I will leave it at this paper graphics for awhile anyways.

For the Marquee there really aren’t any hot spots. I was thinking doing a frosted piece of Plexiglass behind the marquee to handle any hotspots, but that turned out to not be needed (with the paper that is). It is a little brighter than I think I want it, but I didn’t find it too distracting while test playing it. It is quite hard to photograph anywhere near properly though as bright as it is. I have at this point decided to not make a dimmer system for it. I have a couple of workable circuits that I have used for that in the past, I just don’t want to take the time at this point, when the biggest issue is taking photographs of it.

For the LCD I wanted to make a bezel/cover that went over it. To do this I put some 1/8th inch strips up the sides of the cabinet to rest the Plexiglas against. It slides up behind the Marquee bottom board, between it and the top edge of the LCD itself. For Mike’s it seemed he was putting the MDF strips up infront of the monitor? At least in his plans, that would have pushed it back, in my case with the thin strips they are even with the front of the LCD and are just guides to keep the plexiglass from flexing. Mike also had a small board along the bottom above the control panel, which I omitted due to the Plexiglas. I fitted the Plexiglas so that it just meets up with the back edge of the control panel. It is not held along the bottom and just goes up against the control panel board, so it can flex and make a gap there a bit. I may have to secure that in some way in the future, but currently it is minimal, and I do not want to make it difficult to remove the control panel if I can help it.

Above is the Plexiglas I was cutting for the screen. To cut it, I used a board and metal angle clamped together. I was cutting from the side on the right side where the knife is laying. Because the Plexiglas had a bad edge from when I purchased it, I needed to be sure to get one good long cut for the bottom edge. The top edge is hidden up past the marquee bottom board. This stuff is very hard, it is not the softer type so I found that it likes to fracture/crack. I managed to get a very good first cut on the top edge. The next cut, which I was doing in that picture really cracked up the edge. The last cut, cutting it down to the right width, that cut went very well thankfully. I had 1 factory edge and 2 cut edges exposed that turned out pretty well. It was very slightly too wide, to get it down to the right width I used some 180 grit sandpaper with a sanding block to get it just right.

The next part after fitting the Plexiglas was to get it in the final position with the LCD in place and the Control Panel in place. I then used a marker to mark the corners of the LCD behind the Plexiglas. I removed the Plexiglas, and monitor. I placed the monitor on the bench facing up and then placed the Plexiglass back over it using the marks I did while it was in the Cabinet to get a good view and check the marks were correct and centered properly. Once I was sure I had the corners marked correctly, I took away the monitor and flipped the Plexiglas to the back side. The back side being the side that will in the end be toward the monitor itself once installed. From the back side, I cut into the protective plastic with a fresh Xacto blade around where the monitor will be placed, and removed the outer portion (yes only the outside part, not the center where the monitor will be). This left the “monitor area” covered and protected. I also kept the protective layer on the “front” side as well. Then I used some Gloss Black Rustoleum 2x Ultra Cover paint, painting that on the outer rim that I exposed by removing the film from it. This paint is on the back side of the plastic not the front, I have done this before for other projects. It leaves with me with a super gloss finish when viewed through the plexiglass and the paint won’t be touched so it won’t get scratched. You could use any opaque paint color, in my case I was using Black due to the black case, red, blue anything really should work. Even Flat paints look super gloss from the front side. I have used dark flat primers before to get the same effect. The back is not flawless, it is not quite 100% opaque if back lit with a single coat(with more coats of paint it can be made fully opaque), but it is opaque enough for this use in my case with the single coat. Viewing it from the front the finish is flawless.

Below you see the painted edge once the “inner” monitor protective plastic film was removed after painting on the black paint. The “front” still has the protective film on at this point, which is where that white label is stuck to.

Above is the panel after painting it once I removed the protective layer from the inside. This reveals where the monitor will now be behind. The paint does take a while to dry well. I wanted to make sure it was good and dry before installing it, I didn’t want paint lifting where it meets the strips on the side. The final installation it went well, it is held tightly in place by the monitor at the top edge. I have a fair bit of pressure on the board there from the Monitor to get a little more tilt than the base will give on its own. I was very happy with the result. If I didn’t have the monitor keeping pressure against the Plexi I would have drilled 2 or 3 small holes in the top edge of the Plexi and screwed it into the mdf at the top to keep it in place.

Above you can see the thin strips the Plexiglas rests on when it is installed. After installing them I painted them gloss black to blend in. You can also see the door latch and spacer block to keep it from moving much. The little block at the bottom of the door is to keep it from going in to far, there is another stop block on the top corner as well, but it is out of view in the picture. The round speaker grills are again easy to see here as well as the chrome volume knob on the right.

Above is the Plexiglas installed with the monitor behind it before I removed the front protective film. Yes those are the wires leading to the front panel, when I reinstalled the panel I wrapped them up so they weren’t such a tangled mess. The monitor is there sitting on the blocking it is screw into the cabinet with. I have some pressure on the marquee bottom support board to get a little more angle out of it, as well as the block is a bit angled itself. I would have used the VESA mount board in the cabinet except this monitor doesn’t support VESA mounting (The VESA mount method is so much easier to work with, and cleaner..). There are two screws in the back of the monitor base going into the block there. The block is built up so that the monitor was at the height I was going for, and it is secured to the bottom of the cabinet with 4 brackets with screws. I used brackets as I have it set so that I can get to the screws if I need to remove the monitor rather than gluing it in or putting in screws from the underside.

Above you can see the speakers installed before securing the wiring, the power supply board has been removed, or it would be attached there at the black and red wire, which now lead down to the 5Volt output on the Meanwell power supply below it. The other picture shows more of the internal wiring that goes to the Raspberry Pi, the two front mounted USB ports, the USB power cable which goes to the Meanwell 5Volt output as well. The safe shutdown/power up button wiring is there as well as the speaker input wiring. I ended up plugging the speakers into the Monitor’s Audio Output as I am using HDMI from the Pi. If I had plugged into the Pi I would have likely needed an audio ground loop isolator, because I have the Pi and the Speakers powered by the same power source. When powering the Pi and Speakers from the same power source, you can end up with a “buzz”, there are cheap Audio Ground Isolators that you can pass the audio through. I used one on my Pi1541 & Tapduino combo build post due to that. Using the Monitor Audio Out that it gets the Audio from from the HDMI input, lets me eliminate the need for that for this build.

Here is the back with the door latched of course. There is a fair gap at the hinge side, but with the wide hinge that does not show. I should have made it just a little shorter, it rubs easily, but I hope to not have to open it much. I also hope to not loose the keys.. You can see a bit of the run in the paint at the top, but it is on the back and shouldn’t be seen. Overall I have to say the paint turned out pretty good. I am certainly not great with spray painting, but those “Paint Spray Handles” I used really help me. My hand can’t take pressing that little nozzle enough for a paint project this size. There at the top, there is that extra T Molding strip on the Marquee Top. The Plug/Fuse/Switch unit in the back there can be wired a few different ways. The one I have has a lighted switch, that switch could be wired either as an Always On light even when turned off, or it can be wired to light up when the power is on (or not wired to ever light up). I have chosen to wire it so that it will only be lighted if the power is on. Some of them do come with a black switch and those don’t have lights in them. You could just switch the Hot line so that the light would not come on then because if the Neutral isn’t there it won’t light up. With the plug unit, be certain all the connections are secure and making good contact and not loose, a loose wire can cause heat and melting and potentially fire. I nearly used soldered and heat shrink on the plug unit for that reason, but I didn’t as then I would have to desolder it to ever remove the plug or power strip.

I had to edit the above picture, as the Marquee keeps washing out almost completely. That is the Marquee that is in it, I just took two pictures and over laid it over the lighter cabinet picture. The Marquee looks a little better in the picture than it looks to look at it. I did not remove the protective plastic from either side of the Marquee Plexiglas yet though. It turns out to be very hard to photograph this cabinet.

Above is the Pi 3B+ as it is sitting in the cabinet currently. I would have taken it out of the case and mounted it to the cabinet, but then I have to rig up a fan to it somehow. I may do that later (I never did, but it would be easier for me now that I have a 3d printer. I could make up a case with mounting points and a fan). You can see in the picture the wires coming down to the GPIO Pins. The round momentary button on the back of the case there is wired to GPIO3 (Physical Pin 5) and Ground (Physical Pin 6) of the Pi 3B+. GPIO3 is a pin that will by default wake the Pi from a the shutdown/halt condition. Simply editing the /boot/config.txt file and adding the line “dtoverlay=gpio-shutdown” will activate GPIO3 to be a “shutdown” button. You can change the Pin that it will use for the Shutdown by defining the pin in the dtoverlay value. That will then make the other pin be the shutdown pin, but it won’t move the “wake/start” function from GPIO3. The Pi will start the Shutdown process as soon as it has been pressed and detected. Once the Pi has shutdown, you can start it back up by pressing the button again (as long as you are using GPIO3 (Physical Pin5). There are other ways to set this up, they can include a delay where it will make sure the button is held down for a period of time, which could be handy to have. I went with the easiest option though, as I have the button on the back where it is not very likely to get bumped while the cabinet is in use. I found the instructions on how to set that up on this thread: https://www.raspberrypi.org/forums/viewtopic.php?t=217442#p1337231

I did do just a little testing firing up one of my old 2600 games. Asteroids, I managed to roll over the score easily. I was playing on the easiest level though. I went back and started with the next level and that did not go so well.

I want player 1 to be the left side, and player 2 to be the right side. I found after reinstalling the control panel that they were backwards. To correct his, I unplugged the joysticks from the USB ports on the Pi and swapped their positions. Joysticks are based on the USB Port they are plugged into. So Originally I must have had them in the other ports, and when I re connected them they were put in the opposite positions. I didn’t have to swap the control boards or anything.

The Pi is accessible from the back door if I need access to it. I can also easily remove the control panel. I have two brackets on the back of the Control Panel with screws into to keep it in from coming off. I briefly thought of making the SD Slot accessible on the Pi from the outside like I did with the Pi1541 project. It is a bit much with 3/4″ material though, and I don’t want the card to be to easy to remove and loose. If I want to add anything to it or make changes I have it connected to my wifi and I can access it over the network.

The Marquee top has some brackets and screws that I used to secure it to the cabinet. I want to have it remain removable to easily access the Marquee graphics etc if needed. If I make another I am thinking of making it set back just slightly then use painted angle metal pieces to hold the Marquee in place like full size machines did. This will mean there would be no T Molding across the Marquee Top and Bottom. It would make it easier to install and support the Marquee though. I think I will still use the light box design behind it. That worked great, and I hope the Aluminum will distribute any heat from the LEDs which shouldn’t be very much. They are using nearly half an amp at 12volts, so there is some heat there over time.

So one may ask about what this project cost to build. In my case I believe that I have a little over $250 wrapped up in materials. I am not counting the Pi 3B+, SD card, Monitor or Power Strip. If those were purchased as well, I would have been looking at around $410. I did not include cost of Wood Glue, Brads, the bit of Aluminum sheet, as those are supplies I had around, as well as the corner blocks which are scrap wood. I did purchase a few tools, a 30mm Forster bit, a Slot Cutting bit for a router, and the Edge Guide Clamp, those items add up to around another $100. I now have those tools for future projects though.

I have enough MDF, LED strip light, hinge, Plexiglas and a few other bits for a second cabinet. I would need to buy some T Molding, Controls, the Pi, Monitor etc though. I would like to find a better way to cut the Plexiglas, the scoring it with a knife doesn’t work very well on this hard stuff, at least for long cuts. I managed to get it cut, but it could very easily have turned out bad. It really isn’t “Plexiglas” brand that I picked up, I think I have had some softer stuff in the past that was easier to cut, but that probably wouldn’t hold up well for this usage. I don’t remember Lucite cracking like this material has for me, I have used that in the past, it is pretty good stuff, although even more expensive. It has been quite a long time since I worked with it, so I don’t know if it was all that much more fun to work with.

In the end the cabinet is still difficult to photograph, at least with the camera I have. I guess Gloss Black is not much fun for that. Although it is not flawless, I am quite happy with the final result. Above the Plexiglas over the LCD is quite obvious though and gives a good view of how well that turned out for me. The little mix of colors of the buttons is that I purchase a Blue and Yellow set, and already had a white set. I felt mixing the colors gave a better effect.

I figured I would give a little update to what the machine looks like currently as of 2021. I did get around to having a marquee printed up on Plexiglass. This is based on my prototype design. It looks great, but does not photograph well.. It is direct printed on the back of the plexiglass by a local sign company. The background is a dark blue starfield looking effect. The PiCade text came out great. I made the marquee in GIMP, which is what I tend to use for anything like this. The background and the effects on the PiCade text are all effects that it can create. For the most part though I have been using it off and on for years, mostly I got lucky getting it looking that good, I really don’t know how to use it properly.

Here is the machine turned off.
This is the best shot I could get of the marquee. You may be able to just see the starfield effect a bit.

The other thing that has changed is it is now sitting on a stand/cabinet that was made for it. One of my uncles is a cabinet maker and he put it together. The top is inlayed about one inch, so there is a lip all the way around that keeps the Arcade cabinet from sliding off. You can see that pretty well in the one picture above. It has a good sized door on it that lets me use the cabinet for storage. I keep my SNES knock off USB Controllers inside, the Airmouse Gun and some other items. I put on a little hand turn lock on the front, it is like the key lock in the back of the cabinet but without a key. If I wanted I could simply swap it out for a lock, but in reality that is the kind of latch I wanted on the cabinet.. I really don’t want to loose the key someday and have to drill it out.. I wanted something secure that wouldn’t flap around though when I was building the Arcade, so I ended up putting in the lock. Lowes doesn’t carry the the keyless type.. Below you can see the complete cabinet powered up. The only fault on the marquee was that I didn’t know it would need light blocking on the “dark” areas, so it does end up washing out the “starfield” area. It is not as bad as the camera makes it look though. If I get another printed I will have to figure out the light blocking layer on the back first. I have since seen the backs of Pinball Backglass which you can see they have thicker paint for light blocking and such for dark areas. I can’t fault the company that printed it, they did a great job with their part.

The Complete Cabinet

Thanks for checking out the project. I do have the second Grey cabinet build posted as well. It mostly shows the differences from this build. In some ways it is neater inside, due to using the VESA Mount for the monitor, which was not an option for this monitor. The other cabinet uses the controller version that has removable USB cables, they are seen by the Pi as the same type of controller, but it seemed the order of the buttons were different. I did match them up to work in the same order for two reasons. The first reason I wired them the same, is the cabinets are wired to let me use my arcade stick that uses the same electronics as a third player, if they weren’t wired in the same order one, or the other would be using the wrong buttons. The other reason is so the SD card images are then also compatible and the Pi could be swapped from one cabinet to the other. The second cabinet uses a Pi4b instead of a Pi3b+, I put it together last year before the Pi4 was supported, but it worked well. At that time the setup was more involved and you couldn’t do the splash screen/video with it. The Pi4 is now officially supported and it is also faster and that does help with RetroPie. I recently also rebuilt the Pi3b+ taking it to the latest RetroPie build from scratch and putting my games and getting the configurations back in place. The image was so old it couldn’t be directly upgraded. I may swap out for a Pi4 at some point, or maybe not..

Bartop Arcade Build Part 1

I have been wanting an arcade machine for a long time. These days there are a lot of options out there that make it easier to build your own. I purchased the Bartop Arcade plans from The Geek Pub http://www.thegeekpub.com He has several different plans, from a full sized stand up unit to a tabletop design, as well as the Bartop design that I went with. So you can pick which you want to go with, but be sure to buy the one you want.

It has been a lot of work. I used a 50 Inch Clamp Edge And Saw Guide from Harbor Freight and circular saw to cut the strait cuts out of the pieces. For the arc cuts on the sides I clamped both sides together and used a jig saw to cut them out at the time time to match the cuts. It is hard to see in the picture below, but I rough cut the “upper right corner side” leaving the line and a tiny bit to spare. That let me sperate the two Side “A” parts. I then clamped them together and did the final cut right to the line. I had to go slow with the Jig Saw as to keep the blade making a nice vertical cut. With a table saw it would be much faster for the strait cuts. I optimized the cut layout from the original to help me get some larger extra bits to work with in case I needed them. Below you can see the layout I went with as I laid all the parts back onto the extra half of the 4’x8′ sheet to so that.

I essentially cut out the parts the same as the plans. In the end I found there was an issue with the Marquee Top (B) and Top Door Frame (F). The Marquee Top and Top Door Frame should have been cut at an angle to meet nicely in the back. To correct this, I shortened the Top Door Frame a bit so that it just let the Marquee Top clear it. I then also added T molding to the back side of the Marquee Top, as it was now going to be an exposed edge. If I made another Arcade, I will be changing how I end up cutting that out (Note: See the “Another Bartop Arcade” which the correction was made by having the pieces cut with the proper angles to fit). I may also make some other alterations to make it easier to put in the Marquee itself.

After cutting out all of the pieces, I did sand them all on both sides. You can see in the picture above that I laid them out on top of the second half of the 4’x8′ Sheet of 3/4″ MDF. This does only take half a sheet to make this unit. Depending how you build it though, you do need a bit of corner blocking to glue it up easily. In my case I could have used the “spare for lcd sides” cut into strips for the blocking. I also didn’t use the VESA mount on this build due to the monitor I used not having a VESA Mount option. I did use blocking in the corners, partly the bit off the Door side, and mostly some old pine strips I had around.

Before assembly I used a slot cutter in a router for all of the T molding areas. I used a 1/16″ slot cutter. I took the pieces outside and used a clamp to clamp them down to my saw horse. Then it only took a couple seconds for each on to put in the slot. The biggest thing being to get the slot bit set perfectly center, which you have to get it adjusted properly, which I tested on a scrap. The other thing, use a mask for this, it was awful the first one blew back right at me. Beyond that it is easy to put in the slot.

I assembled the unit with corner blocking, glue and brads like was done by Mike at The Geek Pub in his video on his Youtube Channel (which I believe are also linked on his website where you can buy his plans). Other methods could be used, if you want you can use screws. He mentioned Pocket screws, which I do have, but I didn’t feel like trying. I figured if I wasn’t careful they could split the mdf as well. If I used them I was probably going to still use glue too.. The blocking made it very easy to assemble. I was looking at trying to do it without putting in the blocking, but that made it more difficult to get good alignment. The blocking makes it stronger too with more surface area for the glue. The “Another Bartop” build Gray cabinet is assembled with pocket holes and screws, it isn’t mdf though, it is coarser flakeboard with the Gray factory top coat, like Arcade machines were often built from.

I realized that I had not drilled for the speakers in the Marquee bottom board until after I had it installed. I used some Logitech 2 piece speakers for the arcade. Removing them from the shell, they have some 2″ speakers in them. I used a 2″ hole saw to make the holes in the board. I also had to drill for the volume control access. I removed the power Led from the board. While the board also had a Headphone jack on it, I decided it wasn’t practical to do anything with it. I needed a longer knob than the one it came with. Had I not already glued the board in, I may have carved out the back so I could have used a more standard length knob (For the Gray Bartop I 3d printed a customized long knob for it).

I then rewired the speakers for installation in the cabinet. I was going to reuse the original AC power unit so I setup to be able to put it in as well. Below you can see the speakers rewired to fit the cabinet.

These speakers operate off of 5Volts DC. In the end I didn’t like the exposed AC board inside the cabinet. I went with a Meanwell dual voltage power supply for the cabinet. This let me run the Raspberry Pi and the Speakers both off of the 5Volt DC on it. It also provides 12Volts DC, which is for the Fan and the Marquee lights.

The next part was the primer. I used the recommended Rustoleum Filler Primer. This is pretty neat stuff. It has a filler product in the paint. It looks like it is fuzzy, but it sands out amazing.

Don’t skip primer, It just won’t work if you are using MDF. I waited until the next day to sand it. I used 220 grit paper to take off the fuzz. I then followed up with some finer paper. From there I wiped it down with paper towels and brushed it well, then used a microfiber cloth to wipe it down. I painted it with Rustoleum Gloss Black. I let that dry a day and took some 3000 grit to lightly sand any little bits that were in the paint. The paint I used is the 15 minute dry type to help keep the dust, bugs etc from blowing into while it was wet. I found that it was good to do a coat that caught most of the dust that got in it. Then I came back and did 2 more light coats after the 3000 grit. That later paint didn’t end up with as much dust in it. The last thing I did with the paint was put on a coat of Rustoleum Clear Gloss. The Clear Gloss dried very fast, it was quite different and had a lot of over spray. When I was doing the painting I was wearing a mask as well. I was thinking of trying to polish it, but I decided I wasn’t going to be that crazy about it, and I wasn’t sure I had the clear on thick enough. I used 2 cans of primer and about 2 cans of the black. The clear coat was less than a full can. I did end up with some runs on the top back door frame piece. I used one of the spray handles for the cans, as seen in the picture below. That makes it much easier for me to get a decent finish and better control a well as saving my wrist.

Well, there were two other things I didn’t get drilled before the initial assembly. The first being the “safe shutdown button” for the Pi on the back beside the power jack. The other being the USB ports in the front right there.

Here is the safe shutdown hole in the back of the cabinet. I had to back bore it.

I had to backbore the Shutdown button here by the power port due to the type of button I used. The USB on the front “nearly” needed to be backbored as well. The USB port insert I used goes into a 30mm hole it barely has any threading with the 3/4″ MDF, but it was just enough.

The T molding is not too bad to do, but I wish it had went a little better. I got a section of 20′ and used all but about 18′ on this cabinet. There would have been that bit more if I had not put that additional piece on the back side of the Marquee Top. I am assuming I had the full 20′ I was to have received, but I can see how it did use that much. I just did it like Mike showed in his video, back cutting at the corners, and put it in with a rubber mallet. I had a few issues here and there. I had some problem with snagging on the bottom and pulling it back out when moving the cabinet. I added some rubber feet and that should help to prevent it from dragging the edges too much in the future. I put a bit of glue toward the ends to help hold it incase it snags a bit.

Here I have the control panel assembled and the USB ports installed after finishing the Clear Coat. I am using a Dell LCD that I had around. It was almost a perfect fit, and had HDMI input and audio output (no speakers internally). The control panel layout is in the plans as well, the template prints out on multiple pages that get taped together. I used a spray adhesive to hold it on like Mike suggested. It was a bit of a pain to remove all of the adhesive after the fact ( I used a different product than he had, so maybe it is harder to get off?). The paper came off fine, but some of the spray stayed behind. I later used more of the templates in other areas and was careful to use as little spray as I could, that turned out better. I used the 2 player template and omitted 2 buttons, 8 was enough for me. You can choose to use the buttons you want. He also includes a 1 player layout template. The buttons I used are the pop in kind. I used a 30mm forstner bit for the hole with the 6 primary buttons, they went right in a perfect fit. For the Joysticks I used a slightly smaller sized bit, this didn’t cause issues in the travel of the stick. If I had used the 30mm bit, then the joystick washers wouldn’t have kept the holes covered at the maximum travel. For the smaller 24mm buttons I didn’t have the perfect drill bit for, so they were slightly loose, and a little glue on the bottom edge in a couple places to ensure they don’t move on me. The forstner bits do a very nice job, the butterfly bits I have are way too aggressive, but they are a weird type. The butterfly bits may be just fine if you are careful, mine are of a very aggressive verity that have a screw start point on them. I can’t hold them back or take it easy to get them started.. I used the bits in my cheap Harbor Freight Drill Press, which made the work go very nice with the forstner bits.

The one trick with the controls is they need to be wired identically, as the Pi (or any computer) can get confused if it has two of the same model of controllers with different layouts. I previously built a USB arcade joystick, with the same type of controls. I have wired both of the controllers on the Arcade as well as the separate USB arcade joystick the same so I can use it as a third player on the Arcade.

This was the first time I tried it out inside the cabinet. It is all together except the marquee and front plexi on the monitor. You can see the speakers in the top.

Here I worked on the Marquee light. I am using 12Volt White LED Strip light. I decided to build an Aluminum Light Box for it. I really didn’t have a good way to mount the LEDs otherwise, and I didn’t want the light going out other areas of the cabinet. The light box is made of a spare piece of flat stock aluminum used for flashing, boxing/facia, and around windows etc on a house from Lowes etc. I made it about 1″ deep, and rests against the corner blocking, and almost against the speakers.

Here I am using clamps and a board like a break to bend the aluminum. It worked ok.
Here is the box. It was neater but I had it slight long and had to compress the ends down a bit.

Above you can see the LED Strip. I put it on the Sides not the bottom. This helps with Hotspots. In such a close space the points of light off of the LEDs would make hotspots all of the Marquee otherwise. Below you can also see the Speaker grills and volume knob installed. The Speaker grills are made from some 2″ desk grommets from the hardware store, and then covered in some speaker cloth (salvaged from an old speaker box I had).

Above you can see the back door. The door was slightly taller than it should have been, possibly a little wave and variation in my cuts for the back. The bigger thing was the that it turned out to be somewhat narrow, I am not sure if was my marking or cutting or what. The door Frame pieces seemed to all go just fine, but there is a bit more gap left and right. So I would watch for that if I make another. I wasn’t going to use a piano hinge for it, but due to the gap that was the only way I was going to be able to hide it well. I also decided to get a lock, not that I wanted to lock it, but that was the most elegant looking latching method, and also when moving I didn’t want a “semi-secure” latch that may flip open accidentally. The holes were drilled with other templates in the plans. The bottom is the 80mm fan pattern while the top two are the hole patterns for the suggested speakers. I used the speaker pattern holes just for additional venting on the door though. Here you can also see the door once it was installed with the 80mm fan 12Volt and latch assembly. The modification to the door frame top that I mentioned above did have the added benefit of adding some ventilation as well as there is a small gap there now. I like that bit of the change, as heat would have caught in the top had it been sealed up. You can also see the wiring going to the power strip I put in there. It is wired directly to the rear power jack. I had it around and it was easy to work with. I really did not want to get an electrical box like the plans suggested. This was a bit easier and I think did a nice job. It also has the added benefit that in my case it is a surge protector and not just a temporary “power tap” as well, not just a power strip.

The power jack includes a switch and fuse. I like it, but some have had it has issues with melting. I could see that if the connections were a bit loose, that would cause the conductors to get hot. The Safe Shutdown button for the Pi is also installed there. The button is wired up to the gpio on the Pi and the Pi is setup to use do a safe shutdown if it is pressed. It will wake the Pi after shutdown if pressed again. I will cover that in Part 2, it is quite easy with the Pi 3 (and pi4b).

The Marquee just has some paper in it behind the Plexiglass to test the brightness.

I have to finish the Marquee. I am also going to put Plexiglas in front of the monitor to hide it. Once I have the Plexiglas cut for the front of the monitor I will be able to mount the monitor in the cabinet. The Monitor I have does not have a VESA mount, so I have secured it to a built up block that I will secure with some brackets to the bottom of the cabinet. I don’t know the exact final position until the Plexiglas is in. The Marquee top needs secured as well, but I have to finish the Marquee first. The Pi is also floating free in there. I have been thinking of pulling it out of the case and mounting to the cabinet as a bare board, but I do want to put a fan on it still if I do that. To start with the Marquee I will probably finish a design for it and reprint it on my inkjet printer instead for some color. I may get proper marquee made professionally later on.. I may get some side graphics for the cabinet as well, but not full side covering graphics (not after the T molding is installed).

Commodore 64 Breadbin #2 Referb : 326298 Part 1

I picked up another Commodore 64 breadbin model. It had a rough time in storage from the looks of it. The system has been in a damp dirty storage area, there were several of them being sold by the same person, in similar conditions along with some other old 80s era computers like Apple ii systems. I guess they were stored in a basement somewhere that had some real water/moisture problems.

As you can see from the outside it is a bit dirty, and some keys were missing. This was I think the second best looking of the batch. Below you can see the inside, the paper shield was a mess, black mildew along the bottom. A good bit of dirt inside. After seeing it in the bag, I decided I wasn’t even opening it inside. So I took it out back and opened it there. I removed the cardboard shield and it went strait to the trash can. The case was then hosed down to get the worst of the dirt off. I wiped the keyboard down a bit and the board before taking them in. The case parts went it the tub and got a really good scrubbing.

I removed the RF Shield and cleaned the board with some 91% IPA. It turns out to be a bit of an interesting board. Yes the screws are mostly rusty, the RF Shield and Cartridge port plate tells a tale of too much water too. On close inspection the board looks ok for the most part, the legs of some of the components are rusted, I clipped a them and the tips just fell off. This board has obviously been worked on in the past. The inner cardboard sheet that was above the bottom RF Shield went strait to the trash, it was about as awful as the upper cardboard shield.. I kind of like this brass looking shield, but without the cardboard to go with it, I won’t be reinstalling it. I don’t care enough to make a new cardboard piece.

You may notice the wires in the above picture. This is a 326298 Rev A board. An early board that only has the 5 Pin Video port. This board was built in 82 based on the unsocketed chips. The board had extensive work done to it. All of the main chips are socketed. They are all dated second half of 84. The 5 Pin Video port was replaced with the later 8 Pin Video port. There are two wires running off from that port, and various cut traces on the top and bottom to separate out the additional pins. I think in the VIC II area there were possibly some other changes. The VIC II area cage was (and still is) rather rusted as well as the RF modulator top plate, and the RF RCA Port was all rusted.

So after the ipa bath I hooked up the board.

It worked, no issues. Next I tested the keyboard, it worked, minus the two broken keys. Some keys were not very responsive though. I did a full teardown of the keyboard to clean it properly.

I first removed all of the keycaps with my keycap puller. I recommend one, they are rather cheap and good insurance to prevent breaking the old plastic. I next desoldered the wires on the ShiftLock key. I had removed the tape from around the keyboard, as you can see, to get to the screws under it. After removing the screws the board lifts off, and you can see the plungers then.

I took out the plungers and put them to the side, then took the keyboard frame and sent it to the tub and some warm very soapy water. I also soaked the keys in the soapy water. Then scrubbed the keyboard and keycaps with a toothbrush and rinsed them well and dried them. I also took the springs which were dirty and some were rather rusty. I put the springs into some White Vinegar. The Vinegar removes the rust, it does make the metal a bit dull looking. I expect if you leave them in too long you may break down the metal too, so I kept checking on them. They cleaned up well, the worst of them you could tell were actually pitted but were still in working order. I then washed the vinegar off with some water and dried the spring as best I could. I placed all of that on a towel to dry properly.

While that was drying, I took some IPA on a qtip and lightly wiped the contacts on the circut board. We don’t want to remove the conductive coating. If you clean too much of it off they keys won’t work. Next I took the plungers, and wiped the shaft part with a damp cloth to get any dirt off, I didn’t wipe the contacts on the plungers, they looked pretty good. They were mostly clean overall due to being covered by the keycaps and in the keyboard frame holes.

All of the good plungers and two broken ones.

Well, I had watched Perifractic’s Lego 64 videos, and I got an idea to try on the broken plungers. They did still work, as I had tested the keyboard with them, they just won’t hold a key now.

So I found a Lego laying around. You see the full piece I started with there in the lower left. I cut it in half, cleaned the plunger up and fited it to it. I shaved it down to go into the plunger shaft a little for more surface area and strength. Then I glued it in with a combination of Bondic and Super Glue gel. I DID have to file down the Lego piece, it was too large and the Commodore Key cap wouldn’t go on it. I used my small Diamond Grit Needle Files from Harbor Freight (they are just small files, I got the Diamond Grit ones, they seemed to work well for me on plastics). I will say that the glue doesn’t hold well, these tops will come off. So it isn’t a great fix, but I think it will work. I am still waiting on replacement Plungers and springs for the keyboard. I put the one plunger back at the British Pound symbol location, but I put the other at another key that is less likely to see much use. The 8 key gets a lot of use.

Here is the keyboard frame after reassembly.

Here is the keyboard back together back in the cleaned upper case. I tested it and it all works. The * key doesn’t work very well though.. When I get the new plungers in, I will probably remove the circuit board again and check that key. I don’t know if it it is the plunger, or dirt, or the contacts on the circuit board. Other than that and the missing caps, the keyboard was quite responsive, better than my other C64. That one I did not remove the board to clean the contacts. Removing to swap the plunger and check that key isn’t too bad. I will only have to desolder the ShiftLock key and remove the screws. The plungers that I am not working with will all stay as long as the keycaps are still on the keys can’t come out.

I does look much better than it did, but it is very streaked. The Power LED plate was actually corroded to the point much of the paint was lifted and flaking off. Corroded Aluminium.. Ya, I guess a good bit of moisture for a long period of time. I plan to get a replacement Badge and maybe a matching Power LED plate, I just don’t know what I want to go with.

Next I started on some preventative maintenance as well as rust removal. I had already removed the rusty tops of the VIC II area and the Modulator top cover. I then desoldered the Cartridge Plate and the VIC II cage which is rather rusty. I did alot of cleanup on the RF Modulator cover and Cartridge plate. A combination of wire brushes, sanding, and polishing with the Dremel etc. To remove the stickers easily, I put a little WD40 on them and let it sit. When I was done they were pretty decent. I tried some Vinegar on the RF Modulator cover, but that removes the protective coating that was still on some areas of it, so I stopped that. I did soak all of the rusty screws (basically every screw in this thing) in the Vinegar to get the rust off. I also removed the Fuse holder pieces, and fuse, they were quite corroded. I placed them into the Vinegar as well (well not the fuse). The Vinegar did clean the corrosion pretty well off the Fuse holder, but it left those areas black, I then polished them back to a shiny surface before reinstalling them. When all the rust was off of the screws and Cartridge plate and RF Modulator cover, I put some “Teflon Non-Stick Dry-Film Lubricant” on them. Not to Lubricate them so much, but to put a protective film on them to help prevent them rusting again. I did the same with the keyboard springs after they were dry. I don’t use the stuff on plastics though it puts a white film on that is hard to remove. So I put it on before putting them in place.

I resoldered the Cartridge Plate back to the board. I also touched up some solder points on the board. The VIC II cage will not be going back in either. I think the VIC will stay cooler without it, and with a proper heatsink installed.

Here is the board reinstalled after cleaning up the rusty bits.

The board was tested again and still worked. So next I installed a few heatsinks.

The 5 Volt Regulator doesn’t have much of a heatsink on it. The Rivet is loose and the heatsink is spinning around. So I decided to remove it and fix that as best I could. I took the heatsink off of it. I placed it on a new 2 Amp capable 5 Volt Regulator, it wasn’t needed, but that is what I keep around. I was a concerned that with the age and heat that Regulator dealt with over the years plus that loose tiny heatsink that it really should be replaced before it fails. When these regulators fail they most often fail open, meaning they will push the full voltage through them instead of dropping it or cutting off the voltage completely.. That fries the ics in the board. I have not heard of them failing inside the C64, while they are the big issue inside the C64 power supplies. With that very tiny heatsink, which was also not making good thermal connection to the regulator I didn’t want to take a chance on it. This time I put a second folded back heatsink behind it with thermal compound between the heatsinks as well as on the back of the regulator and bolted it all together.

As far as the case repairs go, I guess I didn’t take any pictures to show that specifically. The top of the case is cracked in the front right corner, it appeared to have taken a hit to that corner. It also has 2 cracks in some of the screw supports. I used my solder iron on a lower temp to melt the inside of the crack in the corner of the case together again. Then I put some liquid Testors Model glue in from the back to smooth it out. That did start to melt the plastic, I removed the excess glue. I have found that if you use that stuff and it melts the plastic and there is too much excess glue the plastic won’t harden again. The one standoff in the top of the care there is cracked as well, I haven’t fixed that yet, I think maybe from the same trauma that cracked the top. Three of the standoffs that hold the keyboard in place were sheared off as well. Those I glue back on with superglue gel. I then clamped them for a day and left it sit. That will give me the best strength, they shouldn’t be stressed while it is curing, which is 24 hours to get to full strength per the manufactures directions that is. The clamping ensures they are down properly and the joint is thin and tight too. After that I put some Bondic glue around them, the Bondic won’t cure in the crack because it needs UV Light to cure. I have also found it doesn’t bond very well compared to Super Glue. It does retain some flexibility and have some hold, I find that can assist Super Glue because it holds so tight, but doesn’t flex and fractures.

This case is badly discolored and I don’t want to try to retrobright it. I picked up some Krylon Fusion All-In-One Paint+Primer “Matte River Rock” paint awhile back to potentially paint a 1541 case. The case had some small chips out of the bottom. I took some Tamiya Putty “white” and filled in and built up the missing areas. It is a potent thin putty that dries quickly, and sands well for me. I it seems to bond to the case plastic well (As the model glue fuses the plastic, so I would expect the model putty to grip it well too). When I was done with the physical repairs to the bottom portion of the case, I put a even coat of the Matte River Rock paint on it. It turned out well. After the paint dried I found a crack show in the center of the half circle of the video port in the middle of the case. I glued that with the Testors Liquid model glue, I hope it holds well. Later I will put on some epoxy to help give that crack a little more support (I should have used Epoxy on the keyboard plungers instead) . I think once the board is reinstalled it will have more support where that crack is as well.

I haven’t done anything to the top of the case so far except weld and glue the one crack. The one case clip on it is broken off and lost. There are also 2 screws posts in the top that are cracked. I have thought about getting one of Birt’s “Hey Birt!” case saver kits to get a new case clip, I could use one of the reinforcement pieces on the cracked stand off, and have spares for the future. As I have to fix that case clip, I don’t want to paint the case yet, I will likely scratch up the paint having it upside down for those repairs. I will put several coats on the case. I want to test the paint on something with a Matt Finish clear over it. Some paints don’t mix well, and can cause the lower paint to lift or got to a crackle like finish. I have found that even with paints from the same company.. So I will test the Krylon Matt Finish first on a scrap of similar plastic (probably a modern computer case bezel). I want to put the clear over it, even though I like the existing Matt Finish of the paint as it should help protect it better.

So for now that is about it for this C64. In the future I will be doing more to it. The remaining repairs to the case. That include the Clip and post repair as well as painting and installing a new Badge plate. Checking out the * key, as well as installing the replacement keys and springs. I also have a capacitor replacement kit for it. With the 84 Breadbin I already worked on, I had found some capacitors that showed evidence of failing, so I figure this one is going to be served well by replacing them. I do wonder if that, especially the ones in the RF Modulator, may make a difference in the video output. I may or may not install some additional heatsinks. The computer is working fine, but it does have bad jailbars, so I may do something with that too at some point. I don’t know of removing the modulator and building up a replacement would help that or not.

I would love to know where the other Breadbins that were sold with this ended up and see that they were properly cared for. There was a very interesting VIC that I would have loved to see, but I wasn’t paying that kind of cash for a VIC let alone one that looked like it spent a few years sitting in water.