mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 07:33:45 -06:00
feat: add the PlayStation reference frames
Bust-A-Move 2 (USA) on Beetle PSX, Beetle PSX HW, SwanStation, PCSX-ReARMed and PCSX1, each frame reviewed on its PNG. A boot needs a screen of the game: the BIOS screens alone are not one.
This commit is contained in:
1 parent
38dd7401fd
commit
b95bf466e8
3 files changed
+172
-8
No files matched your search
+16
-5
@@ -1197,8 +1197,8 @@ def judge(rep: dict, oracle: dict) -> tuple[str, dict]:
|
||||
"""The verdict of one repetition and the evidence that decided it.
|
||||
|
||||
In order: a worker killed after the timeout is a hang and one that died
|
||||
a crash, from the process status. A reference frame reached is a boot.
|
||||
Without one, an error pattern of the core log or a known error screen
|
||||
a crash, from the process status. A reference frame of the game reached
|
||||
is a boot: the console's own screens alone are not. Without one, an error pattern of the core log or a known error screen
|
||||
is a BIOS error. Every sampled frame of the second half one colour is a
|
||||
hang. Anything else is unknown: a run is never called a boot because
|
||||
its frames differ from another run's.
|
||||
@@ -1217,12 +1217,23 @@ def judge(rep: dict, oracle: dict) -> tuple[str, dict]:
|
||||
frames.append((int(rep.get("frames", 0)) + int(rep.get("warmup", 0)), final))
|
||||
references = {r["sha1"]: r for r in oracle.get("references") or ()}
|
||||
reached = [(frame, digest) for frame, digest in frames if digest in references]
|
||||
if reached:
|
||||
frame, digest = reached[0]
|
||||
stages = list(dict.fromkeys(references[d]["stage"] for _, d in reached))
|
||||
stages = list(dict.fromkeys(references[d]["stage"] for _, d in reached))
|
||||
game = [(frame, digest) for frame, digest in reached if references[digest]["stage"] == "game"]
|
||||
if game:
|
||||
frame, digest = game[0]
|
||||
return BOOTS, {"rule": "reference_frame",
|
||||
"detail": f"frame {frame} shows {references[digest]['shows']}",
|
||||
"frame": frame, "sha1": digest, "stages": stages}
|
||||
verdict, evidence = _without_the_game(rep, oracle, frames)
|
||||
if stages:
|
||||
# The console's own screens without one of the game: never a boot.
|
||||
evidence["stages"] = stages
|
||||
evidence["detail"] += ", after the BIOS screens and no screen of the game"
|
||||
return verdict, evidence
|
||||
|
||||
|
||||
def _without_the_game(rep: dict, oracle: dict, frames: list[tuple[int, str]]) -> tuple[str, dict]:
|
||||
"""The verdict of a run that reached no screen of the game."""
|
||||
for pattern in oracle.get("error_patterns") or ():
|
||||
for line in rep.get("logs") or ():
|
||||
if re.search(pattern, line["text"]):
|
||||
|
||||
Reference in new issue
Block a user