ZornsLemma/py8dis

assertion fires when tracing a 16k ROM at 0xc000

Closed this issue · 1 comments

Loading a ROM at C000, such as os120, causes an assertion fail. Looks like an address of 0x10000 is put into a list.

macbook-air:examples ed$ env PYTHONPATH=../py8dis python3 os12.py
Traceback (most recent call last):
  File "/Users/ed/github/py8dis/examples/os12.py", line 14, in <module>
    go()
  File "/Users/ed/github/py8dis/py8dis/commands.py", line 758, in go
    trace.cpu.generate_references()
  File "/Users/ed/github/py8dis/py8dis/trace.py", line 189, in generate_references
    binary_addr, _ = movemanager.r2b(runtime_addr)
  File "/Users/ed/github/py8dis/py8dis/movemanager.py", line 165, in r2b
    relevant_move_ids = move_ids_for_runtime_addr(runtime_addr)
  File "/Users/ed/github/py8dis/py8dis/movemanager.py", line 137, in move_ids_for_runtime_addr
    assert memorymanager.is_valid_runtime_addr(runtime_addr)
AssertionError

Here's the control file

from commands import *

# Load the program to be disassembled into the debugger's memory.
# The md5sum is optional but helps avoid confusion if there are
# multiple versions of the same program.
load(0xc000, "os12.rom", "6502")

# Start tracing instructions at 0x2000.
#entry(0x2000)

# Add extra stuff here as the disassembly progresses...

# Use all the information provided to actually disassemble the program.
go()

This can probably be closed now.