Thursday, November 11, 2010

WeTab Dosbox cursor/touchscreen offset

After running dosbox on the WeTab and trying to get one of my all time favorite games to run: Gabriel Knight 1, I found that the touchscreen clicks were not being mapped correctly. This led me on quite a chase.

To start with, I read some of the posts at Vogon concerning touchscreens and Dosbox. It seems that people generally agree that the problem originates inside the SDL libraries.

I removed the 4tiitoo version of the sdllib and compiled it.

i then set the following environment in a terminal window:

export  SDL_MOUSE_RELATIVE=0

With this setting I get strange offsets between where I touch and where the mouse actually ends up clicking. This gap increases as I go up the screen. Have to add some debug message in the source and test.

3 comments:

  1. I also put some inverstigation into this issue. The problem is that the DOS mouse drivers work only with relativ coordinate systems. Inside the games, some acceleration calcs are put over the relative data from the mouse driver. This explains the offsets which are also not constant.
    BTW: I wanted to run Command and Conquer on a WeTab.

    ReplyDelete
  2. Yeah, it seems that the games are messing around with the coordinates they get from SDL because the printfs I threw into the SDL mouse events source appear fine and dandy, I'm not sure if there is a way around this, perhaps force some kind of absolute communication of the coordinates. But I don't really know the details of all this.

    ReplyDelete
  3. Hi. There is a way to bind right mouse click to the tap and hold. You can found original data here: http://wetab-community.de/forum/viewtopic.php?f=64&t=1337&hilit=rechtsKlick.
    Briefly:
    1) sudo yum install at-spi
    2) Download mousetweaks rpm from here http://rpm.pbone.net/index.php3/stat/4/idpl/14010461/dir/fedora_13/com/mousetweaks-2.30.1-1.fc13.i686.rpm.html
    3) sudo yum install libbonoboui gnome-panel
    These are dependences for mousetweaks
    4) sudo yum localinstall --nogpgcheck
    5)run command:
    /usr/libexec/at-spi-registryd & mousetweaks --enable-secondary --secondary-time=0.5 --threshold=30 --daemonize
    6)tap&hold (half of second), release and voila

    Best wishes,
    p1at0n

    ReplyDelete