[pypy-svn] r60214 - in pypy/trunk/pypy/lang/gameboy: . debug

tverwaes at codespeak.net tverwaes at codespeak.net
Fri Nov 28 20:03:15 CET 2008


Author: tverwaes
Date: Fri Nov 28 20:03:13 2008
New Revision: 60214

Modified:
   pypy/trunk/pypy/lang/gameboy/debug/gameboy_debug_entry_point.py
   pypy/trunk/pypy/lang/gameboy/gameboy_implementation.py
   pypy/trunk/pypy/lang/gameboy/video.py
   pypy/trunk/pypy/lang/gameboy/video_register.py
   pypy/trunk/pypy/lang/gameboy/video_sprite.py
Log:
bufgixing camillos code. Mostly swapping VRAM_DATA selection based on
upper_tile_map and fixing parentheses for shifting in get_pattern


Modified: pypy/trunk/pypy/lang/gameboy/debug/gameboy_debug_entry_point.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/debug/gameboy_debug_entry_point.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/debug/gameboy_debug_entry_point.py	Fri Nov 28 20:03:13 2008
@@ -21,8 +21,9 @@
 ROM_PATH    = str(py.magic.autopath().dirpath().dirpath())+"/rom"
 filename    = ROM_PATH + "/rom9/rom9.gb"
 SOCKET_PORT = 55680
-skipExecs   = 22545
-skipExecs   = 2700
+skipExecs   = 9999999
+# skipExecs   = 22545
+# skipExecs   = 2700
 # skipExecs   = 0
 
 # ------------------------------------------------------------------------------

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	Fri Nov 28 20:03:13 2008
@@ -7,7 +7,7 @@
 from pypy.lang.gameboy.timer import Clock
 from pypy.lang.gameboy import constants
 
-#    from pypy.rlib.rsdl import RSDL, RSDL_helper
+from pypy.rlib.rsdl import RSDL, RSDL_helper
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rlib.objectmodel import specialize
 import time

Modified: pypy/trunk/pypy/lang/gameboy/video.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video.py	Fri Nov 28 20:03:13 2008
@@ -571,6 +571,7 @@
         while x < GAMEBOY_SCREEN_WIDTH+SPRITE_SIZE:
             if self.control.background_and_window_lower_tile_data_selected:
                 tile = self.vram[tile_map]
+                assert tile == (tile & 0xFF)
             else:
                 tile = (self.vram[tile_map] ^ 0x80) & 0xFF
             self.draw_tile(x, tile_data + (tile << 4))
@@ -583,7 +584,7 @@
             self.line[x + i] = (pattern >> (7-i)) & 0x0101
                    
     def get_pattern(self, address):
-        return self.vram[address] +(self.vram[address + 1]) << 8
+        return self.vram[address] + (self.vram[address + 1] << 8)
 
 
     def draw_object_tile(self, x, address, flags):

Modified: pypy/trunk/pypy/lang/gameboy/video_register.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video_register.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video_register.py	Fri Nov 28 20:03:13 2008
@@ -125,6 +125,6 @@
     
     def get_selected_tile_data_space(self):
         if self.window.upper_tile_map_selected:
-            return constants.VRAM_DATA_A
+            return constants.VRAM_DATA_B
         else:
-            return  constants.VRAM_DATA_B
+            return constants.VRAM_DATA_A

Modified: pypy/trunk/pypy/lang/gameboy/video_sprite.py
==============================================================================
--- pypy/trunk/pypy/lang/gameboy/video_sprite.py	(original)
+++ pypy/trunk/pypy/lang/gameboy/video_sprite.py	Fri Nov 28 20:03:13 2008
@@ -242,4 +242,4 @@
         tile_data += (y & 7) << 1
         return tile_map, tile_data
     
-      
\ No newline at end of file
+      



More information about the Pypy-commit mailing list