How atc1441/action_104_games_and_pacman_doom works
This repository runs a single-player Doom port on two Action handheld consoles, replacing their stock firmware. At runtime, the console entry point initializes clocks and peripherals, then enters Doom; player input and timed game ticks drive play, while rendering, sound, and WAD assets provide the on-screen and audio result. The graph preserves major Doom subsystems and the board-specific hardware layer. Several engine relationships are documented only at a high level or have unsampled implementations, so uncertain links are omitted; dashed edges indicate README-level behavior.
Main entry points: i_system_console.c Console entry · g_game.c Game state · d_client.c Tick scheduler · i_sound_console.c Sound mixer
Components 18
Console platform
- Console entry
firmware/port/i_system_console.c - Board definitions
firmware/boards/pacman/board.h - SoC register map
firmware/sdk/soc.h - Clock control
firmware/sdk/clock.c - LCD driver
firmware/sdk/lcd.c - Button scanning
firmware/sdk/input.c - Audio output
firmware/sdk/audio.c
Doom runtime
- Doom entry
firmware/GBADoom/source/i_main.c - Tick scheduler
firmware/GBADoom/source/d_client.c
Gameplay systems
- Game state
firmware/GBADoom/source/g_game.c - World simulation
firmware/GBADoom/source/p_tick.c - Actor behavior
firmware/GBADoom/source/p_enemy.c - Game data tables
firmware/GBADoom/source/info.c
Presentation and assets
- Renderer
firmware/GBADoom/source/r_main.c - HUD and menus
firmware/GBADoom/source/st_stuff.c - WAD assets
firmware/GBADoom/source/w_wad.c - Sound mixer
firmware/port/i_sound_console.c
Other components
- Player
Connections 16
- Player → Button scanning: presses
- Console entry → Clock control: initializes
firmware/port/i_system_console.c - Console entry → LCD driver: initializes
firmware/port/i_system_console.c - Console entry → Button scanning: initializes
firmware/port/i_system_console.c - Console entry → Doom entry: calls
firmware/port/i_system_console.c - Board definitions → SoC register map: uses registers
firmware/boards/pacman/board.h - Tick scheduler → Game state: ticks
firmware/GBADoom/source/d_client.c - Tick scheduler → HUD and menus: ticks menus
firmware/GBADoom/source/d_client.c - Game state → World simulation: advances
- World simulation → Actor behavior: updates
- Game state → Renderer: renders
- Game state → HUD and menus: updates display
- Sound mixer → WAD assets: reads samples
firmware/port/i_sound_console.c - Sound mixer → Audio output: streams audio
- Renderer → LCD driver: draws frames
- Actor behavior → Game data tables: uses definitions
firmware/GBADoom/source/info.c