[pypy-svn] r62270 - pypy/trunk/pypy/lang/gameboy

tverwaes at codespeak.net tverwaes at codespeak.net
Sat Feb 28 02:10:06 CET 2009


Author: tverwaes
Date: Sat Feb 28 02:10:05 2009
New Revision: 62270

Modified:
   pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py
   pypy/trunk/pypy/lang/gameboy/video.py
Log:
translates with RSDL; the nintendo logo appears and the hello world cartridge
works!


Modified: pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py	Sat Feb 28 02:10:05 2009
@@ -7,7 +7,7 @@
 from pypy.lang.gameboy.timer import Clock
 from pypy.lang.gameboy import constants
 
-use_rsdl = False
+use_rsdl = True
 if use_rsdl:
     from pypy.rlib.rsdl import RSDL, RSDL_helper
     from pypy.rpython.lltypesystem import lltype, rffi
@@ -48,8 +48,7 @@
         return 0
     
     def emulate_cycle(self):
-        print "Emulating!"
-        self.joypad_driver.button_up(True)
+        # self.joypad_driver.button_up(True)
         self.handle_events()
         self.emulate(constants.GAMEBOY_CLOCK >> 2)
         if use_rsdl:

Modified: pypy/trunk/pypy/lang/gameboy/video.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video.py	Sat Feb 28 02:10:05 2009
@@ -96,7 +96,10 @@
         attribute = [-1] * 4
         # assign the data to the correct attribute
         attribute[address % 4] = data
-        self.get_sprite(address).set_data(*attribute)
+        self.get_sprite(address).set_data(attribute[0],
+                                          attribute[1],
+                                          attribute[2],
+                                          attribute[3])
        
     def get_sprite(self, address):
         address -= constants.OAM_ADDR



More information about the Pypy-commit mailing list