1
0

emualtor working

This commit is contained in:
Aiden
2026-05-25 21:00:25 +10:00
parent 3ab79648ff
commit 752148c585
22 changed files with 588 additions and 22 deletions

View File

@@ -829,7 +829,7 @@ def _report_gate_decision(pc: int, *, f9c4: int, faa5: int, f9c3: int, head: int
if pc == 0x4063:
return "return_queue_not_empty" if not z else "enqueue_zero_report"
if pc == 0x4067:
return "write_report_00ff_to_queue_slot"
return "write_report_0000_to_queue_slot"
if pc == 0x406C:
return "advance_report_queue_head"
if pc == 0x4070:
@@ -1197,7 +1197,7 @@ def build_arg_parser() -> argparse.ArgumentParser:
action="append",
type=parse_watch_pc,
default=[],
help="highlight queue traces involving a logical report id, e.g. 00FF or 0x00FF",
help="highlight queue traces involving a logical report id, e.g. 0015 or 0x0015",
)
parser.add_argument("--report-queue-watch-hit-limit", type=int, default=32)
parser.add_argument(

View File

@@ -207,8 +207,9 @@ class H8536Emulator:
if op in (0x06, 0x07):
value = raw[-1] if op == 0x06 else int.from_bytes(raw[-2:], "big")
self._write_ea(ea, value, 1 if op == 0x06 else 2)
self._set_logic_flags(value, 1 if op == 0x06 else 2)
write_size = size if op == 0x06 else 2
self._write_ea(ea, value, write_size)
self._set_logic_flags(value, write_size)
return next_pc
base = op & 0xF8