SheepShaver mouse control fix! (somewhat)

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

Warning - This is not finished yet but is it ready for testing..... Lots of work is needed but some games do work however...

So ive been playing with the source code i have not got far yet but heres a sample...

*Known* fixed games so far:
Wolfenstein 3D
MacWorms
Fallout
Super Wing Commander
Age of Empires 1

What it does is:
1. it fixes the bug where windows mouse will snap around screen when mac is loading or installing or doing something (This means you can freely use the windows mouse while the mac is doing anything and it wont effect you)
2. Theres a new hotkey that you can use once you are IN-GAME it is:
Control + Shift + Z ... To use it you must hold down control + shift and TAP z very lightly
If it worked you will see mouse grabbed at top of the screen....
(This is incomplete and doesnt work for all games its a work in progress...)
3. The Control + F5 hotkey can now be used to lock the mouse in the window without activating the FPS lock from #2 (This is very useful since you can use the emulator normally without the mouse going off screen when your using stuff like Photoshop etc -- Note Control + F5 is not used to play FPS games etc use Control + Shift + Z for them!).
4. "Computer" of the host file system available to the Mac now displays 15 GB free instead of 1 GB this allows files over 1 GB to be transferred to the host (It could be set higher than 15 GB but i think its more than enough) -- Note The emulator may seem frozen if your transferring HUGE files just wait it out and it will finish eventually (Or you can watch the file growing in the host folder).

How to play games such as Wolfenstein 3D and MacWorms etc that require mouse:
Do the hotkey (Control + Shift + Z) once you are game and you should be able to play using the mouse with no real problems.

This makes many games playable with mouse but not all games yet.

Eventually this will become a proper mouse grabber that activates when it needs to automatically and works on every game.

Link to my test build (32-bit use window mode only)
http://uberfox.no-ip.org/sheep6.zip
http://www.emaculation.com/sheepshaver/sheep6.zip

(Download for build 6 -- If this number changes it means you need an update)

I hope to have pretty much all FPS games working with the mouse such as Descent, DooM, Duke Nukem etc.

Not just FPS game but any game that requires the mouse to function....

Anyway have a test of my extreme alpha build and let me know what you think and any suggestions to fix it even further thanks.

I very new to the emu source so i dont really know how it works or how to properly handle input signals to it so anybody who DOES know i could use your help :)

Edit from the future: I added a working download link. -ClockWise
Last edited by ClockWise on Wed Apr 03, 2013 7:06 pm, edited 12 times in total.
Reason: Added a working link
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: Wolfenstein 3D mouse control fix!

Post by UberFoX »

Anybody tried this? Input is helpful in deciding how to improve it further... Something that works for me may not work for everybody i could use a few test etc hmm.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Wolfenstein 3D mouse control fix!

Post by Cat_7 »

Yes,

I tried it. Certainly the fix for the irratic mouse behaviour on sheepshaver start is great.
The in-game fix works, but it is very specifically related to that situation. And as I don't play many games, I can't really comment on it.

Best,
Cat_7
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: Wolfenstein 3D mouse control fix!

Post by UberFoX »

Cat_7 wrote:Yes,

I tried it. Certainly the fix for the irratic mouse behaviour on sheepshaver start is great.
The in-game fix works, but it is very specifically related to that situation. And as I don't play many games, I can't really comment on it.

Best,
Cat_7
The plan is to eventually have it working on all games that focus the mouse such as FPS games etc.

Once that's working the next step will be making the emulator decide when and when not to activate the focus automatically.

Although the one thing you could test is does the mouse snap around when Mac is loading/installing etc while you try to use windows?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Wolfenstein 3D mouse control fix!

Post by Cat_7 »

Certainly the fix for the irratic mouse behaviour on sheepshaver start is great.
I did, and it works just fine. I'm very happy with it.
I also tried the in-game mouse behaviour in wolfenstein 3-d. That also works as you described through the key commands. The game itself runs way to fast for my old brain, so I get disoriented quite quickly ;-)

Perhaps it is better for publicity if you create a new post with a more descriptive title in which you post builds. I'm sure the more generic fixes, like the irratic mouse fix on start-up please a lot of users.
I can make it stick to the top of the postings list, so it will get the required attention.

Best,
Cat_7
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: Wolfenstein 3D mouse control fix!

Post by UberFoX »

Cat_7 wrote:
Certainly the fix for the irratic mouse behaviour on sheepshaver start is great.
I did, and it works just fine. I'm very happy with it.
I also tried the in-game mouse behaviour in wolfenstein 3-d. That also works as you described through the key commands. The game itself runs way to fast for my old brain, so I get disoriented quite quickly ;-)

Perhaps it is better for publicity if you create a new post with a more descriptive title in which you post builds. I'm sure the more generic fixes, like the irratic mouse fix on start-up please a lot of users.
I can make it stick to the top of the postings list, so it will get the required attention.

Best,
Cat_7
Eventually the code of the emulator is a real mess its gonna take time to understand it.
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

Under what circumstance do you get the erratic mouse behavior while starting up? I don't get that, I'm using the most recent version (gamma ramp patch) of SheepShaver.
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

He means if the emulator is installing macos or booting up (especially if its checking hard disk for errors) or something is installing AND you dont have the emulator focused instead your trying to use windows to do stuff.... It will cause the mouse to go extremely erratic.
Drathian
Student Driver
Posts: 17
Joined: Sat Oct 06, 2007 9:32 pm

Re: SheepShaver mouse control fix! (somewhat)

Post by Drathian »

First off, nice speed on your build, it must be optimized compiled with jit enabled well, now my new favorite. Secondly, I find your hack very useful, esp for a game I've been playing Super Wing Commander, even in fullscreen mode the mouse is normally unplayable with your hack it is playable finally with a mouse.
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

Good :)

Can you find what other games it works on and what it doesnt work on? I could use lists for testing new builds on (It doesnt currently work on Descent1/2 and its a bit fudgy on Redneck Rampage and DooM).

When i made the fix i thought it would fix every game instantly (Since logically it is sound) however it seems theres something else going on with how the mac handles stuff therefore it only fixed like half of them.

Im trying to figure out how to fix the rest.

Once its fixed properly the next step will be to make it automatically shift between mouse modes.
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

I made the control + F5 hotkey useable again to lock the mouse inside the SheepShaver window for use in normal applications such as photoshop etc.

This is not the same as control + shift + z!.

The control + shift + z is used to lock the mouse for FPS games such as Wolfenstein 3D.

Now the host file system "Computer" shows 15 GB of free space so you can transfer files of over 1 GB to the host system!.

Note the emulation may seem frozen when transferring HUGE files you can check if its really frozen by seeing if the file is still growing on the host system.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: SheepShaver mouse control fix! (somewhat)

Post by Cat_7 »

Hi,

I love the grab feature with Ctrl-F5. It works perfect. However, the grab is lost after a resolution change.

Best,
Cat_7
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

Cat_7 wrote:Hi,

I love the grab feature with Ctrl-F5. It works perfect. However, the grab is lost after a resolution change.

Best,
Cat_7
Its supposed to (In case an error occurred) well i can make it not be lost if you think its required... ^^

(If you didn't already know the Control+F5 seems to be somebody Else's attempt at a mouse grab but it doesn't work in FPS games etc -- It probably works on mac/linux versions too but again only for desktop stuff such as photoshop as i said its *useable again*)

Heres some hidden hotkeys not everybody may know:

Control + F5 - grab/ungrab mouse (not for FPS games use my control + shift + z for that)
Control + TAB - Freeze/Unfreeze the emulation (like suspend)
[Control + Alt]hold + Escape[tap a few times] - Force close the Emulator
Control + F1 - Seems to be something to do with mounting floppy images it looks obsolete without a GUI to pick the images...

If there anybody who knows the internals of how the mac handles I/O that can help with making mouse work properly?

Currently i have it working on around 50% of mouse controlled games however i need more details on read/write from the I/O with the mouse....
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: SheepShaver mouse control fix! (somewhat)

Post by Cat_7 »

Hi,

I noticed a quirkiness when the mouse is grabbed through Ctrl-F5 in your 6th build:
Sometimes, when navigating the top menus, the mouse jumps to the left top corner (0,0?) of the screen and then continues as normal from that point.
If there anybody who knows the internals of how the mac handles I/O that can help with making mouse work properly?

There is technical documentation:
1985 Original Inside Macintosh, guides I,II and III: http://www.pagetable.com/?p=50
1992 Later version http://hci.rwth-aachen.de/borchers-old/ ... ntials.pdf
A google search on: site:developer.apple.com "inside macintosh" brings up boatload of docs

About the other key combis: at least Ctrtl-F1 was used in the older Basilisk 142 Windows build to poll a real floppy drive for a Mac disk. Perhaps that old code could help in adding features lost in the current SheepShaver/Basilisk versions? The original developer seems to have stripped those features to create more equality between host platforms supported.

Best,
Cat_7
Last edited by Cat_7 on Sat Jun 09, 2012 10:06 am, edited 4 times in total.
Reason:  
Amade
Tinkerer
Posts: 63
Joined: Thu Feb 18, 2010 10:09 pm

Re: SheepShaver mouse control fix! (somewhat)

Post by Amade »

Your patches seem interesting, are they available somewhere?
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

I used your build to play Duke Nukem.

The control-shift-z didn't fix the mouse problems there, but the control-F5 grab did, though it had to be deactivated to work the menu screens.
Last edited by ClockWise on Thu Jun 14, 2012 4:22 pm, edited 1 time in total.
Reason:  
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

My above report is with the fourth build, as the download for the sixth isn't working for me at the moment.
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

ClockWise wrote:My above report is with the fourth build, as the download for the sixth isn't working for me at the moment.
Link should be fixed now.

Although the V4 control+f5 grab settings may be different to v6.
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

The Ctrl-F5 works better in Version 6 on the desktop, for example, as in version 5 it rendered the mouse unusable. It no longer fixes Duke Nukem, however.

I noticed the problem with Ctrl-shift-z, though. It isn't sticking. That is, if I HOLD those keys down the mouse remains grabbed and Duke is fixed. But if I just tap those keys, the mouse is only grabbed while I'm pressing them.

I'm using SheepShaver in a Window in Windows 7.

If you want to do a test, Duke IS in our download section:

http://emaculation.com/doku.php/downloa ... h_software
http://www.emaculation.com/sheepshaver/ ... PC.sit.hqx
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: SheepShaver mouse control fix! (somewhat)

Post by Cat_7 »

Hi,

Build 6: Ctrl-F5 results in strange behaviour in Netscape 7. The mouse wont go to some buttons or sticks to window edges.

Best,
Cat_7
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

I solved my problem with Duke 3D:

I followed your directions more closely, and tapped ctrl-shift-z very gently and it worked. Duke plays fine! Previously I had been holding control and shift and tapping F5. That doesn't work in any case. It's actually kinda tricky to tap three keys all at once without holding any. Maybe this could be adjusted?
UberFoX
Student Driver
Posts: 19
Joined: Sun Jun 03, 2012 5:00 am

Re: SheepShaver mouse control fix! (somewhat)

Post by UberFoX »

Yes it can be improved by using a timer and only allowing on/off say every 2 seconds.

That would make it snap on/off more easily (i just didnt do that yet since i felt it more important to get the fix working on games rather than making it slightly easier to use while it is not finished lol)
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

I tried it with Dark Forces and it works well there too! I want to try more games, but I think I might actually just try to get ahold of the full version of Duke 3D and play that instead. That game holds up pretty darn well! I had a ton of fun testing out the demo!
OSH
Student Driver
Posts: 10
Joined: Fri Mar 02, 2012 11:46 pm

Re: SheepShaver mouse control fix! (somewhat)

Post by OSH »

Please, give me link for this brilliant fix! The link in first post is inactive :(
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: SheepShaver mouse control fix! (somewhat)

Post by ClockWise »

Sorry for not posting this earlier. Where the heck was I?

http://www.emaculation.com/sheepshaver/sheep6.zip

I did answer your request for a mirror over on Macintosh Garden however. :) I guess this link is for everyone else!
Post Reply