Login  •  Register


The time is now: Mon Jun 25, 2018 7:18 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 72 of 81 [ 2016 posts ]    Go to page Previous  1 ... 69, 70, 71, 72, 73, 74, 75 ... 81  Next
Print view Previous topic  |  Next topic
Author Message
PostPosted: Fri May 19, 2017 7:56 pm 
Offline
Granny Smith

Joined: Sun Nov 01, 2015 10:33 pm
Posts: 107
andreas_g wrote:
An example: Let's say we want to implement 68k emulation into QEMU


I should probably point out that this isn't a particularly good example since QEMU already supports the 68K target, and Laurent even has a test branch which attempts to emulate a Quadra! At least recently there were patches applied that fixed up the emulation enough to able to boot a Linux 68K kernel.

However I should just point out that you're making the mistake here of confusing simulation and emulation. QEMU is an emulator and therefore is not concerned with 100% accuracy, the trade-offs being that timings will be different to real hardware and floating point maths will have rounding errors and some FP status may not match for certain edge cases. But for 99.9% of use cases that's good enough for everyone to run their old software.

FWIW QEMU has struggled in the past because it's SF2 library was forked fairly early on which led to a number of differences. If the decision ends up being that the project moves to SF3 I suspect this time around there will be a greater effort to get any QEMU-specific patches upstream so there is no need to maintain an internal fork.

In terms of emulation you are right in that QEMU will likely never reach the speed of SS, however SS works by live-patching the OS which is not really the focus of QEMU which aims to model real hardware. I should also add as a QEMU maintainer one of the benefits of working on QEMU is that there are a large number of developers who work on independent subsystems such as the JIT, disk IO etc. and so all I need to do is focus on the PPC mac hardware emulation routines.

This contrasts sharply with SS which as a bespoke emulator requires any developer to have complete in-depth knowledge of Mac and PPC hardware. The reason I think that QEMU has a brighter future compared to a lot of the other emulators is that the number of developers with the time, knowledge and skill to work on SS to emulate an entire PPC-based Mac is very few, while at the moment with QEMU I can focus the time I have available on just the PPC Mac-specific hardware emulation. And as as major benefit, as other people improve other QEMU subsystems over time then QEMU's PPC Mac emulation gains from these enhancements automatically :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat May 20, 2017 1:32 pm 
Offline
Granny Smith

Joined: Sun Feb 07, 2016 4:40 pm
Posts: 136
QEMU is superior to SheepShaver in every way, except CPU speed, Disk IO, Sound subsystem, Networking, and Video Subsystem. :mrgreen:


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat May 20, 2017 11:06 pm 
Offline
Apple Corer

Joined: Sun Jan 31, 2016 6:01 pm
Posts: 239
Just wanted to report my research. Since Rosetta fails more floating point tests than QEMU I thought it would be interesting to see what happens when the PowerPC version of Quicktime is ran in Rosetta. I was actually hoping for poor audio playback. What actually happened was MP3 audio played back perfectly.

I used Quicktime 7.6.4 copied from a PowerPC Mac running Mac OS 10.4. I set this copy of Quicktime to run using Rosetta via the Get Info window. While Quicktime was running I could see that Activity Monitor was report it as being PowerPC.

I'm pretty disappointed by this result. It looks as if the floating point unit isn't the reason why audio plays so poorly in QEMU. But this isn't proven true so it still could be the floating point unit. I just wish we knew what was exactly wrong with QEMU.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon May 22, 2017 9:57 am 
Offline
Tinkerer

Joined: Fri Nov 09, 2007 5:42 pm
Posts: 98
mcayland wrote:
QEMU is an emulator and therefore is not concerned with 100% accuracy


First time I hear this. So you are saying higan (aka. bsnes) is not an emulator because it strives for 100% accuracy?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon May 22, 2017 8:52 pm 
Offline
Apple Corer

Joined: Sun Feb 01, 2009 4:55 pm
Posts: 245
mcayland worded it pretty badly. Sometimes, emulators do try to get 100% accuracy. The big thing though is that BSNES/higan is emulating a games console with hardware that can be accurately emulated, though it's requirements are also very high as a consequence of this. Not only that, but the SNES uses hardware significantly easier to emulate than a PowerPC Mac ever had.

BSNES tries to get as cycle-accurate as possible to the original hardware, but QEMU does not intend to do so as having it that way would slow the emulation way too much for it to be usable. Not only that, but while there is extensive documentation on how the 65c816 uses a certain amount of cycles for an instruction, it's not quite as extensive for PowerPC processors. Fresscale's document do at least give hints as to how many cycles each instruction takes. Also, no one has decapped a Mac's chips before, while the SNES has had its chips decapped.

This is probably the best source I've found on this so far for the PPC. (Here's an updated link to the 7410 User Manual, btw)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon May 22, 2017 10:31 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2150
Location: Emaculation.com
There are lots of arguments over what is an emulator and what is a simulator.

But in this context, emulation refers to virtualizing specific hardware in software, and the simulator would be attempting to create software that behaves like an overall system -- so SheepShaver functions with a specific OS, specific hardware set, and patches it all together to make software run quickly and somewhat accurately. What QEMU, MESS, MAME and friends do is create a library of emulated chips, and then have a minor set of simulation code that glues them all together to function like a specific computer. The software running on that computer isn't really taken into consideration at all.

So something like Executor is emulating the OS, and simulating the environment. WINE likewise (despite its name) is emulating the OS and simulating the environment. Higen/BSNES is emulating all of the hardware and using the real OS (which is on the supplied ROMs). QEMU is emulating the hardware and simulating a computer, on which a real OS is run. VirtualBox uses some real hardware, uses an old version of QEMU to emulate the rest, and uses the host architecture instead of simulating a computer for the most part -- but has options to simulate some parts of the system if needed as well. Mini vMac is somewhere between Higen and Basilisk II, patching some parts of the hardware and toolbox chain, but trying to emulate the entire computer architecture for the rest, and trying to become cycle exact for the components being emulated (some bits aren't there yet).


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 8:07 am 
Offline
Space Cadet

Joined: Thu May 18, 2017 9:55 pm
Posts: 7
Hej guys,

I would like to use a printer in my QEMU OS9.2.2 machine.

Network works great.
I tried to pass through the USB-printer. I was able to see it under "system profiler" - but how do I add this device as a printer?

As soon as I start "Apple printer utility PPC" it says I have to activate AppleTalk - but it's already activated.

I don't care if it is a network printer or a local device. But I don't know how to add this thing to my OS9?

Any ideas?

Cheers,
-b0mb


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 3:10 pm 
Offline
Tinkerer

Joined: Thu Aug 14, 2008 9:05 am
Posts: 96
To use the built-in networking to connect straight from OS 9 to the printer, you'd need an OS 9-compatible printer driver, which unless the printer is very old is unlikely to exist these days.

What I do know is that the LaserWriter 8 driver is very flexible. Back when Classic was still a thing, I had a crazy hack involving a 'PAPA' resource with its TYPE set to '=Cst' (as documented here), which sent a PostScript file to an application which was actually an AppleScript droplet. The droplet then sent the PS file to the OS X side and printed it. I wish I'd documented exactly how all this worked, but it's been a decade and a half (jeez...), and my memory is fuzzy.

So, if you have a little programming skill, you could rig up something like that. The main trick (well, after figuring out how to add a custom print job to LaserWriter 8) would be to break out of the emulated environment to send the PostScript file to OS X. You could probably use the network to do it—write a little daemon on the OS X side that the OS 9 droplet could connect to and send the file. You'd of course want to make sure that the firewall on your router was set up such that the port you open wouldn't be visible outside the LAN.

_________________
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.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 3:17 pm 
Offline
Apple Corer

Joined: Wed Apr 10, 2013 9:32 am
Posts: 239
b0mbel wrote:
I tried to pass through the USB-printer.

What do you mean by that? Did you give QEMU direct access to the device or did you share it to the network from your host?

AppleTalk is not involved. Neither in the first case, as AppleTalk has nothing to do with USB; nor in the second case, as your host is surely not capable of AppleTalk and therefore can't share the printer via that protocol.

In any case I suppose you would need a MacOS 9 driver from the manufacturer of the printer. During installation that driver software should be able to find the printer, I suppose (as you wrote System Profiler could find it as well).

If there is no MacOS 9 driver for your printer (or your printer happens to be a PostScript printer), you might be able to set up the printer similar to one of the ways described in the printing guide for Basilisk II and SheepShaver:http://www.emaculation.com/doku.php/sheepshaver_basilisk_printing

What host system are you on?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 3:19 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4339
Location: Sittard, The Netherlands
Quote:
I would like to use a printer in my QEMU OS9.2.2 machine.


Have you tried finding a solution that fits your situation in our Basilisk/SheepShaver printing guide?
http://www.emaculation.com/doku.php/she ... k_printing

Qemu (-net user) and SheepShaver/Basilisk (slirp) basically use the same networking implementation.
Passthrough is certainly interesting and needed when drivers are only available for OS 9.2, but perhaps connecting the printer to you host (if it has appropriated drivers) is easiest.

Best,
Cat_7

EDIT: OOPS


Last edited by Cat_7 on Wed May 24, 2017 3:19 pm, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 3:27 pm 
Offline
Apple Corer

Joined: Wed Apr 10, 2013 9:32 am
Posts: 239
I imagine poor B0mbel desperately refreshing this page in his browser since hours in anticipation of a reply, and suddenly receiving three of them within nine minutes … ;-)

I hope we (I) didn't confuse you.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 5:38 pm 
Offline
Space Cadet

Joined: Thu May 18, 2017 9:55 pm
Posts: 7
mabam wrote:
I imagine poor B0mbel desperately refreshing this page in his browser since hours in anticipation of a reply, and suddenly receiving three of them within nine minutes … ;-)

I hope we (I) didn't confuse you.


Nope you haven't .. I'll be back later to you with all my replys.
Thanks a lot so far!
Cheers,
-bomb


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 10:17 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 843
CharlesS wrote:
What I do know is that the LaserWriter 8 driver is very flexible. Back when Classic was still a thing, I had a crazy hack involving a 'PAPA' resource with its TYPE set to '=Cst' (as documented here), which sent a PostScript file to an application which was actually an AppleScript droplet. The droplet then sent the PS file to the OS X side and printed it. I wish I'd documented exactly how all this worked, but it's been a decade and a half (jeez...), and my memory is fuzzy.


This is a brilliant hack and entirely new to me. More details here:

http://mirror.informatimago.com/next/de ... n1113.html

I had to remind myself how to use ResEdit, but once I got it right, it took about five minutes to create a sample AppleScript application that copied the dropped file to the desktop (I did this simply to test things), and then I created a custom printer definition that sent the print job to that AppleScript. This will be really useful, and will simply things enormously. Thank you!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 11:01 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2150
Location: Emaculation.com
So I can see the way this simplifies printing to host via SheepShaver; is there some way we can use AppleScript in the guest on qemu to do something similar? Or do we have to do some workaround like send it via FTP to the host and have a folder action script on the host that prints and deletes it?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed May 24, 2017 11:46 pm 
Offline
Tinkerer

Joined: Thu Aug 14, 2008 9:05 am
Posts: 96
adespoton wrote:
So I can see the way this simplifies printing to host via SheepShaver; is there some way we can use AppleScript in the guest on qemu to do something similar? Or do we have to do some workaround like send it via FTP to the host and have a folder action script on the host that prints and deletes it?

Well, my original Classic hack didn't have to worry about that, because IIRC, due to the weird hybrid nature of Classic, having LaserWriter 8 launch a Carbon applet actually caused the applet to launch on the OS X side, so at that point I could just open the PostScript file with Print Center and it'd print. With QEMU, we won't be able to do that, of course. I don't know enough about it to know if there's any way to break out of the emulated environment like there is with Mini vMac and SheepShaver, but if not, networking is probably the way to go. I had been thinking of writing one's own server to listen for and accept the PS file and print it, but folder actions do seem like a much less labor-intensive way to go.

_________________
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.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu May 25, 2017 12:00 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 843
CharlesS wrote:
I don't know enough about it to know if there's any way to break out of the emulated environment like there is with Mini vMac and SheepShaver, but if not, networking is probably the way to go. I had been thinking of writing one's own server to listen for and accept the PS file and print it, but folder actions do seem like a much less labor-intensive way to go.


It's probably going to require SFTP to send the file to the OS X host, and then use a launch daemon (faster and more reliable than a folder action script) to print the file on the host. My SheepShaver-based WPMacApp uses a launch daemon to print to the OS X default printer:

http://wpdos.org/mac-intel.html


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu May 25, 2017 2:41 am 
Offline
Tinkerer

Joined: Thu Aug 14, 2008 9:05 am
Posts: 96
How does your existing solution do it? Just curious.

(BTW: There really is/was an app called Color MacCheese. It was Delta Tao's first product: http://macintoshgarden.org/apps/color-maccheese )

_________________
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.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu May 25, 2017 3:11 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 843
CharlesS wrote:
How does your existing solution do it? Just curious.

(BTW: There really is/was an app called Color MacCheese. It was Delta Tao's first product: http://macintoshgarden.org/apps/color-maccheese )


Briefly: In Sheepshaver, print to a PostScript driver that saves a file to a folder that has a folder action script attached to it; the folder action script moves the file to "Unix:.WPTransfer" which is a hidden folder in OS X. That folder has a launch daemon running that (like a folder action script) prints the file. Of course, it's a lot more complicated than that, but you can download the system and see the details.

I just looked at my system again, and I see that some features have stopped working, but the printing system works well, and I'll figure out how to fix the things that aren't working now.

BTW: Color MacCheese?!! Amazing.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu May 25, 2017 8:28 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2150
Location: Emaculation.com
SFTP/SCP sounds like a reasonable way to do it... I suppose since qemu allows for attaching named pipes as devices, it should also be possible to use applescript to redirect the PDF file to a pipe and directly consume it on the host side using a daemon. We may even be able to pipe directly to a folder that's read-only on the host, and use a launch daemon to print it when it shows up. The problem with that is signalling to the guest that the file has been dealt with and can be deleted.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu May 25, 2017 8:36 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 843
Meanwhile, I've updated my SheepShaver system to use this terrific hack. I created a Desktop Printer that sends the PS file to an AppleScript application; the AppleScript adds a ".ps" extension to the temporary PS file (so OS X/macOS will recognize it as a PostScript file) and copies the file to a hidden folder in the Unix folder, and then deletes the temporary file. On the OS X/macOS side, a launch daemon detects the file and prints it (or converts it to a PDF if you choose an option to do so).

The updated version of system won't be available for a while, because I'm on a slow connection and DropBox uploading takes time, but I'm very glad to have this. Thanks again!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jun 15, 2017 1:38 pm 
Offline
Tinkerer

Joined: Mon Jul 13, 2015 11:32 am
Posts: 49
Just a quick heads up I compiled QEMU from the latest source code on the main branch today and it looks like the VGA patches have made it in :) i can change rez etc in OS X (not tested any other OSs yet but id expect those work too) this is the g3beige machine btw, im sure mac99 will work too
Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 16, 2017 7:22 am 
Offline
Mac Mechanic

Joined: Mon Aug 29, 2016 3:44 am
Posts: 169
It looks like because of 4 patches concerning MacDrivers added by Marc Cave-Ayland on 10th of May...
Interesting, does the official qemu boot MOS < 10.2 now?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 16, 2017 7:52 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4339
Location: Sittard, The Netherlands
viewtopic.php?f=34&t=8848 ;-)
viewtopic.php?f=34&t=9028 ;-)

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Jun 16, 2017 10:12 am 
Offline
Mac Mechanic

Joined: Mon Aug 29, 2016 3:44 am
Posts: 169
Oh,great!Thanks!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Jun 17, 2017 2:40 am 
Offline
Tinkerer
User avatar

Joined: Wed Jun 18, 2008 5:53 am
Posts: 74
LightBulbFun wrote:
Just a quick heads up I compiled QEMU from the latest source code on the main branch today and it looks like the VGA patches have made it in :) i can change rez etc in OS X (not tested any other OSs yet but id expect those work too) this is the g3beige machine btw, im sure mac99 will work too
Image

Does this mean Public Beta can be installed?


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 72 of 81 [ 2016 posts ]    Go to page Previous  1 ... 69, 70, 71, 72, 73, 74, 75 ... 81  Next


Who is online

Users browsing this forum: No registered users and 2 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