Switch to full style
About Mini vMac and all other 68k emulators, including SoftMac, Executor, and MESS.
Post a reply

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

Fri May 09, 2014 7:04 pm

If he's going to port, I'd shy away from GTK+ in favour of Qt. WxWidgets is of course always a good solution.

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

Fri May 09, 2014 7:15 pm

If rendering is just needed and no gui you could use SDL.

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

Fri May 09, 2014 11:14 pm

I actually tend to prefer a command-line binary based on SDL with a front end using Qt or WxWidgets. On a Mac, you can just drop the binary inside the GUI app even :) Plus, it means if someone wants to write a system-native GUI, they can.

Just look at MAME for a successful project that operates this way.

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

Sun May 11, 2014 2:27 am

I'm looking into writing a small SDL gui for POSIX-y systems, which might exclude windows. I haven't written code on windows in a long time, but I don't remember it having great native POSIX support. Maybe using Cygwin is an option, if that's still around. Most recently I committed a small GLUT-based debugger app which might compile on Linux/*BSD - though I haven't tried to yet - but it's not really meant for public consumption. If anyone's a really dedicated A/UX fan and linux nerd, they can try to compile it. Pro tip: just type "continue\n" and it'll begin executing.

In other news, PRAM is now working! :D The VIA code had to be extensively refactored to make this happen, but I'll try to get this integrated into the GUI and crank out a release soon. Not much progress has been made on 3.0.1 support, but I'll definitely try to get clean not-crashing restart working for v0.0.3.

Shoebill also has a new mascot, with props to http://dirtiran.deviantart.com!
Image

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

Sun May 11, 2014 6:09 am

Wow! That's great news about PRAM! Just so you know, that means at this point you know enough about hardware/system interfaces that if you ever wanted to change jobs, you've got a lot of really good companies that would be more than willing to hire you :)

As for SDL, it compiles on Windows, either natively or under Cygwin or MinGW. MinGW's probably the easiest to get working, without all the dependency headaches you can get with Cygwin.

Might be worth creating a headless target anyway, so that others could set it up using command-line switches only and/or provide their own GUI. Keep the native GUI by default though; I know I sure appreciate it :)

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

Sat May 24, 2014 9:06 pm

Dumped a new shoebill release on github! v0.0.3
https://github.com/pruten/Shoebill/releases

  • Now supports restart/shutdown without crashing
  • Now supports PRAM!
  • Now idles when A/UX's scheduler idles
  • Has limited support for the real time clock. It usually gets the *day* right, and it usually progresses forward monotonically (working on it)
  • Supports full screen mode
  • Other little fixes

Still working on getting 3.0.1 to work, and addressing all the weird random freezes and crashes...

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

Sat May 24, 2014 11:18 pm

pruten wrote:Snip

Great work you are doing with Shoebill :-)
Are you able to fix the random stuttering?

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

Sun May 25, 2014 2:01 am

julialy wrote:Great work you are doing with Shoebill :-)
Are you able to fix the random stuttering?


Thanks :) I'm actually not even sure where the stuttering comes from. I think the still-not-working VIA timers might be responsible. Another possibility is the fact that the CPU blocks while waiting to read disk image data during SCSI reads, but that doesn't really explain the freezes I'm seeing (but then I've only ever run shoebill from a SSD, so perhaps that really is causing worse stuttering on other people's machines...)

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

Mon May 26, 2014 5:41 am

Hi,

Great progress. I experience no stuttering. But I also run from an SSD.
Restart and direct availability of a working mouse really improve the user experience ;-)

Best,
Cat_7

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

Mon May 26, 2014 2:35 pm

Also, there isn't a way for me to cancel the A/UX boot sequence to run fsck, since it goes too fast and I can't click the cancel button.

There needs to be a way to fix the filesystem, either through the emulator GUI or outside the emulator. Any suggestion?

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

Mon May 26, 2014 4:13 pm

julialy wrote:Also, there isn't a way for me to cancel the A/UX boot sequence to run fsck, since it goes too fast and I can't click the cancel button.

There needs to be a way to fix the filesystem, either through the emulator GUI or outside the emulator. Any suggestion?


I've considered maybe emulating fsck directly (via emulated syscalls), but in general, I just boot into verbose mode. It'll run fsck automatically.

Image

Also, as of 0.0.3, A/UX filesystems should be severely corrupted less often. This is because A/UX automatically syncs mounted filesystems every 30-60 seconds, and prior to the real time clock working, it couldn't actually count that high. So now you can expect more data to have been sync'd after a crash.

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

Mon May 26, 2014 5:26 pm

Any chance of adding snapshotting/journalling on the emulation side? This should at least enable reverting to last known good state after corruption.

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

Tue May 27, 2014 2:36 pm

adespoton wrote:Any chance of adding snapshotting/journalling on the emulation side? This should at least enable reverting to last known good state after corruption.


Yeah, that's something I'd definitely like to do in the future, perhaps as part of a more sophisticated disk image infrastructure. That plus automatically wrapping plain HFS volumes in a partition map so that A/UX can recognize them, and maybe adding .dmg / disk copy support.

Nearer term plans include figuring out why 3.0.1 won't boot, fixing a bunch of bad scsi behaviors, 16/32-bit video, and maybe getting sound working a bit.

Also, I've recently discovered that the System 7 time manager on A/UX doesn't use microsecond VIA timers. Instead, it fakes it by multiplying the 60hz "tick" timer by (1000000/60). The 60hz clock does work, so I'm not sure why there are so many weird timing issues on A/UX 3.0.0...

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

Thu May 29, 2014 2:43 am

How do I get my empty disk image to mount? I added an empty disk image, but no format box shows up.

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

Thu May 29, 2014 6:05 am

Hi,

On the pages 2/3 of this thread there are diskimages you can download and an explanation of how to create your own.

Best,
Cat_7

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

Thu May 29, 2014 4:36 pm

ah, okay, thanks for the tip!

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

Sun Jun 01, 2014 7:06 pm

julialy wrote:How do I get my empty disk image to mount? I added an empty disk image, but no format box shows up.


What I've been doing is,
Code:
dd if=/dev/zero of=/foobar.img bs=1m count=512
hdiutil attach -nomount foobar.img

And then using Disk Utility.app to create an Apple Partition Map with 1 HFS+ partition. System 7 will recognize the pmap, and give you the option to reformat the partition.

Also, just got "thousands" and "millions" of colors working!

Image

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

Mon Jun 09, 2014 8:48 pm

adespoton wrote:As for SDL, it compiles on Windows, either natively or under Cygwin or MinGW. MinGW's probably the easiest to get working, without all the dependency headaches you can get with Cygwin.

Might be worth creating a headless target anyway, so that others could set it up using command-line switches only and/or provide their own GUI. Keep the native GUI by default though; I know I sure appreciate it :)


By popular demand, there is now a linux port! It's not complete yet (lacking PRAM, and support for config files), and it can only be built by hacking up the makefiles. Not quite sure how to do cross-platform makefiles... But I'll try release a 0.0.4 binary for linux as well as OS X.

Image

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

Tue Jun 10, 2014 12:49 am

This might help with the makefiles:
http://llvm.org/docs/CMake.html

Of course, that's using CMake; you could use a different makefile generator (there are a number).

If you want to do it all by hand, it'll get trickier, but you'll need to query the BUILD_ENV among other things.

Or you can take a page out of Mini vMac's playbook, and make Shoebill the dev environment, and have it generate the appropriate makefile ;) Not so good for having a non-dev-environment target though.

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

Tue Jun 10, 2014 5:11 am

well the good news is that I got it to compile on windows! ...

Code:
D:\shoebill\Shoebill-master\sdl-gui>gcc sdl.c ..\intermediates\*.o -lmingw32 -lsdl2main -lsdl2 -lws2_32 -lopengl32  -o shoebill.exe
sdl.c: In function '_handle_key_event':
sdl.c:316:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         const uint16_t value = (uint16_t)_value;
                                ^
Warning: resolving _Sleep by linking to _Sleep@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving _ntohl by linking to _ntohl@4
Warning: resolving _ntohs by linking to _ntohs@4
D:\shoebill\Shoebill-master\sdl-gui>shoebill
Winsock inited!
Rom checksum doesn't match (computed=0x00000000, expected=0x97221136)



The bad news is that it doesn't work.. I don't know offhand why it's computing a checksum of zero.. the file is there, I guess I'll have to dig deeper... And I guess it's related to ntohl in winsock not doing it's job correctly, or the replacemnt I had to use for fseeko...

Code:
#ifndef HAVE_FSEEKO
#define fseeko(a, b, c) fseek(a, b, c)
#define ftello(a)       ftell(a)
#endif

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

Tue Jun 10, 2014 8:48 am

more progress... Turns out that there is a lot of "fopen" stuff that never specifies BINARY MODE... MinGW defaults to ASCII so yeah.

Image

For some reason the filesystem type is 520 bytes, not 512... so one of the datatypes has a mismatch.

But you know, progress!

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

Tue Jun 10, 2014 12:20 pm

neozeed wrote:well the good news is that I got it to compile on windows! ...


Wow! I didn't expect to see it running on windows so soon! I was truly planning to switch the fopen() mode to binary :) Not sure why you're hitting panics now... "exec = 'startmac'" indicates that the kernel booted and is running the mac virtualization environment. "physaddr = 0x6369a26f" is definitely bogus.

neozeed wrote: For some reason the filesystem type is 520 bytes, not 512... so one of the datatypes has a mismatch.


Hmm... presumably the root filesystem should be UFS and not SVFS. Is it possible the root filesystem is mangled from having run with fopen in ASCII-mode?

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

Tue Jun 10, 2014 1:18 pm

it's to do with the packed structures.

apparently it's a thing where structures under MinGW are a different size than Linux, and there is a 'simple fix' with the cflag

-mno-ms-bitfields

So it got much further!...

Image

And it was crashing in either memory or video... So like an idiot I tried to mess with the source, and now ... I can't build it. I just purged, and rebuilt and I get a white screen..... It's stuck somewhere in the source.

It's getting late, so I'll zap it and try again tomorrow... but yeah, so close under Windows, it basically boots up, switches video modes, then corrupts the screen, and as soon as the corruption touches the mouse pointer, or an element on the screen it's updating itself and it crashes.

ARGH!!!!

-----edit
so I purged everything, and rebuilt. again and again.. and now it's working!!!!!! turns out that signals on windows just aren't needed.

Image

Binary is here, and source code is here.

Sorry for anyone who wants to download, you have to deal with the idiotic password system :(

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

Tue Jun 10, 2014 11:55 pm

Amazing to see a Windows port. Thank you! Now for the noob question: what's the command line required to run your bootable disk image??? Thanks for any help.

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

Wed Jun 11, 2014 12:36 am

I hard coded it to my liking.... :)

so looking at sdl.c

Code:
user_params.rom_path = "macii.rom";
    user_params.relative_unix_path = "/unix";
   
    user_params.height = 600;
    user_params.width = 800;
    user_params.ram_megabytes = 32;
    user_params.verbose = 1;
    user_params.scsi_path[0]="root.dmg";
    user_params.scsi_path[1]="hfs.dmg";


this is what it will do by default.

full options are

Code:
ram=    how many MB
height=  screen height
width=  screen width
verbose=   boot in verbose mode (good idea, it'll force a filesystem check if needed
rom=   your macII rom
unix-path=  path to kernel (you dont need to mess with this
disk0=  hard disk image 0 (first one, the boot disk)
disk1=
..
disk7=


so you can launch it something like this:


Code:
shoebill.exe  mem=8 verbose=0 height=640 height=480 disk0=apple-aux-2.0.iso
Post a reply