mirror of
https://github.com/maximumspatium/PowerRomDasm.git
synced 2025-03-12 00:08:13 +00:00
Add directive for fixed-length strings.
This commit is contained in:
parent
8f12291508
commit
728bb708ff
@ -228,6 +228,11 @@ class ROMDisassembler:
|
||||
print("PPC disassembler not implemented yet")
|
||||
else:
|
||||
print("Unknown code region architecture " + entry['arch'])
|
||||
elif entry['type'] == 'fixlenstr': # fixed-length string
|
||||
print(hex(self.start_addr + offset).ljust(15), end='')
|
||||
str_len = entry['size']
|
||||
fmt_str = '%is' % str_len
|
||||
print('"%s"' % struct.unpack(fmt_str, self.rom_data[offset:offset+str_len])[0].decode('mac_roman'))
|
||||
|
||||
return entry['size']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user