Skip to content
Snippets Groups Projects
Verified Commit b9bc1374 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: new pyboy demo

parent b45f4b9d
No related branches found
No related tags found
1 merge request!36Support for Python
Pipeline #3599 passed
This commit is part of merge request !36. Comments created here will be created in the context of that merge request.
import boytacean
from time import time
from boytacean import GameBoy
gb = boytacean.GameBoy()
gb = GameBoy()
gb.load()
gb.load_rom("../../res/roms/demo/pocket.gb")
start = time()
for _ in range(6000):
gb.next_frame()
print(f"Time taken: {(time() - start)}")
gb.save_image("pocket.png")
from time import time
from pyboy import PyBoy
with PyBoy("../../res/roms/demo/pocket.gb", disable_renderer=True) as pyboy:
pyboy.set_emulation_speed(0)
print(pyboy.cartridge_title())
start = time()
for _ in range(6000):
pyboy.tick()
print(f"Time taken: {(time() - start)}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment