Replies: 2 comments
-
That is a fantastic thing to add to this project, and something I wanted to do myself long time ago! Now parenthood got the better of me and I don't have much free time to play around with this emulator as much as I wanted to. Are you using pyo3 for that ^^? |
Beta Was this translation helpful? Give feedback.
-
Congratulations to the new dad! I can take care of it as soon as I've finished my project. For the moment I've got a fork that's a bit dirty, but I can make a new, cleaner branch and add the changes to manage the python module. import rustboyadvance_py
import utils.parser
import utils.pokemon_data
import time
import pandas as pd
ROM_PATH = "pokeemerald_ai_rl/pokeemerald_modern.elf"
BIOS_PATH = "rustboyadvance-ng-for-rl/gba_bios.bin"
STEPS = 32000
parser = utils.parser.MapAnalyzer('pokeemerald_ai_rl/pokeemerald_modern.map')
gba = rustboyadvance_py.RustGba()
gba.load(BIOS_PATH,ROM_PATH )
addrs = {
'stopHandleTurn': int(parser.get_address('stopHandleTurn'), 16),
'monDataEnemy': int(parser.get_address('monDataEnemy'), 16),
}
name_by_addr = {v: k for k, v in addrs.items()}
gba.add_stop_addr(addrs['stopHandleTurn'],1,True,'stopHandleTurn')
cpt = 0
while(1):
steps_does = gba.run_to_next_stop(STEPS)
if cpt%10000 == 0:
print(f"Steps done: {steps_does}")
if steps_does == -1:
print("Player data:")
print(utils.pokemon_data.to_pandas_mon_dump_data(gba.read_u32_list(addrs['monDataPlayer'],36)))
cpt+= 1
print("end") Update: it was really easy with my previous work to get the render buffer |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For a personal reinforcement learning project, I had to make a python module of rust boy advance that manages access to the gba object and can also write to and read from memory, and stop when a value at an address is modified.
My module doesn't handle rendering or inputs.
Could a python module (platform/rustboy-adavance-ng-py) be useful for the project, given that no other gba emulator does this? (mgba-py doesn't work).
Beta Was this translation helpful? Give feedback.
All reactions