D
Deleted member 132407
Guest
GitHub - Baekalfen/PyBoy: Game Boy emulator written in Python
Game Boy emulator written in Python. Contribute to Baekalfen/PyBoy development by creating an account on GitHub.
class PyBoy (gamerom, *, window='SDL2', scale=3, symbols=None, bootrom=None, sound_volume=100, sound_emulated=True, sound_sample_rate=None, cgb=None, gameshark=None, no_input=False, log_level='ERROR', color_palette=(16777215, 10066329, 5592405, 0), cgb_color_palette=((16777215, 8126257, 25541, 0), (16777215, 16745604, 9714234, 0), (16777215, 16745604, 9714234, 0)), **kwargs)
from pyboy import PyBoy
pyboy = PyBoy('game_rom.gb')
while pyboy.tick():
pass
pyboy.stop()
pyboy.set_emulation_speed(0) # No speed limit
pyboy.button('down')
pyboy.button('a')
pyboy.tick() # Process at least one frame to let the game register the input
value_of_interest = pyboy.memory[0xC345]
pil_image = pyboy.screen.image
pil_image.save('screenshot.png')