Skip to the content
PCBKitNew board
2 layers139.7 × 64.8 mmSprig Console PCB, the printed circuit board in 3D

A custom isometric game engine built from scratch in C++ for PocketGate — a handheld gaming console powered by the STM32H743 microcontroller.

Size
139.7 × 64.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
36
Nets
43
Pads
133
Tracks, vias
254, 19
Pours
52
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
18 Dec 2025
Updated
25 Apr 2026

Overview

Sprig Console PCB is an open-source printed circuit board by AntonSplavnik, from the AntonSplavnik/pocketgate-engine repository on GitHub. It is a 2-layer board of 139.7 × 64.8 mm with 36 parts on 43 nets, routed with 254 tracks and 19 vias.

It is built around the MAX98357AETE+T. Its parts include 9 switches, 4 resistors, 3 ICs, 3 diodes and 2 capacitors. It belongs with the RP2040 boards of this library.

Main components

1

README

README.md

PocketGate Engine

A custom isometric game engine built from scratch in C++ for PocketGate — a handheld gaming console powered by the STM32H743 microcontroller.

What is PocketGate?

PocketGate is an open-source handheld gaming console built around the STM32H743 ARM Cortex-M7 microcontroller. The engine drives a 4-inch 480x320 TFT display, rendering sprite-based isometric worlds at 60 FPS — all on a microcontroller with ~1 MB of RAM.

Think classic isometric games like Fallout 1 or GBA-era RPGs, running on custom hardware you can hold in your hand.

The project spans the full stack: from PCB design and bare-metal drivers to a double-buffered rendering pipeline with fixed-point math, isometric coordinate systems, and an asset conversion toolchain.

Features

Rendering

  • Double-buffered framebuffer with pointer swapping
  • RGB565 pixel format (16-bit color)
  • Sprite rendering with per-pixel alpha blending
  • Bresenham line drawing and diamond tile outlines
  • Isometric world-to-screen coordinate conversion
  • Camera/viewport system with offset tracking

Engine

  • Q16.16 fixed-point arithmetic (no floating-point dependency)
  • Movement system with boundary checks
  • Entity Component System (in progress)
  • DMA-accelerated display transfers

Platform Support

  • STM32H743 — target hardware with 4" ST7796S SPI display
  • Desktop (GLFW/OpenGL) — development build for fast iteration

Tooling

  • PNG to binary sprite converter (RGB565 + alpha)
  • Sprite to C++ header generator (for Flash embedding)
  • Sprite file inspector and alpha channel analyzer

Hardware

ComponentPart
MCUSTM32H743VIT6 (Cortex-M7, 480 MHz)
Display4.0" ST7796S TFT, 480x320, SPI
TouchFT6336U capacitive (I2C)
AudioPCM5100A I2S DAC + NS4150B Class D amp
External RAMPSRAM64H 8 MB (QSPI)
WiFiESP8266 D1 Mini (UART)
PowerSW6106 USB-C PD 18W BMS
Battery2x 18650 Li-ion, 4000 mAh (1S2P)

A custom PCB is currently in development using KiCad — the next step after the breadboard prototype is validated.

Architecture

text
PocketGate Engine
├── engine/                 Core engine (platform-independent)
│   ├── graphics/           Double-buffered framebuffer, sprite blitting
│   ├── isometric/          World/screen coordinate conversion, camera
│   └── math/               Q16.16 fixed-point arithmetic
│
├── platforms/
│   ├── stm32/              STM32H743 drivers (ST7796S, FT6336U, DMA)
│   └── desktop/            GLFW/OpenGL development build
│
├── game/                   Game logic (entity system, WIP)
├── assets/                 Sprites, tilesets, asset packs
└── tools/                  Asset conversion pipeline

The engine core is fully platform-independent. The same framebuffer.cpp and rendering code runs identically on the STM32 and the desktop build — only the display output layer differs.

Rendering Pipeline

text
World Space (Fixed_q16)          Screen Space (pixels)         Display
       │                                │                        │
  Isometric projection ──►  Camera offset applied ──►  Framebuffer ──► SPI/DMA (STM32)
  world_to_screen()         back buffer render          swap()         or
                                                                  glTexImage2D (Desktop)

Memory Layout (STM32H743)

text
Internal (~1 MB)                    External
├── DTCM 128 KB  → Stack            ├── PSRAM 8 MB → 2x framebuffers
├── AXI  512 KB  → Working buffers  └── QSPI Flash → Assets
├── SRAM 288 KB  → DMA buffers
└── SRAM4 64 KB  → Low-power

Building (Desktop)

The desktop build lets you develop and test the engine without hardware. It renders the framebuffer to a GLFW window using OpenGL.

Prerequisites

macOS:

bash
brew install glfw

Linux:

bash
sudo apt install libglfw3-dev libgl1-mesa-dev

Build and Run

bash
# Clone the repository
git clone https://github.com/AntonSplavnik/pocketgate-engine.git
cd pocketgate-engine

# Build
make -f platforms/desktop/Makefile.desktop

# Build and run
make -f platforms/desktop/Makefile.desktop run

Controls

KeyAction
WMove up
AMove left
SMove down
DMove right
ESCQuit

Asset Pipeline

The engine includes tools for converting standard image files into optimized sprite data:

bash
# Convert PNG to binary sprite (RGB565 + transparency)
./tools/png_to_sprite/png_to_sprite_alpha character.png

# Generate C++ header for Flash embedding
python tools/sprite_to_cpp/sprite_to_cpp_alpha.py character.sprite

# Inspect sprite file
./tools/inspecter/inspect_sprite character.sprite

Sprite format: 4-byte header (width + height as uint16_t) followed by raw RGB565 pixel data. Magenta (0xF81F) is used as the transparency key.

Roadmap

Software

  • Entity System — component-based entity architecture for game objects
  • Tile Rendering — filled isometric tiles with texture mapping
  • Collision System — tile-based walkability and entity-to-entity checks
  • Depth Sorting — back-to-front rendering with proper z-ordering
  • Viewport Culling — render only visible tiles for performance
  • Animation — sprite sheet frame management
  • Touch Input — FT6336U capacitive touch integration
  • Audio — I2S playback through the PCM5100A DAC
  • WiFi — ESP8266 communication for multiplayer or updates

Hardware

  • Prototype Assembly — wire all components and validate on breadboard
  • Custom PCB — KiCad schematic and board layout (in progress)
  • Enclosure — 3D-printed or manufactured case design

Project History

This project evolved through several hardware iterations — starting with a Raspberry Pi Pico and a small 128x160 ST7735 display, then migrating to the STM32H743 with a larger 480x320 screen as the scope and ambitions grew. The engine was restructured for multi-platform support along the way, and the Pico platform code remains in the repository.

License

The engine software is open source under the MIT License.

Hardware designs (KiCad schematics, PCB layouts) are proprietary and not covered by the software license.

Parts

36
QtyValueFootprintReferences
8, , , , , , ,
21kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR3, R4
21uFCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC1, C4
1100kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR2
11020_battery_holderlocal:1022J1
11MResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1
11N5819Diode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD3
1AButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW2
1Adafruit_TFT_ST7735Library:Generic_1.8Inch_TFT_120x160U1
1Conn_PinHeader_2x03_P2.54mm_Vertical_SMDConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ2
1DButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW4
1IButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW5
1JButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW6
1KButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW7
1LButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW8
1LOGOLOGOG***
1LOGOgraphics:spriglogoG***
1LOGOgraphics:oshlogoG***
1LOGOgraphics:hcflagG***
1L_LEDPCM_4ms_LED:LED_3mm_C1A2_Polarity_IndicatorD2
1MAX98357AETE+Library:Max98357A_ClassD_I2S_Mono_Amp_BreakoutBoardU2
1Picofab:RPi_Pico_SMD_TH_modU5
1R_LEDPCM_4ms_LED:LED_3mm_C1A2_Polarity_IndicatorD1
1SButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW3
1SlideswitchButton_Switch_THT:SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mmSW9
1SpeakerLibrary:1W_8Ohm_SpeakerLS1
1WButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW1

Questions

How big is the Sprig Console PCB PCB?

It measures 139.7 × 64.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Sprig Console PCB use?

36 parts, built around the MAX98357AETE+T. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Sprig Console PCB KiCad files?

From the AntonSplavnik/pocketgate-engine repository on GitHub, at the commit this page was made from: the board is Docs/pico/kicad/Sprig Console PCB.kicad_pcb and its schematic Docs/KiCad/PocketGate-backups/PocketGate-2026-02-24_212718/PocketGate.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Sprig Console PCB design in my own project?

Its repository states no licence, so its author keeps all rights: ask AntonSplavnik before reusing the design.

Similar boards

  • 2 layers139.7 × 64.8 mmSprig console, the printed circuit board in 3D

    Sprig console

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    42 parts1.1kMIT
  • 2 layers90.5 × 50 mmMain control board, the printed circuit board in 3D

    Main control board

    jamro/tiny-engineer

    A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

    42 parts1.1k
  • 2 layers89 × 55.5 mmMintypcb, the printed circuit board in 3D

    Mintypcb

    jackw01/pi-tin

    Open source raspberry pi handheld retro gaming console

    129 parts75CERN-OHL-W-2.0
  • 4 layers48 × 35.1 mmMicro esp32-s3, the printed circuit board in 3D

    Micro esp32-s3

    atomic14/esp32-tv-hardware

    This is Work In Progress - I'm still working on this.

    81 parts29
  • 2 layersAI voice assistant, the printed circuit board in 3D

    AI voice assistant

    DhamuVkl/ESP32S3-AI-Voice-Assistant

    This project is a complete DIY AI voice assistant built around the ESP32-S3 microcontroller. It combines custom PCB design, advanced audio processing, and cloud-based AI to create a device that rivals commercial smart…

    78 parts26MIT
  • 6 layers68.8 × 74.6 mmFurbyBoard, the printed circuit board in 3D

    FurbyBoard

    Guilleloma/Furby-GPT

    This project transforms a 1998 Furby into an interactive and advanced desktop assistant using a Raspberry Pi W. It incorporates OpenAI and Whisper for natural language processing, primarily relying on Google Cloud Text…

    158 parts26
  • 2 layers140.6 × 25.9 mmESP32 SmartGlass, the printed circuit board in 3D

    ESP32 SmartGlass

    jobitjoseph/ESP32-AI-SmartGlass

    The ESP32 AI Smartglass is an innovative wearable device that blends the power of artificial intelligence with the convenience of home automation.

    47 parts16
  • 2 layers53.3 × 39.7 mmHomeAssistantSpeaker, the printed circuit board in 3D

    HomeAssistantSpeaker

    ProrokWielki/HomeAssistantSpeaker

    It is a small, 3D printable rhasspy satellite. It uses INMP441 microphone, MAX98357A audio amplifier paired with 8 Ohm 0.5 W broadband speaker, NeoPixel led strip and ESP32. It is powered from 5V USB.

    33 parts15