import struct, sys, io sys.stdout=io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') DUMP=r"C:/Users/vikto/Documents/Claude/rt-4d/radio-spi-dump.bin" data=open(DUMP,'rb').read() # 0x126000 decode as call-log. Fields observed: # b0=00, b1=type(1=priv/grp,2=?), b2=01, b3=00, b4-5=?, b6-9=dmr_id LE, b10-13=counter LE, # b14-19 = YY MM DD HH MM SS, rest 0 print("### 0x126000 decoded call-log entries ###") for i in range(16): o=0x126000+i*32 r=data[o:o+32] if r[14]==0 and all(b==0 for b in r[:14]): break b1=r[1]; b4=struct.unpack('>row)&1 else ' ' print(line.rstrip()) # 0x03E000 twin: what is at 0x01E000 exactly and how does it relate to zones? print("\n### 0x01E000 (inside zones region) full ###") def hd(off,n): out=[] for i in range(0,n,16): c=data[off+i:off+i+16] h=' '.join(f'{b:02x}' for b in c) a=''.join(chr(b) if 32<=b<127 else '.' for b in c) out.append(f'{off+i:08x} {h:<47} {a}') return '\n'.join(out) print(hd(0x01e000,48)) # Is 0x01E000 the tail of the last zone slot? zones start 0x01C000, 512B each. 0x01E000 = slot 16. print(f"0x01E000 is zone slot #{(0x01E000-0x01C000)//512}") # The DTCN A/B marker in beta is at page+0xFF8. 0x01dffc had ff ff ff ff before DMRhub. # So 0x01E000 likely a settings/identity page, twinned at 0x03E000.