[pypy-svn] r55225 - pypy/dist/pypy/lang/gameboy
cami at codespeak.net
cami at codespeak.net
Mon May 26 00:56:08 CEST 2008
Author: cami
Date: Mon May 26 00:56:07 2008
New Revision: 55225
Modified:
pypy/dist/pypy/lang/gameboy/cpu.py
pypy/dist/pypy/lang/gameboy/gameboy.py
pypy/dist/pypy/lang/gameboy/gameboyImplementation.py
Log:
change videodriver so we have a nice terminal window ;)
Modified: pypy/dist/pypy/lang/gameboy/cpu.py
==============================================================================
--- pypy/dist/pypy/lang/gameboy/cpu.py (original)
+++ pypy/dist/pypy/lang/gameboy/cpu.py Mon May 26 00:56:07 2008
@@ -183,7 +183,7 @@
def c_flag_compare(self, value, compare_and=0x01, reset=False):
if reset:
self.reset()
- print hex(value), hex(compare_and), (value & compare_and) != 0
+ #print hex(value), hex(compare_and), (value & compare_and) != 0
self.c_flag = ((value & compare_and) != 0)
def h_flag_compare(self, value, a, inverted=False):
@@ -383,7 +383,7 @@
def fetch_execute(self):
# Execution
opCode = self.fetch()
- print " fetch exe:", hex(opCode), " "
+ #print " fetch exe:", hex(opCode), " "
#, FETCH_EXECUTE_OP_CODES[opCode].__name__
self.last_fetch_execute_op_code = opCode
FETCH_EXECUTE_OP_CODES[opCode](self)
@@ -391,11 +391,11 @@
def execute(self, opCode):
self.instruction_counter += 1
- print self.instruction_counter, "-"*60
- print "exe: ", hex(opCode), " "
+ #print self.instruction_counter, "-"*60
+ #print "exe: ", hex(opCode), " "
#, OP_CODES[opCode].__name__
- print " pc:", hex(self.pc.get()), "sp:", hex(self.sp.get())
- self.print_registers()
+ #print " pc:", hex(self.pc.get()), "sp:", hex(self.sp.get())
+ #self.print_registers()
self.last_op_code = opCode
OP_CODES[opCode](self)
Modified: pypy/dist/pypy/lang/gameboy/gameboy.py
==============================================================================
--- pypy/dist/pypy/lang/gameboy/gameboy.py (original)
+++ pypy/dist/pypy/lang/gameboy/gameboy.py Mon May 26 00:56:07 2008
@@ -96,7 +96,7 @@
self.joypad.emulate(count)
#self.print_cycles()
if count == 0:
- self.print_cycles()
+ #self.print_cycles()
return 0
ticks -= count
return 0
Modified: pypy/dist/pypy/lang/gameboy/gameboyImplementation.py
==============================================================================
--- pypy/dist/pypy/lang/gameboy/gameboyImplementation.py (original)
+++ pypy/dist/pypy/lang/gameboy/gameboyImplementation.py Mon May 26 00:56:07 2008
@@ -83,8 +83,9 @@
for y in range(self.height):
str = ""
for x in range(self.width):
- str += self.pixel_map(x, y)
- RSDL_helper.set_pixel(self.screen, x, y, self.get_pixel_color(x, y))
+ if y%2 == 0:
+ str += self.pixel_map(x, y)*2
+ #RSDL_helper.set_pixel(self.screen, x, y, self.get_pixel_color(x, y))
print str;
print "-"*60
More information about the Pypy-commit
mailing list