Hatari - RetroBIOS¶
Technical notes
The main branch of libretro/hatari is the upstream Hatari tree with its experimental libretro target in src/retro, which upstream added in January 2026, plus the port commits that follow the merge base recorded as upstream_commit: VFS, disk control, core options and hard disk loading. It builds as hatari_libretro (.gitlab-ci-libretro.yml:10-11, src/CMakeLists.txt:371-402), reports library_name hatari and the HATARI_VERSION string 2.6.1-devel (src/retro/main_retro.c:219-220, src/includes/version.h:8). The .info shipped in the tree declares no firmware (share/libretro/info/libretro-hatari.info); the hatari_libretro.info in libretro-core-info still describes the 1.8 port and its tos.img MD5, which this code never checks.
retro_init builds
The Hatari home directory is the RetroArch save directory
(src/paths.c:236-250). Configuration is read from
Content is a floppy image, an .m3u list parsed relative to its own
directory (src/retro/disk_control.c:96-184), an .ide image put on the
IDE master, a .vhd image put on ACSI 0 or a .gem marker naming a GEMDOS
directory (src/retro/main_retro.c:370-424, src/retro/harddisk.c:32-129).
With a .gem,
6 files | 1 required, 5 optional | 2 in repo, 4 missing
tos.img required in repo
Atari TOS ROM image
- Size: max 1.0 MB
- Validation: size
- Source:
src/retro/main_retro.c:157-204,src/retro/main_retro.c:251-262,src/options.c:1937-1945,src/tos.c:61-67,src/tos.c:976-1097,src/tos.c:838-969,src/file.c:298-339 - Platforms: batocera, lakka, recalbox, retroarch, retrobat, retrodeck, retropie, romm
- Any TOS 1.00 to 4.04, TOS 0.00, a RAM TOS or EmuTOS. The file must carry this exact name: retro_init only enables emulation when
/tos.img exists.
tos.sym optional missing user_provided
Symbol table for the TOS image, nm-style text or a program symbol table
- Source:
src/tos.c:1094,src/debug/symbols.c:1095-1113,src/debug/symbols.c:1002-1020,src/debug/symbols.c:372-407,src/configuration.c:621,src/includes/configuration.h:29-31 - Read next to tos.img at every TOS load when present; the symbols serve the built-in debugger.
cartridge ROM optional missing
Atari ST cartridge image loaded at 0xFA0000
- Size: min 40 B, max 128.0 KB
- Validation: size
- Source:
src/cart.c:39-46,src/cart.c:52-88,src/cart.c:97-105,src/cart.c:115-141,src/configuration.c:487-493,src/configuration.c:814 - Config key:
szCartridgeImageFileName - Set through hatari.cfg. Raw images up to 0x20000 bytes or .stc images of exactly 0x20004 bytes whose 4-byte header is skipped; extensions .img, .rom and .stc are tried when the configured path is missing. Replaced by the built-in GEMDOS trampoline whenever GEMDOS hard disk emulation, extended VDI or OS tracing is on.
BOOT.ST optional in repo
Boot floppy inserted with GEMDOS hard disk folders
- Path:
hatari/BOOT.ST - Source:
src/retro/harddisk.c:78-129,src/retro/main_retro.c:393-396 - Inserted into drive A when the content is a .gem file.
hatari.cfg optional missing user_provided
Hatari configuration file
- Source:
src/main.c:256-278,src/main.c:315-318,src/configuration.c:862-867,src/configuration.c:1061-1071,src/paths.c:236-250,CMakeLists.txt:440-457 - Read from
/hatari.cfg and then from hatari.cfg in the RetroArch save directory, before the --tos argument is applied.
hatari.nvram optional missing user_provided built-in fallback
TT and Falcon NVRAM contents, 50 bytes
- Size: min 50 B
- Validation: size
- Source:
src/falcon/nvram.c:96-97,src/falcon/nvram.c:116-141,src/falcon/nvram.c:148-171,src/falcon/nvram.c:282-294,src/falcon/nvram.c:334-337,src/paths.c:236-250,src/main.c:204 - Read from the RetroArch save directory at NvRam_Init; a short read keeps the built-in defaults. Saved back on exit.
Generated on 2026-09-14T09:03:09Z