Mouse Calaboration


rcx21000

Well-Known Member
Joined
Mar 26, 2003
Messages
1,624
Age
55
Website
Visit site
I'm sorry about all the problems with CaSTaway that I am having, but I am having them :blink: This time I try to play SimCity, and the mouse won't goto the toolbar, so I try and try and try, then I see mouse calaboration in the menu, so I try that, moving the mouse to random places, and that happens a bit until it works. But then the area that the mouse can move gets smaller and samller and smaller...... then I re-calabirate and it takes longer :angry: How do you calabarate, and why is the mouse area getting smaller (it happens in other games too, but SimCity is most annoying.)
 
This is something skeezix hasn't worked out completely yet....

This is a question and answer from the latest Castaway beta testing mail...

(I hope you dont mind me posting it here Jeff?)

> Calibrate mouse - Does this even work?? When my mouse co-ords get
> messed up this does not help

It tries to help a little, but it usually doesn't work; I'll be
adding to that operation once I figure it out :)

Cheers
 
Usually you can get the mouse fixed up.. ie: If the mouse can't go all the way up, go to the bottom of the scrteen and keep holding down a bit, to get the mouse verticals all worked out in the OS. Same if you can't go left, go to the right side for a bit. Works for all directions, for most games.

The actual problem is that the OS knows where the mouse is, but theres no good way for *us* to know where *it* thinks the mouse is :) So when it changes resolution, it puts the mouse in the middle, for example. How are we to know our virtual mouse is in the middle?

I'm working on it though.

Castaway v10 is pretty super solid, I think.. the only real issue is the mouse one, I think.

jeff
 
I just got Atari ST 1040 and Atari Falcon. Falcon is going bac where it came from. But ST is my love...
Well, after that stupid geek thing, I will say that all gem based software have a little bad mouse handling.
I have used STmeg for a week now and I can say this that I WANT MY GP32!
I had ST back in 90's....

Former FOF member. Wuahahhaa!
 
skeezix posted on May 18 2003 said:
The actual problem is that the OS knows where the mouse is, but theres no good way for *us* to know where *it* thinks the mouse is
Why do you need to know where the mouse is, just out of interest?

You said before that you track the mouse pos in your own variables, and the problem occurs when your variable reaches zero (for the left-/top-most position) but the ST thinks it's still in the middle of the screen.

Assuming I remembered that correctly, it puzzles me a little. Why do you care care when the position reaches zero? Why not just carry on to -1, etc.? Why do you care where the pointer is at all, surely that's just something for the OS to worry about?

Intrigued...
 
Last edited by a moderator:
Just wanted to comment that the same happens in Zany Golf. I'm not complaining, just letting everyone know my soul yearns for Zany Golf. Just being able to play a few holes brings back memories though.
 
AdamDawes posted on May 19 2003 said:
skeezix posted on May 18 2003 said:
The actual problem is that the OS knows where the mouse is, but theres no good way for *us* to know where *it* thinks the mouse is
Why do you need to know where the mouse is, just out of interest?

You said before that you track the mouse pos in your own variables, and the problem occurs when your variable reaches zero (for the left-/top-most position) but the ST thinks it's still in the middle of the screen.

Assuming I remembered that correctly, it puzzles me a little. Why do you care care when the position reaches zero? Why not just carry on to -1, etc.? Why do you care where the pointer is at all, surely that's just something for the OS to worry about?

Intrigued...
I think it is because the OS dosen't show the mouse and the emu/real ST has to put it on itself (even though I am only 1% sure, and I got this idea from all these posts in the topic)

P.S. Why wasn't I notified of people posting in this topic via e-mail? I wasn't even notified once and I put automaticially subscribe to all topics that I post in. :angry:
 
Last edited by a moderator:
Is the mouse emulation based on absolute coordinates, or relative?

I agree, if he can work out this mouse problem, that's pretty much sorted this emulator. Oh, and perhaps an option for defining keys for the joystick, for games like Blasteroids that don't seem to want to use mouse or joystick.
 
The mouse is managed and drawn by GEM. (On a modern PC with SVGA or better, the video card itself can draw the mouse to save the OS from doing it, but old machines like an ST or Amiga draw it themselves.. so its not up to the emulated environment).

The mouse operates in several modes; the OS asks the IKBD (keyboard chip essentially) to report relative mose motion, or absolute mouse motion. Absolute is easy.. just report where it is. Sadly, this mode is almost never used by the OS or games. 99.9999% of the time, the games use the OS mouse stuff, and the OS always uses relative coords.

which is to say the emulation reports via the IKBD emulation "-1 x" or "+5 y" or the like. If we reported "(150,25)" it would be hella easy ;)

So this means we need to keep in mind a virtual cursor.. where we thibk the mouse is. Then when you move the mouse (move the joystick) we report back a diff.. if you wre at x 10 and now are at x 12, we report x +2. ITs much more complex too.. you cannot report more than 127 or 128 each direction (its a signed 8bit quantity). Well and good and easy, right?

The trick is that the games and loaders and such may change resolution, or move the mous around on their own, etc. So TOS and GEM know where the mouse is.. but we do not. So you move it to 0,0 say (can't go left and up any more), and the game goes and moves it to 160,100 .. so its in the middle of s low res screen, but we don't think you can go left anymore. A pain.

So you hit calibrate.. it woudl ber easy if we could just ask the OS "where the hell do *you* think the mouse is?" but you can't.. it doesnt' expect to be emulated.

The mouse is also much more complex than the above; you can tell the ikbd to scale the response coords, or put a bounding box around it so it cannot travel anymore, etc etc. SDo games set all sorts of weird effects on the mouse, and things get all weird.

Theres also a number of bugs in the Castaway core for this.

You also cannot broadcast "move here move here move here move here" until it gets where you think "Here" is, for you overrun various bufferds or confuse the OS, since it already thinks its in the rght place. Painful :)

10.1 helps a lot.. it tries a few things to shove the mouse into the true bottom right.

But I'm plannign on trying some ugly fixes and reworking how Castaway's core deals with the mouse. ie: Not keep a virtual mouse at all.. just report back -1 when pushign left, without caring where the mouse is. Thats how a real ST does it. Castaway doesn't like that sort of thing, and it messes with the component emulation, but it might work a lot better.

So anyway, its more complicated than what you think :) But fea not, I'm working on it :)

Castaway/GP is only a couple motnhs old after all, and come a long way; when presented with tough problems like the above ,and easy prolems like gammka correciton.. you know which one I'll take when limited time is available ;)

jeff
 
Couldn't you do x + 128 and if there is an error, try again, again (subtracting 1).... until there is no error? And do the same with y? That would be calabarate mouse command :)
 
rcx21000 posted on May 19 2003 said:
Couldn't you do x + 128 and if there is an error, try again, again (subtracting 1).... until there is no error? And do the same with y? That would be calabarate mouse command :)
Thats not how it works :p See, the OS doesn't know its being emulated.. it doesn't have an API into it for emulators to use :p We don't know where the mouse is, and so we just shove in relative directions. Theres no "error".. if it doesn't make sense, the OS gets whacky, since it assumes it knows what its doing :p You have to separate the emu from the OS.. they do not cooperate :)

But don't worry.. suggestions don't help unless you know the ST internals really well and have a copy of Abacus ST Internals on your desk or the like ;)

I'll work out something; if I worked on it for a few hors I'd get it, but I don't have a few days to work on just one thing :p I'll get it sooner or later, whe I get a chance to do some serious thinking about it :p

jeff
 
Last edited by a moderator:
That said, I tyhink I may have just beaten the mouse issue :)

(which is to say, goign from low to medium res and back doesn't stick the mouse, and running Millenium 2.2 the mouse can get full screen of motion, which wasn't possible prior to this development version I'm working on.. so looks good to me! Anyway have any other games known to be a pain in the ass for mouse getting stuck?)

Stay tuned for more news :)

jeff
 
Hard Drivin, Hard Drivin 2, Race Drivin, Defender of the Crown, just a few with mouse issues.
 
Arkanoid was a problem game (Arkanoid 2 to be exact, have no image of Ark 1). When a life was lost, the bat would be set back in the middle of the screen, and an unpredictable amount of left-hand travel would be lost. Moving to the right and then some, then hitting calibrate a couple of times seems to sort it out 'til next life. I'll try out 10.1 when I finish work.

I see what you're getting at with the TOS mouse thing. You have done an extraordinary amount of work in a minuscule amount of time, I mean this emulator just suddenly appeared out of nowhere. Great job.
 
Loonie posted on May 20 2003 said:
Arkanoid was a problem game (Arkanoid 2 to be exact, have no image of Ark 1). When a life was lost, the bat would be set back in the middle of the screen, and an unpredictable amount of left-hand travel would be lost. Moving to the right and then some, then hitting calibrate a couple of times seems to sort it out 'til next life. I'll try out 10.1 when I finish work.

I see what you're getting at with the TOS mouse thing. You have done an extraordinary amount of work in a minuscule amount of time, I mean this emulator just suddenly appeared out of nowhere. Great job.
Mouse shoudl be all fixed in 10.2 :)

Castaway/GP is getting a little old in the tooth now.. shes been around about 2 months now ;)

(also note that before Castaway/GP came out, I'd already ported both STonX and Castaway normal, and Castaway/GP is based on a 3rd port.. CastCE). I also ported my own basic ST emulator (which is mostly a TOS emulator reeally, not doing graphics hardly at all). So in reality, I've already ported 4 ST emulators to gp32 ;)

jeff
 
Last edited by a moderator:
Back
Top