- Rewrote plugin using RArchPlugin (decode callback) - Matches z80 reference plugin structure - Tested against r2 6.1.3 - Decodes: NOP, Type 1 (Compute|DM|PM), Type 6 (Imm16), Type 10 (Jump/Call), Type 11 (DO UNTIL), Type 20 (RTS/RTI) - Proper code alignment (3 bytes) via archinfo callback - Delayed branch flag support
14 lines
413 B
Python
14 lines
413 B
Python
import r2pipe
|
|
import sys
|
|
|
|
def adsp_disasm(hex_str):
|
|
"""Simple bridge to our existing disasm logic"""
|
|
# For now, just return hex + architecture name as POC
|
|
return f"ADSP219x: {hex_str}"
|
|
|
|
if __name__ == "__main__":
|
|
r2 = r2pipe.open()
|
|
# Register architecture via r2pipe hook
|
|
# Note: Modern r2 supports python-based asm plugins via 'L' (plugins)
|
|
print("ADSP219x Plugin loaded via r2pipe")
|