May 26

NES-Pi + Custom Amiibo (sort of)

New weekend project that I made:
Last year I a got a NES case of a co-worker, I did’t know what to do with it, until now…

IMG_3365 IMG_3370
Empty case, only the top and bottom and the buttons.  perfect for a Raspberry pi project….
The last weekend I started printing heavy on my Anycubric Photon.

  IMG_3382
And it felt if i was making Amiibo’s

After seeing the second picture above I got inspired to make a new RetroPie console.
Needed to be RFID and controller…
Left the NES case and the semi setup  Right a working setup only no working code at that point.
Even the RFID would’t read the cards because of the SPI-PY  its sort of broken.

IMG_3369   IMG_3420

How to connect?
DIY-RFID-Doggy-Door-Circuit-Schematic-w_-LED_Fig1 6IW3b-1

First install SPI-PY (git clone https://github.com/lthiery/SPI-Py.git) then rolle back:

git clone https://github.com/lthiery/SPI-Py.git
git checkout 8cce26b9ee6e69eb041e9d5665944b88688fca68
sudo python setup.py install

If you do that! Then and only then, you can get the RFID-RC533 working under latest Jessy or RetroPie latest build.
Then you can install the MFRC522 Library and start reading some card data.
IMG_3418 IMG_3417
IMG_3415

To get it working the way I wanted was a pain in the @ss. There is some info on runcommand:

example:
/opt/retropie/supplementary/runcommand/runcommand.sh','0', '_SYS_', 'gb', '/home/pi/RetroPie/roms/gb/Tetris (JUE) (V1.0) [!].gb'

But no info on Scummvm and i wanted to launch Monkey Island 1 SE talkie version I made back in the day.
When the Talkie Mod came out.. Been looking for a console that could play those 2 new Talkie versions.
And ScummVM is vers 2.0 on Raspberry so it would work.

Here is a Video showing off how it works and change between Monkey Island and EmulationStation.

More detailed view of how it works: Look at the LED LOL

Some close up photo’s

IMG_3421 IMG_3425
A almost done, want to mount the RFID on top. I want to keep the opening to load maybe custom NES cartridges.

Made also new printed USB controller ports:
Schermafbeelding 2019-05-26 om 21.39.11

How to Script it?

I made  2 bash scripts and 1 pyton script (reworked its the RFID reader):

Schermafbeelding 2019-05-26 om 22.25.41
Only added the import subprocess so i can run shell code.
Schermafbeelding 2019-05-26 om 22.26.17
Change your UID to the card you want to use to boot a game. (my card is 221,107,213,59,88)

The Time.sleep(15) needs to be removed to boot the game quicker but left it in because want to try loading splach screen or something. The Led is to indicate if the game is stopt or not. Then it will boot EmulationStation again.
The python program stops but is been rebooted with EmulationStation.

The bash scripts:

Schermafbeelding 2019-05-26 om 21.00.17
This will kill EmulationStation and load the game
Schermafbeelding 2019-05-26 om 20.58.42
This will restart EmulationStation and my Python script will check for a RFID card

And to make it boot at run you need to make this change:
Schermafbeelding 2019-05-26 om 22.48.26

And for the skin i used the NES-Mini theme.

But it was missing 2 themes, i used ScummVM and the Oric emulator on my Pi.
So i made them download link below:
ScummVM:
SCUMMTHEME 1 SCUMMTHEME 2
Download link: ScummVM.
Oric Atmos :
ORIC THEME 1 ORIC THEME 2

Download link: Oric Atoms.

The RFID fits perfect in the box that i made, now i can insert real NES cartridges 😀
IMG_3454
So if i buy empty nes cartridges i could insert a rfid tag and load that game

Tried that and works ;-)
Tried that and works 😉

(cartridges and RFID tag)

Things to do:

Mount RFID on top case, make everything more durable.
Optimise the code, use some sort of database to use more UID’s and game titles.
Get more RFID tag’s, print more modes of old games… (open source Amiibo’s)

Sources needed to make this happen:

How to integrate RFID module with Raspberry Pi


https://pimylifeup.com/raspberry-pi-rfid-rc522/

RC522 RFID lezer aansluiten op een Raspberry Pi en uitlezen met Python


https://github.com/mxgxw/MFRC522-python/issues/69
https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ
https://retropie.org.uk/forum/topic/2211/questions-about-runcommand-sh/2
https://retropie.org.uk/forum/topic/8230/start-game-from-command-line
https://retropie.org.uk/forum/topic/18937/runcommand-usage-from-python-script-not-working
https://github.com/Aloshi/EmulationStation/issues/236

Retropie – Tips ‘n Tricks


https://www.codingepiphany.com/2013/06/23/running-gog-com-scummvm-games-on-raspberry-pi/
https://retropie.org.uk/forum/topic/13482/using-runcommand-from-the-terminal/3|
https://retropie.org.uk/forum/topic/5307/command-line-command-works-but-doesn-t-work-if-i-put-it-into-a-script

 

Category: 3d Model, 3D Printing, Coding, DIY, Nes, Raspberry Pi, Retro, RetroPie | Comments Off on NES-Pi + Custom Amiibo (sort of)