summaryrefslogtreecommitdiff
path: root/pokemontools/vba/vba.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-09-21 16:07:51 -0500
committerBryan Bishop <kanzure@gmail.com>2013-09-21 16:07:51 -0500
commit55a436a1445027f7bf512cbf2b54392bbc0f99e0 (patch)
treec556f6226a3abbffcb229a024fa56e06763e7428 /pokemontools/vba/vba.py
parentd29f193037cad147fe99aca6216a2e35346f5780 (diff)
fix some memory manipulation to use vba_wrapper
Diffstat (limited to 'pokemontools/vba/vba.py')
-rw-r--r--pokemontools/vba/vba.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py
index e107d90..8fdff08 100644
--- a/pokemontools/vba/vba.py
+++ b/pokemontools/vba/vba.py
@@ -194,12 +194,12 @@ class crystal:
@staticmethod
def walk_through_walls_slow():
- memory = get_memory()
+ memory = vba.memory
memory[0xC2FA] = 0
memory[0xC2FB] = 0
memory[0xC2FC] = 0
memory[0xC2FD] = 0
- set_memory(memory)
+ vba.memory = memory
@staticmethod
def walk_through_walls():
@@ -420,7 +420,7 @@ class crystal:
"""
This causes corruption, so it's not working yet.
"""
- memory = get_memory()
+ memory = vba.memory
memory[0xdcd7] = 2
memory[0xdcd9] = 0x7
@@ -454,7 +454,7 @@ class crystal:
memory[0xdd33] = 0x10
memory[0xdd34] = 0x40
- set_memory(memory)
+ vba.memory = memory
@staticmethod
def wait_for_script_running(debug=False, limit=1000):
@@ -482,12 +482,12 @@ class crystal:
vba.press(cmd, hold=10, after=0)
vba.press([])
- memory = get_memory()
+ memory = vba.memory
#while memory[0xd4e1] == 2 and memory[0xd042] != 0x3e:
while memory[0xd043] in [0, 1, 2, 3]:
#while memory[0xd043] in [0, 1, 2, 3] or memory[0xd042] != 0x3e:
vba.step(count=10)
- memory = get_memory()
+ memory = vba.memory
class TestEmulator(unittest.TestCase):
def test_PlaceString(self):