Retroarch to be built with HAVE_TRANSLATE option (AI Service)?
-
Hello,
Current setting:
Running Retropie image 4.5.18 on RPi3 Raspbian 9.11 Stretch, built from Pre made SD Image on RetroPie website. Retroarch GUI 1.8.5 with built date April 17th 2020 now matches latest Retroarch 1.8.5 (from previous 1.8.4)
https://github.com/libretro/RetroArch/releasesAI Service does not seem to work with current Retroarch build 1.8.5. For the AI Service to perform as expected, it seems Retroarch should be compiled with HAVE_TRANSLATE parameter.
https://github.com/libretro/RetroArch/blob/master/retroarch.c
/* TRANSLATION */ #ifdef HAVE_TRANSLATE static int g_ai_service_auto = 0; [...]
Retroarch build funtion does not seem to show such parameter:
https://github.com/RetroPie/RetroPie-Setup/blob/d037c7f5bdc83bb2713c06fef28c4fb0f83290a1/scriptmodules/emulators/retroarch.shfunction build_retroarch() { local params=(--disable-sdl --enable-sdl2 --disable-oss --disable-al --disable-jack --disable-qt) if ! isPlatform "x11"; then params+=(--disable-pulse) ! isPlatform "mesa" && params+=(--disable-x11) fi if compareVersions "$__os_debian_ver" lt 9; then params+=(--disable-ffmpeg) fi isPlatform "gles" && params+=(--enable-opengles) isPlatform "gles3" && params+=(--enable-opengles3) isPlatform "rpi" && isPlatform "mesa" && params+=(--disable-videocore) # Temporarily block dispmanx support for fkms until upstream support is fixed isPlatform "dispmanx" && ! isPlatform "kms" && params+=(--enable-dispmanx --disable-opengl1) isPlatform "mali" && params+=(--enable-mali_fbdev) isPlatform "kms" && params+=(--enable-kms --enable-egl) isPlatform "arm" && params+=(--enable-floathard) isPlatform "neon" && params+=(--enable-neon) isPlatform "x11" && params+=(--enable-vulkan) ! isPlatform "x11" && params+=(--disable-vulkan --disable-wayland) isPlatform "vero4k" && params+=(--enable-mali_fbdev --with-opengles_libs='-L/opt/vero3/lib') ./configure --prefix="$md_inst" "${params[@]}" make clean make md_ret_require="$md_build/retroarch" }
Is there a specific reason not to use that parameter? Anyhow, please, kindly review and comment.
-
@vg8020 said in Retroarch to be built with HAVE_TRANSLATE option (AI Service)?:
Is there a specific reason not to use that parameter? Anyhow, please, kindly review and comment.
How did you determine that the AI Translation service feature is not enabled ?
By default, it's enabled in RetroArch builds and - as you pointed out in the build script - the RetroPie package doesn't disable it explicitely, so it's included in any RetroPie build.
-
@mitu Thank you for your interest. Appreciated. Please, let me clarify as I have not determined yet. Please, notice Subject: shows a question mark. Basically, I am running different tests that may help determine what the issue is.
These are my AI Service settings as per file:
/opt/retropie/configs/all/retroarch.cfg ai_service_enable = "true" ai_service_mode = "0" ai_service_pause = "true" ai_service_source_lang = "0" ai_service_target_lang = "1" ai_service_url = "http://ztranslate.net/service?api_key=HEREISMYKEY" [...] input_ai_service = "p" input_ai_service_axis = "nul" input_ai_service_btn = "nul" input_ai_service_mbtn = "nul"
In general terms, when text is displayed in-game (think of typical 80's Japanese RPG) a screenshot should be uploaded to service_url to return text translated into eg. English. When hotkey bind "p" is pressed, Retroarch does not seem to notice (Retroarch verbose log enabled) and AI Service is not triggered.
The fact that Retroarch log does not seem to give any indication of a call to AI Service may be a hint that either the hotkey binding is not responding (don't think so because it shows in retroarch.cfg correctly), or maybe HAVE_TRANSLATE parameter may not have been passed when compiling Retroarch and so, pressing the hotkey will not trigger AI Service.
Since some parameters are explicitly passed, I wonder whether doing the same with HAVE_TRANSLATE parameter may have an effect. Other than that, I can only think that input from other users running RetroPie on a Raspberry Pi might prove useful.
Once more, thank you.
-
@vg8020 said in Retroarch to be built with HAVE_TRANSLATE option (AI Service)?:
The fact that Retroarch log does not seem to give any indication of a call to AI Service may be a hint that either the hotkey binding is not responding (don't think so because it shows in retroarch.cfg correctly), or maybe HAVE_TRANSLATE parameter may not have been passed when compiling Retroarch and so, pressing the hotkey will not trigger AI Service.
I can assure you that
HAVE_TRANSLATE
is included in the RetroPie build for RetroArch. Note that pressingp
might not be enough if you have a Hotkey set-up for RetroArch, you need to pressHotkey + p
in order for the action to take place.What input devices do you have connected ? Keyboard/gamepad/etc. ?
-
Thank you for your feedback and assurance. I needed to discard that option so your feedback is so valuable. In the end, I have used the good ol' method: copy Pre made SD Image to SD card and set things up anew.
I have elaborated the table below to clarify the relationship between an SNES USB Gamepad , its Retroarch Port Binds and Default Actions as a result of Hotkey Binds. It's just a bit of an expansion of the Default joypad hotkeys section in the Wiki article on RetroArch configuration
+------------------+------------------------+----------------------------+-------------------------+ | SNES USB Gamepad | RetroArch Port 1 Binds | Default Action | Hotkey Binds | +------------------+------------------------+----------------------------+-------------------------+ | Up | -1 | [AI SERVICE] *Free to use* | SELECT + Up | | Down | +1 | [PAUSE] *Free to use* | SELECT + Down | | Left | -0 | Savestate Slot - | SELECT + Left | | Right | +0 | Savestate Slot + | SELECT + Right | | SELECT | 8 | HOTKEY | | | Start | 9 | Quit Retroarch | SELECT + Start | | A | 1 | *Free to use* | | | B | 2 | Reset | SELECT + B | | X | 0 | Menu Toggle | SELECT + X | | Y | 3 | *Free to use* | | | Left Shoulder | 4 | Load State | SELECT + Left Shoulder | | Right Shoulder | 5 | Save State | SELECT + Right Shoulder | +------------------+------------------------+----------------------------+-------------------------+
- Select button in SNES USB Gamepad is set as the HOTKEY button
- Free to use means Retroarch does not set a default Action, so it can be used for any purpose.
- [ACTION] = name of the manually-set action
Setting a specific Hotkey Bin to pause the gameplay [PAUSE] seems particularly useful when setting AI Service Pause Toggle to ON (RGUI > Settings > AI Service): Retroarch will pause gameplay, allowing time to read translated text, to continue only upon pressing the Pause Hotkey Bind. And of course, Hotkey Binds for actions can be redefined.
Cheers,
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.