New Mp3 player for my Touchscreen Radio.


![]() |
Free Web Hosting with PHP, MySQL, Apache, FTP and more. |
![]() |



For awhile I have been trying to make a GAMEBOY and Raspberry Pi Mod.

My last post showing some real progress and installation of the software.
Today I will write a better guide for myself and others so they can learn from my mistakes.
If you follow this guide for setting up your SD cart this progress will take about 1,5 h to complete.
(guide is below show and tell
)
Warning: I still have to remove a error that i getting but i din’t find a solution for this atm:
”At random times i get: alsa lib pcm.c 7843: (snd_pcm_recover) underrun occurred”
not when playing a game only if i am in the front end and during boot….
Lets start with show and tell:
Hardware used:
Gameboy case, wires, tact switches, empty PCB, power bar, cheap speakers and a Dremel
And of course a
Raspberry 1b:
| 000f | Q4 2012 | B | 2.0 | 512 MB | (Mfg by Qisda) |
And a Adafruit 2-8 pitft capacitive touch:
Below are some pictures of my GAMEBOY Pi that is mostly finished.
Things todo build in the speaker and power bar remove some plastic form d-pad because its fits to well…
But thinking of making a custom cartridge to slide in to the slot of the Gameboy.
Build in Wifi and dongle for keyboard for now, in the future I gone extend one port to the side.
Ethernet is still available but don’t use a High-end cables, my own made utp cable works perfect 
conversion:

I started this project awhile back so if you want to do this. Do little things, one thing at the time.
Don’t start doing lots of things at once because in the end you will need to change or rework it again…
(Tip from Ben Heck and now from me 😀 )
RetroPi and PiTFT and DIY Joystick test!
Testing the tact switches…
RetroPi and PiTFT and DIY Joystick test 2!
More testing of the tact switches… 😀 Mario is fun hahaha.
For those how notice i have some strange glitching in my screen in the video’s above.
This is because at that time my raspberry pi setup was not perfect. Not that its now LOL.
But the screen glitching is gone…
GAMEBOY PI Semi complete Test!
This is my last video i made for now showing it closed (taped down) and using the original GAMEBOY buttons on my custom pcb using those 8 tact switches.
If I have time i will make a new video showing it closed with screws and without glitches in the screen.
This install will take about 1,5 hours
First download the 2016-03-25-28c.img.

Make sd img from 2016-03-25-28c.img

Identifier “myfb”
Driver “fbdev”
Option “fbdev” “/dev/fb1″
EndSection
Close Nano and Save ( CTRL+X, Yes, ENTER)
cd .. ( goto home cd /~/ will do just fine)
git clone https://github.com/AndrewFromMelbourne/raspi2fb
cd raspi2fb/
mkdir build
cd build
cmake ..
make
sudo make install
sudo cp ../raspi2fb@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable raspi2fb@1.service
sudo systemctl start raspi2fb@1
Almost done:
sudo dpkg-reconfigure console-setup
sudo nano /boot/config.txt
sudo nano /etc/emulationstation/themes/carbon/carbon.xml
Close Nano and Save ( CTRL+X, Yes, ENTER)
sudo reboot
And check if everything is still working if you want to add your own controls continue below

cd /~/
git clone https://github.com/adafruit/Adafruit-Retrogame
cd Adafruit-Retrogame
Edit the file retrogame.c, looking for the table called ioStandard and the input.h table. Each line in brackets represents one pin on the GPIO header and a corresponding key code.
The full list of available keycodes can be found in /usr/include/linux/input.h
My setup:
// Input Output (from /usr/include/linux/input.h)
{ 22, KEY_LEFT }, // Joystick (4 pins)
{ 14, KEY_RIGHT },
{ 17, KEY_DOWN },
{ 4, KEY_UP },
{ 2, KEY_LEFTCTRL }, // A/Fire/jump/primary
{ 3, KEY_LEFTALT }, // B/Bomb/secondary
{ 15, KEY_5 }, // Credit
{ 18, KEY_1 }, // Start 1P
{ -1, -1 } }, // END OF LIST, DO NOT CHANGE
You’ll need to be careful in your GPIO pin selection…some are used by the PiTFT display, others have certain reserved functions. Any green GPIO pin is free to use…yellow pins may be okay with additional setup. If you’ve configured a tactile button on the PiTFT for shutdown, that pin is unavailable for game controls.
One wire from each button connects to a GPIO pin, while the other wire connects to an available ground pin (GND). The 2.8″ PiTFT boards have an extra header breakout for the first 26 pins…for the remaining pins, you’ll need to get clever with female jumper wires on the exposed part of the Raspberry Pi GPIO header.
That is why i disable I2C and Serial so i can use gpio 2, 3, 14 and 15. Made a mistake and was easier to use gpio 14 and 15 instead. otherwise i would only disable I2C…
After editing, compile and install the code with:
make retrogame
sudo mv retrogame /usr/local/bin
Test fist before making something boot that is not working.
sudo /usr/local/bin/retrogame &
sudo nano /etc/rc.local
Reboot and you should now have “virtual” keys associated with GPIO buttons.
Or make it more fancy:
sudo nano /boot/cmdline.txt
Adding a splash screen can be done from in retropie so this is optional. but this way you know what is changed in retropie to show the splashscreen at start up, same method.
Custom Splash Screen for Raspberry Pi
This is a quick and dirty solution for an unanimated custom splash screen during boot.
First of all, you need to install fbi:
apt-get install fbi
Copy your custom splash image to /etc/ and name it “splash.png”
example code:
sudo mv splash.png /etc/init.d/
Next, create an init.d script called “asplashscreen” in “/etc/init.d/”.
sudo nano /etc/init.d/asplashscreen
I chose “asplashscreen” with an “a” at the beginning to be sure it starts first.
#! /bin/sh
### BEGIN INIT INFO
# Provides: asplashscreen
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: S
# Default-Stop:
# Short-Description: Show custom splashscreen
# Description: Show custom splashscreen
### END INIT INFO
do_start () {
/usr/bin/fbi -T 1 -noverbose -a /home/pi/RetroPie/splashscreens/splash.png
exit 0
}
case “$1″ in
start|””)
do_start
;;
restart|reload|force-reload)
echo “Error: argument ‘$1′ not supported” >&2
exit 3
;;
stop)
# No-op
;;
status)
exit 0
;;
*)
echo “Usage: asplashscreen [start|stop]” >&2
exit 3
;;
esac
:
Then make that script executable and install it for init mode:
chmod a+x /etc/init.d/asplashscreen
insserv /etc/init.d/asplashscreen
Reboot and watch your custom splash screen:
sudo reboot
If everything is correct you still boot in console but now is everything setup to start retropie
Start by typing:
emulationstation
After the startup you need to setup you fresh made controls by pressing one of the keys and then follow the onscreen text. Skipping by holding down one button.
After that your done and can start adding roms, you have 2 options for this by usb or by samba.
So you probably need to set that up 2 lucky for us you can do this from in emulationstation
choose retropie setup from the menu.
The let it boot directly in to emulationstation.
Next Samba: Oleee
For now i leave this project to rest, i am glad whit the progress that i made.
also after 6 months I can close the case 😀 hooray!!!
Recap of what to do:
-Fix asla error….
-Build power cartridge for power.
-Build in speaker
-Extend usb to connector port and replace it by usb.
Gameboy Pi install:
Make sd img from 2016-03-25-28c.img
Then install retropi:
sudo raspi-config
Enable ssh
Resize SD
Disable boot Gui boot Console:
sudo reboot.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y git dialog
cd
git clone –depth=1 https://github.com/RetroPie/RetroPie-Setup.git
cd RetroPie-Setup
chmod +x retropie_setup.sh
sudo ./retropie_setup.sh
Install binary-based.
Install fb
sudo apt-get install cmake
sudo apt-get install libbsd-dev
Create file: /usr/share/X11/xorg.conf.d/99-fbdev.conf
sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf
add in nano
Section “Device”
Identifier “myfb”
Driver “fbdev”
Option “fbdev” “/dev/fb1″
EndSection
Exit Nano
sudo apt-get install cmake
git clone https://github.com/AndrewFromMelbourne/raspi2fb
cd raspi2fb/
mkdir build
cd build
cmake ..
make
sudo make install
sudo cp ../raspi2fb@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable raspi2fb@1.service
sudo systemctl start raspi2fb@1
TEST
sudo nano /etc/rc.local
add before exit 0
sudo systemctl daemon-reload
sudo systemctl enable raspi2fb@1.service
sudo systemctl start raspi2fb@1
END TEST
sudo dpkg-reconfigure console-setup
Select “UTF-8”, “Guess optimal character set”, “Terminus” and “6×12 (framebuffer only).”
sudo nano /boot/config.txt
Add
framebuffer_width=810
framebuffer_height=540
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=320 240 51 1 0 0 0
dtoverlay=pitft28-capacitive-overlay,rotate=90,speed=80000000,fps=51
gpu_mem=44
sudo nano /etc/emulationstation/themes/carbon/carbon.xml
fontSize to 0.05
Controls
cd
git clone https://github.com/adafruit/Adafruit-Retrogame
cd Adafruit-Retrogame
Edit the file retrogame.c, looking for the table called ioStandard (not the ioTFT table — that’s for other projects). Each line in brackets represents one pin on the GPIO header and a corresponding key code.
The full list of available keycodes can be found in /usr/include/linux/input.h
raspberry_pi_retrogame.png
After editing, compile and install the code with:
Copy Code
make retrogame
sudo mv retrogame /usr/local/bin
To make retrogame start automatically when the system boots:
Copy Code
sudo nano /etc/rc.local
Before the final “exit 0” line, insert this one line:
Copy Code
/usr/local/bin/retrogame &
Just one more file needs editing, so that EmulationStation recognizes retrogame as a keyboard:
Copy Code
sudo nano /etc/udev/rules.d/10-retrogame.rules
Copy and paste this line exactly into the new file:
Copy Code
SUBSYSTEM==”input”, ATTRS{name}==”retrogame”, ENV{ID_INPUT_KEYBOARD}=”1″
Reboot and you should now have “virtual” keys associated with GPIO buttons.
I solder the Velleman K8019 kit together and made my own software:
And now let the creative thought flow!
Make a more complex program ^_^
This is a screen of the official Velleman program:

Its used to program the RFID reader you can change the door open system and add or remove cards from the system.
If you write your own program you can gather the data from the serial port and make your own database and give it functions.
For now I don´t have the need for the door unlock feature but its handy for future project.
Example : Turn on pc by presenting rfid card
This is my own tutorial on how to make a VR game its been done so many times before me but all the tutorials have shitty controls or are outdated.
Here is a sample of a game i did but controls on android device are screwed by the autowalk script i used so need to create my own.
So lets start form scratsh and make en new tutorial that would work with Unity 5.0.0p2 (64-bit)
and Latest Google Cardboard SDK from the Github
Also lets download the extra controllers
Requires Unity 4.6.3 or higher.
Unity forgot the Y
Today I was having a problem getting a first person control to work in Unity for Google Cardboard. I had done it once but could not remember how to do it again. The problem I was having was that once the controller was attached to head i has just falling through the terrain. I attached the controller to the camera (but not the head) and this would solve the problem of falling through the terrain, but the head was not attached to the controller so movement was set in the start and would not change based on head movement.
My solution to the problem, once you have added a first person control delete its camera. Put it under CardboardMain and all cameras under the first person control. Add a component to the First Person Control. This component should be the CardBoard Head (script). Next uncheck the Track Position button under the Head (script) you just added, and the Mouse Look (script) also under First Person Control. Finally delete the old Head object in the Hierarchy.
Hope this can save some time with anyone else with this problem,
Couple of Bros
I Modded Stuart in to Sonic 1, at first i thought it was Bob that´s why the name is showing Bob in some video´s, changed it in final version.
Not that i am releasing this in to the wild, only by popular demand.
Did this MOD just to play around with the sprite editor and the Level editor.
Here are some making offscreens :-p




Love the idea of change the old games and i like to see it also on real hardware:
Also Flashed it on my Fake Everdrive:

Tried it on my Megadrive and works 
This is the Finale Version:
Compare beta 1 Vs Sonic:
Beta 1:
Its just for play play nothing special.
Things done:
Did some Sprite edting on the Rom file it self.
Did some Pallet editing on the rom file it self.
Did some Hex Editing on the Rom file it self.
Did Some level editing on the rom file it self.
Things i would do different?
Use the dis-assembled file and start from there on.
Recap, I think Sonic has potential to be an Minion,
Change the rings to bananas and add in some mean minions and done.
Would be a Nice Megadrive / Genesis Clone of that Minions running game ‘Minion Rush’ on Smartphones…