Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
techatron6002
Published

raspiduboy's dreamboy

A handheld emulation device based on raspberry pi, that has a removable controller and the controller has a arduboy it to play it on the go.

IntermediateFull instructions provided1 hour425
raspiduboy's dreamboy

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
Jumper wires (generic)
Jumper wires (generic)
female to female
×1
Pro Micro - 5V/16MHz
SparkFun Pro Micro - 5V/16MHz
×1
Buzzer
Buzzer
×1
Tactile Switch, Top Actuated
Tactile Switch, Top Actuated
×4
JS Series Switch
C&K Switches JS Series Switch
×1
Male-Header 36 Position 1 Row- Long (0.1")
Male-Header 36 Position 1 Row- Long (0.1")
×1
Female Header 8 Position 1 Row (0.1")
Female Header 8 Position 1 Row (0.1")
×1
oled 0.96 inch spi
×1
SparkFun Snappable Protoboard
SparkFun Snappable Protoboard
×1
lipo 350mah
used to power arduboy
×1
350mah battery charger
an old drone charger that i have
×1
Flash Memory Card, SD Card
Flash Memory Card, SD Card
I used 64Gb one you can youse one more than 8Gb
×1
Female Header 20 Position 2 Row (0.1")
Female Header 20 Position 2 Row (0.1")
×1
powerbank
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

Arduino IDE
Arduino IDE
putty
retropie os
os on which RPI runs on
Raspberry Pi Imager

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Flux, Soldering
Solder Flux, Soldering
Solder Wire, Lead Free
Solder Wire, Lead Free
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Soldering Tool Stand, for use with W100PG Irons
Soldering Tool Stand, for use with W100PG Irons
3d pen
did not have the budget to buy a 3d printer so got away with this cheap 3d pen to make some enclosure and attachments to the model.

Story

Read more

Custom parts and enclosures

custom enclosure for RPI made using cardboard and 3d pen

enclosure

made out of cardboard

enclosure side view

Schematics

arduboy

mr blinky homemade package

rpi buttons pinnout

RPI buttons pins to which d-pad and a&b buttons are connected

header pinout

pinout of the wire that connects arduboy game pad to RPI

Code

installing waveshare display overlays

Python
few commands in the terminal to install waveshare display overlays
Type the following commands:
i used putty to copy and paste these lines of code
git clone  https://github.com/swkim01/waveshare-dtoverlays.git
sudo cp waveshare-dtoverlays/waveshare32b.dtbo /boot/overlays/

making a few changes to boot config file

Python
Now to edit the boot config file:
after typing sudo nano /boot/config.txt
delete everything in that file and paste the driven code
After pasting save the file by pressing CTRL+X, then Y, then Enter.
Thenreboot the raspberry pi by typing the command:
sudo reboot
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=20
overscan_right=20
overscan_top=20
overscan_bottom=20

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
hdmi_mode=1
hdmi_mode=87
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
dtparam=spi=on
dtoverlay=waveshare32b:rotate=270,speed=92000000,fps=60
avoid_warnings=1

retrogame button config

Python
after installing retrogame using
cd
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh
sudo bash retrogame.sh

When run, you’ll be asked to pick one of several control configurations.
pick 3 and press “y”

you will be asked for reboot press y

then open up terminal again
and type
sudo nano /boot/retrogame.cfg

now delete everything in the file

paste the following code and press ctrl+x then y to save.
# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!

# Here's a pin configuration for the PiGRRL 2 project:

LEFT       6  # Joypad left
RIGHT     13  # Joypad right
UP        26  # Joypad up
DOWN      19  # Joypad down
LEFTCTRL  21  # 'A' button
LEFTALT   20  # 'B' button
SPACE     23  # 'Select' button
ENTER     24  # 'Start' button
ESC       18  # Exit ROM; PiTFT Button 1
Z          1  # 'X' button
X          0  # 'Y' button

# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers.  When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.

Credits

techatron6002
3 projects • 2 followers
Thanks to Phillip Burgess, mr.blinky, and arduboy community.

Comments