Login  •  Register


The time is now: Sun Jun 25, 2017 5:15 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 17 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue Jan 24, 2017 7:49 am 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
Hi everyone,

I'm new here. Forgive me, I'm not sure I'm in the right place or on the right forum. I've been having fun with this little project of mine and was hoping I could get some advice and opinions. There aren't a whole lot of resources out there for OS9 development and system-level stuff.

I recently made a super simple wrapper that creates self-contained OS X app packages using SS. I didn't want to use the existing SheepShaver Wrapper because it has issues with fullscreen- which is very important for games. The basic idea is to have classic Mac games play like native .app packages in OS X without revealing to the user that it's using emulation at all. The custom one is ridiculously simple, but it wound up working pretty well. It's just a launcher .app package that loads an internal sheepvm in fullscreen, and then an alias of the application is in the startup items in OS9. It's pretty thrown-together right now but it works surprisingly well. I'm really interested in taking it a step further and modifying OS9.

In order to act like a truly native app, it needs to get rid of the booting screen, and shut down the emulation when the application is closed without giving the user access to the operating system. I can think of 3 ways to do this:

1 (easiest): For startup, replace the startup screen with an all-black screen with the text "Loading". Then replace all of the extension icons to all-black- hiding the extensions loading during boot. I've had some success with this. You have to use a resource editor for the extension. They are not normal icons, and the actual PICTs are scattered about depending on which extension you're looking at. For shutdown, have an os9 script in startup items that launches the app, then issues a shut down command when the app has been closed. It's kind of gimmicky, and I could definitely see it slipping up in different situations. But it kind of works.

2: Have OS9 talk to SheepShaver somehow. I'm not really sure how to do this. I haven't delve into the SS source code right now. I might do it though. Startup should be easier than shut down. I could overlay a splash screen, and have a script in startup items that tells SS when to remove the splash screen. For shut down, there could be something to monitor the application to determine when it has been quit, and tells SS to overlay another splash screen to hide OS9's user interface.

3: Modify OS9 directly. Definitely the hardest solution but probably the most reliable- if it's feasible. I'm not sure where to start. Any advice would be greatly appreciated. I have done a little binary stuff, which may or may not be necessary. The idea would be to prevent OS9/Platinum from displaying any user interface components to the user. Certain things like the file menu are mandatory, since so many fullscreen applications use them. But the desktop shouldn't ever be displayed, and if the user somehow winds up exiting the application mistakenly or through a bug, it shouldn't give them any access to the OS's user interface. I've seen a lot of Windows kiosks that are able to do this pretty well- locking the user into an application. It doesn't seem Apple gives a whole lot of flexibility for these kinds of things back in the OS9 days though. But then again, I do recall there being a lot of software back in the day that did some pretty core modifications to OS9. Again, any advice is super valuable.

I'm really having fun with this project and love the idea of preserving old Mac history. Thanks everyone!!!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jan 24, 2017 11:06 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
I did this a bit a decade or so ago :) One thing I did was replaced the Finder with the app I wanted to launch, just like with System 6 and earlier. Type/Creator: FNDR/MACS on the application, and then it'll load as soon as the boot process is done.

You already know how to replace the MacOS with a different graphic resource; you can also just modify the CLUT resource in various bits so that all the colors used are black. This will automatically make everything load as black.

You can also try creating a file with a PICT resource ID 0 called StartupScreen; I can't recall if this still worked for OS 9, but it was the way floppy-booted games used to load right to the game with only a custom boot image back in the day -- Dark Castle and Beyond Dark Castle do this IIRC.

The StartupScreen image needs a specific Type and creator; can't recall what they are, but it loads a split second after the welcome screen and covers over a lot of the other messaging.

Good luck!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 25, 2017 4:14 am 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
Hah! Replace the finder! That's genius!! Never thought of that.
That works extremely well. I had a boot time issue where the finder lagged for a few seconds and it fixed that too.

Now looking into a way to order it to shut down the system when the application is quit. The system always relaunches the Finder after it's quit. I was using a script that used the Finder to list all applications and then asked it to shut down when a certain application is not running. So I have to find a workaround.

Looks like the finder sends an apple event call to the system to do a shut down. I'm thinking there should be a way to make a replacement Finder application that loads the desired application and sends a call to system to do a shut down when the application is quit.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 25, 2017 6:01 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
There's an app called nofinder that will do this, and I think the gryphel project has something too.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 25, 2017 11:12 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 663
adespoton wrote:
There's an app called nofinder that will do this, and I think the gryphel project has something too.


I've been searching for Nofinder, but it seems that I'm a personal no-finder of that software. Can anyone post a link? Thanks!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 25, 2017 11:46 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
These might help, although they're designed for use with Mini vMac (which can run up to Mac OS 7.5.5 as a Mac II with sound and color now, any screen size):
http://www.gryphel.com/c/minivmac/extras/index.html

I'm pretty sure UnFinder is on here somewhere: https://www.info-mac.org/viewforum.php?f=94

However, doing a search, I discovered that there's a PPC OS X era app by the same name that makes searching for it even more difficult.

Remind me enough and I'll see if I can find it in my collection. There was minifinder, nofinder, unfinder and others, back in the day. They were all System 6 Finder replacements with slightly different features. One of them did nothing other than launch an app when launched, and shut down the OS when that app quit and the "Finder" resumed focus. Not sure how well that would behave under OS 9.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jan 26, 2017 5:03 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
OK; I found my copies of Mighty Finder, MiniFinder and Tiny Finder. They're all from 1985/86 though, so probably not as good as the Gryphel apps if those will work for you. Haven't found NoFinder and UnFinder yet.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jan 26, 2017 11:13 am 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
Wow! Yeah, if you have some replacement Finders, it could possibly save me countless hours of reading Inside Macintosh (although I might do it anyway hehe). Even if they don't run in OS9 they could still provide some great insights. That would be amazing. Thanks so much!!

Scraped Google for Unfinder. Can't find it on the info-mac forums. There's one link to an old ftp site with "Unfinder.sit.bin" but it's a dead link now.

---

But I did find some other minifinders and made some notes:

Nofinder: http://www.macgui.com/downloads/?file_id=22180
- Works in OS9. It acts as a normal Finder when it's a finder in the system folder though. Even uses the OS6 font set. Very interesting.

FaberFinder on Gryphel site:
http://www.gryphel.com/c/sw/sysutils/fa ... index.html
- Looks like it still runs on OS9. Doesn't launch applications when acting as a Finder.

Found some more finders on this page:
http://home.earthlink.net/~gamba2/bootdisks.html

Minisubstitute 1.7.1
- Works in OS9, works as hoped when replacing finder, opens applications, shut down works properly. The GUI is very minimal, no popup windows. There is a bit of a lag after startup, and isn't scriptable. But might be one of the best so far.

Shortfinder 1.5b2
- Fully functions in OS9. Unfortunately, it also acts as a normal Finder when in the System Folder. Not scriptable.

Substitute 1.6
- Works in OS9, doesn't act like a normal finder when installed as a finder (which is good). But it has a popup dialog box with their 'about' info that cannot be closed, and shut down does not function, since it forces the user to "close all applications" - and of course there are applications in OS9 that run in the background.

Getting warmer.

Still very interested in any other finder replacements anyone can find!!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jan 26, 2017 6:41 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
If you have issues with popup dialogs, I can probably open the app up in Resourcerer and nop the call to the dialog. I'm sure the original authors wouldn't mind at this point.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jan 26, 2017 6:45 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 663
This is terrifically helpful. Thank you!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jan 26, 2017 9:52 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
Hmm... I just had another idea: if I can find my copy of ResHacker, I could generate a patch that will replace the A9F4 trap reference from the File menu with a call to the shutdown trap reference. Can't recall offhand what the shutdown value is, but the *Shutdown app in the Apple menu likely spells it out pretty clearly.

Then we could just patch any app we want to use in a wrapper, and it would shut down the OS instead of quitting to Finder.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jan 27, 2017 1:54 am 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
Hah, oh wow that would be amazing!! The best solution is by far using the application itself as a Finder, and that's basically the only missing thing from the equation.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jan 27, 2017 7:29 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 663
What are the chances that it might be possible to use a startup script that would run an application and then shut down the system when that application closes?

I use a startup script for the system I use for running WordPerfect for the Mac; the script performs various housekeeping tasks before launching WP. But I haven't explored a way to shut down the system when WP quits. Can it be done?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jan 27, 2017 7:45 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1643
Yes; an Applescript can do the task, but there will be a noticeable delay introduced at multiple levels. In pre-os x, the script needs to keep polling to see if the process it launched is still running.

I still haven't figured out what the correct toolbox call is to shut down; looks like I may have to dig into the Finder code. I found the ExitToShell calls in some standard software (LodeRunner Online is my test case), and they should be easy to patch. I presume Shutdown is another A9 call, but I'm not sure which one yet. I also had the idea that SheepShaver probably knows, as it intercepts it for application termination. So I may look through the source to see what trap it is looking for.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Jan 29, 2017 9:13 am 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
Yeah, the applescript doesn't work very well. The scripts are relatively unreliable, there's a delay, and boot time is slower. It doesn't give you that seamless experience of a native-esque app like DOSBox, etc.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Feb 14, 2017 10:33 am 
Offline
Space Cadet

Joined: Tue Feb 14, 2017 9:45 am
Posts: 4
Would something like this be similar to the Classic Environment that was on PPC Macs that would use the Apple menu bar in a full screen rootless environment ?

It would be awesome to finally have programs like the Mac versions of FoxPro and Visual FoxPro on intel Mac OS X.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Feb 15, 2017 12:02 pm 
Offline
Student Driver
User avatar

Joined: Tue Jan 24, 2017 6:58 am
Posts: 10
I guess you could say it's kind of like the classic environment. The only difference being that it would be designed mainly for fullscreen apps instead of having platinum's windows load in OS X.

But the basic idea is to have (fullscreen) OS9 apps that run as similarly as possible to native OSX apps.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 17 posts ]


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group