mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
RetroAchievements' Arcade has sets for games Flycast runs (Atomiswave, NAOMI, NAOMI 2 and NAOMI GD-ROM) and for Gaelco games FinalBurn Neo runs. Since #5273 those folders have slugs of their own with no RetroAchievements console, so their games get no hash. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
1.9 KiB
Python
73 lines
1.9 KiB
Python
"""Arcade platform groupings shared by the providers, the player and the feeds."""
|
|
|
|
from collections.abc import Iterable, Mapping
|
|
from typing import Final
|
|
|
|
from utils.platform_slugs import UniversalPlatformSlug as UPS
|
|
|
|
# Platforms whose games are MAME or FinalBurn romsets.
|
|
ARCADE_SET_PLATFORMS: Final = frozenset(
|
|
{UPS.ARCADE, UPS.MAME, UPS.MAME_ADVMAME, UPS.FBNEO, UPS.FBA}
|
|
)
|
|
|
|
# Set platforms a browser emulator runs. None ships an AdvanceMAME core.
|
|
PLAYABLE_ARCADE_SET_PLATFORMS: Final = ARCADE_SET_PLATFORMS - {UPS.MAME_ADVMAME}
|
|
|
|
# Platforms RetroAchievements' Arcade has sets for: what FinalBurn Neo runs,
|
|
# Gaelco included, and what Flycast runs.
|
|
RA_ARCADE_PLATFORMS: Final = ARCADE_SET_PLATFORMS | {
|
|
UPS.ATOMISWAVE,
|
|
UPS.GAELCO,
|
|
UPS.NAOMI,
|
|
UPS.NAOMI2,
|
|
UPS.NAOMIGD,
|
|
}
|
|
|
|
# Every arcade platform. A provider without a platform of its own for one
|
|
# uses its Arcade entry instead.
|
|
ARCADE_PLATFORMS: Final = ARCADE_SET_PLATFORMS | {
|
|
UPS.ATOMISWAVE,
|
|
UPS.CHIHIRO,
|
|
UPS.DAPHNE,
|
|
UPS.DICE,
|
|
UPS.GAELCO,
|
|
UPS.HIKARU,
|
|
UPS.LINDBERGH,
|
|
UPS.MODEL2,
|
|
UPS.MODEL3,
|
|
UPS.NAMCO2X6,
|
|
UPS.NAMCO3XX,
|
|
UPS.NAOMI,
|
|
UPS.NAOMI2,
|
|
UPS.NAOMIGD,
|
|
UPS.SINGE,
|
|
UPS.STV,
|
|
UPS.TEKNOPARROT,
|
|
UPS.TRIFORCE,
|
|
UPS.TYPE_X,
|
|
}
|
|
|
|
# Platforms whose filenames are MAME shortnames: the set platforms, the boards
|
|
# MAME runs, and Neo Geo. Daphne and Singe sets are named differently.
|
|
MAME_SHORTNAME_PLATFORMS: Final = ARCADE_SET_PLATFORMS | {
|
|
UPS.ATOMISWAVE,
|
|
UPS.GAELCO,
|
|
UPS.HIKARU,
|
|
UPS.MODEL2,
|
|
UPS.MODEL3,
|
|
UPS.NAMCO2X6,
|
|
UPS.NAOMI,
|
|
UPS.NAOMI2,
|
|
UPS.NAOMIGD,
|
|
UPS.NEOGEOAES,
|
|
UPS.NEOGEOMVS,
|
|
UPS.STV,
|
|
}
|
|
|
|
|
|
def arcade_fallbacks[T](
|
|
platforms: Mapping[UPS, T], slugs: Iterable[UPS] = ARCADE_PLATFORMS
|
|
) -> dict[UPS, T]:
|
|
"""A provider's Arcade entry for each of `slugs` it has no entry of its own for."""
|
|
return {slug: platforms[UPS.ARCADE] for slug in slugs if slug not in platforms}
|