[SOLVED] NDS / lr-desmume2015: Rotate also Mouse Axis When Video is Rotated?
-
Recently I gave
lr-desmume2015
a try.
I am close to run "Hotel Dusk: Room 215" smoothly without turning my cabinet by 90 degrees ;-)
(FWIW The game runs on a Nindento DS in "book" / upright position).So far: I was able to rotate the video and also the axis of dpad.
Video rotation:
pi@rpi4:~/.config/retroarch/config/DeSmuME 2015 $ cat Hotel\ Dusk\ -\ Room\ 215\ \(USA\).cfg video_allow_rotate = "true" video_rotation = "1" # 0 == 4:3 aspect_ratio_index = "0" video_scale_integer = "false" custom_viewport_width = "1600" custom_viewport_x = "0"
Remaps up to right, down to left and vice versa on the primary controller:
pi@rpi4:/opt/retropie/configs $ cat nds/DeSmuME\ 2015/Hotel\ Dusk\ -\ Room\ 215\ \(USA\).rmp input_libretro_device_p1 = "1" input_libretro_device_p2 = "1" input_libretro_device_p3 = "1" input_libretro_device_p4 = "1" input_libretro_device_p5 = "1" input_player1_analog_dpad_mode = "0" input_player1_btn_down = "6" input_player1_btn_left = "4" input_player1_btn_right = "5" input_player1_btn_up = "7" input_player2_analog_dpad_mode = "0" input_player2_btn_r2 = "-1" input_player3_analog_dpad_mode = "0" input_player4_analog_dpad_mode = "0" input_player5_analog_dpad_mode = "0"
Question:
However, the last part which is missing/keeps puzzling me is rotating also the mouse axis or the analog axis of a gamepad. I haven't been able to find satisfying answers by searching here or at retroarch.
So, how to achieve this?(I am fine by using either a physical mouse or the retroarch nds mouse emulation of an analog controller, worst option would be to do a custom build of lr-desmume2015.)
I still see some options but want to ask if someone has come across this already and can share his/her experience.
Thanks.
The stats:
- Retropie 4.7.1 on Rpi4 4GB
- Retropie setup started from official image then continously updated
retropie_setup.sh
script currently at 82cb6d86lr-desmume2015
compiled from sources (a day ago, v.1.8.8 commit e6b3aa4)- Display 1600x1200 (4:3), installed in cabinet in usual desktop orientation
- (Meanwell Powersupply RD65, providing 5.15V)
-
@lolonois to change the analogue stick directions you can go into input in the GUI and save an override for that game only. So then within retroarch for that specific game axis up becomes left etc etc which then makes it work with the book style ds games.
What settings did you use for hotel dusk? As for me the game just runs a tad bit too slow in the 3d parts
-
@retropieuser555 Thanks for the hint. I followed the "per game remapping" but it turned out to be somewhat awkward (at least on my arcade, maybe others have experienced the same):
As I wrote above, the dpad remapping works well in
/opt/retropie/configs/nds/DeSmuME 2015/Hotel Dusk - Room 215 (USA).rmp
, e.g. for a retropad /w analog (Hardware controller is a Xbox 360 via USB):input_player1_btn_down = "6" input_player1_btn_left = "4" input_player1_btn_right = "5" input_player1_btn_up = "7"
So the dpad is rotated 90° CCW. Fine. But: If I did put a 90° CCW remapping for analog stick also in this file, the analog remapping was not recognized. -- Huh?
Well, I ended up putting everything (dpad and analog remapping) in a
.cfg
for that ROM. Then I noticed that the dpad rotation was not recognized from within the per rom configHotel Dusk - Room 215 (USA).nds.cfg
. -- Woot?TL;DR: I ended up with the awkward setup to have the dpad remapping in the
.rmp
and the analog sticks remapped in the per ROM.cfg
:The
.rmp
contains dpad remapping only (see above). And the per ROM.cfg
(/home/pi/roms/nds/Hotel Dusk - Room 215 (USA).nds.cfg
) contains analog remapping only:[...] input_player1_l_x_minus_axis = "+1" input_player1_l_x_plus_axis = "-1" input_player1_l_y_minus_axis = "-0" input_player1_l_y_plus_axis = "+0" input_player1_r_x_minus_axis = "+4" input_player1_r_x_plus_axis = "-4" input_player1_r_y_minus_axis = "-3" input_player1_r_y_plus_axis = "+3" [...]
(FWIW: The "Touch Tap" / "Stylus Press" is on R2.)
Last but not least: The mouse is still not rotated. :/ Meanwhile I learned that the issue (upright mode and mouse control for touch) seems to be somewhat lost between lr-desmume2015 and retroarch.
-
As a relief for the IMHO quirks in configuration I come up with a patch for
lr-desmume2015
:It provides a config switch in the per game options for rotating mouse and analog stick ("emulated" mode only, the "absolute" mode is left as excercise to the reader ;-) ).
After applying the video rotation and dpad rotation (see above), these few steps are to be done as user
pi
:cd ~/RetroPie-Setup/scriptmodules/libretrocores mkdir lr-desmume2015 cd lr-desmume2015 wget https://gist.githubusercontent.com/Gemba/22d55e309f1be1cbfc06b12bd8a4986f/raw/9e7b96852e85ba6f29f838e854ab2a6140630c0e/lr-desmume2015-mouse-analogstick-rotate-for-upright-games.patch cd ..
Modify
lr-desmume2015.sh
(in~/RetroPie-Setup/scriptmodules/libretrocores
) and add right belowgitPullOrClone...
this line:applyPatch "$md_data/lr-desmume2015-mouse-analogstick-rotate-for-upright-games.patch"
Then do
sudo ~/RetroPie-Setup/retropie_packages.sh lr-desmume2015
.Finally start up your game, select in the overlay QUICK MENU -> Options and note the switch Rotate mouse/analog input by 90 deg CCW ... Set to ON. Save your changes in the per game options.
Voilà !
...
Albeit off-topic, but as you asked @retropieuser555 :
I have setdesmume_num_cores = "4"
, thegovernor = "performance"
(in/opt/retropie/configs/all/runcommand.cfg
) and a overclocking set like this:arm_freq=1900 over_voltage=6 initial_turbo=50 force_turbo=0 v3d_freq_min=500 v3d_freq=750 overscan_scale=0
Haven't noticed any lags aso.
-
TIL that there is an option in lr-desmume which has not yet been ported to lr-desmume2015. Thus there is another option to solve this issue. :)
-
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.