from pyboy import PyBoy
pyboy = PyBoy('game_rom.gb')
while pyboy.tick():
pass
pyboy.stop()
Python:
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')
Whoa, this looks cool as hell!
I wonder what other emulators you can interact with scripts like this.
One of my favorite things in the world is seeing people code emulators in the weirdest way possible. There are dozens of emulators the use html out there and people have even put Gameboy emulators on calculators. I remember one time seeing someone emulate the Nintendo Switch with Ryujinx while playing the emulator mGBA. mGBA was running this emulator for NES games called pocketNES, and that was running an shotty emulator for Game Boy that I can't remember the name of. Basically, what I'm trying to say is that emulators being made on every possible platform is amazing and I wish I could marry an emulator because I love them so much.
The AI feature looks interesting. Building neural networks is ultimately a toy and nothing serious, but it's pretty cool that they emplemented them into an emulator. I'll download this later and see what it can do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.