From bbd778b390698f48e8fa9ef6ace00f22830aea2f Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 21 Oct 2026 06:55:42 +0200 Subject: [PATCH] fix: file nicaiemu and coolbaremu as one system The buildbot serves nicaiemu_libretro (frozen at 4c9b73f7, last built 2026-10-16 05:15) beside coolbaremu_libretro. They are two builds: each reads its own orientation list from the system directory, so both profiles stay, each with its own core name. Both read the same .cbe archives from the same workspace, which builds a standalone binary at both revisions: one system id and one build type for the two. --- emulators/coolbaremu.yml | 8 ++++++-- emulators/nicaiemu.yml | 14 ++++++++++---- tests/test_profile_sync.py | 30 ++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/emulators/coolbaremu.yml b/emulators/coolbaremu.yml index 37ef0198..9894753e 100644 --- a/emulators/coolbaremu.yml +++ b/emulators/coolbaremu.yml @@ -1,5 +1,5 @@ emulator: "CoolbarEmu" -type: libretro +type: standalone + libretro core_classification: official_port source: "https://github.com/AloysHF/CoolbarEmu" upstream: "https://github.com/AloysHF/CoolbarEmu" @@ -34,7 +34,11 @@ notes: | the built-in table (crates/coolbaremu-libretro/src/libretro/api.rs:45, crates/coolbaremu-libretro/src/libretro/api.rs:369-399, crates/coolbaremu-core/src/orientation_profile.rs:31-54). A missing file is - logged and the built-in table applies. + logged and the built-in table applies. The standalone binary reads and + writes only the files named on its command line, --orientation-profile, + --screenshot, --save-state and --load-state + (crates/coolbaremu/src/main.rs:105-108, crates/coolbaremu/src/main.rs:153-167, + crates/coolbaremu/src/main.rs:186-187). files: [] diff --git a/emulators/nicaiemu.yml b/emulators/nicaiemu.yml index e250b0bc..dbb585e0 100644 --- a/emulators/nicaiemu.yml +++ b/emulators/nicaiemu.yml @@ -1,6 +1,6 @@ emulator: NicaiEmu type: standalone + libretro -core_classification: pure_libretro +core_classification: frozen_snapshot source: "https://github.com/AloysHF/CoolbarEmu" upstream: "https://github.com/AloysHF/CoolbarEmu" profiled_date: "2026-10-21" @@ -11,7 +11,7 @@ display_name: "MStar - Nicai (NicaiEmu)" cores: - nicaiemu systems: - - mstar-nicai + - coolbar notes: | Emulator for Nicai/MStar CBE (Cool Bar Engine) phone games written in @@ -43,8 +43,14 @@ notes: | crates/nicaiemu-libretro/src/libretro/api.rs:365-399, crates/nicaiemu-core/src/orientation_profile.rs:132-140). A missing file is logged and the built-in table applies. The standalone binary reads - and writes only the files named by --load-state and --save-state - (crates/nicaiemu/src/main.rs:160-166). + and writes only the files named on its command line, --orientation-profile, + --screenshot, --save-state and --load-state + (crates/nicaiemu/src/main.rs:104-107, crates/nicaiemu/src/main.rs:152-166, + crates/nicaiemu/src/main.rs:185-186). + + The buildbot publishes nicaiemu_libretro next to coolbaremu_libretro, and + the two cores read different system files: nicaiemu_orientation.csv here, + coolbaremu_orientation.csv in the coolbaremu core built after the rename. exclusion_note: "The firmware services are reimplemented in the core, glyphs come from the unifont crate and MIDI is synthesised without a bank. The system directory holds only an optional user-written orientation list, and the .info declares firmware_count = 0." files: [] diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index ba694379..dd69ddb3 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -2710,6 +2710,36 @@ class TestDeliberatelyFrozenPin(TestBuildReport): with self.subTest(profile=name): self.assertTrue(str(profiles[name].get("pin_frozen") or "").strip()) + def test_a_frozen_build_files_its_content_with_the_build_that_follows(self): + # AloysHF/NicaiEmu became AloysHF/CoolbarEmu (PR #78). The buildbot + # still serves nicaiemu_libretro, built from 4c9b73f7, beside + # coolbaremu_libretro. Both read the same .cbe archives, yet the two + # profiles named two systems and two build types, so --system for + # either missed the other core. + from common import load_emulator_profiles # noqa: PLC0415 + + root = Path(__file__).resolve().parents[1] / "emulators" + profiles = load_emulator_profiles(str(root)) + by_source: dict[str, list[str]] = {} + for name, profile in profiles.items(): + source = profile.get("source") + if isinstance(source, str): + by_source.setdefault(source.rstrip("/").lower(), []).append(name) + pairs = 0 + for names in by_source.values(): + frozen = [n for n in names if str(profiles[n].get("pin_frozen") or "").strip()] + live = [n for n in names if n not in frozen] + for old in frozen: + for new in live: + pairs += 1 + with self.subTest(frozen=old, live=new): + self.assertEqual( + sorted(profiles[old].get("systems") or []), + sorted(profiles[new].get("systems") or []), + ) + self.assertEqual(profiles[old].get("type"), profiles[new].get("type")) + self.assertGreaterEqual(pairs, 3) + def test_an_ordinary_profile_is_unaffected(self): self.files[("pinsha", "a.c")] = ["x", "hit"] self.files[("headsha", "a.c")] = ["pad", "x", "hit"]