Commit Graph

2314 Commits

Author SHA1 Message Date
asvitkine
c6d88f213c [Michael Schmitt]
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.
2009-08-11 07:43:46 +00:00
asvitkine
fbef7bcf22 more improvements to Launcher 2009-08-06 18:12:25 +00:00
asvitkine
7004db923a allow looking inside bundles and default disk location to inside bundle 2009-08-06 06:42:43 +00:00
asvitkine
61770c58eb keep track of running VMs 2009-08-02 23:46:44 +00:00
asvitkine
b67b983156 disable buttons when no selection 2009-08-02 23:17:18 +00:00
asvitkine
abbd1785b1 delete vm from list 2009-08-02 22:37:34 +00:00
asvitkine
b38bb12ab3 New Virtual Machine button working 2009-08-02 20:24:38 +00:00
asvitkine
820ae8100c misc changes 2009-08-02 19:51:15 +00:00
asvitkine
d38c755204 Launching VMs 2009-08-02 18:59:26 +00:00
asvitkine
07a2d906c4 add icon to launcher 2009-08-02 18:42:06 +00:00
asvitkine
e8e5440b31 initial import of SheepShaver Launcher project for Mac OS X (WIP) 2009-08-02 18:34:57 +00:00
asvitkine
80a7589e29 only if standalone 2009-08-01 15:31:54 +00:00
asvitkine
743888f407 fix PrefsEditor build 2009-08-01 15:31:31 +00:00
asvitkine
5cef748ac7 only "continue previous delay" if delay is 0 2009-08-01 07:02:41 +00:00
asvitkine
ccdb8ab3c0 correct implementation of PrimeTime(0) 2009-07-31 20:43:28 +00:00
asvitkine
57b64245ad handle one case of PrimeTime(0) 2009-07-31 19:41:50 +00:00
asvitkine
d0c46de7c3 BasiliskII side of changes to support .sheepvm bundles for SheepShaver 2009-07-23 19:19:14 +00:00
asvitkine
5b958defa7 support for .sheepvm bundles on macosx, containing "prefs" and "nvram" files 2009-07-23 19:12:51 +00:00
asvitkine
581ff8d86f add prefs option to ignore illegal instructions (ignoreillegal) 2009-07-20 18:50:28 +00:00
asvitkine
6db0c7453b [Patch by Kelvin Delbarre]
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.
2009-04-14 15:17:03 +00:00
asvitkine
9c8387f8d0 more syncing 2009-04-14 00:52:15 +00:00
asvitkine
f2630f5e6a sync Makefile.in with Unix version 2009-04-14 00:36:13 +00:00
asvitkine
7fc0d3137b syncing Windows configure.ac file with the unix one 2009-04-14 00:17:56 +00:00
asvitkine
8ad0bbcc80 windows fix try#2 2009-04-13 23:13:20 +00:00
asvitkine
abb9d2eb24 make sigsegv work better with cygwin 2009-04-13 19:57:08 +00:00
asvitkine
fceeb39d3c Restore OSX built-in prefs editor. Change the configure.ac check for
no_x to WANT_GTK=no since X may be installed when building on OS X,
but we probably don't want it!
2009-03-18 16:09:15 +00:00
asvitkine
b6f9f38f98 [patch by Dave Vasilevsky]
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
2009-03-03 08:14:53 +00:00
asvitkine
da540a74f6 [patch by Mike Sliczniak]
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.
2009-03-03 08:07:22 +00:00
asvitkine
31551389f6 change #else #if into #elif in case both are defined 2009-03-03 08:01:48 +00:00
asvitkine
3e12a80a3b [Patch by Mike Sliczniak]
I was testing some other SS patches and I noticed that when I ran an X11
build of SS there were not all the video modes I expected in the the
control strip. Mac OS X 10.5 changed the form of the DISPLAY environment
variable. The reason for this is that the DISPLAY variable looks like
this in Leopard:

/tmp/launch-XXXXXX/:0

The Xs are like in mktemp.
2009-02-19 07:09:35 +00:00
asvitkine
e083e0ac33 [Patch by Mike Sliczniak]
Here is a patch that has a shell script cpr.sh to recursively copy directories but
discarding things that cause problems at least on 10.4 when making the .app bundles.
2009-02-19 07:02:46 +00:00
asvitkine
65eac29142 [patch from Mike Sliczniak]
Here is a patch that has a shell script cpr.sh to recursively copy directories but
discarding things that cause problems at least on 10.4 when making the .app bundles.
2009-02-19 06:52:03 +00:00
asvitkine
1b9d155673 [patch by Mike Sliczniak]
This patch helps to keep the audio from breaking-up on slow machines when using
SDL audio. On those slow machines you do still get the break-up every so often
but the sound tends not to break-up nearly as often. It is much better on the
ears. Notably often the system beeps do not have a pause in them.
Slow machine is <= 1 GHz G4.
2009-02-19 06:42:01 +00:00
asvitkine
04bec66567 don't re-declare sigsegv_info_t, instead use the one from the header 2009-02-11 20:44:49 +00:00
asvitkine
8375c57047 move sigsegv_info_t declaration to header 2009-02-11 20:44:10 +00:00
asvitkine
ca2b9b5832 [Patch from Mike Sliczniak]
This first patch gets B2 and SS to build under Leopard and Tiger.

I tested this on a 32-bit intel 10.5.6 mac like so:

B2
./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-video --enable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x

SS
./autogen.sh --disable-standalone-gui --enable-vosf -enable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x --enable-jit

There is also a little tweak so that you can use sdl audio in SheepShaver when building for Mac OS X.
2009-02-11 19:23:53 +00:00
asvitkine
d6db773362 [patch from Darik Horn <dajhorn@vanadac.com> ]
Makes SheepShaver compatible with Ubuntu Intrepid and
other distros that bundle the gcc-4.3 compiler.

The patch changes two things:

1. Renames the block_cache where its name collides with its class
definition.

2. Fixes the "explicit template specialization cannot have a storage
class" error in the ppc-dyngen-ops.cpp file.
2009-01-15 23:25:08 +00:00
asvitkine
a370638388 some changes to make Basillisk build better on Leopard 2008-12-09 18:03:35 +00:00
asvitkine
de2d407b1e Add missing MacOSX icons file. Fix character encoding of InfoPlist.strings,
so that the copyright symbol shows up correctly in the Basillisk about box.
2008-12-09 17:28:30 +00:00
asvitkine
06ac24df65 Fix Leopard build. 2008-11-21 01:09:28 +00:00
cebix
a4c18a19ce fixed the "smart questions" link 2008-10-01 10:34:34 +00:00
asvitkine
5505a5dc62 Change < to - in qsort compare functions to correctly return 0 for equality. 2008-09-14 19:54:36 +00:00
asvitkine
3b8e4ccc9d [patch from Kelvin Delbarre]
Previously, SheepShaver would usually hang if it was unable to access the ROM
file on startup, due to a race between media_poll_func() and DarwinSysExit().
This change eliminates the race by ensuring that media_poll_func() always ends
up waiting in CFRunLoopRun(), which allows us to terminate the polling thread
in a consistent way.
2008-07-20 07:38:27 +00:00
asvitkine
6dcddb92e6 [patch from Kelvin Delbarre]
This fixes the mapping of SDL mouse-button numbers to MacOS/ADB mouse-button numbers,
to correct the reversal of the middle and right buttons. Most useful in conjunction
with a multi-button mouse enabler such as TheMouse2B:

http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cfg/themouse-2b-11.hqx

... which can turn a right-click into a control-click.
2008-07-20 07:33:09 +00:00
asvitkine
bf7408e151 Fix prefs 2008-07-20 07:29:46 +00:00
asvitkine
a9086a8165 [patch from Kelvin Delbarre]
The CDROM status call "WhoIsThere" (csCode 97) is now implemented. Apart from
eliminating "WARNING: Unknown CDROMStatus(97)" complaints from the console log,
this does not appear to have had any effects whatsoever.

A typo in the implementation of the CDROM status call "GetCDFeatures" has been
corrected per Technical Note DV22:
	http://developer.apple.com/technotes/dv/dv_22.html
2008-06-28 18:36:18 +00:00
asvitkine
c23511080e [patch from Kelvin Delbarre]
Software cursor mode is now supported, although currently the existing hardware
cursor mode is used whenever possible. (Software mode will be used if you are
running with a recent version of SDL's Quartz video driver, since a bug in SDL
1.2.11 and later prevents the hardware cursor from working properly with that
driver.)

In hardware cursor mode, the hot-spot is now determined heuristically. Formerly
it could not be determined and was always (1,1), an annoyance for many cursors
other than the arrow.

In hardware cursor mode, the cursor will now be hidden when requested by the
emulated OS (such as when you are typing in a text field).

In hardware cursor mode, some cursor image formats that the code does not handle
correctly will now be rejected, causing the emulated OS to revert temporarily to
software cursor mode. Formerly you would just end up with random garbage for a
cursor. This typically happened for grayscale or color cursors; rejecting images
with rowBytes != 2 eliminates the worst cases.
2008-06-25 02:52:52 +00:00
asvitkine
d885e5ccf4 [patch from Kelvin Delbarre] SDL's Quartz video implementation maps command
clicks to right-clicks and option-clicks to middle-clicks, a feature intended
for Mac users with single-button mice who are running SDL-based games that
require a multi-button mouse. This is unhelpful in SheepShaver, where we want
command-clicks and option-clicks to be passed through unchanged to the emulated
Mac OS. We can disable the unwanted behavior by setting an environment variable
SDL_HAS3BUTTONMOUSE intended for this very purpose.

A similar change in main_windows.cpp is NOT required, because only the Quartz
video implementation is involved.

By SDL convention, putenv is used in preference to setenv, although for Unix
platforms it doesn't matter.
2008-06-22 20:30:12 +00:00
asvitkine
e8e2f3727a Don't profile by default - as this is no use to non-developers. 2008-06-20 00:50:33 +00:00
asvitkine
603c447da7 [patch from Kelvin Delbarre] Typo fix. 2008-06-20 00:47:25 +00:00