How mateusrodcosta/bign-handheld-thumbnailer works
This is a Freedesktop-compatible Nintendo DS/3DS ROM and homebrew thumbnailer. Its main workflow parses thumbnailer arguments, identifies the input MIME type, extracts a console-specific icon, optionally resizes it, and writes PNG output. The graph preserves the documented DS, SMDH, 3DSX, CIA, CXI, and CCI routes. Some wiring is based on the README and module tree where implementation excerpts were not provided; uncertain details are omitted.
Main entry points: main.rs CLI workflow · n3ds.rs 3DS format routing · cxi.rs CXI ExeFS extraction · structures.rs SMDH icon extraction
Components 15
Thumbnailer entry
- CLI workflow
src/main.rs - Argument parsing
src/args.rs - MIME detection
src/utils.rs
Nintendo DS
- NDS banner extraction
src/nds.rs - NDS icon structures
src/nds/structures.rs
Nintendo 3DS
- CIA extraction
src/n3ds/structures/cia.rs - CCI partition lookup
src/n3ds/structures/cci.rs - CXI ExeFS extraction
src/n3ds/structures/cxi.rs - SMDH icon extraction
src/n3ds/structures.rs - 3DS format routing
src/n3ds.rs
Icon rendering
- Pixel color conversion
src/utils/rgb888.rs - Resize and PNG output
src/main.rs
Other components
- Thumbnail service
- ROM or metadata file
- Thumbnail file
Connections 19
- Thumbnail service → CLI workflow: invokes
- CLI workflow → Argument parsing: parses arguments
- CLI workflow → MIME detection: detects MIME
- CLI workflow → ROM or metadata file: opens file
- CLI workflow → NDS banner extraction: dispatches NDS
- CLI workflow → 3DS format routing: dispatches 3DS
- NDS banner extraction → NDS icon structures: builds icon
- NDS banner extraction → Pixel color conversion: converts palette
- 3DS format routing → SMDH icon extraction: parses SMDH
- 3DS format routing → CIA extraction: parses CIA
- 3DS format routing → CCI partition lookup: parses CCI
- 3DS format routing → CXI ExeFS extraction: parses CXI
- CIA extraction → SMDH icon extraction: reads metadata icon
- CIA extraction → CXI ExeFS extraction: falls back to CXI
- CCI partition lookup → CXI ExeFS extraction: reads partition
- CXI ExeFS extraction → SMDH icon extraction: reads ExeFS icon
- SMDH icon extraction → Pixel color conversion: converts pixels
- CLI workflow → Resize and PNG output: resizes and saves
- Resize and PNG output → Thumbnail file: writes PNG