12. December 2016 at 13:58 #4076rcoltraneParticipant
First, I would like to thank the Magic DosBox author for this superb app, please keep improving it!!
I’m having trouble on playing some old DOS games that requires 8way joysticks. Even by setting the diagonals in the keymapper, they won’t work in game. If the mapper doesn’t recognize upleft/upright/downleft or downright inputs, the games won’t work at all. I also tried games that uses keyboard individual keys to work as diagonals, such as World Karate Championship and Supreme Warrior, but without a proper 8way phisical joystick, these games won’t be fully playable.
I’ve read that you tried to implement 8way dpad inputs in the latest 46 version of the app without success, because of some weird angle issue with the physical dpad or something like that. This is strange, since Retroarch’s MAME core, MD.emu, MSX.emu, NES.emu and other apps handles 8way inputs from the dpad and it works perfectly. So if it works with that apps mentioned here, it could work in Magic DoxBox as well. Or am I missing something important here?13. December 2016 at 8:00 #4077
yes, adding 8way joystick is not a problem. It is already implemented in virtual joystick (Master of puppets). Physical gamepad currently supports
- 4way joystick – 4 directions (mostly up, down, left, right). Here can be enabled diagonals, so nearest directions are fired together. For example left-top direction fires left and up keys together.
- diagonals joystick – 4 way, but in diagonal directions
You can bind first type to left stick and second to right stick
In previous beta was for a while implemented true 8 way joystick, but working with this type was hard and it did mistakes. For example :
numpad 7 numpad 8 numpad 9 numpad 4 Middle numpad 6 numpad 1 numpad 2 numpad 3
8 way joystick looks like circle with 8 parts. Each part has 45°.
Let’s say you move analog stick from middle to top-left direction. You must hit 45° angle (not so big angle, in 4way joystick you must hit 90°). Analog stick reports X and Y coordinates which are converted to appropriate direction.
But..you can really hit top-left angle, but during stick movement you can easily enter left or top directions. In this case is top-left direction finished and is started new direction. This does mistakes. It was reduced significantly when I set big deadzone, but it still did mistakes, so I better removed it from v46. The same issue happens when stick moves to side as well when it returns back to deadzone – in both ways you can jump between nearest directions. And I don’t know how to solve this issue. 45° is small. How it works in other emus? I’ll be happy for any idea what can lead to solution.
Here is how the 8 directional joystick works:
I was thinking about it last times and I one probably usable idea come on my mind. At beginning if you are in deadzone I can calculate which angle you hit (just like now, without modifying algorythm). Then if you change direction (f.e from deadzone to left-up) then I will not check joystick’s axis against 45°, but I’ll increase the active angle, f.e to 65°. This could avoid jumping between nearest directions.
Tony14. December 2016 at 16:29 #4082Al exKeymaster
I think the large dead zone is a good idea, and can solve most of the issue.
For the last bit of accuracy, maybe you can add a tiny (user-adjustable?) input delay: let’s say, I want to move to the top left position. This will take ~50-100 ms, I guess. So, if mDosbox notices beginning analog joystick input, it waits for ~50 ms, to see where the movement ends.
Of course, you could also extend the deadzone further, something like this should also do the trick:
It doesn’t get any more precise when you’re playing with an analog joystick, maybe your first solution in the beta was already what rcoltrane is talking about.15. December 2016 at 4:43 #4083rcoltraneParticipant
Do We have máster of puppets in the free version? I cannot find it anywhere here…
I understand what are you talking about now. But unfortunately i don’t know how mame and other emulators deals with this situation you are facing. I just can tell that they work pretty well using the dpad as an 8 way joystick and it hás a flawless response.
If you can get this larger deadzone to work, it would be nice to testando it in the next version.15. December 2016 at 8:04 #4084
>Do We have máster of puppets in the free version? I cannot find it anywhere here…
I am sorry,…it’s my thanks to people who somehow supported magic dosbox development
Ok, I’ll add 8 way joystick to next version with these changes :
1. you will be able increase deadzone up to 95%
2. when you enter direction then I increase active angle, instead 45° I will compare against 67.5°, or maybe against 90°.15. December 2016 at 11:58 #4085
I did these changes :
You can’t set deadzone for 8way joystick. It’s automatically set to 95% (based on Pythagoras algorithm its +/-).
First direction must be entered under 45°. Then is detection angle increased, what reduces mistakes.
If it will not work so well then we can do one additional update – we can make detection angles for up,down,left right smaller and for diagonals bigger…will see what people say when v47 will be out. But now I think it’s fine (at least in eye of beholder I can turn around and walk to sides almost without incident).
- You must be logged in to reply to this topic.