September 25 2016

Howto make a GAMEBOY PI

splash

Tutorial Time :-)

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:PiTFT 2.8

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.

(not my Picture just for show my version will have a power-bar also. How? wait and see )

Pictures:
How it looks now:

 

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 :-)

The mod of the case….

conversion:

Gameboy Upgrade / Hack / crack :-)
The Layout
Gameboy Upgrade / Hack / crack :-)
 Fitting the LayoutBezel of Gameboy on top of screen (will lose touchscreen function so will be a sticker)
Gameboy Upgrade / Hack / crack :-)
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons Problem Video out and speaker jack are on the wrong side. Need to de-solder them.
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons PiTFT pcb is to big for the Gameboy case need to chip it down.
Removed the hole left side (seen from picture above) until the FFC connector.
Lost the tact solder position but then again i would use them anyway.
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
First idea for custom joystick control but scraped this in the end.
(Do little things at the time don’t do everything at once grrr……. :-) )
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
Gameboy Upgrade / Hack / Crack - Part IIMade my custom button pcb´sNext step refitting the original buttons 
They fit  :-)
They fit  :-)
They fit  :-)
They fit  :-)
They fit  :-)
They fit  :-)
They fit  :-)
 The Screen fits the case
:-)
I Saw of a part of the display driver board and its still working :)next step connecting the wires to the raspberry pi directly without the header pins.
At first i wanted to solder all 26 pins to the pcb’s but then i ordered a FFC extender
This saved my so much time and cost 6 Euro 😛
I Saw of a part of the display driver board and its still working :)next step connecting the wires to the raspberry pi directly without the header pins.
I Saw of a part of the display driver board and its still working :)next step connecting the wires to the raspberry pi directly without the header pins.
I Saw of a part of the display driver board and its still working :)next step connecting the wires to the raspberry pi directly without the header pins.
I Saw of a part of the display driver board and its still working :)next step connecting the wires to the raspberry pi directly without the header pins.
 These pictures showing the concept of the build.

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 😀 )

The Arivale of the FFC extender and extra Cable

 You need controls.

I have rebuild the pcb for the controls because this way its much stronger then before. And the board looks more like the original Gameboy PCB haha.
Also i made some video’s that show the different stages of the build :
RetroPi and PiTFT from Ada fruit test!

(I have 4 Pi’s: two models B and one Model 2B+

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.

How i Did my software side:

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

Boot in Raspberry pi, let it boot in to startx and then quit it to command line
And launch Raspi-config: (sudo raspi-config)

Last things: 1 Overscan disable, 4 SSH Enable, 5 Device tree Enable, 6 SPI 7 I2C and  8 Serial disable, 9 Audio force 3.5mm headphone jack.
Side note for those how need Tochscreen: I disable 6, 7 and 8 to get more Gpio pins working
but this will disable touchscreen control.

But this is not needed for this project anyway. And also you can make another SD card that can use the Touchscreen interface but you will lose the Gpio pins that use SPI, I2C and Serial.

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

Select “UTF-8”, “Guess optimal character set”, “Terminus” and “6×12 (framebuffer only).”
Last edits before reboot.

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

Adding Controls:

cd /~/
git clone https://github.com/adafruit/Adafruit-Retrogame
cd Adafruit-Retrogame

nano retrogame.c

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…

raspberry_pi_gpio-map.png

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 &

It works!

sudo nano /etc/rc.local

Reboot and you should now have “virtual” keys associated with GPIO buttons.

Or make it more fancy:

HOW TO HIDE BOOT TEXT:

sudo nano /boot/cmdline.txt

Add splach screen

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

and if you did’t follow my splashscreen install you can choose it here:

 

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.

 

 

Category: Coding, DIY, Gameboy Pi, Homebrew, Linux, Mod´s, Raspberry Pi, Retro Hardware, Software, Soldering, Upgrade | Comments Off on Howto make a GAMEBOY PI
September 24 2016

Beta tester for a PS3 tool

Back in the hay days of the ps3  Contacted me to test his new ps3 tool.
Its a all in one tool for ps3 in a nice GUI.

He contacted me because i have been checking different build versions of eboot.bin  files.
Results of scetool:

I shared a lot of info on forums like psx-scene.com ps3hax.com and i got his attention.
On twitter he asked me to beta test the final version of his tool.
I never beta tested a program my self and found it a great honor to do.
Over twitter i told him my results and he updated the bugs afterwards.
This was a great experions and found it very cool.
Below is the release info on psx-scene.com where you can download the tool your self.

Source: psx-scene.com

In a turn of events, PsDev has released his final edition of PS3Tools GUI Edition, v3.3.

He has also stated he plans on releasing the source code to his project at a later time, so others may continue the work he started. He has told me the reason he wishes to stop work on this project, is so that he can move on to develop other projects. Below you will find all 12 releases, all of which were released here at PSX-Scene first. Thanks PsDev!

It has been fun making this program, it has gone threw 12 awesome updates. I’m sad to stop working on it, but I’m happy to see what you guys can continue to make it into. I will release the source code, but not today, not in this thread. lets leave that for another time and focus on this release. This is also the most stable version, all features have been tested not only by me but other people too, (Dcnigma, Industerialcode) and all features work properly.

 

CHANGES:

  • scetool v0.28 added
  • New keys added to keyset
  • New script for EBOOT resigning
  • New file system layout
  • Removed do it button
  • Now everytime you select a option from one of the drop down menu it does that option right away
  • Removed SELF tool
  • Cleaner
  • Every option has its individual message box completion of operation

There is a new way that the file system works. There is a individual folder for all the tools (PUP Tools, scetool, Core_os Tool ect) And when you want to use the tool just place the file in the correct folder and use the GUI. This system is cleaner and allows me to not use as much code.

there is a script in the scetool folder called fix. This script is what can be edited to your standards for the EBOOT resigning. I did this so if you want to sign for 3.41 ect or change compression or anything just edit the script and run the GUI no need for new update, much more efficient

@echo off
FOR /F "tokens=1,2 delims= " %%A IN ('scetool.exe -i EBOOT.BIN') DO (
if [%%A]==[ContentID] set CID=%%B
)
scetool.exe --decrypt EBOOT.BIN EBOOT.ELF
rename EBOOT.BIN ORIGINAL_EBOOT.BIN > NUL
pause
scetool.exe --sce-type=SELF --compress-data=FALSE --skip-sections=TRUE --key-revision=0A --self-auth-id=1010000001000003 --self-add-shdrs=TRUE --self-vendor-id=01000002 --self-type=NPDRM --self-fw-version=0003005500000000 --np-license-type=FREE --np-content-id=%CID% --np-app-type=EXEC --np-real-fname=EBOOT.BIN --encrypt EBOOT.ELF EBOOT.BIN
pause
del /Q EBOOT.ELF > NUL
scetool -i EBOOT.BIN
pause

There is no more “Do It” button, since I change the way the files are modified I thought I will just make every option a button it self, si when you click the option you like from the drop down menu it will do the operation

Note* After click may take a sec for the operation to start be patient.
DOWNLOAD: PS3Tools Final

 

Category: Coding, Download, Homebrew, PS3, Software | Comments Off on Beta tester for a PS3 tool
September 20 2016

Test card/screen Simulator!

My dad is a Ham Radio/TV amateur and he asked if i could write a better version of his version Test card/screen program that he found on the internet.

http://home.worldonline.nl/~peterdb/testcard/ Site is offline 

My version is almost a one 2 one copy of Peter his program the only different aspect is: custom screen options.

My dad complains that after he upgrade his video card he could get Peter’s version working correct.

So i looked at the application and told my dad that i could code that in one day and make it better.
I took this challenge because i written some code for custom screen options before.

My version got all basic functions that peter’s version got i left out the RGB options because otherwise i couldn’t make the dead line of one day 😀

If you select view set location Testbeeld you get another window and you can drag it to the desired screen/location…
after hitting the Set button the location is fixed.
If you hit the fullscreen button it will load the Test card/screen on that location.
Some more test card options:

Download: Dropbox download. Testscreen app

Source code : Github
Video demo:

Category: Coding, Design, DIY, Download, Programs | Comments Off on Test card/screen Simulator!
July 30 2016

Old AR demo I made forgotten about until Pokemon Go appeared.

Some time back i tried the hole Augmented Reality thing and now that Pokemon Go is so popular

I remembered this project that i did below is a video showing a demo of the project that i did:

If you enable your Webcam in this flash app you can try it your self.

The X-wing will rotated on the Code and if you move it it will follow your movement.

Needs Webcam!

This code is used to display the xwing print it out or display it on your tablet or phone

Place it so the webcam can see the code

Category: 3d Model, augmented reality, Coding, Design, DIY | Comments Off on Old AR demo I made forgotten about until Pokemon Go appeared.
June 25 2016

New Mp3 player for my Touchscreen Radio.

unnamed
 Last week i tried DWjukebox on my Touchscreen Radio,
the read me file states that it will not work with a touchscreen or mouse above windows xp
 
So i lost all my touchscreen goodness if i use that program.
I did a search for alternative for it but could’t find any good that looked good enough for standalone player….
So i decided to code my own version in Visual Studio 2010 (VB)
It works very easy:
 First time you run the program you will need to setup the Database.
I do this by making a simple TXT file containing the location of the files.
First select the location of you mp3 files:
Example users/My Music
Then Press the button Prepare TXT and wait until the console screen closes it self and
you return to the first screen.
The program will use a predetermined folder for saving the TXT file.
if you click the Use Mp3 TXT file you will be pointed in to the right folder.
Just select the mp3list.txt and the contend of the txt file will be loaded in to the database.
You can check it and I suggest you do this the first time you Run the program.
When you don’t check the database the Jukebox player will not load the database.
But if you close (click the 25 cent button) and restart it will load the Jukebox and the database
directly. This is a little bug and is in reality very easy to fix only did’t do it for now.
Honestly its not that a big bug because it will only happen at first setup. After setup it will correct
the bug at loading.

Demo video, sorry for no original music from the video.
The source code and the project files are available on Github.
A compiled version can be Downloaded here: Touchscreenmp3Radio
April 8 2016

Half Life² Survivor 2.0 Nesys Simulator App Wip

Here is a construct of my new Half Life² loader.
I bought a Rfid reader and now i want to simulate the arcade feeling more.

In later clips you will see the custom player menu´s weapon shop item shop etc.

This clip shows the possible way´s to save or load the game.

Will add a option for dual screens so you can have a marquee effect:
show loading maps have player info etc…

this app/loader will give you the beste Half life² survivor arcade experience that you can have on pc.

 

Category: Coding, Design, DIY, Games, hl², Homebrew, Mod´s, PC, RFID | Comments Off on Half Life² Survivor 2.0 Nesys Simulator App Wip
February 6 2016

RFID I Know how you work :-)

RFID-Tag

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

 

Category: Coding, DIY, RFID, Software, Soldering | Comments Off on RFID I Know how you work :-)
January 2 2016

Unity 3D make your own VR Game

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

Setting up Cardboard

  1. Download the latest version of Unity.
  2. Download the Cardboard SDK for Unity.
  3. Download the Cardboard Demo for Unity.
  4. Download the Android SDK if you don’t already have it. The “SDK Tools Only” option is sufficient.
    Follow theinstallation instructions up to and including “Get the latest SDK tools”.
  5. Open Unity, creating a new project

Also lets download the extra controllers
Requires Unity 4.6.3 or higher.

Cardboard Controls+ is all you need to develop the best Cardboard games in Unity.
These scripts enhance Google’s official Cardboard SDK for Unity with event-driven improvements for discrete magnet control,
orientation tilting, and gaze raycasting. Stop limiting your creative options!
Usage

You may experience problems if you import the code manually without using the provided unitypackage file.

Import them like show below
import them

Controls+ Demo APK download

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

Category: Coding, DIY, Games, Google Cardboard, Unity3d | Comments Off on Unity 3D make your own VR Game