open memory files in binary mode

This commit is contained in:
Greg Hewgill 2011-08-18 21:21:42 +12:00
parent c36ad8b662
commit 9ffbf63716

View File

@ -25,7 +25,7 @@ class ROM:
self._mem[address - self.start + offset] = datum
def load_file(self, address, filename):
with open(filename) as f:
with open(filename, "rb") as f:
for offset, datum in enumerate(f.read()):
self._mem[address - self.start + offset] = ord(datum)