Giter Club home page Giter Club logo

specdeck's Introduction

SpecDeck

Load game and programs to your ZX Spectrum directly from a Raspberry Pi.

Features

  • TZX and WAV Support
  • Cover display on Pirate Audio screen
  • Select, playback, rewind and shutdown from Pirate Audio controls

You Will Need

  • Raspberry Pi Zero WH (with GPIO header)
  • Pimoroni Pirate Audio Headphone Amp HAT
  • Additional headphone amplifier (see notes)

Installation

Before installing, make sure you have physically installed the Pirate Audio HAT and added the following to /boot/config.txt:

dtoverlay=hifiberry-dac
gpio=25=op,dh
dtparam=audio=off

Reboot, then add the dependancies:

sudo apt -y update && sudo apt -y upgrade
sudo apt install git libsdl2-mixer-2.0-0 python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy libatlas-base-dev libportaudio2python3-pip python3-pil python3-numpy
sudo pip3 install pygame keyboard st7789 tzxtools

Now you can clone this repo:

cd
git clone https://github.com/mrpjevans/specdeck.git

Everything is now in ~/specdeck

Running

To run manually:

cd ~/specdeck
sudo python3 specdeck.py

To run as service on startup:

sudo nano /usr/lib/systemd/specdeck.service

Add the following:

[Unit]
Description=specdeck

[Service]
ExecStart=/usr/bin/python3 /home/pi/specdeck/specdeck.py
Restart=on-failure

[Install]
WantedBy=multi-user.target

(Provided in specdeck.service)

Save and close, then enable:

sudo systemctl enable /usr/lib/systemd/specdeck.service

Test by rebooting:

sudo reboot

Adding Games

Place TZX files in the tzx folder. These will be converted on first run to WAV and then cached in the wav folder so subsequent playbacks will be instantaneous.

Cover Art

When selecting a file, by default the filename is displayed on screen. However, if an identifically named .jpg file is found in the image directory, this will be resized to fit and displayed instead.

e.g. If we have

tzx/Hungry Horace.tzx

Then you would set the image to be

image/Hungry Horace.jpg

and this image will be picked up automatically.

Using SpecDeck

Once loaded, the first game will be displayed. You ca then use the following controls on the Pirate Audio HAT:

A: Play/Pause

B: Rewind and pause

X: Previous file

Y: Next file

To shutdown cleanly, press and hold B for at least 5 seconds.

Acknowledgments

specdeck's People

Contributors

mrpjevans avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.