diff --git a/src/mudlib/zmachine/zmemory.py b/src/mudlib/zmachine/zmemory.py index ade9adf..6a19266 100644 --- a/src/mudlib/zmachine/zmemory.py +++ b/src/mudlib/zmachine/zmemory.py @@ -5,7 +5,6 @@ # root directory of this distribution. # -from . import bitfield from .zlogging import log # This class that represents the "main memory" of the z-machine. It's @@ -317,9 +316,8 @@ class ZMemory: raise ZMemoryIllegalWrite(value) log(f"Write {value} to global variable {varnum}") actual_address = self._global_variable_start + ((varnum - 0x10) * 2) - bf = bitfield.BitField(value) - self._memory[actual_address] = bf[8:15] - self._memory[actual_address + 1] = bf[0:7] + self._memory[actual_address] = (value >> 8) & 0xFF + self._memory[actual_address + 1] = value & 0xFF # The 'verify' opcode and the QueztalWriter class both need to have # a checksum of memory generated.