DavidLudwig / macemu

Basilisk II and SheepShaver Macintosh emulators
14 stars 1 forks source link

Basilisk II: on OS X host, System 7.5.5 can be very slow to boot #25

Open RonaldPR opened 7 years ago

RonaldPR commented 7 years ago

Tried BasiliskII prerelease 6 for OSX as posted in Emaculation forum, with System 7.5.5 on macOS 10.12.6 (Sierra). Startup proceeds up to and including extension icons racing (much too fast) along the bottom of the screen and then it stops with only the desktop background showing. Mouse arrow shows and can be moved, but no icons on the desktop and no menu bar.

Prefs file: disk /Users/ronald/Applications/BasiliskII/BasiliskII map/kanjer755.dmg disk /Users/ronald/Applications/BasiliskII/BasiliskII map/heenenweer.dmg extfs /Users/ronald/Applications/BasiliskII/BasiliskII map/doorgeefluik screen win/1024/768 seriala serialb ether slirp udptunnel false udpport 6066 rom /Users/ronald/Applications/BasiliskII/BasiliskII map/MAC.ROM bootdrive 0 bootdriver 0 ramsize 268435456 frameskip 0 modelid 14 cpu 4 fpu true nocdrom false nosound false noclipconversion false nogui false jit false jitfpu true jitdebug false jitcachesize 2048 jitlazyflush true jitinline true keyboardtype 5 keycodes true keycodefile /Users/ronald/Applications/BasiliskII/BasiliskII map/BasiliskII_keycodes mousewheelmode 1 mousewheellines 3 dsp mixer ignoresegv true idlewait true

DavidLudwig commented 7 years ago

I suspect this is due to missing or illegal instructions in the 68k emulator, which is currently beyond the scope of my current work, however I'd be happy to dig in a bit on it, to see what might be up.

Might you be able to relaunch Basilisk II from an OS X command prompt window? If so, this should display diagnostic information from Basilisk II itself. Attempts to emulate missing or illegal instructions will get logged there. If you cannot do this, I can look into having a future PR output this data to a text file (which I've already set up Windows builds to do).

DavidLudwig commented 7 years ago

I do, however, wonder if the 68k emulator is being built correctly.

Knowing which instruction(s) fail, if any, may help.

RonaldPR commented 7 years ago

Other (older) BasiliskII builds work fine with the same files and settings. I will try to launch your build using Terminal.

DavidLudwig commented 7 years ago

Which builds of Basilisk II were you using? Do you have any details on who made them, and/or when they were released, and/or any other details on what they included?

RonaldPR commented 7 years ago

It appears that after the extremely fast beginning of the startup process it takes some 100 seconds for the desktop to appear. I did not wait that long before. When the desktop finally appears, things seem OK.

Terminal output (removed path): Last login: Thu Aug 24 17:52:25 on ttys000 $ BasiliskII\ (Ludwig).app/Contents/MacOS/BasiliskII ; exit; Basilisk II V1.0 by Christian Bauer et al. WARNING: Unknown preferences keyword 'keycodes' WARNING: Unknown preferences keyword 'keycodefile' WARNING: Unknown preferences keyword 'mousewheelmode' WARNING: Unknown preferences keyword 'mousewheellines' WARNING: Unknown preferences keyword 'dsp' WARNING: Unknown preferences keyword 'mixer' WARNING: Unknown preferences keyword 'ignoresegv' Reading ROM file... Using SDL/coreaudio audio output

The various builds I have here are linked to from this topic in Emaculation BasiliskII forum. http://www.emaculation.com/forum/viewtopic.php?f=6&t=7361

DavidLudwig commented 7 years ago

What are you using as a host system?

RonaldPR commented 7 years ago

As I wrote above: macOS 10.12.6 (Sierra).

Hardware: iMac (late 2013), 2.9 GHz Intel Core i5, 1 TB Fusion Drive, 16 GB 1600 MHz DDR3, NVIDIA GeForce GT 750M 1024 MB

DavidLudwig commented 7 years ago

I don't have that hardware config setup, per se, but do have a lower-end Mac, a 2010 Mac Mini, which I'll try booting System 7.5.5 on.

I'll be trying a stock, Universal install of System 7.5.5, with all extensions enabled (minus AROSE, which seems to crash Basilisk). Any suggestions for additional extensions, control panels, Mac Rom, etc. welcomed.

DavidLudwig commented 7 years ago

For reference, I've already tried booting 7.5.5 on a max-ed out 2015 MacBook Pro, but I didn't see much in the way of lag. It only takes a few seconds (less than five), to boot, starting from launch of Basilisk II.

RonaldPR commented 7 years ago

The issue is manifest with only the extensions enabled that belong to the System 7.5.5 installation itself. (A default System installation should normally not install the A/Roze extension in BasiliskII. A custom installation for all Mac models will, though. A/Roze was intended for use with special hardware expansion cards.)

The host OS version may be more relevant than the hardware. Which OSX/macOS version do you use? (Mac OS X was first renamed OSX and with the latest version renamed macOS, not to be confused with classic MacOS.)

All older (32-bit) BasiliskII builds I have here boot within 10 seconds on my iMac with macOS 10.12.6. (Sierra). But all older 64-bit builds I have here do not run at all on OSX 10.10 (Yosemite) and later, as also 64-bit SheepShaver. This 64-bit build of yours is the first one I tried that does run at all. There may have been other 64-bit builds that work, but I did not follow developments closely recently.

RonaldPR commented 7 years ago

I tried with various BasiliskII settings for Model ID and CPU and I tried with different ROM files (1MB Performa rom and 500KB LCII rom. Always the same lag during startup just before the appearance of the desktop, which I think is a lag during loading of the Finder.

jvernet commented 7 years ago

It's related to network: TCP/IP is broken in this SDL2 version. Remove AppleShare, it will boot a lot faster, but no network. I can't find any Basilisk.Xcode Project in the original Macemu git, so I can't build Basilisk.

RonaldPR commented 7 years ago

Right. That is also what I suspected. I noticed that slirp networking did not work.

(I don't think there has ever been a Xcode Project for BasiliskII.)

rickyzhang82 commented 7 years ago

slirp is not 64 bit clean.

DavidLudwig commented 7 years ago

@jvernet + @RonaldPR : The Basilisk II Xcode project is new, and is something that I added for the SDL2 port.

@rickyzhang82 : In what way(s) are slirp not 64-bit clean? Any thoughts on how difficult it might be to allow it to work on a 64-bit host?

rickyzhang82 commented 7 years ago

@DavidLudwig I knew it is not 64 bit clean because it failed to compile slirp under 64 bit OS. TBH, I didn't dig deep enough to know how slirp work. It seems that it was stolen from QEMU. Someone tried to fix it in this PR https://github.com/cebix/macemu/pull/55. But you never knows if this did fix all issues or if there is any bugs.

jvernet commented 7 years ago

Actually, David's XCode project build SLIRP, but slirp do not work in 64 bits mode. I tried to build 32 bit, it work; network work BUT I have only half of the pixel on the Mac screen. SLIRP need to be updated from QEMU, where it work in 64 bits. About the XCode project: I removed the build of SDL 2, as I already have my own SDL Framework build, 32/64bits, with or without Debug. SDL2 port is very promising: very fast !

RonaldPR commented 7 years ago

The delay before the Finder appears during startup is only some 4 - 5 seconds when TCP/IP control panel in the guest is set to AppleTalk (MacIP) instead of Ethernet.

jvernet commented 7 years ago

I've got slirp now working in 64 bits mode. david's XCode project do not buil with slirp support, but Unix way of building will now work.

kencu commented 6 years ago

FYI, JIT is broken unless this patch https://github.com/cebix/macemu/commit/1c9b21f580501c5d5833935375945479c5651964 is brought over from the main repo. I find this has a notable effect on speed.

I'm using this SDL2 version now as my main BasiliskII build, and so far I like it! (32 bit, JIT fix included).