Open alexpalms opened 5 years ago
PS: the rom I am using is a cue file where inside are listed 3 bin files (Tekken3)
PPS:
System information OS: Mint 19 Python version: 3.6 gym-retro version: 0.7.1
If you build a simple C program that uses the core via the libretro API, are you able to load everything and run the ROM?
Hello Christopher,
thanks for your reply. I didn't try it actually. I sense integrating another emulator already present in LibRetro shouldn't be so hard, for this reason I am suggesting adding a small section with a worked case in your docs. It would be of great help.
Maybe this step you are suggesting could also be described there as a preliminary development.
Thanks for writing this guide! I agree it shouldn't be that hard, but definitely if you can't get the core to work without gym-retro, it won't be possible to get it to work with gym-retro.
Hello Christopher,
thanks for your reply. I didn't try it actually. I sense integrating another emulator already present in LibRetro shouldn't be so hard, for this reason I am suggesting adding a small section with a worked case in your docs. It would be of great help.
Maybe this step you are suggesting could also be described there as a preliminary development.
Did you succeed in trying later? Do you need to modify the source code of gym-retro and then recompile it? I also want to run mame2003-plus-libretro in gym-retro, so I can train the game Double Dragon (Neo-Geo)
I recently integrated two emulators (Sega 32x and Saturn) into stable-retro (a fork of gym-retro)
I think this PR I made would help with your issues since it enables support for debug logging from within emulator cores. Moreover some cores will crash if they don't have log support (ex mame2003_plus)
Issue summary
I tried to integrate PSX emulator in gym-retro doing the following steps:
repo-root/cores/
cd ./; git submodule add repo-url psx
repo-root
folder ->git mv psx cores/.
.gitmodules
addingignore = dirty
row and check paths and urlpsx
) must be as other cores in../.git/modules/custom-gym-retro/modules/
repo-root/cores/
Psx
)lib
attribute depending on the correspondent libretroMakefile
TARGET_NAME
variable (e.g. for thelibretro-beetle-hw
caseTARGET_NAME = mednafen_psx
)ramBase
value, the starting RAM address specific for the emulator (e.g. for snes9x is0x7E0000
in hexadecimal =8257536
in decimal, found inrepo-root/cores/snes/libretro/libretro.h
), delete the attribute from the JSON file if not foundext
attribute), accordingly to the most diffused onekeybinds
,buttons
andactions
attributes accordingly to libretro controller listed in the specific emulator pagetypes
attribute TBDCMakeLists.txt
file inrepo-root
add_core(new-emulator-name lib-attribute)
line around row 175, e.g.add_core(psx mednafen_psx)
setup.py
file inrepo-root
platform_globs
variable -> e.g. forPsx
useplatform_globs = ['*-%s/*' % plat for plat in ['Nes', 'Snes', 'Genesis', 'Psx', 'Atari2600', 'GameBoy', 'Sms', 'GameGear', 'PCEngine', 'GbColor', 'GbAdvance']]
Both the
gym-retro-integration
as well as the simplegym-retro
are able to compile successfully, correctly showing also psx emulator. But both of them do not work, showing different, generic errors. Specifically the following one is obtained when executingpython3 -m retro.examples.interactive --game GameName
Error:It would be great to have even a small tutorial on how to add a libretro emulator, or some indications on compatible commits/version of repo that can be found on libretro website.
System information