Skip to content
Snippets Groups Projects

Support for Python

Merged João Magalhães requested to merge joamag/python into master
Compare and Show latest version
4 files
+ 58
4
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 10
3
import boytacean
from time import time
from boytacean import GameBoy
gb = boytacean.GameBoy()
FRAME_COUNT = 12000
gb = GameBoy(apu_enabled=False, serial_enabled=False)
gb.load()
gb.load_rom("../../res/roms/demo/pocket.gb")
for _ in range(6000):
start = time()
for _ in range(FRAME_COUNT):
gb.next_frame()
total = time() - start
print(f"Time taken: {total} seconds")
print(f"Speedup: {FRAME_COUNT / total / 60}x")
gb.save_image("pocket.png")
Loading