DosBox AnalogStick for mouse

Game ROMs compatibility, performance and new cores
Post Reply
mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

DosBox AnalogStick for mouse

Post by mameise »

Hi together,

i did not find an answer to that… Is it possible to use the AnalogStick and the Shoulder Buttons as a mouse Control and left and right mouse click?
If so, is there a tutorial around? I use the Emuelec Image if that matters. I would be happy if someone could help me getting it to run.
I want to Play BMH on it.

Thanks
mameise

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

I tried with x11 and antimicro and the joypad can work as a mouse. But when I start dosbox from x11 and touch the joystick the mouse cursor jumps to the lower right corner. A physical mouse works fine.
So I too am interested in a fix.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

I tried with a wired mouse now and that also did not work. How did you get it running?

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

I think the mouse was picked up and handled by X11 and events were automatically passed on to dosbox, which ran as a x11 application in my case. I couldn't say what happens without X11.
I tested on meveric's debian for ogo.

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

Just tested DOSBox on my image works fine with antimicro and analog stick as mouse pointer, but you have to set:

Code: Select all

autolock=false
else it will catch the joystick and you can't use it anymore as a mouse.

https://oph.mdrjr.net/meveric/other/Vid ... dosbox.mp4
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Thank you for your answers. I have now installed everything and also got it working.

some questions:
how can i set the scaling as defauft after restart? xrandr commend i am talking about
how can i set antimicro to start automatic?
using the analog stick as mouse only works in window mode for me, not in full screen. i have set autolock to false.

Again thanks, almost there thanks to you.

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

you can create scripts that are started on boot that can do both scaling and starting antimicro at startup
Mine looks for example like this:

Code: Select all

#!/bin/bash
xrandr --output DSI-1 --scale 1.5x1.5
antimicro --hidden --profile joyconf-mouse.xml &
dosbox
xrandr --output DSI-1 --scale 1x1
And I start this when I want to start dosbox.
That way antimicro and scaling is done automatically as well as resetting scaling once dosbox ends.
You can also put parts of this in other scripts and launch them at system boot. Under most Linux there is something called "Startup Applications" which defines which programs should be started when the system boots.
You can add your own scripts here.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Hmm i have everything set up. The only Thing i am unable to manage is to start antimicro at boot…

Can you give me some more detailed info? Thanks

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

Are you running mate or x11 without a DE?

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

As i do not really know what i am doing i have mate running… And i tried almost everything (rc.local, cron -e etc) but Nothing works… antimicro does not want to start at boot.
Also still mouse in Fullscreen mode is not working, only windowed mode in dosbox, but that is not that important. But without antimicro at start i Always Need to plug in the mouse….

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Ok i was now able to have antimicro start at boot :) Now almost everything is working.
Just one small Thing remains: How to get the mouse working in full screen mode… The window mode is
unfortunately in scale 1.5x1.5 a Little bit too big and in 2x2 the window is too small already. 1.5x1.5 Fullscreen would be perfect.

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

You are aware that you don't have to use 1.5x and 2x you can also do 1.3 or 1.4 or even things like 1.35 if you want to, heck you don't even need the same dimensions:
1.5x1.35 would work as well ;)

Edit:
I also found this online:

Code: Select all

#!/bin/bash
xprop -name "$1" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
wmctrl -r "$1" -b toggle,above
wmctrl -r "$1" -e 0,0,0,-1,-1
where $1 is the name of your Window which you can check with wmctrl -l

What it does is, that it removes all window decoration around the selected window, boarder, buttons, etc.
Then changes it, that it's always on top, and positions the window in the upper left corner of the screen.
That way you have a "fullscreen window" without borders.

In fact here's what I did:

Code: Select all

xprop -name "DOSBox 0.74-2, Cpu speed: max 100% cycles, Frameskip  0, Program:  KRNL386" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
wmctrl -r "DOSBox 0.74-2, Cpu speed: max 100% cycles, Frameskip  0, Program:  KRNL386" -b toggle,above
wmctrl -r "DOSBox 0.74-2, Cpu speed: max 100% cycles, Frameskip  0, Program:  KRNL386" -e 0,40,0,-1,-1
I used 0,40 instead of 0,0 to position the window in the middle of the screen rather than all the way to the left (using 1.5x1.5 scaling)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Haha no i was not Aware that i can Change the scale. That works perfect. Thanks a lot.

What would i do with the Code? create a script and run it before dosbox?

Thanks again for all your work. Thanks to your Image i have dosbox working with the
good old dos games. :) :)

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

You would have to run the code AFTER DOSBox was started, as it manipulates the DOSBox window, so it must run first.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Ah ok lol, seems to make sense ;)

Ok i will try that out after work.

Thanks again for all the help.

Now we would need a cool keyboard/mouse combi from HK for the Advance.

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

+1 for a foldable 102 key PC keyboard! :D

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

I would love to see a combination of keys and maybe another analogstick for mouse. Ideally attacheable to the Odroid like the keyboard for the go classic.

I will (if time allows) build a keyboard with mouse to be attached to the GO-A. Beside Micro-USB for charging and a 3G module for phone calls the 3rd project on my plan for the Advance. Just need to check priority... I think the keyboard/mouse combi can either be combined with the 3G module or i will put that as prio 1. Seems to bring most value.

deerwings
Posts: 175
Joined: Mon Oct 08, 2018 9:11 am
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advance
Has thanked: 3 times
Been thanked: 13 times
Contact:

Re: DosBox AnalogStick for mouse

Post by deerwings »

mameise wrote:
Mon Mar 02, 2020 9:58 pm
I would love to see a combination of keys and maybe another analogstick for mouse. Ideally attacheable to the Odroid like the keyboard for the go classic.

I will (if time allows) build a keyboard with mouse to be attached to the GO-A. Beside Micro-USB for charging and a 3G module for phone calls the 3rd project on my plan for the Advance. Just need to check priority... I think the keyboard/mouse combi can either be combined with the 3G module or i will put that as prio 1. Seems to bring most value.
+1 for Clamshell Odroid Go Advance with full keyboard, Stereo Speakers, and 3G cellphone. It's the latest in Open Source hardware, say goodbye to your iPhone! :D

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

You mean something like this?
Image
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

It doesn't look half-bad! What is it?

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

Dragonbox Pyra... open source community created gaming handheld... successor of the Open Pandora.
2xA15 Cores, 2 or 4GB RAM, 720p Touch Screen, about 10hrs of battery life as well (exchangeable), dual SDXC Card slots (normal size not micro) + 32GB internal eMMC + micro sd card slot, wifi + bluetooth, 4G if you want it...
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Was the pyra finally launched? I still have the Pandora here. Nice gadget but not really useable due to the own packaging etc... Are phone calls possible with it?

I have the Cosmo Communicator as my main phone at the moment. They just released Drbian for it as multiboot beside Android. No modem access yef in Linux but very promising and a full keyboard included. I love it :)

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

Will it ever be launched? :D
I don't know ;)
Yeah, the Pandora is what got me started with ODROIDs, I couldn't afford it back then and then started with my good old trusty ODROID X2 and was just blown away by the performance.
But generally I like the idea behind it, it's really an impressive design.
Although it has 4G I don't think they advertise it for making phone calls, but hey if you find linux drivers that work with it, I don't think anyone stops you from turning it into a phone.
I think I saw a project on the RPi where someone turned the RPi2 into a mobile, really big clunky one.. but apparently it worked.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

mad_ady
Posts: 9352
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mad_ady »

It looks interesting, but for that price (600-745€) and the specs it seems way too pricey. But I like it's a modular design and you can later on swap the CPU board. If it were built in a laptop form and somewhat modular, with a full keyboard, then it might look better.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: DosBox AnalogStick for mouse

Post by mameise »

Agree, price is too high for this devices but the pyra will anyway never get launched. I wonder where you got it.

Here are some of my attempts. The blue one is an Atmega1284 phone with 3G -> advantage: normal phone size but i have to write the whole OS myself...

The big black in front is my attempt with a Raspberry Zero and an Arduino included. Advantage here is full Linux experience with phone function included and a second screen at the top left. But with this i have power issues and need a stronger module to keep it alive.

And at the top this is the Cosmo Communicator. Not built by me but a really nice device.

And if you remember i also already built a phone case for the classic go ;)
Attachments
33CD3CFD-D8E0-49BD-86E1-7057F91966F0.jpeg
33CD3CFD-D8E0-49BD-86E1-7057F91966F0.jpeg (715.08 KiB) Viewed 2342 times

soncfe@163.com
Posts: 19
Joined: Sun Mar 28, 2021 10:16 pm
languages_spoken: english
ODROIDs: oga
Has thanked: 2 times
Been thanked: 0
Contact:

Re: DosBox AnalogStick for mouse

Post by soncfe@163.com »

meveric wrote:
Tue Mar 03, 2020 8:01 am
You mean something like this?
Image
What's that ?
I want it!
:P :P :P :P

User avatar
meveric
Posts: 11507
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox AnalogStick for mouse

Post by meveric »

Should be the Dragonbox Pyra.
The successor of the OpenPandora.
https://pyra-handheld.com/boards/pages/pyra/
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “Game emulations”

Who is online

Users browsing this forum: No registered users and 2 guests