Shoebill - a Macintosh II + A/UX emulator for OS X

About Mini vMac and all other 68k emulators, including SoftMac, Executor, and MESS.

Moderators: Cat_7, Ronald P. Regensburg

neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by neozeed »

floating point updates!

Ok, so I snagged the latest source from CVS, added in my patch nonsense, and got myself an EXE.

I'm going to use fbench & ffbenchout of valgrind (John Walker 1989)


Running with the Apple compiler, it works 100% no issues! :mrgreen:

Code: Select all

jaderabbit.root # cc fbench.c -o fbench -lm
"fbench.c", line 867: warning: statement not reached
jaderabbit.root # ./fbench
Beginning execution of floating point accuracy test...
Pass 100.
And using GCC 2.7.2 that was part of the jagubox archive stuff:

Code: Select all

jaderabbit.root # gcc -v
Reading specs from /usr/local/Gnu/lib/gcc/aux/2.7.2/specs
gcc version 2.7.2
jaderabbit.root # gcc fbench.c -o fbench -lm
jaderabbit.root # ./fbench
Beginning execution of floating point accuracy test...

Error in pass 1 for results on line 2...
Expected:  "   Paraxial ray          47.08372160249   0.04177864821"
Received:  "   Paraxial ray          47.08372160249   0.04177864820"
(Errors)                                                          ^
So there is one "error" being detected by GCC, and if you look at the difference, it's so minimal.

By comparisson, I've been playing with GCC for the Sharp x68000... And XM6 TypeG has a 68881 emulation or host FPU swap, and it consistently has the same errors...

Beginning execution of floating point accuracy test...

Code: Select all

D:\x68000\shared>human68k-gcc -v
Using built-in specs.
COLLECT_GCC=human68k-gcc
COLLECT_LTO_WRAPPER=d:/x68000/dev/bin/../libexec/gcc/human68k/4.6.2/lto-wrapper.
exe
Target: human68k
Configured with: ../../../gcc-human68k/configure --prefix=/ --target=human68k --
host=i686-pc-mingw32 --disable-nls --with-newlib --without-headers --disable-lib
ssp --with-mpc=/home/lmaillet/x68k/tc-w32/packages/mpc-0.8.2/ --enable-languages
=c
Thread model: single
gcc version 4.6.2 (GCC)

D:\x68000\shared>human68k-gcc -m68030 -m68881 fbench.c -o fbench -lm

D:\x68000\shared>human68k-objcopy -v -O xfile fbench fbench.X
copy from `fbench' [elf32-m68k] to `fbench.X' [xfile]
And running on XM6 TypeG

Code: Select all

Error in pass 1 for results on line 1...
Expected:  "   Marginal ray          47.09479120920   0.04178472683"
Received:  "   Marginal ray         -76.60446725159  -0.62065031521"
(Errors)                            ^^^ ^^ ^^^ ^^^^  ^  ^^^^^^^^^^^

Error in pass 1 for results on line 3...
Expected:  "Longitudinal spherical aberration:        -0.01106960671"
Received:  "Longitudinal spherical aberration:       123.68818885408"
(Errors)                                             ^^^ ^^^^^^^^^^^

Error in pass 1 for results on line 4...
Expected:  "    (Maximum permissible):                 0.05306749907"
Received:  "    (Maximum permissible):                 0.00018529689"
(Errors)                                                  ^^^^^^ ^^^

Error in pass 1 for results on line 5...
Expected:  "Offense against sine condition (coma):     0.00008954761"
Received:  "Offense against sine condition (coma):     1.01305406898"
(Errors)                                               ^  ^^ ^^^^^^^

Error in pass 1 for results on line 7...
Expected:  "Axial chromatic aberration:                0.00448229032"
Received:  "Axial chromatic aberration:               -0.70692188363"
(Errors)                                              ^  ^ ^^^^^^^^^

Error in pass 1 for results on line 8...
Expected:  "    (Maximum permissible):                 0.05306749907"
Received:  "    (Maximum permissible):                 0.00018529689"
(Errors)                                                  ^^^^^^ ^^^
What is interesting, (well to me) is that gcc with -msoft-float operates differently on either platform, with the jagbox giving a lot of 0.00 restults. But I don't think that's a fault of Shoebill, since to run A/UX you need a 68881, and who would test FPU emulation under a platform that demands a FPU?

So yeah, excellent job!!!! :mrgreen:
don't do today what you can put off until tomorrow.
pruten
Tinkerer
Posts: 68
Joined: Thu Feb 27, 2014 3:10 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by pruten »

neozeed wrote:Awesome! Id' love to get my SLiRP stuff in there by default? SLiRP is FreeBSD's TCP/IP stack so it is BSD licensed. My trivial modifications (as always the trick is to know where) along with the integration glue can be licensed to whatever, I'm more interested in seeing it work than licensing hell. Otherwise this guide thing should be pretty agnostic.
That seems doable. SLiRP is probably a lot easier for regular users to use than tun/tap. I dread having to write up documentation on configuring and troubleshooting TAP interfaces.

I think I'm about done banging on the new FPU code, since it works well enough. It's probably chock full of weird bugs, but I don't have any test cases for testing the correctness of a 68881 implementation. Presumably Motorola had one they used internally...

The most recent commits on github have a bunch of performance improvements, and it's maybe 25-50% faster based on profiling. Instruction fetches are now done through a specialized cache that takes advantage of the fact that instruction reads most often occur within the same page as the last read.

I'm planning to throw a new release together soon. I'm going to focus on the SDL version, since it has the broadest appeal and it's easier to add new features to its CLI than to the cocoa version. The argument format is probably going to change. I want to allow users to install and configure nubus cards in arbitrary slots, so you could for example have 4 video cards and 2 ethernet cards, with 4 SDL windows and 2 TAP interfaces. Or 6 video cards, or 0 video cards and 6 ethernet cards (have to double check whether A/UX will boot without a video card). After that, I guess I'll start working on sound, SLiRP, or improving/threading SCSI.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by adespoton »

I'm not sure about correctness tests,, but you could do a comparison test against SoftwareFPU to monitor the differences in instruction handling. I haven't been able to track John down, but he probably had his own test suite back in the day -- I remember him being active on the Info-Mac discussion boards.
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by neozeed »

Cool, I'm still alive, and more than willing to help any way my limited skills can.

I have super high hopes of being able to keep a server up for for longer than 24 hours.. :mrgreen:
don't do today what you can put off until tomorrow.
KingJunglist
Space Cadet
Posts: 2
Joined: Mon Feb 16, 2015 4:10 pm

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by KingJunglist »

OK guys, I'm having a bit of hassle copying an A/UX installation onto a separate disk and booting it.

I'm using:
- MacII ROM (md5 = 66223be1497460f1e60885eeb35e03cc)
- an A/UX 3.0.1 installer disk image (the venerable "AUX_3.0.1_Install.toast_image")
- the 420MB+80MB swap disk image (created by equally venerable neozeed)
- Shoebill 0.0.4, last commit

Code: Select all

commit a66ad6d9b48c6ff7f582b360b25476472c90194c
Author: Peter Rutenbar <pruten@gmail.com>
Date:   Thu Jan 29 23:20:23 2015 -0500

    A/UX 3 should boot reliably now
    
    - Added a hack to bypass SetUpTimeK, which works on 3.0.0,
      not sure about other versions.
A/UX boots fine from the installer image. I can mount the other disk image and sync the root filesystem across (using dump.bsd as per http://support.apple.com/kb/TA32490).

However, when I try to boot from my new disk image, it starts booting but then gives me the following error:

Code: Select all

Error output from startmac:

   The system file is missing, protected or corrupted.
   Check "/mac/sys/System Folder/System"
   Fatal error in Toolbox

Error output from CommandShell:

   Can't attach to the toolbox environment

Press the Return key to exit.
The last thing it says before I get this message is:

Code: Select all

INIT: new process: id 'dbg2'. action 'wait'
INIT:   exec /etc/telinit v # turn off init's verbose mode
Any ideas? I've tried rebuilding the System Folder using the "systemfolder" command and replacing the one at "/mac/sys/System Folder", but that didn't work. Plainly the problem is somewhere else.
KingJunglist
Space Cadet
Posts: 2
Joined: Mon Feb 16, 2015 4:10 pm

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by KingJunglist »

OK guys, I'm having a bit of hassle copying an A/UX installation onto a separate disk and booting it.
OK, panic over. I must have had a dubious A/UX image. Found another one and the dump/restore worked perfectly.

Rock on A/UX :-)
pruten
Tinkerer
Posts: 68
Joined: Thu Feb 27, 2014 3:10 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by pruten »

KingJunglist wrote:
OK guys, I'm having a bit of hassle copying an A/UX installation onto a separate disk and booting it.
OK, panic over. I must have had a dubious A/UX image. Found another one and the dump/restore worked perfectly.

Rock on A/UX :-)
Oh good! All hail A/UX :)

I've been both busy and, uh, lackadaisical about updating shoebill. The readme.md on github makes a lot of lofty claims about posting new binaries and this and that, but I haven't really thought about it in the past month or so. Also, some casual code inspection revealed a lot of weird bugs in the new fpu code. I think the BSUN exception fires whether or not the NaN condition bit is set, which one might call an "oversight" to be kind. There are also a few other major dumb bugs I found that I can't remember.

Regrettably, I'm kinda losing interest in this. It definitely works, which is more than I ever expected to achieve. I thought it'd be the loftiest, most remote goal to successfully draw a gray startup screen, and maybe get a boot beep. And it took like four years and three total rewrites to get there, (sans beep). I almost started a new project to rewrite the cpu/mmu core as a dynamic recompiler using OS X 10.10's hypervisor kext, but I doubt I'll ever get around to that.

So in spite of my several recent claims and promises, I'm not sure I'll get around to releasing any more binaries in the near future. If all else fails, I'm sure I'll post at least one more major update/binary in the future some time. But if anyone else so loves A/UX and wants to take over the project in the short/long term, that would be super, and I'd be happy to transfer all my various knowledge about the guts of A/UX. (Its weird random dependencies on lowmem parameters, the particular MMU features it uses, the way its SCSI driver talks to the NCR5380 (on v0.7 and v1.x-v3.x), the mid-boot speed tests 3.x.x does, anything about 680x0/6885x/6888x architecture, or anything about IEEE 754 subnormal numbers which I've suddenly become an expert in - I'd be very happy to answer!) (And I'd like, but can't demand, that any shoebill derivatives be released under a permissive BSD-like license :) )

Anyways, if all else fails, I expect to release at least one more binary eventually. It's just that devising user interfaces and setting up linux/windows build environments are my least favorite things, so it'll probably be a while until I get around to it.
Last edited by pruten on Mon Feb 23, 2015 5:06 pm, edited 1 time in total.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by emendelson »

You've done an amazing job already, achieving things that most of us thought were impossible. No one can complain about your decision. All we can say is "Thank you" for what you've already done.

One thought about Shoebill that makes me hope someone else might pursue it: There seems to be a real chance that Basilisk and SheepShaver will be unusable in future OS X versions. Shoebill may turn out to be the only practical way to run System 7-era applications and games under OS X. That's certainly one reason to hope that it might have a future.

Again, thanks for all your work on this. I enjoyed putting together an Applescript wrapper for it last summer, and will try to update it for your next binary.
CharlesS
Granny Smith
Posts: 107
Joined: Thu Aug 14, 2008 9:05 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by CharlesS »

emendelson wrote:One thought about Shoebill that makes me hope someone else might pursue it: There seems to be a real chance that Basilisk and SheepShaver will be unusable in future OS X versions. Shoebill may turn out to be the only practical way to run System 7-era applications and games under OS X. That's certainly one reason to hope that it might have a future.
Have you checked out MESS? Previous versions had some issues with the Mac emulation, but the current version (0.159) seems to work pretty well at emulating a Mac II-series machine. Still won't help for software that requires a 68040 or PowerPC processor, but better than nothing.
There's no earthly way of knowing, which direction we are going, for the rowers keep on rowing, and they're certainly not showing any signs that they are slowing.
KAYOver
Space Cadet
Posts: 1
Joined: Tue Jul 21, 2015 2:54 pm

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by KAYOver »

Anyone have fully configured VM of this? I want to test it, and I will appreciate if someone get for me link with preinstalled/configured A/UX :sad:
User avatar
Cat_7
Expert User
Posts: 6121
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by Cat_7 »

Hi,

In case you missed it: Shoebill 0.0.5 is out! A binary for OSX can be found here:
https://github.com/pruten/Shoebill/releases

This is new:
-New FPU core that ought to work better than the old one
-Ethernet support with TAP
-CPU speed improvements and many CPU bug fixes
-Multiple screen support

Best,
Cat_7
MetalSnake
Granny Smith
Posts: 120
Joined: Fri Nov 09, 2007 5:42 pm

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by MetalSnake »

Tenox scanned and published A/UX 3.0 Documentation here: http://www.tenox.net/docs/
I found it via http://virtuallyfun.superglobalmegacorp ... on-update/

Thought you guys might be interested in this.
uternet
Space Cadet
Posts: 6
Joined: Mon Dec 28, 2015 2:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by uternet »

I can't download neozeed's Windows build, because I have no account for "vpsland.superglobalmegacorp.com"

I had download the shoebill-0.0.5 and compiled it on Debian Jessie(with some warning):

/tmp/ccgrVNDc.ltrans2.ltrans.o: In function `_init_pram':
/home/uternet/shoebill-0.0.5/shoebill-0.0.5/sdl-gui/sdl.c:494: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

And, I had installed A/UX 3.0.1 follow neozeed's thread:
http://www.emaculation.com/forum/viewto ... 483#p49174

But I can't let network working (slirp had installed from apt source)

anyone help me?
Thanks!
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by uyjulian »

uternet wrote:I can't download neozeed's Windows build, because I have no account for "vpsland.superglobalmegacorp.com"

I had download the shoebill-0.0.5 and compiled it on Debian Jessie(with some warning):

/tmp/ccgrVNDc.ltrans2.ltrans.o: In function `_init_pram':
/home/uternet/shoebill-0.0.5/shoebill-0.0.5/sdl-gui/sdl.c:494: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

And, I had installed A/UX 3.0.1 follow neozeed's thread:
http://www.emaculation.com/forum/viewto ... 483#p49174

But I can't let network working (slirp had installed from apt source)

anyone help me?
Thanks!
Pay attention to the error page, it will tell you the username and password you need to enter.
uternet
Space Cadet
Posts: 6
Joined: Mon Dec 28, 2015 2:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by uternet »

julialy wrote: Pay attention to the error page, it will tell you the username and password you need to enter.
Thanks!
uternet
Space Cadet
Posts: 6
Joined: Mon Dec 28, 2015 2:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by uternet »

julialy wrote:
Pay attention to the error page, it will tell you the username and password you need to enter.
But I still has a problem: How to use the builtin Slirp on Linux?

I open two console window: the first one ran slirp, It prompted:

Code: Select all

Slirp v1.0.17 (BETA)

Copyright (c) 1995,1996 Danny Gasparovski and others.
All rights reserved.
This program is copyrighted, free software.
Please read the file COPYRIGHT that came with the Slirp
package for the terms and conditions of the copyright.

IP address of Slirp host: 127.0.1.1
IP address of your DNS(s): 8.8.8.8, 8.8.4.4
Your address is 10.0.2.15
(or anything else you want)

Type five zeroes (0) to exit.

[autodetect SLIP/CSLIP, MTU 1500, MRU 1500, 115200 baud]

SLiRP Ready ...
And another window run Shoebill, But I can't found any Ethernet card in the emulator:

Code: Select all

localhost.root # newconfig
newconfig: Making backup copies of important files.
newconfig: Preparing to build a new A/UX kernel.
newconfig: Building a new A/UX kernel (this may take several minutes).
newconfig: Checking for any installation information.
newconfig: The new configuration will take effect when the system is rebooted.
localhost.root #
Shoebill's README:
* 68020 CPU (mostly)
* 68881 FPU (mostly)
* 68851 PMMU (just enough to boot A/UX)
* SCSI
* ADB
* PRAM
* Ethernet (via emulated Apple EtherTalk/DP8390 card)
* A NuBus video card with 24-bit depth.
codoodguy
Student Driver
Posts: 13
Joined: Tue Nov 17, 2015 8:14 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by codoodguy »

Is it possible to merge shoebill code into BII?
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by uyjulian »

codoodguy wrote:Is it possible to merge shoebill code into BII?
That would be quite messy; Shoebill is written from the ground up and not based on Basilisk II.
nathan8299
Space Cadet
Posts: 5
Joined: Tue Feb 14, 2017 9:45 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by nathan8299 »

does anyone have a copy of the AUXrunner wrapper? i the links i have found are dead.

Thanks,

Nathan
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by emendelson »

I seem to have left a copy of it here:

http://www.columbia.edu/~em36/AUXrunner-0.92.zip

Make sure your browser doesn't change http to https. And it's likely that this won't run at all on modern Macs. I haven't looked at it since 2014.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by emendelson »

emendelson wrote: Fri Aug 04, 2023 8:02 pm I seem to have left a copy of it here:

http://www.columbia.edu/~em36/AUXrunner-0.92.zip

Make sure your browser doesn't change http to https. And it's likely that this won't run at all on modern Macs. I haven't looked at it since 2014.
I looked into this, and I don't think you need this wrapper, because Shoebill 0.5 lets you select a ROM file and disk. I don't have a disk image that works smoothly with Shoebill anyway, and I wasn't able to use the wrapper at all, but I only spent about five minutes on it. Again, I'll be glad to know about your progress.

EDIT: It turns out that Shoebill 0.5 works quite well under MacOS Ventura on an M1 machine. The only thing I can't figure out is how to get a larger screen than 640x480. If I enter 800x600 in the settings, the usable screen remains 640x480. If anyone has any insights, I'll be grateful.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by adespoton »

Do you still have a copy of your Shoebill work up somewhere?

I'm trying to get a self-contained A/UX 0.7 off the ground, and as you can guess, I'm running into all sorts of headaches with the macOS version of Shoebill. Command line arguments still don't work, and I can't seem to even add paths that reference inside the app bundle to the prefs fields. And, of course, I'll have to osascript things to get it to run.

It's things like this that make me so glad Fabrice designed QEMU in the way that he did. So easy to tool it exactly the way you want! I wrote up some apps similar to your applescript ones for A/UX 3.x by hand (create a folder, create a Contents folder, create an info.plist, create a script and mark it executable, toss the payload files in a Resources folder....) in less than 5 minutes.

[edit] running into further problems as well: attempting to run A/UX 0.7 pre-built image with the Mac II ROM, 64MB RAM and an 800x600 screen returns:
Shoebill.app/Contents/MacOS/Shoebill
Assertion failed: (!"odd pc address!\n"), function pccache_nextword, file ../intermediates/mem.post.c, line 749.
Abort trap: 6
I'll see if I can get this sorted.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by emendelson »

adespoton wrote: Wed Mar 13, 2024 6:02 pm Do you still have a copy of your Shoebill work up somewhere?
Possibly on an old machine or a backup. I'm traveling until Sunday night and the laptop I have here doesn't have it. Let me know next week if you still want it.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Shoebill - a Macintosh II + A/UX emulator for OS X

Post by adespoton »

emendelson wrote: Wed Mar 13, 2024 7:53 pm
adespoton wrote: Wed Mar 13, 2024 6:02 pm Do you still have a copy of your Shoebill work up somewhere?
Possibly on an old machine or a backup. I'm traveling until Sunday night and the laptop I have here doesn't have it. Let me know next week if you still want it.
Will do; turns out that the error is 0.7-specific -- I've got 1.1.1 and up working just fine, so I'll use those to fiddle with things. Next up is locating Neozeed's source code to build a SLIrP version, and maybe enable command line arguments on the macOS build, plus create an AARCH64 target like two forks have done. Although with all that effort... maybe it would be more worthwhile to fork qemu-system-m68k and implement the Shoebill MacII architecture in there... in my mythical spare time.
Post Reply