Note: Checks for __LP64__ explicitly because build/host/target
all get reported as i686-apple-darwin10.8.0 (not x86_64).
Also fixes a compile warning in clip_macosx64.cpp.
thread is currently only used to poll for CDROM devices and is not useful
when "nocdrom" is set. This change also fixes the problem of the emulator
preventing the CD to be ejected at the host level despite "nocdrom" being
set in prefs.
Thanks to Robert Munafo <mrob27@gmail.com> for investigating this problem!
| This patch affects the Makefile.in used to compile Basilisk II in
| order to allow out-of-tree compilation. This is useful for building
| multiple flavours of the Debian package.
|Author: Giulio Paci <giuliopaci@gmail.com>
| This patch fix a compiler warning about the direct printing of strings
| using formatted printing functions without the use of a format string.
|Author: Giulio Paci <giuliopaci@gmail.com>
|Forwarded: no
|Last-Update: 2012-03-04
version of slirp (where this code comes from), with the following checkin:
commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec
Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Mon Jan 26 19:37:41 2009 +0000
Remove the advertising clause from the slirp license
According to the FSF, the 4-clause BSD license, which slirp is covered under,
is not compatible with the GPL or LGPL[1].
[1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses
There are three declared copyright holders in slirp that use the 4-clause
BSD license, the Regents of UC Berkley, Danny Gasparovski, and Kelly Price.
Below are the appropriate permissions to remove the advertise clause from slirp
from each party.
Special thanks go to Richard Fontana from Red Hat for contacting all of the
necessary authors to resolve this issue!
Regents of UC Berkley:
From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
July 22, 1999
To All Licensees, Distributors of Any Version of BSD:
As you know, certain of the Berkeley Software Distribution ("BSD") source
code files require that further distributions of products containing all or
portions of the software, acknowledge within their advertising materials
that such products contain software developed by UC Berkeley and its
contributors.
Specifically, the provision reads:
" * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors."
Effective immediately, licensees and distributors are no longer required to
include the acknowledgement within advertising materials. Accordingly, the
foregoing paragraph of those BSD Unix files containing it is hereby deleted
in its entirety.
William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley
Danny Gasparovski:
Subject: RE: Slirp license
Date: Thu, 8 Jan 2009 10:51:00 +1100
From: "Gasparovski, Daniel" <Daniel.Gasparovski@ato.gov.au>
To: "Richard Fontana" <rfontana@redhat.com>
Hi Richard,
I have no objection to having Slirp code in QEMU be licensed under the
3-clause BSD license.
Thanks for taking the effort to consult me about this.
Dan ...
Kelly Price:
Date: Thu, 8 Jan 2009 19:38:56 -0500
From: "Kelly Price" <strredwolf@gmail.com>
To: "Richard Fontana" <rfontana@redhat.com>
Subject: Re: Slirp license
Thanks for contacting me, Richard. I'm glad you were able to find
Dan, as I've been "keeping the light on" for Slirp. I have no use for
it now, and I have little time for it (now holding onto Keenspot's
Comic Genesis and having a regular US state government position). If
Dan would like to return to the project, I'd love to give it back to
him.
As for copyright, I don't own all of it. Dan does, so I will defer to
him. Any of my patches I will gladly license to the 3-part BSD
license. My interest in re-licensing was because we didn't have ready
info to contact Dan. If Dan would like to port Slirp back out of
QEMU, a lot of us 64-bit users would be grateful.
Feel free to share this email address with Dan. I will be glad to
effect a transfer of the project to him and Mr. Bellard of the QEMU
project.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6451 c046a42c-6fe2-441c-8c8c-71466251a162
version of slirp (where this code comes from), with the following checkin:
commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec
Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Mon Jan 26 19:37:41 2009 +0000
Remove the advertising clause from the slirp license
According to the FSF, the 4-clause BSD license, which slirp is covered under,
is not compatible with the GPL or LGPL[1].
[1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses
There are three declared copyright holders in slirp that use the 4-clause
BSD license, the Regents of UC Berkley, Danny Gasparovski, and Kelly Price.
Below are the appropriate permissions to remove the advertise clause from slirp
from each party.
Special thanks go to Richard Fontana from Red Hat for contacting all of the
necessary authors to resolve this issue!
Regents of UC Berkley:
From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
July 22, 1999
To All Licensees, Distributors of Any Version of BSD:
As you know, certain of the Berkeley Software Distribution ("BSD") source
code files require that further distributions of products containing all or
portions of the software, acknowledge within their advertising materials
that such products contain software developed by UC Berkeley and its
contributors.
Specifically, the provision reads:
" * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors."
Effective immediately, licensees and distributors are no longer required to
include the acknowledgement within advertising materials. Accordingly, the
foregoing paragraph of those BSD Unix files containing it is hereby deleted
in its entirety.
William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley
Danny Gasparovski:
Subject: RE: Slirp license
Date: Thu, 8 Jan 2009 10:51:00 +1100
From: "Gasparovski, Daniel" <Daniel.Gasparovski@ato.gov.au>
To: "Richard Fontana" <rfontana@redhat.com>
Hi Richard,
I have no objection to having Slirp code in QEMU be licensed under the
3-clause BSD license.
Thanks for taking the effort to consult me about this.
Dan ...
Kelly Price:
Date: Thu, 8 Jan 2009 19:38:56 -0500
From: "Kelly Price" <strredwolf@gmail.com>
To: "Richard Fontana" <rfontana@redhat.com>
Subject: Re: Slirp license
Thanks for contacting me, Richard. I'm glad you were able to find
Dan, as I've been "keeping the light on" for Slirp. I have no use for
it now, and I have little time for it (now holding onto Keenspot's
Comic Genesis and having a regular US state government position). If
Dan would like to return to the project, I'd love to give it back to
him.
As for copyright, I don't own all of it. Dan does, so I will defer to
him. Any of my patches I will gladly license to the 3-part BSD
license. My interest in re-licensing was because we didn't have ready
info to contact Dan. If Dan would like to port Slirp back out of
QEMU, a lot of us 64-bit users would be grateful.
Feel free to share this email address with Dan. I will be glad to
effect a transfer of the project to him and Mr. Bellard of the QEMU
project.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6451 c046a42c-6fe2-441c-8c8c-71466251a162
For my work on digital preservation it's important to have "golden"
disk images that are not corrupted by user action. In order to enable
this, I've added support for VHD virtual disks (especially snapshots !)
to the Linux and OS X versions of BasiliskII and SheepShaver.
The support uses the open source libvhd library which is part of xen,
available here:
http://www.xen.org/products/xen_source.html
The piece that's needed is libvhd which is in tools/blktap2 and it can
be separately compiled.
The vhd-util enables creation of vhd disks and snapshots.
Compiling libvhd for OS X is non-trivial and required 1) a new config
and 2) a number of small changes to the include files and c files.
Compiling for linux is a snap.
I use this as follows.
1) create my "golden image" gold.dsk in the usual way
2) create a snapshot: vhd-util snapshot -n gold.vhd -p gold.dsk -m
3) use the snapshot in my prefs file
In my work the golden images are in an AFS system which means the golden
images can reside at "universal" addresses. The snapshots are initially
tiny, so a complete virtual machine configuration -- prefs + snapshot is
quick to download for the end user.
The snapshots are copy on write which has the pleasant side effect of
letting the end user keep any changes.
This attached patch allows you to compile the Carbon Pasteboard services on
Snow Leopard if you are building for 32-bit, but not if you are building for 64.
To maintain backwards compatibility, the Carbon UI APIs aren't going to be
stripped from the 32-bit any time soon. However, there is no worry about
that in 64, so they didn't include it.
Add bin/cue support. The following should work:
1) Basilisk and SheepShaver with sdl-audio and bincue on linux and os x
2) SheepShaver with bincue and core audio on os x
GCC has become too smart - we need to slice the binary created to be sure the
address of the trap is within the test addresses. This is why each trap occurs
between two case labels and a new section of assembly code is set in between.
giving it to the host OS, and don't clear clipboard every time as some
apps will put many varieties of the same data in succession...
however, a better fix would be to patch the ROM ZeroScrap function in a
similar way as we patch GetScrap/PutScrap
Attached is a set of patches to port the precise timer that is currently used in the Linux and BeOS builds of SheepShaver to Mac OS X (and any other Mach-based operating systems).
Currently, the Linux build uses the clock_gettime() function to get nanosecond-precision time, and falls back on gettimeofday() if it is not present. Unfortunately, Mac OS X does not currently support clock_gettime(), and gettimeofday() has only microsecond granularity. The Mach kernel, however, has a clock_get_time() function that does very nearly the same thing as clock_gettime(). The patches to BasiliskII cause the timing functions such as timer_current_time() to use clock_get_time() instead of gettimeofday() on Mach-based systems that do not support clock_gettime().
The changes to SheepShaver involve the precise timer. The existing code for Linux uses pthreads and real-time signals to handle the timing. Mac OS X unfortunately does not seem to support real-time signals, so Mach calls are again used to suspend and resume the timer thread in order to attempt to duplicate the Linux and BeOS versions of the timer. The code is somewhat ugly right now, as I decided to leave alone the pre-existing style of the source file, which unfortunately involves #ifdefs scattered throughout the file and some duplication of code. A future patch may want to clean this up to separate out the OS-specific code and put it all together at the top of the file. However, for the time being, this seems to work.
This has not been extensively tested, because I have not been able to get my hands on a good test-case app for the classic Mac OS that would run inside the emulator and try out the timer. However, performance does seem to be better than with the pre-existing code, and nothing seems to have blown up as far as I can tell. I did find a game via a Google search - Cap'n Magneto - that is known to have problems with Basilisk/SheepShaver's legacy 60 Hz timer, and the opening fade-to-color for this game appears to run much more smoothly with the precise timer code in place.
SheepShaver includes the C errno string in many error messages. One case is when it calls the memory allocation routines in the Basilisk II vm_alloc.cpp program.
This works when the memory allocation routine uses functions that set errno (such as mmap or malloc). For example, running SheepShaver on a Linux hosts produces meaningful error messages.
The problem is that when run on an OS X host, the memory allocation uses Mach routines such as vm_allocate, which do not set errno.
So when SheepShaver reported the error, it used a stale value of errno, which happened to be 17. The result was an extremely misleading error message: "Cannot map RAM: File already exists".
The fix is to change vm_alloc so that it translates Mac return codes into POSIX errno values.
It also initializes errno to 0 at the start of the memory allocation routine, so that no matter what path it takes, it won't return a stale value.
Fixes copy/paste errors in the Windows version of SheepShaver, wherein pasted
text would have a trailing null character or extra garbage after the end.
Fix for bug: SheepShaver compiled with VOSF off will not display
fullscreen on OS X. The VM boots, but the display is entirely black.
This was expected, I suppose, since video_refresh_dga() didn't
actually attempt to draw anything!
The patch fixes this. Notes:
* video_refresh_window() now takes an argument of type driver_base,
since nothing specific to driver_window was used
* video_refresh_dga() can now call video_refresh_window_static()
* update_display_static_bbox() now respects the destination having a
different bytes-per-row from the source
* fullscreen modes are now created for all depths
Here is a patch to allow compiling of SS and B2 with an SDL Framework. You can
get this by downloading from:
http://www.libsdl.org/release/SDL-1.2.13.dmg
Here is how I tested on an intel 32-bit mac with Mac OS X 10.5.6:
SS ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --disable-sdl-audio --enable-addressing=real
--without-esd --without-gtk --without-mon --without-x
SS /autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --with-x
B2 ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --enable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x --enable-jit-compiler
B2 ./autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --with-esd --without-gtk --without-mon --with-x --enable-jit-compiler
(esound does not really work on mac, it needs some better coreaudio patches.)
configure.ac for SS has two little additional fixes so that the Cocoa prefs gui
does not get built if you are building for X11 and so that you can use esd, sdl,
or coreaudio for sound.