summaryrefslogtreecommitdiff
path: root/gbz80disasm.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-06-06 20:26:02 -0500
committerBryan Bishop <kanzure@gmail.com>2012-06-06 20:26:02 -0500
commit49477ae85ca575370da13f95985597fc9d66d5fe (patch)
tree4aa7d8b448a6b523f9773c91f2ae98ca44a743a3 /gbz80disasm.py
parent88d1cd8197b3e1dd3cd1bd8b545e7f58affa00fc (diff)
get RomStr from romstr.py in gbz80disasm
original-commit-id: 315edbe14bd630e3d4dbdbeb362fc9dacc0e358d
Diffstat (limited to 'gbz80disasm.py')
-rw-r--r--gbz80disasm.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/gbz80disasm.py b/gbz80disasm.py
index 9da064c..b7b2929 100644
--- a/gbz80disasm.py
+++ b/gbz80disasm.py
@@ -6,26 +6,24 @@ from copy import copy, deepcopy
from ctypes import c_int8
import json
import random
+from romstr import RomStr
+
spacing = "\t"
-#this was originally for renaming freeze maps for a unique name
+# this was originally for renaming freeze maps for a unique name
def random_hash():
available_chars = string.hexdigits[:16]
return ''.join(
random.choice(available_chars)
for dummy in xrange(5))
-class RomStr(str):
- """simple wrapper to prevent a giant rom from being shown on screen"""
- def __repr__(self):
- return "RomStr(too long)"
def load_rom(filename="../baserom.gbc"):
"""loads bytes into memory"""
global rom
file_handler = open(filename, "r")
rom = RomStr(file_handler.read())
file_handler.close()
- return rom
+ return rom
temp_opt_table = [
[ "ADC A", 0x8f, 0 ],