Beta Uae4All Additions


smoku said:
mousehack_setfollow();

http://github.com/smokku/uae4all/commit/58249b904b580743902a3fc70c51f2db21695d18

What I mean is how do you know where the Amiga program stores the mouse location? It seems like a near impossible problem to solve in all software.

Or are you just allowing the user to drag the mouse about, like a hack?
 
Last edited by a moderator:
It computes the difference between last mouse position (A) and new one (B) and then simulates mouse movement from point A to B by proper changes on mouse port as fast as possible.

The only problem reported by users is that many programs paint the mouse sprite at given location, and then compute the offset of click (in case of X like cursors). Then you need to tap with the offset.
 
Well, just tried this and it works. Lemmings is playable. But the controls get messed up if you click in the offscreen area (the black bars) and you need to restart UAE4All.
In order to move the displayed area in Lemmings you can click on the minimap in-game so there's no danger of dragging the mouse "offsides". As Lemmings has one of these X-shaped mouse-cursors in game you need to click about 5 pixels up/left of a Lemming to use him...

Also using touchscreen + dpad/nubs to move the mouse simultaneously doesn't work well.

I could make it so that "mouse mode" is for touchscreen and if you screw something up so that it becomes "decalibrated" you can switch to joystick mode and back again to reset the mouse position.

So in joystick mode you'd use the nubs as mouse and in mouse mode (=> touchscreen mode) you'd use the stylus (and the dpad maybe arrow keys now instead of mouse-movement?).

What do you think?
 
john4p said:
Well, just tried this and it works. Lemmings is playable..... As Lemmings has one of these X-shaped mouse-cursors in game you need to click about 5 pixels up/left of a Lemming to use him...

Glad that works well, nice patch smoku.

John4p, can't recall if you have per-game settings savable (don't think so) but you could add a vertical/horizontal pixel offset in the menu. So when in a "X cursor" or Lemmings-type game, user could add 5 pixels up/left or whatever - should make it spot on & configurable. Simple extra X and Y integer should do it. (Probably need to offset on pixels of original resolution, rather than scaled up screen though)
 
Last edited by a moderator:
john4p said:
Well, just tried this and it works. Lemmings is playable. But the controls get messed up if you click in the offscreen area (the black bars) and you need to restart UAE4All.
In order to move the displayed area in Lemmings you can click on the minimap in-game so there's no danger of dragging the mouse "offsides". As Lemmings has one of these X-shaped mouse-cursors in game you need to click about 5 pixels up/left of a Lemming to use him...

Also using touchscreen + dpad/nubs to move the mouse simultaneously doesn't work well.

I could make it so that "mouse mode" is for touchscreen and if you screw something up so that it becomes "decalibrated" you can switch to joystick mode and back again to reset the mouse position.

So in joystick mode you'd use the nubs as mouse and in mouse mode (=> touchscreen mode) you'd use the stylus (and the dpad maybe arrow keys now instead of mouse-movement?).

What do you think?

Cool, good to know. I hope this also can be backported to the uae4all version on the wiz or at least on the caanoo. When it ships in two weeks roughly.
 
Last edited by a moderator:
@silver: Of course some offset-possibility will be added. Also the pixels for vertical/horizontal adjustment have to be taken into account.

fettouhi said:
I hope this also can be backported to the uae4all version on the wiz or at least on the caanoo.
That wouldn't be a huge task.
 
Last edited by a moderator:
smoku said:
It computes the difference between last mouse position (A) and new one (B) and then simulates mouse movement from point A to B by proper changes on mouse port as fast as possible.

The only problem reported by users is that many programs paint the mouse sprite at given location, and then compute the offset of click (in case of X like cursors). Then you need to tap with the offset.

But how does it know where the mouse is in the first place? Does it just assume top left?
 
Last edited by a moderator:
craigix said:
But how does it know where the mouse is in the first place? Does it just assume top left?
I would imagine so. A real Amiga doesn't know where the mouse is until you move it, either.
 
Last edited by a moderator:
SteveM said:
craigix said:
But how does it know where the mouse is in the first place? Does it just assume top left?
I would imagine so. A real Amiga doesn't know where the mouse is until you move it, either.

Can you explain that further?
 
Last edited by a moderator:
It rather assumes that the mouse is in the center. This is the default for most apps (Workbench for sure).

I know what you mean, but it works. :)
Besides you have kind-of calibration by apps not allowing to move outside the screen. So touch two opposite corners and you have mouse "calibrated".

And of course there is an assumption that one mouse tick moves the pointer one pixel. This is how most apps work.
 
smoku said:
It rather assumes that the mouse is in the center. This is the default for most apps (Workbench for sure).
Strange - I always figured top left was the hardware's idea of where the mouse pointer was at boot up as the mouse pointer is always visible up in that corner when you boot any random Workbench-based disk. I don't suppose it really matters too much; as you say the system is pretty much self-calibrating.
 
Last edited by a moderator:
Yes. You're right. It's top-left corner.
Anyway - if the OS starts with this idea of default position and emulator assumes so, this is going to work in most cases.
 
This could be awfully useful for point and click adventures. Is there no way to use the screen resolution settings to 'block out' the borders as far as the mouse is concerned? Also, perhaps a recalibrate function could save some trouble later on...

Great stuff though. I think I read in a DOSbox thread that clicking outside game borders messes things up as well. This shouldn't be a big problem unless like me you have poor co-ordination (though seems to be reasonable with my current medication). I'm sure there has to be a way to fill in borders as a 'dead zone'.

Your continued success with this emulator is very heartening. Please treat yourself to a nice cup of tea and a biscuit before resuming your efforts.
 
Addition VII: Touchscreen support

Codewise it was more convenient to add this to joystick mode (the default mode). Maybe it should stay there.
So Joystick mode is for Joystick and Touchscreen and Mouse mode for Dpad/Nub mouse emulation and pinball games.

Implemented that Touchscreen still works correctly if you've moved the displayed area vertically.

There's no offset functionality implemented yet (for X-shaped cursors).

Note that Touchscreen support currently only works correctly in doubled mode (default) but not in softstretched modes.


New release: http://www.filefront.com/17170138/uae4all.zip


Source: http://www.filefront.com/17170140/uae4all_pandora_src.zip
 
Does Walker work now? Also, I know Goal!, Project X and Jimmy White don't work but is there any chance they might one day as they are three of my faves? Thanks for looking into the touchscreen issue by the way.
 
Walker is playable but has garbled gfx on the left. But as it's already a very difficult game on a real Amiga with a real mouse it will never be beatable with the Pandora's controls. Touchscreen support is also not really suited for this type of game.

To get Goal, Project X and Jimmy White to work some emulation-features of newer (Win/E-)UAE versions would have to be added.

Project X Special Edition already works fine.
 
Jimmy White should work ok on megadrive emulator, I've played the MD version and it's about the same as amiga but without the loading times.
 
john4p said:
Addition VII: Touchscreen support

Codewise it was more convenient to add this to joystick mode (the default mode). Maybe it should stay there.
So Joystick mode is for Joystick and Touchscreen and Mouse mode for Dpad/Nub mouse emulation and pinball games.

Implemented that Touchscreen still works correctly if you've moved the displayed area vertically.

There's no offset functionality implemented yet (for X-shaped cursors).

Note that Touchscreen support currently only works correctly in doubled mode (default) but not in softstretched modes.


how about instead of assuming the pointer is still at (X,Y) and moving it, dragging the pen on the touchscreen would move the mouse no matter where it is without clicking the mouse buttons.

if you start on the cursor it'll move in sync, otherwise it'll move with an offset, but it'll always work.

and you'd tap the screen to do a left-button mouse click.
this is exactly how a laptop's touchpad works, and it works fairly well.

have the left & right shoulder buttons as mouse buttons as well for dragging.

and users could also plug simply a USB mouse or trackball.
 
Last edited by a moderator:
Back
Top