# siddy212/iconic-es-de architecture

> Architecture diagram of the GitHub repository siddy212/iconic-es-de, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/siddy212/iconic-es-de
- Repository: https://github.com/siddy212/iconic-es-de

## Overview

1. This repository is not an application backend; it is a static theme package for EmulationStation-DE (ES-DE). The runtime is ES-DE itself, which loads the XML layouts and media assets in this repo to render system and gamelist screens.

2. The main entry points are the root XML files: `theme.xml`, `theme-simple.xml`, `theme-detailed.xml`, `gameselector.xml`, `null.xml`, `colors.xml`, and `capabilities.xml`. These define the high-level theme behavior, supported options, and which layouts ES-DE should present for different UI contexts.

3. The theme is organized around two major view families: system browsing and gamelist browsing. The README’s “System View” and “Gamelist View” correspond to different screen compositions, with the latter supporting textlist, carousel, and grid-style layouts.

4. A large amount of the structure lives under `_inc/systems`, which acts as the theme’s asset and layout library. This folder contains background sets, overlays, carousel icons, classic/modern/default variants, and many system-specific metadata XML files that map ES-DE system identifiers to artwork and presentation rules.

5. The metadata layer is split into `metadata-global` and `metadata-custom`. `metadata-global` holds broad mappings for platforms, collections, and special categories like favorites, last played, completed, and now playing. `metadata-custom` provides alternative mappings and artwork hooks for the customizable art style.

6. Custom collections are first-class parts of the theme rather than an afterthought. The repo includes dedicated theme folders such as `mario`, `zelda`, `pokemon`, `sonic-the-hedgehog`, `final-fantasy`, `sailor-moon`, `vocaloid`, `tetris`, `now-playing`, `completed`, and `custom-collections`, each with its own `theme.xml` for branded presentation.

7. Aspect ratio is a core architectural axis. The root contains layout variants for `1:1`, `3:2`, `4:3`, `8:7`, `16:9`, `16:10`, `19.5:9`, and `21:9`, each with `-simple` and `-detailed` variants. This means the theme is designed as a matrix of screen shapes × presentation density, not a single fixed UI.

8. The artwork pipeline is entirely file-based. Visuals live in `_inc/images` and `_inc/fonts`, while sounds live in `_inc/sounds` with named UI effects like `back.wav`, `select.wav`, `scroll.wav`, and `launch.wav`. ES-DE uses these assets directly at render time; there is no intermediate build step or service layer.

9. The theme supports user override boundaries through `custom-backgrounds` and `custom-overlay`. The README describes a fallback chain where ES-DE looks for `${system.theme}.webp` first and then `_default.webp`, allowing local artwork replacement without editing the shipped XML. Overlays are layered on top of the base screen art and are only used in non-“Simple” variants.

10. The visual style is parameterized into Light, Dark, and Retro Gray, each combined with art styles like Classic, Modern, Nintendon’t, or Custom. This creates a separation between palette choice, artwork source, and layout complexity, which is why the repo has many XML permutations instead of one monolithic theme definition.

11. The data flow is ES-DE metadata → theme XML rules → layered artwork. Scraped game metadata, system theme IDs, favorite/last-played states, and collections determine which XML branch and asset file ES-DE selects, then the theme composes backgrounds, overlays, icons, box art, miximages, marquees, and text metadata into the final UI.

12. `resources/background-template.afdesign` suggests a source-artwork design asset for producing theme imagery. It reinforces that this repo is an art/layout distribution package, with design tooling upstream of the checked-in runtime assets.

13. The main architectural boundary is between static presentation assets in this repo and the ES-DE engine that interprets them. Performance considerations in the README, especially around layered grid views and non-simple variants, come from that runtime boundary: the more layers and media shown, the more GPU/VRAM ES-DE needs.

14. For an architecture diagram, the clearest model is: ES-DE UI state and scraped metadata feed into theme selection; the theme selects a screen template by aspect ratio, variant, and system/collection; templates pull from shared and overrideable asset libraries; the final composition is rendered with optional audio feedback.

Main entry points: [`_inc/systems`](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems) (System assets), [`theme.xml`](https://github.com/siddy212/iconic-es-de/blob/main/theme.xml) (Theme entry), [`_inc/systems/metadata-global`](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/metadata-global) (Global maps), [`theme-simple.xml`](https://github.com/siddy212/iconic-es-de/blob/main/theme-simple.xml) (Simple theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root["Root layouts"]
  node_theme["Theme entry<br/>root xml<br/>[theme.xml]"]
  node_theme_simple["Simple theme<br/>root xml<br/>[theme-simple.xml]"]
  node_theme_detailed["Detailed theme<br/>root xml<br/>[theme-detailed.xml]"]
  node_gameselector["Game selector<br/>ui xml<br/>[gameselector.xml]"]
  node_null_layout["Null screen<br/>ui xml<br/>[null.xml]"]
  node_colors["Colors<br/>palette xml<br/>[colors.xml]"]
  node_capabilities["Capabilities<br/>feature xml<br/>[capabilities.xml]"]
  node_aspect_matrix["Aspect matrix<br/>layout set"]
end

subgraph group_shared["Shared assets"]
  node_system_assets["System assets<br/>asset library"]
  node_system_bg_variants["Bg variants<br/>background sets"]
  node_system_overlay_variants["Overlay variants<br/>overlay sets"]
  node_system_icons["Carousel icons<br/>icon assets"]
  node_audio_fx["UI sounds<br/>sound assets"]
end

subgraph group_metadata["Metadata maps"]
  node_meta_global["Global maps<br/>metadata xml"]
  node_meta_custom["Custom maps<br/>metadata xml"]
end

subgraph group_collections["Branded themes"]
  node_brand_collections["Branded sets<br/>theme folders"]
  node_custom_collections["Custom collections<br/>theme folder<br/>[theme.xml]"]
  node_mario["Mario<br/>theme folder<br/>[theme.xml]"]
  node_zelda["Zelda<br/>theme folder<br/>[theme.xml]"]
  node_pokemon["Pokémon<br/>theme folder<br/>[theme.xml]"]
  node_sonic["Sonic<br/>theme folder<br/>[theme.xml]"]
  node_final_fantasy["Final Fantasy<br/>theme folder<br/>[theme.xml]"]
  node_sailor_moon["Sailor Moon<br/>theme folder<br/>[theme.xml]"]
  node_vocaloid["Vocaloid<br/>theme folder<br/>[theme.xml]"]
  node_tetris["Tetris<br/>theme folder<br/>[theme.xml]"]
  node_now_playing["Now playing<br/>theme folder<br/>[theme.xml]"]
  node_completed["Completed<br/>theme folder<br/>[theme.xml]"]
end

subgraph group_runtime["Runtime"]
  node_esde["ES-DE<br/>runtime engine"]
end

node_esde -->|"loads"| node_theme
node_esde -->|"loads"| node_theme_simple
node_esde -->|"loads"| node_theme_detailed
node_esde -->|"loads"| node_gameselector
node_esde -.->|"fallback"| node_null_layout
node_theme -->|"uses"| node_colors
node_theme -->|"declares"| node_capabilities
node_theme -->|"routes"| node_aspect_matrix
node_theme_simple -->|"routes"| node_aspect_matrix
node_theme_detailed -->|"routes"| node_aspect_matrix
node_gameselector -->|"composes"| node_system_assets
node_system_assets -->|"includes"| node_system_bg_variants
node_system_assets -->|"includes"| node_system_overlay_variants
node_system_assets -->|"includes"| node_system_icons
node_system_assets -->|"includes"| node_audio_fx
node_system_assets -->|"indexed by"| node_meta_global
node_system_assets -->|"indexed by"| node_meta_custom
node_meta_global -->|"maps"| node_brand_collections
node_meta_custom -->|"maps"| node_brand_collections
node_brand_collections -->|"contains"| node_custom_collections
node_brand_collections -->|"contains"| node_mario
node_brand_collections -->|"contains"| node_zelda
node_brand_collections -->|"contains"| node_pokemon
node_brand_collections -->|"contains"| node_sonic
node_brand_collections -->|"contains"| node_final_fantasy
node_brand_collections -->|"contains"| node_sailor_moon
node_brand_collections -->|"contains"| node_vocaloid
node_brand_collections -->|"contains"| node_tetris
node_brand_collections -->|"contains"| node_now_playing
node_brand_collections -->|"contains"| node_completed
node_meta_global -.->|"consumed by"| node_esde
node_aspect_matrix -->|"pulls"| node_system_assets

click node_theme "https://github.com/siddy212/iconic-es-de/blob/main/theme.xml"
click node_theme_simple "https://github.com/siddy212/iconic-es-de/blob/main/theme-simple.xml"
click node_theme_detailed "https://github.com/siddy212/iconic-es-de/blob/main/theme-detailed.xml"
click node_gameselector "https://github.com/siddy212/iconic-es-de/blob/main/gameselector.xml"
click node_null_layout "https://github.com/siddy212/iconic-es-de/blob/main/null.xml"
click node_colors "https://github.com/siddy212/iconic-es-de/blob/main/colors.xml"
click node_capabilities "https://github.com/siddy212/iconic-es-de/blob/main/capabilities.xml"
click node_system_assets "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems"
click node_system_bg_variants "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/default-backgrounds"
click node_system_overlay_variants "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/default-overlay"
click node_system_icons "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/carousel-icons"
click node_audio_fx "https://github.com/siddy212/iconic-es-de/tree/main/_inc/sounds"
click node_meta_global "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/metadata-global"
click node_meta_custom "https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/metadata-custom"
click node_custom_collections "https://github.com/siddy212/iconic-es-de/blob/main/custom-collections/theme.xml"
click node_mario "https://github.com/siddy212/iconic-es-de/blob/main/mario/theme.xml"
click node_zelda "https://github.com/siddy212/iconic-es-de/blob/main/zelda/theme.xml"
click node_pokemon "https://github.com/siddy212/iconic-es-de/blob/main/pokemon/theme.xml"
click node_sonic "https://github.com/siddy212/iconic-es-de/blob/main/sonic-the-hedgehog/theme.xml"
click node_final_fantasy "https://github.com/siddy212/iconic-es-de/blob/main/final-fantasy/theme.xml"
click node_sailor_moon "https://github.com/siddy212/iconic-es-de/blob/main/sailor-moon/theme.xml"
click node_vocaloid "https://github.com/siddy212/iconic-es-de/blob/main/vocaloid/theme.xml"
click node_tetris "https://github.com/siddy212/iconic-es-de/blob/main/tetris/theme.xml"
click node_now_playing "https://github.com/siddy212/iconic-es-de/blob/main/now-playing/theme.xml"
click node_completed "https://github.com/siddy212/iconic-es-de/blob/main/completed/theme.xml"

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_theme,node_theme_simple,node_theme_detailed,node_gameselector,node_null_layout,node_colors,node_capabilities,node_aspect_matrix toneBlue
class node_system_assets,node_system_bg_variants,node_system_overlay_variants,node_system_icons,node_audio_fx toneAmber
class node_meta_global,node_meta_custom toneMint
class node_brand_collections,node_custom_collections,node_mario,node_zelda,node_pokemon,node_sonic,node_final_fantasy,node_sailor_moon,node_vocaloid,node_tetris,node_now_playing,node_completed toneRose
class node_esde toneIndigo
```

## Components

### Root layouts

Top-level theme entrypoints and presentation variants.

- [Theme entry](https://github.com/siddy212/iconic-es-de/blob/main/theme.xml): root xml · Primary theme selector and bootstrap layout. · `theme.xml`
- [Simple theme](https://github.com/siddy212/iconic-es-de/blob/main/theme-simple.xml): root xml · Reduced-density theme entry for simpler layouts. · `theme-simple.xml`
- [Detailed theme](https://github.com/siddy212/iconic-es-de/blob/main/theme-detailed.xml): root xml · Higher-density theme entry with more layered presentation. · `theme-detailed.xml`
- [Game selector](https://github.com/siddy212/iconic-es-de/blob/main/gameselector.xml): ui xml · Entry for gamelist browsing behavior and screen selection. · `gameselector.xml`
- [Null screen](https://github.com/siddy212/iconic-es-de/blob/main/null.xml): ui xml · Fallback or empty-state layout used by the theme. · `null.xml`
- [Colors](https://github.com/siddy212/iconic-es-de/blob/main/colors.xml): palette xml · Theme-wide color definitions and palette mode support. · `colors.xml`
- [Capabilities](https://github.com/siddy212/iconic-es-de/blob/main/capabilities.xml): feature xml · Declares supported theme features and layout capabilities. · `capabilities.xml`
- **Aspect matrix**: layout set · Screen-shape variants split into simple and detailed presentations.

### Shared assets

Reusable imagery, fonts, sounds, and system libraries.

- [System assets](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems): asset library · Shared backgrounds, overlays, icons, fonts, and sounds for system browsing. · `_inc/systems`
- [Bg variants](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/default-backgrounds): background sets · Default, classic, modern, alternate, and custom background layers. · `_inc/systems/default-backgrounds`
- [Overlay variants](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/default-overlay): overlay sets · Default, classic, modern, alternate, and custom overlay layers. · `_inc/systems/default-overlay`
- [Carousel icons](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/carousel-icons): icon assets · System icon artwork used by browsing layouts. · `_inc/systems/carousel-icons`
- [UI sounds](https://github.com/siddy212/iconic-es-de/tree/main/_inc/sounds): sound assets · Navigation and selection feedback used by ES-DE. · `_inc/sounds`

### Metadata maps

System-to-artwork mapping layers used by ES-DE.

- [Global maps](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/metadata-global): metadata xml · Broad system and collection mappings for standard theme styling. · `_inc/systems/metadata-global`
- [Custom maps](https://github.com/siddy212/iconic-es-de/tree/main/_inc/systems/metadata-custom): metadata xml · Alternative mappings and artwork hooks for custom art styles. · `_inc/systems/metadata-custom`

### Branded themes

Dedicated collection and franchise presentation themes.

- **Branded sets**: theme folders · Dedicated presentation themes for collections and franchises.
- [Custom collections](https://github.com/siddy212/iconic-es-de/blob/main/custom-collections/theme.xml): theme folder · Theme package for user-defined collections and curated lists. · `custom-collections/theme.xml`
- [Mario](https://github.com/siddy212/iconic-es-de/blob/main/mario/theme.xml): theme folder · Branded theme for the Mario collection. · `mario/theme.xml`
- [Zelda](https://github.com/siddy212/iconic-es-de/blob/main/zelda/theme.xml): theme folder · Branded theme for the Zelda collection. · `zelda/theme.xml`
- [Pokémon](https://github.com/siddy212/iconic-es-de/blob/main/pokemon/theme.xml): theme folder · Branded theme for the Pokémon collection. · `pokemon/theme.xml`
- [Sonic](https://github.com/siddy212/iconic-es-de/blob/main/sonic-the-hedgehog/theme.xml): theme folder · Branded theme for the Sonic collection. · `sonic-the-hedgehog/theme.xml`
- [Final Fantasy](https://github.com/siddy212/iconic-es-de/blob/main/final-fantasy/theme.xml): theme folder · Branded theme for the Final Fantasy collection. · `final-fantasy/theme.xml`
- [Sailor Moon](https://github.com/siddy212/iconic-es-de/blob/main/sailor-moon/theme.xml): theme folder · Branded theme for the Sailor Moon collection. · `sailor-moon/theme.xml`
- [Vocaloid](https://github.com/siddy212/iconic-es-de/blob/main/vocaloid/theme.xml): theme folder · Branded theme for the Vocaloid collection. · `vocaloid/theme.xml`
- [Tetris](https://github.com/siddy212/iconic-es-de/blob/main/tetris/theme.xml): theme folder · Branded theme for the Tetris collection. · `tetris/theme.xml`
- [Now playing](https://github.com/siddy212/iconic-es-de/blob/main/now-playing/theme.xml): theme folder · Presentation theme for currently playing content. · `now-playing/theme.xml`
- [Completed](https://github.com/siddy212/iconic-es-de/blob/main/completed/theme.xml): theme folder · Presentation theme for completed content. · `completed/theme.xml`

### Runtime

ES-DE interprets these files at render time.

- **ES-DE**: runtime engine · Hosts the theme and resolves layouts, metadata, and media at runtime.

## Connections

- ES-DE → Theme entry: loads · ES-DE starts from the main theme entry.
- ES-DE → Simple theme: loads · ES-DE can select the simplified root layout.
- ES-DE → Detailed theme: loads · ES-DE can select the detailed root layout.
- ES-DE → Game selector: loads · ES-DE uses gamelist browsing layouts from this entry.
- ES-DE → Null screen: fallback · Used when the theme needs an empty or neutral screen.
- Theme entry → Colors: uses · Theme entry pulls palette definitions.
- Theme entry → Capabilities: declares · Theme entry advertises supported features.
- Theme entry → Aspect matrix: routes · Selects aspect-ratio-specific layouts.
- Simple theme → Aspect matrix: routes · Simple density still follows the aspect-ratio matrix.
- Detailed theme → Aspect matrix: routes · Detailed density still follows the aspect-ratio matrix.
- Game selector → System assets: composes · Game browsing screens draw from the shared system library.
- System assets → Bg variants: includes · Background sets are one layer of the shared library.
- System assets → Overlay variants: includes · Overlay sets are layered on top of the base screens.
- System assets → Carousel icons: includes · Carousel and system icons are part of the shared library.
- System assets → UI sounds: includes · UI sounds are loaded directly by ES-DE.
- System assets → Global maps: indexed by · Global metadata maps connect system ids to presentation rules.
- System assets → Custom maps: indexed by · Custom metadata maps provide alternate artwork hooks.
- Global maps → Branded sets: maps · Global mappings include collection and franchise themes.
- Custom maps → Branded sets: maps · Custom mappings can redirect to branded presentation sets.
- Branded sets → Custom collections: contains · Collection-focused theme folder.
- Branded sets → Mario: contains · Franchise-specific theme folder.
- Branded sets → Zelda: contains · Franchise-specific theme folder.
- Branded sets → Pokémon: contains · Franchise-specific theme folder.
- Branded sets → Sonic: contains · Franchise-specific theme folder.
- Branded sets → Final Fantasy: contains · Franchise-specific theme folder.
- Branded sets → Sailor Moon: contains · Franchise-specific theme folder.
- Branded sets → Vocaloid: contains · Franchise-specific theme folder.
- Branded sets → Tetris: contains · Franchise-specific theme folder.
- Branded sets → Now playing: contains · State-based theme folder.
- Branded sets → Completed: contains · State-based theme folder.
- Global maps → ES-DE: consumed by · ES-DE metadata state selects which XML branch and assets are rendered.
- Aspect matrix → System assets: pulls · Aspect-specific layouts use shared media assets.
