Eprom emulation
This commit is contained in:
@@ -181,6 +181,8 @@ class ReplayConfig:
|
||||
p9_fast_path: bool = True
|
||||
p9_fast_input: int = 0xFF
|
||||
p9_fast_optimistic_wrapper: bool = False
|
||||
p7_input: int = 0xFF
|
||||
eeprom_seed: str = "blank"
|
||||
|
||||
|
||||
def parse_bench_replay_log_text(text: str) -> BenchReplayLog:
|
||||
@@ -244,6 +246,8 @@ def run_bench_replay(log_path: Path, *, rom_path: Path | None = None, config: Re
|
||||
p9_fast_path_enabled=config.p9_fast_path,
|
||||
p9_fast_default_input_byte=config.p9_fast_input,
|
||||
p9_fast_default_wrapper_success=config.p9_fast_optimistic_wrapper,
|
||||
p7_input=config.p7_input,
|
||||
eeprom_seed=config.eeprom_seed,
|
||||
)
|
||||
|
||||
context = RunContext()
|
||||
@@ -369,6 +373,8 @@ def build_arg_parser() -> argparse.ArgumentParser:
|
||||
parser.add_argument("--no-p9-fast-path", action="store_true", help="disable shortcut handling for known P9 routines")
|
||||
parser.add_argument("--p9-fast-input", type=lambda text: int(text, 0), default=ReplayConfig.p9_fast_input)
|
||||
parser.add_argument("--p9-fast-optimistic-wrapper", action="store_true", help="legacy fallback for older wrapper experiments; known BFE0/BFFE wrappers use the X24164 model")
|
||||
parser.add_argument("--p7-input", type=lambda text: int(text, 0), default=ReplayConfig.p7_input, help="external P7 pin state for input bits; DIP-off board default is 0xFF")
|
||||
parser.add_argument("--eeprom-seed", choices=("blank", "factory"), default=ReplayConfig.eeprom_seed, help="initial X24164/shadow state before reset")
|
||||
parser.add_argument("--assert-bench-parity", action="store_true", help="exit nonzero if emulator behavior diverges from the bench log")
|
||||
parser.add_argument("--json", action="store_true", help="emit JSON")
|
||||
return parser
|
||||
@@ -392,6 +398,8 @@ def main(argv: list[str] | None = None) -> int:
|
||||
p9_fast_path=not args.no_p9_fast_path,
|
||||
p9_fast_input=args.p9_fast_input,
|
||||
p9_fast_optimistic_wrapper=args.p9_fast_optimistic_wrapper,
|
||||
p7_input=args.p7_input,
|
||||
eeprom_seed=args.eeprom_seed,
|
||||
),
|
||||
)
|
||||
if args.json:
|
||||
|
||||
Reference in New Issue
Block a user