# mister-devel/arcade-pinballaction architecture

> Architecture diagram of the GitHub repository mister-devel/arcade-pinballaction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mister-devel/arcade-pinballaction
- Repository: https://github.com/mister-devel/arcade-pinballaction

## Overview

This repository is a MiSTer FPGA recreation of Tehkan’s Pinball Action arcade hardware. Its documented gameplay hardware includes main and sound Z80s, three AY-compatible sound generators, tile and sprite rendering, scrolling, palette generation, and screen flipping; ROMs are supplied by users through the MRA workflow. The graph groups those hardware functions and the MiSTer video integration. No source excerpts were provided, so relationships are limited to capabilities and integrations stated in the README; source paths identify likely implementations from the file tree.

Main entry points: [`rtl/pbaction.sv`](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction.sv) (Pinball Action Core), [`rtl/pbaction_sound.v`](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_sound.v) (Sound Subsystem), [`rtl/pbaction_video.v`](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_video.v) (Video Pipeline), [`releases/Pinball Action.mra`](https://github.com/mister-devel/arcade-pinballaction/blob/main/releases/Pinball%20Action.mra) (MRA ROM Map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_compute["Game Compute"]
  node_core["Pinball Action Core<br/>[pbaction.sv]"]
  node_maincpu["Main Z80<br/>[T80.vhd]"]
  node_soundcpu["Sound Z80<br/>[T80.vhd]"]
end

subgraph group_video["Video Hardware"]
  node_foreground["Foreground Tiles<br/>[pbaction_fg.v]"]
  node_background["Background Tiles<br/>[pbaction_bg.v]"]
  node_sprites["Sprite Renderer<br/>[pbaction_sprites.v]"]
  node_palette[("Palette RAM<br/>[pbaction_palette.v]")]
  node_videoengine["Video Pipeline<br/>[pbaction_video.v]"]
end

subgraph group_audio["Sound Hardware"]
  node_psg["AY PSGs<br/>[jt49.v]"]
  node_sound["Sound Subsystem<br/>[pbaction_sound.v]"]
end

subgraph group_platform["MiSTer I/O"]
  node_mra["MRA ROM Map<br/>[Pinball Action.mra]"]
  node_videoout["HDMI / Analog"]
  node_framework["MiSTer Framework<br/>[sys_top.v]"]
end

node_user(("User"))
node_mister["MiSTer FPGA"]
node_roms["Arcade ROMs"]

node_user -->|"provides"| node_roms
node_roms -->|"loaded via"| node_mra
node_mister -->|"uses"| node_mra
node_core -->|"implements"| node_maincpu
node_core -->|"implements"| node_soundcpu
node_core -->|"renders"| node_foreground
node_core -->|"renders"| node_background
node_core -->|"renders"| node_sprites
node_core -->|"generates colors"| node_palette
node_core -->|"supports scrolling"| node_videoengine
node_core -->|"supports flip screen"| node_videoengine
node_core -->|"implements sound"| node_sound
node_sound -->|"uses three"| node_psg
node_core -->|"integrates with"| node_framework
node_core -->|"supports output"| node_videoout
node_videoout -->|"outputs to"| node_mister

click node_mra "https://github.com/mister-devel/arcade-pinballaction/blob/main/releases/Pinball%20Action.mra"
click node_core "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction.sv"
click node_maincpu "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/t80/T80.vhd"
click node_soundcpu "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/t80/T80.vhd"
click node_foreground "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_fg.v"
click node_background "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_bg.v"
click node_sprites "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_sprites.v"
click node_palette "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_palette.v"
click node_videoengine "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_video.v"
click node_psg "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/jt49/jt49.v"
click node_sound "https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_sound.v"
click node_framework "https://github.com/mister-devel/arcade-pinballaction/blob/main/sys/sys_top.v"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_core,node_maincpu,node_soundcpu,node_user toneBlue
class node_foreground,node_background,node_sprites,node_palette,node_videoengine toneAmber
class node_psg,node_sound toneMint
class node_mra,node_videoout,node_framework toneRose
class node_mister,node_roms toneIndigo
```

## Components

### Game Compute

- [Pinball Action Core](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction.sv): `rtl/pbaction.sv`
- [Main Z80](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/t80/T80.vhd): `rtl/t80/T80.vhd`
- [Sound Z80](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/t80/T80.vhd): `rtl/t80/T80.vhd`

### Video Hardware

- [Foreground Tiles](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_fg.v): `rtl/pbaction_fg.v`
- [Background Tiles](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_bg.v): `rtl/pbaction_bg.v`
- [Sprite Renderer](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_sprites.v): `rtl/pbaction_sprites.v`
- [Palette RAM](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_palette.v): `rtl/pbaction_palette.v`
- [Video Pipeline](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_video.v): `rtl/pbaction_video.v`

### Sound Hardware

- [AY PSGs](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/jt49/jt49.v): `rtl/jt49/jt49.v`
- [Sound Subsystem](https://github.com/mister-devel/arcade-pinballaction/blob/main/rtl/pbaction_sound.v): `rtl/pbaction_sound.v`

### MiSTer I/O

- [MRA ROM Map](https://github.com/mister-devel/arcade-pinballaction/blob/main/releases/Pinball%20Action.mra): `releases/Pinball Action.mra`
- **HDMI / Analog**
- [MiSTer Framework](https://github.com/mister-devel/arcade-pinballaction/blob/main/sys/sys_top.v): `sys/sys_top.v`

### Other components

- **User**
- **MiSTer FPGA**
- **Arcade ROMs**

## Connections

- User → Arcade ROMs: provides (evidence: `README.md`)
- Arcade ROMs → MRA ROM Map: loaded via (evidence: `README.md`)
- MiSTer FPGA → MRA ROM Map: uses (evidence: `README.md`)
- Pinball Action Core → Main Z80: implements (evidence: `README.md`)
- Pinball Action Core → Sound Z80: implements (evidence: `README.md`)
- Pinball Action Core → Foreground Tiles: renders (evidence: `README.md`)
- Pinball Action Core → Background Tiles: renders (evidence: `README.md`)
- Pinball Action Core → Sprite Renderer: renders (evidence: `README.md`)
- Pinball Action Core → Palette RAM: generates colors (evidence: `README.md`)
- Pinball Action Core → Video Pipeline: supports scrolling (evidence: `README.md`)
- Pinball Action Core → Video Pipeline: supports flip screen (evidence: `README.md`)
- Pinball Action Core → Sound Subsystem: implements sound (evidence: `README.md`)
- Sound Subsystem → AY PSGs: uses three (evidence: `README.md`)
- Pinball Action Core → MiSTer Framework: integrates with (evidence: `README.md`)
- Pinball Action Core → HDMI / Analog: supports output (evidence: `README.md`)
- HDMI / Analog → MiSTer FPGA: outputs to (evidence: `README.md`)
