import sys

f = open(r"C:/Users/vikto/Documents/Claude/rt-4d/radio-spi-dump.bin","rb")
data = f.read()
f.close()
print("filesize", len(data))

def hexdump(off, n=256):
    for i in range(0, n, 16):
        chunk = data[off+i:off+i+16]
        h = ' '.join('%02x'%b for b in chunk)
        a = ''.join(chr(b) if 32<=b<127 else '.' for b in chunk)
        print('%08x  %-47s  %s'%(off+i, h, a))

for base in (0x198000, 0x352000, 0x3F0000):
    print("="*80)
    print("BLOB @ %08x"%base)
    hexdump(base, 512)
