[pypy-svn] r54593 - pypy/branch/gameboy-emulator/pypy/lang/gameboy
cami at codespeak.net
cami at codespeak.net
Fri May 9 15:26:54 CEST 2008
Author: cami
Date: Fri May 9 15:26:54 2008
New Revision: 54593
Modified:
pypy/branch/gameboy-emulator/pypy/lang/gameboy/cartridge.py
pypy/branch/gameboy-emulator/pypy/lang/gameboy/serial.py
Log:
fixed some bugs, tested with more annotations
Modified: pypy/branch/gameboy-emulator/pypy/lang/gameboy/cartridge.py
==============================================================================
--- pypy/branch/gameboy-emulator/pypy/lang/gameboy/cartridge.py (original)
+++ pypy/branch/gameboy-emulator/pypy/lang/gameboy/cartridge.py Fri May 9 15:26:54 2008
@@ -156,10 +156,10 @@
def load(self, cartridgeFilePath):
- self.cartridgeFilePath = cartridgeFilePath
- self.cartridgeName = os.path.basename(cartridgeFilePath)
- self.cartridgeFile = open(cartridgeFilePath)
- self._load_battery(cartridgeFilePath)
+ self.cartridgeFilePath = str(cartridgeFilePath)
+ self.cartridgeName = os.path.basename(self.cartridgeFilePath)
+ self.cartridgeFile = open(self.cartridgeFilePath)
+ self._load_battery(self.cartridgeFilePath)
def _load_battery(self, cartridgeFilePath):
Modified: pypy/branch/gameboy-emulator/pypy/lang/gameboy/serial.py
==============================================================================
--- pypy/branch/gameboy-emulator/pypy/lang/gameboy/serial.py (original)
+++ pypy/branch/gameboy-emulator/pypy/lang/gameboy/serial.py Fri May 9 15:26:54 2008
@@ -1,5 +1,6 @@
from pypy.lang.gameboy import constants
+from pypy.lang.gameboy.interrupt import *
class Serial(object):
"""
@@ -8,6 +9,7 @@
"""
def __init__(self, interrupt):
+ assert isinstance(interrupt, Interrupt)
self.interrupt = interrupt
self.reset()
More information about the Pypy-commit
mailing list