[pypy-svn] r62405 - pypy/trunk/pypy/translator/goal

cami at codespeak.net cami at codespeak.net
Mon Mar 2 16:41:48 CET 2009


Author: cami
Date: Mon Mar  2 16:41:47 2009
New Revision: 62405

Modified:
   pypy/trunk/pypy/translator/goal/targetgbimplementation.py
Log:
removed the error catch


Modified: pypy/trunk/pypy/translator/goal/targetgbimplementation.py
==============================================================================
--- pypy/trunk/pypy/translator/goal/targetgbimplementation.py	(original)
+++ pypy/trunk/pypy/translator/goal/targetgbimplementation.py	Mon Mar  2 16:41:47 2009
@@ -1,11 +1,11 @@
-import os
-import py
-import pdb
+#!/usr/bin/env python
+import os, py, pdb, sys
 from pypy.lang.gameboy.gameboy_implementation import GameBoyImplementation
 
 
 ROM_PATH = str(py.magic.autopath().dirpath().dirpath().dirpath())+"/lang/gameboy/rom"
 
+use_rsdl = False
 
 def entry_point(argv=None):
     if argv is not None and len(argv) > 1:
@@ -13,6 +13,7 @@
     else:
         pos = str(9)
         filename = ROM_PATH+"/rom"+pos+"/rom"+pos+".gb"
+        filename=None
     print "loading rom: ", str(filename)
     gameBoy = GameBoyImplementation()
     try:
@@ -20,10 +21,7 @@
     except:
         print "Corrupt Cartridge"
         gameBoy.load_cartridge_file(str(filename), verify=False)
-    try:
-        gameBoy.mainLoop()
-    except:
-        pass
+    gameBoy.mainLoop()
     #pdb.runcall(gameBoy.mainLoop)
     return 0
     
@@ -34,13 +32,19 @@
     return entry_point, None
 
 def test_target():
-    entry_point(["b", ROM_PATH+"/rom9/rom9.gb"])
+    entry_point(sys.argv)
     
     
 # STARTPOINT ===================================================================
 
 if __name__ == '__main__':
-    from AppKit import NSApplication
-    NSApplication.sharedApplication()
+    if use_rsdl and sys.platform == 'darwin':
+        from AppKit import NSApplication
+        NSApplication.sharedApplication()
+    try:
+        import psyco
+        psyco.full()
+    except:
+        pass
     
     test_target()



More information about the Pypy-commit mailing list