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
9 files
+ 351
50
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 13
0
from time import time
from boytacean import GameBoy, CPU_FREQ
CLOCK_COUNT = 100000000
gb = GameBoy(apu_enabled=False, serial_enabled=False)
gb.load_rom("../../res/roms/demo/pocket.gb")
start = time()
cycles = gb.clocks(CLOCK_COUNT)
total = time() - start
print(f"Time taken: {total:.2f} seconds")
print(f"Speedup: {cycles / (CPU_FREQ * total):.2f}x")
gb.save_image("pocket.png")
Loading