SinisterSpatula / Gpi2

5 stars 2 forks source link

DoxBox Mapping Not Working #4

Open STANirvanaIND opened 5 years ago

STANirvanaIND commented 5 years ago

Hey Guys, thanks for the awesome tool, it's made the standalone emulators a lot easier/quicker. So far I've only noticed an issue in DosBox where no inputs are detected. This appears to be the case when launching DosBox on it's own with no custom arguments as well as when launching it with game configurations. The configurations for PCSX-ReARMed and Pifba appear to be working fine.

SinisterSpatula commented 5 years ago

The Dosbox maps are currently geared toward commander keen controls. Can you try a commander keen with it and see if it works for you? I want to expand on this one more and add support for other games aside from CK. But the thing with Dosbox on Pi zero is the performance of many games is not so good. If you want to try some games and find others that run well, using a bluetooth keyboard (just for testing), and let me know what other games run decently well that we can add. If CK doesn't work for you, I'll need to investigate it.

STANirvanaIND commented 5 years ago

Just tried Commander Keen 2 and 5. Commander Keen 2 has the same issue as the others, it appears like no inputs are detected (can't select menu options/get out of title screen, can't use the hotkey to quit). Commander Keen 5 detects an input at the initial "press a button" prompt but nothing afterwards (can't select any options, can't quit with the hotkey). Unfortunately I don't actually have a BT keyboard (have a lot of the 2.4GHz ones) but can pick one up if it'll help to troubleshoot.

SinisterSpatula commented 5 years ago

Oh interesting. I had tested I think all of them 2-5 and they had worked for me. Maybe something has changed with dosbox since I wrote it. Yeah, having the bluetooth keyboard makes all the difference, being able to hit keys and see what the controls should be instead, or being able to access the games menu to see what they are set to, is invaluable for this. When I have some time soon, I'll plan to do some looking into this core. And if you find out any good info on it, I definitely appreciate it. There's a software for windows that I've been using with a lot of success if you want to try that instead of a new keyboard: http://www.acrosscenter.com/ it has a 30 minute trial and after 30 mins some keys are disabled. But you can restart it I think, for another 30 minutes. It works exactly like a bluetooth kb and mouse would, but virtualizes it and uses your pc to "fake it".

SinisterSpatula commented 5 years ago

@STANirvanaIND I just discovered that the new recent Gpi cases had a different joystick name so the controller scripts were not working for the new model. That has been fixed now. If you go to controller tools and update controls, I think it should hopefully start working for dosbox and all the other standalone cores. (assuming yours might have been one of these newly minted units)

STANirvanaIND commented 5 years ago

Ended up finding an old Logitech BT keyboard, I'll need to remap the ESC since it's made for an iPad but was able to do some quick testing before work this morning. Tested out Jurassic Park, CK2, and CK5 and looks like all keys are recognized (of course not having an ESC made it a tad annoying). I'll play around later today with the DosBox mapper and config files. Unfortunately I used a start script along with loadmap on my other Retropie so I'm not to familiar with xboxdrv and it's intricacies. Currently my Commander Keen config files are a bit generic (copied from my Treasure Cove config), but here's my Jurassic Park one which has worked on my other system (no idea if it'll help but figured it can't hurt).

JURASSICPARK.txt

EDIT: Just saw the new reply, let me try it and I'll let you know. EDIT2: Nope, same issue as before after updating the controller script

STANirvanaIND commented 5 years ago

Interesting, looks like Commander Keen 5 is only detecting the initial button press (and the button press to skip the intro video) when joystick emulation is enabled in the DosBox config file. I also tested the base "+Start DOSBox.sh" in case one of my config files or custom game shortcuts was to blame, but it looks to still have the same issue (no inputs detected). Run command log attached below:

runcommand.log

SinisterSpatula commented 5 years ago

For dosbox try turning off joystick emulation that might be causing a conflict. I'm actually just having it take keystrokes instead, so maybe it's getting confused by that. This is going to have my attention pretty soon. Still have a couple more things to work on but then I'm going to be taking a hard look at dosbox. Everything looked correct in your runcommand.log. And if you need to get faster replies from me, find me over on this Gpi Case discord: https://discord.gg/323yQH (updated to different discord).

STANirvanaIND commented 5 years ago

Well took a break for a couple of days to actually play some games on the GPi but back at it now. Looks like the issue may be that the virtual gamepad isn't being created for DosBox. I'm able to always see the original X-Box 360 gamepad at /dev/input/event0 and when playing Pifba and PCSX-ReARMed I can see the additional (virtual) gamepad at /dev/input/event1 and test the keystrokes with evtest (evtest /dev/input/event1), however, when opening any DosBox based game (the +DosBox.sh script as well as specific games) the virtual gamepad (/dev/input/event1) doesn't exist (tested with joystick auto and joystick off, mapper enabled, mapper commented out in dosbox config.

I checked syslog and the only difference I can see between dosbox and pcsx are some udev errors (10:19 timestamp is dosbox and 10:31 timestamp is PCSX-ReARMed): Aug 14 10:19:03 CON-GPI kernel: [ 6421.829696] input: Microsoft X-Box 360 pad as /devices/virtual/input/input30 Aug 14 10:19:03 CON-GPI systemd-udevd[7277]: Process '/usr/bin/jscal-restore /dev/input/js1' failed with exit code 1. Aug 14 10:31:58 CON-GPI kernel: [ 7196.787390] input: Microsoft X-Box 360 pad as /devices/virtual/input/input31 Aug 14 10:31:58 CON-GPI systemd-udevd[7971]: Process '/usr/bin/jscal-restore /dev/input/js1' failed with exit code 1. Aug 14 10:31:58 CON-GPI systemd-udevd[7978]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Aug 14 10:31:58 CON-GPI systemd-udevd[7971]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.

STANirvanaIND commented 5 years ago

Well I think I've figured it out. I enabled logging on the basicGPI xboxdrv command via >> /dev/shm/runcommand.log 2>&1. Then checked the log and it looks like both the y+a=KEY_ENTER and y+b=KEY_Y produce errors, forcing xboxdrv to close. Haven't looked into why yet, but figured it'd be helpful.

EDIT: Figured it out, they have spaces after the commas. Removing them allows the config to work.

SinisterSpatula commented 5 years ago

Very interesting, thanks! I'll investigate why this is happening, hopefully soon. Oh I see! You already found the issue, I'll fix this now.

SinisterSpatula commented 5 years ago

Fixed. Thanks for spotting this :) Going to keep this issue open, because I would like to get more feedback for dosbox on alternate control profiles we could make for other games aside from commander keen's.

STANirvanaIND commented 5 years ago

Sure thing, I already have a few quick ones I built out today (Dark Forces, Jurassic Park, Oregon Trail, some learning company games) I'm happy to share. I've just been using the case statement with my custom "rom" names for each DosBox game (they're .sh files that call on the specific dosbox config) and creating a separate mapping each one calls on in xboxdrvstart.sh.