How nukep/smbvanilla works
SMB Vanilla is a playable C/C++ reconstruction of Super Mario Bros. and Super Mario Bros. 2 Japan. The user supplies a ROM and launches the SDL frontend; the frontend initializes the game, gathers keyboard or movie input, advances the core, and presents frames through a renderer. The core contains shared gameplay and area logic plus game-specific SMB1 and SMB2J implementations. The README documents the two supported games and audio; source excerpts show frontend setup and renderer dispatch, but do not expose the complete frame loop or audio callback wiring, so uncertain links are omitted.
Main entry points: main_sdl.c SDL Application · smbcore.c Game API · config.h Runtime Config · common.c Shared Gameplay
Components 14
SDL Frontend
- SDL Application
src/platform/main_sdl.c - Runtime Config
src/platform/config.h - SDL Timer
src/platform/timer_sdl.c
Game Core
- Game API
src/smbcore/smbcore.c - Shared Gameplay
src/smbcore/common.c - Area Processing
src/smbcore/area.c - SMB1 Logic
src/smbcore/smb1only.c - SMB2J Logic
src/smbcore/smb2jonly.c
Presentation
- OpenGL Renderer
src/platform/render_opengl.c - Raster Renderer
src/platform/render_raster.c
Input and Audio
- Movie Playback
src/platform/movie.c - SDL Audio
src/platform/audio_sdl.cpp
Other components
- Player
- Game ROM
Connections 14
- Player → SDL Application: launches
README.md - Game ROM → SDL Application: loads
README.md - SDL Application → Runtime Config: reads settings
src/platform/main_sdl.c - Runtime Config → SDL Application: configures
src/platform/main_sdl.c - SDL Application → Game API: initializes game
src/platform/main_sdl.c - SDL Application → Movie Playback: plays input
src/platform/main_sdl.c - SDL Application → OpenGL Renderer: dispatches rendering
src/platform/main_sdl.c - SDL Application → Raster Renderer: dispatches rendering
src/platform/main_sdl.c - SDL Application → SDL Timer: uses timing
- SDL Application → SDL Audio: outputs audio
- Game API → Shared Gameplay: runs gameplay
- Game API → SMB1 Logic: selects SMB1
- Game API → SMB2J Logic: selects SMB2J
- Shared Gameplay → Area Processing: uses area logic