Skip to main content
Version: FILS English

Portable Retro Gaming Console

info

Author: Illia Kucherenko

GitHub Project Link: link to github

Description

It's a portable gaming console that will run some retro games that used to be popular back in the day. It is built using 2 RP pico 2w, an LCD Display, 4 buttons for controls and LEDs for visual feedback.

Motivation

I've always been passionate about games and it remains a big part of my life even today. I decided to make something fun that would bring that childish joy we all crave for. I plan on implementing games like Pac-Man and Snake for now, if I succeed, I will try implementing more games.

Architecture

Architectural Diagram: Architectural Diagram

Raspberry RP Pico 2W (Debugger) -Used to flash firmware to processing RP Pico 2W and debug in case of issues. -Connects to the PC via micro-usb cable and to processing PR Pico 2W via debug interface Debug Interface

Raspberry RP Pico 2W (Processing) -Runs flashed firmware and acts as a main processing unit for the whole model. Reads data from buttons, controls LCDs, sends and updates image on an LCD, runs firmware with games and games themselves.

LEDs -Used to add visual feedback to whats going on on the screen -Connected via gpio pins to processing RP Pico 2W

Buttons -Used for controls in menus and games -Connected via gpio pins to processing RP Pico 2W

LCD -Used to display the image (menus, games etc.) -Connected via spi interface to processing RP Pico 2W

Log

Week 5 - 11 May

I've acquired all the necessary hardware, which is likely still subject to be rethought and changed. I've set up a configuration with two Pico 2Ws, one of them being a debugger for another one. Currently I'm in the process of getting LCD to work and looking for suitable libraries and crates for the project.

Week 12 - 18 May

I managed to implement a basic version of Snake Game. Although initially it was choppy due to optimisation flaws in screen updates, I managed to fix it and the game now runs at buttery smooth 60 fps. The console is fully functional, but barebones and a little wonky to use for now. For now my plan is to add new gameplay features to the game which are not currently present, and add LEDs for visual feedback. Since I haven't done that yet my KiCad schematic doesn't include RGB LEDs, in the next weekly log I'll make sure to include that as well, as the project will reach a more finished and polished state.

Week 19 - 25 May

I moved buttons to a separate breadboard which is connected to the main one on order to make a more "d-pad" like controls layout. I implemented Tetris, which is still in beta. So far I encountered 0 unfixed issues but in case if I do I will try to fix them. For Snake Game I added 2 types of rare items: Golden Apples and Diamonds. Golden Apples generate on the field every 10 seconds with odds being 50%, Diamonds on the other hand can spawn with a chance of 25% every 10 seconds, while also moving. Golden Apples give 10 points and Diamonds give 20, Unlike the regular Apple which gives only 1. I also added difficulties to Snake Game: Easy, Normal, Hard, Nightmare. Each affect game's speed, the higher the difficulty - the faster the game is.

Hardware

Consists of RP Pico 2W (2x), LCD TFT 2.2" module, buttons and resistors and 2 breadboards to hold everything together. At the moment buttons and resistors are not installed due to design concerns.

Schematics

Here's a KiCad schematic for the current version of the console: KiCad schematic

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2W (2x)Microcontroller39.66 RON
LCD SPI 2,2 '' 240x320 PX (1x)LCD Screen59.99 RON
Wire Kit(2x)Wires7.99 RON
Resistor Kit (1x)Resistors14.99 RON
Breadboard (2x)Breadboards19.96
White Capped Buttons (4x)Buttons1.99 RON
Common Cathode RGB (3x)RGB LEDs0.99 RON

Software

LibraryDescriptionUsage
embassy-rpHardware abstraction for Raspberry Pi Pico (GPIO, SPI, etc.)Used for GPIO, SPI, and board initialization
embassy-executorAsync runtime for embedded systemsRuns the async main loop and tasks
embassy-timeAsync timers and delaysUsed for frame timing and delays
embassy-syncMutexes and synchronization primitivesUsed for sharing SPI bus safely
embassy-embedded-halEmbedded HAL traits and shared bus supportUsed for SPI device abstraction
ili9341Driver for ILI9341 TFT LCD displaysUsed for rendering graphics on the LCD
display-interface-spiSPI interface abstraction for displaysUsed to connect the display driver to SPI
embedded-graphics2D graphics library for embedded devicesUsed for drawing shapes, text, and game graphics
defmtEfficient logging for embeddedUsed for debug output
defmt-rttRTT backend for defmt loggingUsed for debug output over RTT
panic-probeMinimal panic handler for embeddedHandles panics safely in embedded context
  1. link