summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-03-23 23:36:39 -0500
committerBryan Bishop <kanzure@gmail.com>2012-03-23 23:36:39 -0500
commitfa5e1f08b788684c4293168db7f5d3198c4cb50f (patch)
tree8393029b18c3dffcae289e580c03400325afd789
parent1506ff6aaf46ea76420383b5386574ad6d039f84 (diff)
rom_text_at just dumps text straight from the ROM
original-commit-id: 253c897bbd4198632a0d789800c9cd44f861d4c2
-rw-r--r--crystal.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/crystal.py b/crystal.py
index 91e87e3..75e21b3 100644
--- a/crystal.py
+++ b/crystal.py
@@ -569,6 +569,11 @@ def parse_text_at(address, count=10):
see parse_text_at2 for pretty printing"""
return parse_text_from_bytes(rom_interval(address, count, strings=False))
+def rom_text_at(address, count=10):
+ """prints out raw text from the ROM
+ like for 0x112110"""
+ return "".join([chr(x) for x in rom_interval(address, count, strings=False)])
+
def parse_text_at2(address, count=10):
"""returns a string of text from an address
this does not handle text commands"""
@@ -702,6 +707,8 @@ def parse_text_engine_script_at(address, map_group=None, map_id=None, debug=True
global rom, text_count, max_texts, texts
if rom == None:
load_rom()
+ if address == None:
+ return "not a script"
commands = {}
total_text_commands = 0