From b3545d3cc4f8034c2a579474069548f9e9187be1 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:26:24 +0200 Subject: [PATCH] fix: name the TOS images launchers pass to Hatari Batocera, Recalbox and RetroBat choose the TOS file and pass its name to standalone Hatari (--tos, szTosImageFileName) or to hatariB (hatarib_tos): hatariGenerator.py:74-75, 158-193 (Batocera), Hatari.Generator.cs:144-154 (RetroBat). The libretro build still opens tos.img only. The names are aliases of tos.img. --- emulators/hatari.yml | 21 ++++++++++++++++++--- emulators/hatarib.yml | 12 +++++++++++- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/emulators/hatari.yml b/emulators/hatari.yml index ff0bde5b..8ce8184a 100644 --- a/emulators/hatari.yml +++ b/emulators/hatari.yml @@ -115,11 +115,26 @@ files: min_size: 64 max_size: 1048576 validation: [size] - source_ref: "source src/retro/main_retro.c:157-207, source src/retro/main_retro.c:250-261, source src/options.c:1937-1945, source src/tos.c:60-66, source src/tos.c:976-1097, source src/tos.c:838-969, source src/file.c:312-353" + aliases: [tos100fr.img, tos100us.img, tos102.img, tos102de.img, tos102fr.img, tos102uk.img, tos104.img, tos104de.img, tos104es.img, tos104fr.img, tos104uk.img, tos104us.img, tos106.img, tos106de.img, tos106es.img, tos106fr.img, tos106uk.img, tos106us.img, tos162de.img, tos162fr.img, tos162uk.img, tos162us.img, tos205de.img, tos205es.img, tos205fr.img, tos205it.img, tos205us.img, tos206.img, tos206de.img, tos206fr.img, tos206uk.img, tos206us.img, tos306de.img, tos306uk.img, tos400.img, tos402.img, tos404.img, st.img, ste.img, megaste.img, tt.img, falcon.img, emutos.img] + source_ref: "source src/retro/main_retro.c:157-207, source src/retro/main_retro.c:250-261, source src/options.c:1937-1945, source src/configuration.c:489, source src/tos.c:60-66, source src/tos.c:976-1097, source src/tos.c:838-969, source src/file.c:312-353" note: > 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. + carry this exact name in the libretro build: retro_init only enables + emulation when /tos.img exists. Hatari built as its own + program opens whatever file --tos or the szTosImageFileName key of + hatari.cfg names (src/options.c:1937-1940, src/configuration.c:489, + src/tos.c:983), and the aliases are the names the platform launchers + give it. Batocera passes tos.img from the BIOS + root, trying the chosen version then each machine's list and the + languages us, uk, de, es, fr, it, nl, ru, se and none in turn + (configgen generators/hatari/hatariGenerator.py:74-75, 158-193). + Recalbox writes atarist/st.img, ste.img, megaste.img, tt.img or + falcon.img by machine, then tos.img, then emutos.img, and emutos.img + for any content whose path names emutos + (configgen generators/hatari/hatariGenerator.py:151-167). RetroBat + writes hatari/tos/ followed by the hatari_tos option, tos206.img, + tos106.img, tos104.img, tos102.img or emutos.img, and tos.img at the + BIOS root otherwise (emulatorlauncher Generators/Hatari.Generator.cs:144-154). - name: "tos.sym" path: "tos.sym" diff --git a/emulators/hatarib.yml b/emulators/hatarib.yml index 8905bec7..d23a26fb 100644 --- a/emulators/hatarib.yml +++ b/emulators/hatarib.yml @@ -106,12 +106,22 @@ files: min_size: 64 max_size: 1048576 validation: [size] + aliases: [tos102.img, tos104.img, tos106.img, tos206.img, emutos.img, st.img, ste.img, megaste.img, tt.img, falcon.img] source_ref: "source core/core_file.c:791-851, source core/core_config.c:68-92, source core/core_config.c:1112-1135, source core/core_config.c:1325-1340, source hatari/src/tos.c:1028-1160" note: > Any TOS 1.00 to 4.04, TOS 0.00, a RAM TOS or EmuTOS. Further images go in system/hatarib/ with an .img, .rom, .bin or .tos extension and are selected with the hatarib_tos option. Without tos.img the - built-in EmuTOS 192uk is the default. + built-in EmuTOS 192uk is the default. A hatarib_tos value that is not + one of the four special values is opened as a path under the system + directory (core/core_config.c:1121-1122), and the aliases are the + names the platform launchers write there. RetroBat sets + hatarib/tos206.img, tos106.img, tos104.img or tos102.img from its + hatarib_tos option (emulatorlauncher Generators/LibRetro.CoreOptions.cs:3167-3195), + and emutos.img in system/hatarib/ is listed by the scan like any other + image. Recalbox sets atarist/st.img, ste.img, megaste.img, tt.img or + falcon.img by machine, falling back to tos.img and the built-in + EmuTOS 1024k (configgen generators/libretro/libretroCores.py:211-229). - name: "etos1024k.img" description: "EmuTOS 1.4 1024 KB image, all machine types"