kmeisthax / retrogram

Binary program analysis toolkit
7 stars 1 forks source link

Analysis in banks yields excessively contextualized pointers #3

Open kmeisthax opened 3 years ago

kmeisthax commented 3 years ago

In Telefang, disassemble 4:4000. The resulting code will have excessively contextualized pointers, like so:

ENTER_4_4000:
    ld a, [$PR_4!c3e1]
    ld hl, 16394
    call $PR_4!e97
    jp [hl]

The PR_4 is the internal string form of a ROM context on this platform; those are WRAM and HOME pointers though, so their contexts should be stripped when analyzing.

kmeisthax commented 3 years ago

I've managed to fix actual code references, but I'm not sure where or how to fix data references. Possibly because we don't actually do anything with data references.