diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-01-17 01:33:46 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-01-17 01:33:46 -0600 |
commit | f01ad092a54893344157ad6d275febaa7d8d124c (patch) | |
tree | b02a646becc0d3be6ffccd4898d7c8f4a1e44031 /extras/analyze_texts.py | |
parent | 5f7bb0da7269ba8b89c42f22d635f8e403976fbf (diff) |
TX_RAM for text engine command $1 in pretty_text
hg-commit-id: e4f95976fef8
Diffstat (limited to 'extras/analyze_texts.py')
-rw-r--r-- | extras/analyze_texts.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/extras/analyze_texts.py b/extras/analyze_texts.py index 36d80413..780bc08e 100644 --- a/extras/analyze_texts.py +++ b/extras/analyze_texts.py @@ -385,7 +385,7 @@ def find_missing_08s(all_texts): def text_pretty_printer_at(start_address, label="SomeLabel"): commands = parse_text_script(start_address, None, None) - needs_to_begin_with_0 = False + needs_to_begin_with_0 = True #how should this be determined? wanted_command = None if needs_to_begin_with_0: @@ -403,11 +403,28 @@ def text_pretty_printer_at(start_address, label="SomeLabel"): first_line = True for this_command in commands.keys(): - if not "lines" in commands[this_command].keys(): continue + if not "lines" in commands[this_command].keys(): + command = commands[this_command] + if command["type"] == 0x1: + if first_line: + output = "\n" + output += label + ": ; " + hex(start_address) + "\n" + first_line = False + p1 = command["pointer"][0] + p2 = command["pointer"][1] + + #remember to account for big endian -> little endian + output += spacing + "TX_RAM $" + hex(p2)[2:] + hex(p1)[2:] + "\n" + + byte_count += 3 + + #everything else is for $0s, really + continue lines = commands[this_command]["lines"] #add the ending byte to the last line- always seems $57 - lines[len(lines.keys())-1].append(commands[1]["type"]) + #this should already be in there, but it's not because of a bug in the text parser + lines[len(lines.keys())-1].append(commands[len(commands.keys())-1]["type"]) if first_line: output = "\n" |