DIY

The perfect GameBoy

Posted by admin on December 16, 2018
DIY / No Comments

I just finished restoring the perfect GameBoy, in my opinion, to the perfect state! But first a little history:

First was the original GameBoy which took the world by storm by being an awesome way to play video games on the go, with the important feature of actually being able to play different games on the same portable console, a new thing at the time. Technical wise, it was not anything spectacular to speak of, it featured a few grey (well, more like puke-green) colors on the screen, which was not even lit, so no playing in the dark for you (at least without any of the numerous silly light-and-magnifying glass after market add-ons). But it was more than good enough, there were some awesome games on it and the 4 AA batteries last for a long time. 

Then we had the GameBoy Pocket, which was the same thing but smaller and only took 2 AA batteries. Other than that, it was the same machine.

Then we had the GameBoy Color. This could play all the original GameBoy games with the option to turn their grey palettes to a color palette with the same number of colors but at least there are colors. There were also games built specifically for it with better colors. But other than that, the screen remained non-lit and the quality of the games was more or less the same as the original.

Here I should mention that in Japan only there was a special version with a lit screen, called the GameBoy Light which was essentially the Pocket with a front lit screen. This never came out anywhere else.

But then we had the GameBoy Advance. Now this was the real deal. The GBA was more or less on-par with the Super Nintendo, power wise and it fit in your pocket. The future was there! It was also backward compatible with original and color GameBoy games, so at launch its software library was already huge. 

The original GameBoy Advance featured the controls on the sides of the color (but STILL not lit) screen and took 2 AA batteries for power.

The next version was the GameBoy Advance SP. Hardware wise it was a GameBoy Advance, so all of the same games played fine (including original GB and GBC games), but it now featured a much more pocket-able clam shell design. And the screen was lit for the first time!

There were two versions of the SP though, the original SP model 001 featured a rather unimpressive front lit screen that looks, well, not so good, but you could play in the dark for the first time and that was important. But the second version was the real deal. Model 101 featured a very bright and beautiful backlit which is on-par with the ones found on the DS which came after that. These are quite rare and expensive to find nowadays, but in my opinion they are the best GameBoys ever made, since they are backward compatible with ALL GameBoy games ever made (GB, GBC, GBA), they have an awesome small foot print clam shell design and they feature the best screen.

The last GameBoy SP released was the SP Micro, which was a super tiny version of the SP and played only GBA games. These are very nice, feature a smaller backlit display but they are a feature less than the SP 101. 

So, since I never had a GBA, I decided to go hunting for the perfect GameBoy. Finding a 101 was not too hard, the price was a bit high though and, since it’s now more than 15 years since it was released, there are always some problems with them.

The most common problem is of course, the state of the plastic chassis of the device. These games were meant to be carried around and played, so scratches and filth was everywhere. Repairing and cleaning was out of the question but thankfully, you can buy a replacement beautiful brand new plastic chassis for less than $10 online, which is exactly what I did.

The second most common problem is the shoulder buttons, which wear out and stop working after a while. On the device I received, both shoulder buttons were not working at all, or worked when they felt like it. Here, I had to open the device and desolder them, order new ones online and replace them and boy did this make a difference. The new shoulder micro switches work perfectly and they also have a very satisfying clicky feel to them, not present in the originals.

Lastly, the battery needed to be replaced, just so it can last for a good few hours more of gameplay. You can also get them brand new online very cheaply.

So there you have it, I am now a happy owner the of the perfect GameBoy!

Raspberry Pi 3 based arcade box DIY

Posted by admin on February 24, 2018
DIY / No Comments

I recently built an arcade box for emulating old arcade games and old home computers but I wanted an authentic experience with a nice box around it, since emulation can be done with anything these days, computers, a pi connected to the tv with bluetooth controllers etc. I ended up having a friend (thanks Tasos) design and cut a box made out of FOREX PVC, which ended up great. I also cut a plexiglass for the top part and printed a nice retro gaming related graphic under the plexiglass. The final box looks like this:

A little explanation on how this works. I installed an 128GB RetroPie from here: http://www.arcadepunks.com/retro-pi-downloads-page/ for a 200GB microSD card that I put on my Raspberry Pi 3. This saved me a lot of trouble (finding the roms, finding marquees, screenshots, videos, putting everything together etc) but also gave me some space to put some extra stuff that I wanted (I HAD to have the first games I ever loved – namely Blue Max and Alley Cat on the Atari XE emulated in there, I just had to). I then got a USB encoder with 10 fire buttons and a 8way stick from ebay ($27 for everything), which looked like this:

This nice thingy looks like a real mess inside the box, but it gives you a USB controller which I connect from the outside of the box to the Pi, using one of the 4 USB ports available. This was by design for 2 reasons. First of all, at any time, I can disconnect the USB from the Pi and connect it to any PC or laptop and use the controller there. Also, I am planning on creating a second identical small system, without the Pi, to use as a player 2 controller which I will just connect to the same Pi and play with friends. I configured the 8 fire buttons as A,B,X,Y,LT,RT,LS,RS and the 1P and 2P buttons as Start and Select. These map nicely to all systems if they don’t require any analog controls. For these, I can still connect USB controllers (like the excellent 8BIT N30 Pro which works as USB or bluetooth if I want to) for other systems or for more authentic gameplay depending on the system.

Wow, messy I know but it works. The buttons go through the holes and screw from the underneath with their own plastic rings, while the joystick is screwed very tight with 4 metal screws. I also dug a little bit on the top of the FOREX, under the plexiglass, to bury the heads of the screws so they don’t push the plexiglass up. The USB encoder also has options for auto fire and turbo fire, which I connected with small momentary buttons on the back of the box. Speaking of the back of the box, this is what it looks like:

From left to right as we see it, we have an HDMI output (put there with a small internal extension from the Pi), the turbo and normal fire modes (mentioned above), an exhaust fan with a fan switch (more on that later), a restart and a shut down buttons (more on that later), a small hole for status leds (more on that later), the exit hole for the USB joystick and for the power cable (the standard 2.5A RPi supply), the standard Pi ethernet and 4 USB ports and a 3.5 audio jack for headphones (also connected to the Pi with a small internal extension).

Here are the initial schematics for the whole thing, slightly altered as I went along:

There are 2 leds (a red and a green) that both fit inside the small whole I mentioned above. The idea was that the green led will light up when the system starts and the red will light up during the shut down sequence (a safer way to shut down the pi than just pulling the plug). In order to do these, I connected the leds directly to GPIO pins (BCM 16 for the green and BCM 21 for the red) with respective resistors and wrote the following python script for the green led to turn it on at startup:

import RPi.GPIO as GPIO
GreenLed=16
RedLed=21
GPIO.setmode(GPIO.BCM)
GPIO.setup(GreenLed,GPIO.OUT)
GPIO.setup(RedLed,GPIO.OUT)
GPIO.output(GreenLed,GPIO.HIGH)
GPIO.output(RedLed,GPIO.LOW)

I also connected the “shut down” momentary button on BCM 23 and wrote the following python script to perform a clean “sudo shutdown -h now” and also light the red led:

import os
import time
import RPi.GPIO as GPIO
pinNum=23
GPIO.setmode(GPIO.BCM)
GPIO.setup(pinNum,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.wait_for_edge(pinNum,GPIO.FALLING)
GPIO.setup(21,GPIO.OUT)
GPIO.setup(16,GPIO.OUT)
GPIO.setup(16,GPIO.LOW)
GPIO.output(21,GPIO.HIGH)
print("Shutting down...")
time.sleep(2)
os.system("sudo shutdown -h now")

The restart momentary button is connected to the 2 holes on the pi that reset it without any code. These are the pins I refer to:

In the beginning I used very small heatsinks like these:

but let me tell you, with emulation I had huge problems with overheating, even with an NES running. Maybe it’s the enclosed casing, maybe it was the bad heat sinks, whatever the reason, I had issues. I looked it up a little bit and I found a guy on YouTube who did all sorts of test with different heat sinks, with and without fans. Bottom line, fans and a much bigger heatsink with good thermal paste is the best solution.

Here is the guy explaining why:

I used a smaller fan which I mounted sideways with a double sided tape on the board blowing through the heat sink, because putting it on top interfered with the joystick. I connected the fan to 5V (it is a 5V fan) but used a transistor connected to GCM 17, to turn the fan on and off depending on the CPU temperature. Here is the python script:

import RPi.GPIO as GPIO
import os
from time import sleep
import sys
fanPin=17
maxTmp=45
minTmp=40
def setup():
	GPIO.setwarnings(False)
	GPIO.setmode(GPIO.BCM)
	GPIO.setup(fanPin,GPIO.OUT)
def getCPUTemperature():
	res=os.popen('vcgencmd measure_temp').readline()
	temp=(res.replace("temp=","").replace("'C\n",""))
	print("CPU temperature is {0}".format(temp))
	return temp
def fanON():
	setPin(True)
	return()
def fanOFF():
	setPin(False)
	return()
def getTemp():
	CPU_Temp=float(getCPUTemperature())
	if CPU_Temp > maxTmp:
		fanON()
	else:
		if CPU_Temp < minTmp:
			fanOFF()
	return()
def setPin(mode):
	GPIO.output(fanPin,mode)
	return()

try:
	setup()
	while True:
		getTemp()
		sleep(5)
except KeyboardInterrupt:
	GPIO.cleanup()

This will pass 5V to the fan if the temperature gets higher than 45 degrees C and cut the power when it’s less than 40 degrees C (checked every 5 seconds). Since this is an enclosed space, I figured that extensive gameplay sessions could result in the heat getting trapped inside the case, so just in case (pun intended) I also added a manual exhaust fan with a simple switch to turn on and off manually if needed. This is the fan you see on the back picture with the grill. Since this is also noisier than the small one, I avoid unnecessary noise. I was also able to slightly overclock the Pi using this system to allow it to play Playstation 1 and N64 games smoother. I also positioned the transistor inside the airflow of the fan, to avoid it overheating.

Here are some pictures of the heat sink and fans:

All scripts are run at startup in the /etc/rc.local:

python /home/pi/power_led_on.py
python /home/pi/reset_button.py
python /home/pi/shutdown_button.py &
python /home/pi/fan_control.py &
exit 0

I finally configured the controls on Emulationstation, updated everything over ethernet and started playing.

How well does it play? Well, it plays GREAT. And it looks like this:

A small update on the Amiga 1200 Gotek External Control Box

Posted by admin on January 30, 2018
DIY / No Comments

This is an update for the previous post, where I added a FlashFloppy Gotek and an external control box to control it which you can read here: http://www.karios.gr/?p=1003

I’ve removed the initial box and replaced it with a modified 3D printed box, which allows me to fix it perfectly and firmly on top of the Amiga 1200 and also to have the OLED screen in front as well as 3 control buttons on the back (previous, select-eject, next). The modification of the 3D model was done by Tasos (thanks Tasos) to fit the buttons as well as the screen. The original box, without the holes for the buttons, was found here: https://www.thingiverse.com/thing:2701629. The modified version can be downloaded from https://www.thingiverse.com/thing:2791237

It works great AND it looks great now. I think this project is complete!

Took me a couple of hours to do a proper rewiring but it works great as you can see below:

 

Amiga 1200 Gotek with FlashFloppy external control box mod

Posted by admin on October 14, 2017
DIY / 1 Comment

Back in the 90s, the dream was to get all the games for my Amiga 1200 and be able to choose what to play anytime. Easier said than done, we are talking about a time before the internet even existed, and games had to come on floppies, so even space wise this was an impossible task. Flash forward to today, even after the Amiga stopped being manufuctured and sold in the late 90s, people kept coming up with new ways to upgrade and enhance their experiences on classic Amigas. One of them came in the form of the Gotek floppy emulator, which can replace the floppy drive of the Amiga with a USB loading system. The Gotek comes with 2 buttons (the up and down buttons) and a 3 digits screen.

My Gotek came with the Cortex firmware which worked like this:

You had to provide a special SELECTOR.adf in the USB stick, which you run by holding both buttons. This allows you to assign ADF files to numbers and then load them by selecting them with the up and down button, and seeing their numbers on the 3 digits screen. The problem with this system is that you had to remember which number corresponds to which adf and if you needed a new adf file, you needed to go through this process again.

But there is a better way! I found out an awesome firmware, called FlashFloppy (which can be found here : https://github.com/keirf/FlashFloppy) which adds some awesome functionality, including being able to traverse through directory structures to better manage your ADFs. You can find instructions on how to flash the new firmware here:

https://github.com/keirf/FlashFloppy/wiki/Firmware-Programming

Thankfully, once you flash FlashFloppy, you can flash updates by just using the USB drive, as described here:

https://github.com/keirf/FlashFloppy/wiki/Firmware-Update

I used a FTDI FT232RL USB to TTL Serial Adapter Module 5V and 3.3V For Arduino G3 off Ebay to flash mine.
I also 3d printed a mount to be able to mount the Gotek inside the case. If you have access to a 3D printer, you can find the model here:

https://www.thingiverse.com/thing:2102839

Next thing was to replace the 3 digits screen, with a full AMOLED little screen, which is supported brilliantly by the FlashFloppy firmware. I used a 0.91″ IIC I2C SPI128x32 White OLED LCD Display Module For Arduino PIC off Ebay. The little screen looks awesome and it’s detected by the firmware automatically. It shows the name of the current adf as well as the current track and sector while a disk loads.

I used a longer cable and drove the cable off the back of the Amiga. At this point, I could already use the Gotek but it looked bad and I still had to use the side buttons to control the Gotek.

We can do better right? I used a small plastic semi-transparent box from my Samsumg headphones and hotglued the screen inside.

I also opened 2 holes and stuck 2 momentary buttons. I soldered wires below the Gotek, at the original buttons points, so i could use these buttons while being able to use the original buttons if needed.

I also drove these cables below the Gotek and out the back door. I then connected them to the buttons I had on my external control box.

 

And here is the result. Works great AND looks great:)