1
0

Eprom emulation

This commit is contained in:
Aiden
2026-05-25 23:28:14 +10:00
parent 0819701b22
commit 3f9f03388c
12 changed files with 129 additions and 6 deletions

View File

@@ -92,11 +92,17 @@ class H8536Emulator:
p9_fast_path_enabled: bool = False,
p9_fast_default_input_byte: int = 0xFF,
p9_fast_default_wrapper_success: bool = False,
p7_input: int = 0xFF,
eeprom_seed: str = "blank",
) -> None:
if not rom_bytes:
raise ValueError("ROM image is empty")
if eeprom_seed not in {"blank", "factory"}:
raise ValueError("eeprom_seed must be 'blank' or 'factory'")
self.sci1 = SCI1()
self.memory = MemoryMap(rom_bytes, self.sci1)
self.memory = MemoryMap(rom_bytes, self.sci1, p7_input=p7_input)
if eeprom_seed == "factory":
self.memory.seed_factory_eeprom_and_shadow()
self.memory.p9_bus.default_wrapper_success = bool(p9_fast_default_wrapper_success)
self.p9_fast_path = p9_fast_path or P9FastPath(
P9FastPathConfig(enabled=p9_fast_path_enabled, default_input_byte=p9_fast_default_input_byte)