Commit Graph

864 Commits

Author SHA1 Message Date
Dave Vasilevsky
917984e6ec Add to make links 2013-02-24 14:15:21 -05:00
Dave Vasilevsky
2a15911938 Full sparsebundle implementation 2013-02-24 14:11:29 -05:00
Dave Vasilevsky
091db05aac Partial implementation of sparsebundles; still needs Info.plist parsing 2013-02-24 13:02:16 -05:00
Charles Lehner
76911be266 Fix compilation error on OS X. 2012-10-30 09:34:10 -04:00
Charles Lehner
349fad4d2f Add port redirection option for networking with slirp.
Port forwarding allows the emulator to host servers that can be
accessed from outside the virtual network.

The code for parsing the preference option "redir" is adapted from
qemu code. The rest was already implemented.
2012-10-30 01:32:38 -04:00
Christian Bauer
b4940ae29d more cleanups (unused/uninitialized variables, forgotten free()s, etc.) 2012-09-08 12:33:39 +02:00
Alexei Svitkine
243307f05c Fix typo. 2012-08-19 10:17:10 -04:00
Alexei Svitkine
3b6fdddfa1 Use a diff var name in configure.ac to avoid erroneous caching. 2012-08-12 13:01:55 -04:00
Alexei Svitkine
3c8856bcca Include unistd.h in config signal checks. 2012-08-12 12:41:03 -04:00
Alexei Svitkine
fa7da794c3 Trying to fix linux/arm build. 2012-08-12 12:25:19 -04:00
Charles
6f2635ee31 More clipboard-related fixes for Basilisk / SheepShaver
This patch fixes one lingering problem with the 64-bit clipboard code; the way it was designed, the Mac clipboard was being cleared every time a single item was being requested by GetScrap, causing clipboards with multiple items to be unceremoniously whittled down to one. On the other hand, a similar issue was causing some items to get duplicated on the host pasteboard. This patch fixes the issue by making conversion between the host pasteboard and the Mac clipboard a singular operation; when the pasteboard data changes on the host side, it is all converted and sent to the Mac pasteboard at once, and similarly, all Mac clipboard data is sent to the host pasteboard in one operation. Also, data from the host side is copied to the Mac clipboard only if it has changed since the last check, which should improve performance as conversions will not be done over and over every time the Mac side checks whether the scrap has changed.

In addition, I've added a rudimentary PICT converter. It's rudimentary at the moment, only going in one direction, converting to PICT and not from PICT, and currently it always rasterizes the source image and creates a PICT containing bitmap data. However, it's a start, and it should solve Ronald's issue with copying images from OS X to Mac OS. In the future, more could possibly be added. I've put the new PICT code in the main source directory instead of in the MacOSX subdirectory, so that it can be used by other platforms if needed.

I would like to leave the license on the new PICT code as "Public Domain" if that is okay.

Thanks,
Charles
2012-07-07 11:30:21 -04:00
Alexei Svitkine
e1d132083b Fix a logic error. 2012-07-05 22:52:39 -04:00
Alexei Svitkine
94fe1df163 Fix Mac OS X GUI configure option. 2012-07-04 22:44:24 -04:00
Alexei Svitkine
8376a21804 Fix build with SnowLeopard SDK. 2012-07-04 22:22:00 -04:00
Alexei Svitkine
145f6c3d02 Copy help files into BasiliskII bundle. 2012-07-03 22:49:28 -04:00
Alexei Svitkine
702db1dfec Allow building MacOSX GUI version from src/Unix by building with:
./configure --enable-macosx-gui

The goal is to get rid of the build files under src/MacOSX by
allowing the ones under src/Unix to produce the same outputs.

Note: This currently has video problems, but this is consistent
with what you get when building out of src/MacOSX.
2012-07-03 21:54:35 -04:00
Alexei Svitkine
42ae7000b5 Use clip_macosx64.mm for BasiliskII 64-bit builds too. 2012-07-02 00:45:59 -04:00
Alexei Svitkine
a70f9b44f1 Fix configure warning in BasiliskII's configure.ac too. 2012-07-02 00:40:08 -04:00
CharlesJS
ed28705ee3 Patch for copying and pasting styled text in Basilisk II / SheepShaver
Added code to parse the Classic Mac OS 'styl' resources, allowing formatted text to be copied and pasted out of SheepShaver, not just plain text. In order to do this, I made some changes to the emul_op mechanism, patching ZeroScrap() in addition to the scrap methods that were already being patched. The reason for this is that since we need to read data from multiple items that are on the clipboard at once, we cannot simply assume a zero at the beginning of each PutScrap() operation.

This patch uses RTF to store styled text on the host side; unfortunately, since the APIs to convert to and from RTF data are in Cocoa but not in CoreFoundation, I had to write the new portions in Objective-C rather than C, and changed the extension from .cpp to .mm accordingly. In the future, if we are confident that this file will only be used on Mac OS X 10.6 and up, we can rewrite the Pasteboard Manager code to use NSPasteboardReading/Writing instead. This would allow us to read and write NSAttributedString objects directly to and from the pasteboard, which would make sure we were always using the OS's preferred rich text format internally instead of hard-coding it specifically to RTF as in the current implementation.

I believe that this patch should also fix the problem Ronald reported with copying accented characters.

Since I am new to 68k assembly and the emul_op mechanism, I would appreciate if someone could double-check all my changes to make sure that I have done everything correctly.

Thanks,
Charles
2012-06-30 22:20:55 -04:00
Alexei Svitkine
58f4fa8425 Lock opened disk image files with O_EXLOCK (same as flock()) on
Mac OS X to prevent concurrent access from the Finder.
2012-06-25 12:56:58 -04:00
Alexei Svitkine
5a5b7176da Fix an unused function warning. 2012-06-18 19:00:25 -04:00
Christian Bauer
3c66c348c2 ignore generated files 2012-06-18 20:14:22 +02:00
Christian Bauer
ca96911c07 add SheepShaver -> BasiliskII symlinks 2012-06-18 20:02:42 +02:00
asvitkine
d931e6ff78 another try to get sshpty.c compiling on bsd 2012-06-17 23:15:10 +00:00
asvitkine
b417d95f25 fixing FreeBSD build hopefully 2012-06-17 16:41:01 +00:00
asvitkine
16c4802d7b oops, sig should have been signal 2012-06-17 04:23:17 +00:00
asvitkine
bc315e9942 Hopefully make the HAVE_DEV_PTMX path work. 2012-06-15 21:56:52 +00:00
asvitkine
d63422a733 |Description: fixes configure script generation on some systems.
|Author: Giulio Paci <giuliopaci@gmail.com>
2012-04-01 16:34:26 +00:00
asvitkine
c8b85735c4 |Description: avoid stripping binaries
|Author: Jonas Smedegaard <dr@jones.dk>
|Last-Update: 2012-03-04
2012-04-01 15:14:56 +00:00
asvitkine
c154497f17 |Description: enable out-of-tree compilation of Basilisk II
| 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>
2012-04-01 15:12:31 +00:00
asvitkine
f26747520e |Description: fix to the documentation
| This patch aims at improving the man page.
|Author: Giulio Paci <giuliopaci@gmail.com>
|Forwarded: no
|Last-Update: 2012-03-04
2012-04-01 15:07:53 +00:00
asvitkine
c6409b4ce5 |Description: important compiler warnings fixes
| 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
2012-04-01 15:05:55 +00:00
asvitkine
81ab1a3f6c another warning fix 2012-03-01 04:27:42 +00:00
asvitkine
bad472294c fix a warning 2012-03-01 04:24:45 +00:00
asvitkine
62956816ed rename file_handle to mac_file_handle since file_handle is defined in system headers on some systems 2012-03-01 04:22:27 +00:00
asvitkine
c972658d81 cleanup ifdef chain syntax 2012-01-01 22:32:24 +00:00
asvitkine
2fb4e0aa4e make the ifdef chain more readable 2011-12-31 19:47:16 +00:00
asvitkine
1a2566b58e Fix CrashReporter poping up when PPC is not emulated on pre-10.5 systems. 2011-12-30 20:37:30 +00:00
asvitkine
dcf65b4d27 move NSAutoReleasePool_wrap() into its own file 2011-12-29 07:39:56 +00:00
asvitkine
3d09f85dc9 fix some unused var/function warnings 2011-12-28 20:22:25 +00:00
asvitkine
2d14b5fb8b get file size using stat, which seems to be more reliable 2011-12-27 21:01:32 +00:00
asvitkine
521da856b5 check for MAP_FAILED result 2011-12-27 20:50:27 +00:00
asvitkine
b48405744e remove extra comment start 2011-12-27 19:50:38 +00:00
asvitkine
9baf8b4156 Fix fatal() macro 2011-03-11 16:41:18 +00:00
asvitkine
5f8683b346 [Amadeusz Sławiński]
Patch fixing build on 2.6.35 and 2.6.36 kernels.
2010-11-27 00:14:09 +00:00
asvitkine
7a093cb1fb Fix issue from my last change where it ended up not defining
SIGSEGV_FAULT_ADDRESS_FAST at all on PPC builds.
2010-10-23 21:13:21 +00:00
asvitkine
1170b925ee fix sentinel warning 2010-10-19 03:30:20 +00:00
asvitkine
7665252790 [Geoffrey Brown]
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.
2010-10-19 03:21:52 +00:00
asvitkine
90bdd12839 [Geoffrey Brown]
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
2010-10-06 00:30:23 +00:00
asvitkine
7a9a6d18f2 . 2010-09-24 00:49:45 +00:00
asvitkine
7bb230abed apparently this makes newest SDL happy 2010-09-24 00:48:58 +00:00
asvitkine
556a42001b Some messy changes got into last commit that weren't supposed to be there. 2010-07-28 01:10:24 +00:00
asvitkine
930374bbc6 Do the right thing if host-triplet is a i386-i686, but gcc compiles by
default as x86_64. Fixes configure on Snow Leopard.
2010-07-28 01:07:45 +00:00
asvitkine
853db27159 Fixing sigsegv on Mach x86_64 - possibly a hack; I'm not sure why the
address returned doesn't have that bit set already.
2010-07-27 22:52:33 +00:00
asvitkine
812db6ed4f [Howard Spoelstra and Joel Mauras]
Patches to update Linux NetDriver to work with newer kernel versions.
2010-04-08 03:58:26 +00:00
asvitkine
8a0002de43 [Joel Mauras]
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.
2010-04-08 03:53:27 +00:00
asvitkine
ebfe00ba48 [Amadeusz Sławiński]
fix check on gcc 4.4.3
2010-03-10 01:05:49 +00:00
asvitkine
78027e7a46 [Amadeusz Slawinski]
These patches fix the issues with using newer versions of autoconf,
which led to generating broken configure script.
2010-03-07 00:45:10 +00:00
cebix
dca3b18d9d fixed warnings 2010-02-21 12:00:42 +00:00
cebix
1fbacc9c73 fixed missing INT_MAX 2010-02-21 09:58:00 +00:00
cebix
71852dae82 fixed compiler warnings 2010-02-21 09:55:52 +00:00
asvitkine
989f5036fc Fix PrefsInit() calls to take correct number of parameter 2010-01-15 01:53:31 +00:00
asvitkine
6f230efee8 [ Patch from Jean-Pierre <chombier@free.fr> ]
Make lowmem be able to deal with x86_64 binaries.
2009-11-13 01:57:48 +00:00
asvitkine
02313b55c2 [Joel Mauras]
Patch for network suppor on 2.6 Linux Kernel.
2009-10-20 01:55:03 +00:00
asvitkine
cb55b15d39 Change #include <mach/mach_host.h> to #include <mach/mach.h> 2009-08-21 17:39:58 +00:00
asvitkine
5a8dfa1b36 [Charles Srstka]
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.
2009-08-17 20:44:30 +00:00
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
d0c46de7c3 BasiliskII side of changes to support .sheepvm bundles for SheepShaver 2009-07-23 19:19:14 +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
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
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
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
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
a370638388 some changes to make Basillisk build better on Leopard 2008-12-09 18:03:35 +00:00
gbeauche
3f15f4ed26 64-bit Mach exceptions support. Note that mach_exc_server() et al. must be
explicitly generated from mig. The advantage of that is to provide a "fast"
path for x86_64 on Leopard too (fault address in code[1]).

By "fast", this means +33% faster wrt. explicitly thread_get_state() but
still pretty slow (40 usec/fault). This is on par with the i386 code path though.
2008-01-20 22:24:53 +00:00
gbeauche
68668bb4e2 Add support for Windows/ia64. 2008-01-20 17:09:34 +00:00
gbeauche
62697e13c1 Err, restore a reasonnable value for the emulators. ;-) 2008-01-20 11:52:13 +00:00
gbeauche
a4209f5db0 Arrangements for the SIGSEGV perf tester. 2008-01-20 11:51:08 +00:00
gbeauche
2bdb300da1 HPPA support. 2008-01-20 00:39:51 +00:00
gbeauche
acd35671b8 HP-UX does support 32-bit memory mappings. 2008-01-20 00:38:52 +00:00
gbeauche
88ea04a365 Add support for HP-UX/ia64. It would be best to use libunwind so that to
handle stacked registers access with ease...
2008-01-19 22:27:29 +00:00
gbeauche
3615be1d4d Use fixed-size integer types, especially for 64-bit quantities. HP-UX for IPF
is essentially an ILP32 platform but machine registers are 64-bit wide. Make
IA64_SET_GR() set the NaT bit at the same time as the register value.
2008-01-19 22:25:27 +00:00
gbeauche
b5ac45434a Fix build on 64-bit Vista. 2008-01-17 23:19:01 +00:00
gbeauche
69376f61ca Wrap the Windows write-watch API. 2008-01-16 22:36:35 +00:00
gbeauche
ef39e46cb2 Fix build on MacOS X Leopard.
Leopard kernel faster? This is pure marketing hype. For 32-bit applications,
Mach exception recovery is 60% slower. For 64-bit applications, this is up
to 40% faster though. In any case, MacOS X remains pretty slow wrt. Linux...
2008-01-14 19:29:29 +00:00
gbeauche
df3475ed16 64-bit Windows support 2008-01-12 23:01:40 +00:00
gbeauche
f5e5da6916 LLP64 fixes (64-bit Windows) 2008-01-12 21:43:02 +00:00
gbeauche
b1fa25128a Make it possible to override the Mach fault recovery scheme through an
environment variable: SIGSEGV_MACH_FAULT. It can be set to "direct" to
assume the fault address comes from code[1] argument, or "slow" to use
the slow path through thread_get_status(EXCEPTION_STATE)->faultvaddr.
2008-01-07 22:44:39 +00:00
gbeauche
58ff9aba45 The Linux kernel actually allows to restart execution from the specified slot
in the bundle. This is faster and more accurate as this avoids emulation.

Also clean-up code so that to prepare the use of lib uaccess on hpux/ia64.
XXX: this will need explicit use of uint64_t to define registers because
HP/UX is ILP32 capable and all registers are 64-bit capable so "unsigned long"
won't fit.
2008-01-06 17:22:19 +00:00
gbeauche
8aadf8e455 Further comment the ia64 decoder and (minimal) emulator. 2008-01-06 16:36:00 +00:00
gbeauche
57ae6ed470 Add initial support for instruction skipping on Linux/ia64. It was more
complex than expected but it was fun to play with. Who designed this ISA?
I'd love to see how the decoder is implemented in HW, by all means it is
not "simplified" unless I missed some pattern...
2008-01-06 16:25:03 +00:00
gbeauche
a56e4b9be0 Hack around over-optimized labels-as-values extension from GCC. 2008-01-06 16:19:27 +00:00
gbeauche
e08bb16edf ISO C++ conformance fixes: remove superfluous coma at the end of enum definitions. 2008-01-06 16:10:30 +00:00
gbeauche
a93bec88fd Don't clobber "sip" arg from our sigsegv_info wrapper (renamed to SIP). 2008-01-05 08:35:08 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
26f9b1d38b Fix instruction skipping on MacOS X in the fast path case. 2007-12-31 18:07:01 +00:00
gbeauche
b5ac365858 Add support for 64-bit MacOS X for PowerPC (untested beyond "it compiles"). 2007-12-31 06:59:39 +00:00
gbeauche
9fa1bbd972 According to kernel sources, that is XNU 344.49 (10.2.8), XNU 517.12.7 (10.3.9),
XNU 792.21.3 (10.4.10) and XNU 1228 (10.5.0), exception handler code[1] always
contains the fault address nowadays. So make it the default fast path but keep
provisions to check that at run-time first.

This yields a nearly 4x improvement in SIGSEGV recovery but MacOS X is still
suboptimal wrt. Linux, so VOSF is still not possible with frameskip == 0.

XXX: the ppc kernel had bugs that caused DAR (put into code[1]) to be incorrectly
decoded. This would need a broader test audience or more careful audit of the
sources changes.
2007-12-30 12:11:17 +00:00
gbeauche
016dfddd79 Sync with the new SIGSEGV API. 2007-12-30 08:47:34 +00:00
gbeauche
902079ec8e Improve API for systems that require explicit calls to functions to retrieve
the memory addresses that triggered a SIGSEGV (e.g. MacOS X).
2007-12-30 08:45:18 +00:00
gbeauche
b899d55068 Don't raise SIGPIPE, let errno be set to EPIPE. i.e. this fixes slirp ethernet
mode with no listening port on the remote host.
2007-11-03 11:31:36 +00:00
gbeauche
9000d4f54c Rewrite ExtFS support for MacOS X. This implementation uses xattrs (metadata)
on Tiger+ to store FInfo and FXInfo. Otherwise, plain old .finfo/ helpers are
used. "Safe" flags and fields are always synchronized to/from MacOS X.

BTW, CFString leak was fixed at the same time.
2007-11-01 15:33:22 +00:00
gbeauche
e3f9d46556 Improve heuristic for VOSF profitability: we should not spend more than
the half of a video interrupt quantum for updating the screen. Also improve
the wording of the result.
2007-06-16 07:24:39 +00:00
gbeauche
320b4ccd61 Add Darwin/x86_64 support. Fix EDX register index for i386 insn decoder. 2007-06-16 06:21:57 +00:00
gbeauche
e9c5625ada Fix REAL_ADDRESSING mode on MacOS X, aka move Mach defines to config_macosx.h
and fix lowmem (BLESS) to handle other-endian binaries.
2007-06-15 22:54:24 +00:00
gbeauche
0a7fe2eaf8 Workaround video mode switch problems. IOW, make sure to always allocate
the frame buffer at the same base address.
2007-06-14 14:45:54 +00:00
gbeauche
03833e4c56 Fix autogen.sh to automatically include the local m4 directory, used as a
fallback if system-wide defs are not found.
2007-06-13 13:27:40 +00:00
gbeauche
4ec66db185 Add MIPS files from cxmon. 2007-06-07 11:52:14 +00:00
gbeauche
974f086a8c Arrangements for Linux/mips. 2007-06-05 13:15:57 +00:00
asvitkine
f12f5173be macroman_to_host_encoding - so it works the other way around too 2007-01-24 02:37:06 +00:00
asvitkine
ab86a395da Since Guest and Host OS may use different text encodings for filenames,
I am adding functionality to support this. For the moment, I've only
added the platform-specific conversion for MacOSX (ie: UTF8 -> MacRoman),
but others can be added later.
2007-01-22 17:14:06 +00:00
asvitkine
e9fbc36368 fix compile warnings on OS X 2007-01-21 17:10:49 +00:00
gbeauche
2e95c43bf2 Remove the 33-bit addressing hack as it's overly complex for not much gain.
Rather, use an address override prefix (0x67) though Intel Core optimization
reference guide says to avoid LCP prefixes. In practise, impact on performance
is measurably marginal on e.g. Speedometer tests.
2007-01-13 18:21:30 +00:00
gbeauche
87e1518e96 A few fixlets to the SIGSEGV library:
- Don't export transfer types definitions (formerly used by older API)
- Handle ADD instructions in ix86_skip_instruction() (generated by icc 9.1)
- Use "%p" format for EIP/RIP addresses
2006-07-19 21:31:10 +00:00
gbeauche
d1d7d5bd4c Fix remove_shm_range() to actually return something 2006-07-19 21:23:41 +00:00
gbeauche
f39c252fbd Fix 33-bit addressing mode check when compiling with icc 9.1 2006-07-19 21:22:41 +00:00
gbeauche
98675da523 Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard. 2006-05-14 08:32:05 +00:00
gbeauche
26a71e5417 Fix page alignment 2006-05-14 07:11:23 +00:00
gbeauche
e4015e069f Use NQD dirty boxes, VOSF backend
+ make video_vosf_profitable() NQD accel aware
+ call vm_protect() only if PFLAG_CLEAR(page)
2006-05-13 16:48:47 +00:00
gbeauche
4c225b2705 MacOS X exception handling updates:
- Call user handler for KERN_INVALID_ADDRESS too (SIGBUS)
- Check for VALID_THREAD_STATE_FLAVOR in forward_exception()
- Return KERN_FAILURE if forward_exception() got an unknown behavior code
2006-05-09 06:24:05 +00:00
gbeauche
24af8d27c3 Fix for LAZY_FLUSH_ICACHE_RANGE. Blocks are indexed by native addresses. 2006-05-08 16:56:07 +00:00
gbeauche
ecdc036c69 Adapt for new functions (DarwinSysInit() & DarwinSysExit()) 2006-05-08 15:22:56 +00:00
gbeauche
61a2e86594 Rewrite MacOS X CD-ROM support.
Other bugs fixed:
- CD-ROM media are polled and now can be changed without rebooting
- Buffer overflow, memory leak and extra wait in CD-ROM ejection code
2006-05-08 12:15:58 +00:00
gbeauche
ff950c35e6 fix underquoted definition warning 2006-05-05 07:37:14 +00:00
gbeauche
5d3f53943d Add another NULL pointer check 2006-05-05 06:00:17 +00:00
gbeauche
1314f09a68 remove 2006-05-05 05:56:52 +00:00
gbeauche
2bff888cee updates 2006-05-05 05:56:20 +00:00
gbeauche
828b53b990 fix rev 1.22 commit for windows (extraneous return -1 left) 2006-05-02 19:49:25 +00:00
gbeauche
51a5e4c0da Don't build a built-in GUI if --enable-standalone-gui was requested.
The following configurations were tested:
./configure --without-mon --with-gtk=gtk1 --enable-jit-compiler	  [B.GTK1]
./configure --without-mon					  [B.GTK2]
./configure --without-mon --enable-standalone-gui --without-gtk	  [no GUI]
./configure --without-mon --enable-standalone-gui --with-gtk=gtk1 [S.GTK1]
./configure --enable-jit-compiler --enable-standalone-gui	  [S.GTK2]
2006-05-02 05:36:42 +00:00
gbeauche
62389bb3c0 Add my local changes to GTK+OSX 0.7 -- it's only correct for Basilisk II
and SheepShaver purposes. i.e. it's not fully suitable as a generic
g_main_run() replacement.
2006-05-01 23:09:12 +00:00
gbeauche
daa0af4da6 improve locks 2006-05-01 13:13:18 +00:00
gbeauche
4f07113555 Patch SynchIdleTime() to implement new "idlewait" prefs item. 2006-04-30 21:16:48 +00:00
gbeauche
fb332c4e38 Add mkstandalone -- make a standalone bundle with GTK runtime 2006-04-19 22:51:27 +00:00
gbeauche
6d15429156 Always build the STANDALONE_GUI hooks into Basilisk II. 2006-04-19 06:55:54 +00:00
gbeauche
180f3edafd Enable build of RPC code without pthreads (for Basilisk II and SheepShaver)
since we use our own custom message dispatch loop
2006-04-19 06:47:15 +00:00
gbeauche
622eca9068 Handle MacOS X bundles, search order: BasiliskII.app in the same directory
as BasiliskIIGUI.app, or /Applications/BasiliskII.app if none was found.

Also make yet another arrangement for MacOS X "difference". This scenario
was not working: WarningAlert -> ErrorAlert, the latter was not performed
because the exit status was not properly filled in sip->si_status...
2006-04-18 22:17:31 +00:00
gbeauche
d2e672c38f Fix NO_B2_EXE_FOUND (again) -- catch it very early, hence the SIGCHLD. Use
new rpc_wait_dispatch() function and gracefully get out of the main loop
when the child returns, though this is caught but the sigchld_handler().
2006-04-18 21:29:01 +00:00
gbeauche
758050ac73 Implement rpc_wait_dispatch() 2006-04-18 21:24:12 +00:00
gbeauche
3fda1a3af7 - Only start the emulator if requested (click on the "Start" button)
- Rewrote dispatch loop to accomodate GTK+1.2 for MacOS X (which doesn't
  like threads nor forks(!)). The latter also requires an additional patch
  to the version 0.7 available on SourceForge
- Run-time detect JIT capability so that we could hopefully use the ppc GUI
  on intel based Macs (check!)
2006-04-17 21:22:01 +00:00
gbeauche
02c24ed6c2 Create MacOS X bundle for BasiliskIIGUI.app. Also make sure to only link in
necessary GUI_LIBS and not all of the LIBS.
2006-04-17 15:32:37 +00:00
gbeauche
a295eea890 Fixes for GTK+1.2 GUI on MacOS X 2006-04-17 14:25:57 +00:00
gbeauche
5b1977b9f2 Fixes for MacOS X (10.2 has no <sys/poll.h> and 10.4 version is broken). 2006-04-17 09:06:32 +00:00
gbeauche
252f396ff3 Make Basilisk II main application not use GTK libraries when compiling with
STANDALONE_GUI. This is the second step towards a more interesting GUI alike
to VMware. Communication from/to the GUI is held by some lightweight RPC.

Note: The step should be enough to provide a tiny GTK GUI for MacOS X.
2006-04-16 21:25:41 +00:00
gbeauche
6994ab671e Enable build of a standalone GUI (first step). 2006-04-16 16:32:45 +00:00
gbeauche
896ada92dc Try to improve slirp performance again (though passive mode is still slower) 2006-04-02 21:06:50 +00:00
gbeauche
db76383246 decode movslq (generated by gcc4.1) 2006-03-30 22:45:49 +00:00
gbeauche
a4a070bc4a - add Linux/PPC linker script
- always relocate Basilisk II binary to 0x78048000 on MacOS X (including x86,
  to be tested later)
2006-03-25 07:08:50 +00:00
gbeauche
41ee2520b6 freebsd linker script 2006-03-15 06:54:34 +00:00
gbeauche
b662e6acec Add linker script for FreeBSD 5.3 (and probably newer). Verified to allocate
up to 1 GB of Mac RAM in both REAL_ADDRESSING and DIRECT_ADDRESSING modes.

NetBSD 2.0 can use the Linux linker script. However, I could not verify 1G
support since my installation does not permit this.
2006-03-15 06:54:07 +00:00
gbeauche
449c6496ff Link with AppKit framework on MacOS X. This should enable X11 builds when
there is no SDL available (suggested by Dara Hazeghi)
2006-03-14 22:14:13 +00:00
gbeauche
7ee9cb43dc Relocate MacOS X executable to 0x78048000 akin to linker scripts on Linux
arches. This probably already worked in the past but I have just verified
that Basilisk II works with up to 1 GB of Mac RAM in DIRECT_ADDRESSING or
REAL_ADDRESSING mode.

BTW, a quick Speedometer 4 CPU performance test showed a +15% speed increase
in real addressing mode vs. direct addressing. x86 arches don't benefit much
from that mode since they support complex address modes already (beyond plain
load/store).

TODO: check on MacOS X for Intel so that to reduce the test to darwin*:*)
2006-03-14 21:18:44 +00:00
gbeauche
b80e9651f5 fix cross-block initializer 2006-02-27 13:39:29 +00:00
gbeauche
cafa8c8c89 add some barriers to make sure L_e_region* really come after the test insns 2006-02-27 13:38:52 +00:00
gbeauche
c19cc7a81b Updates 2006-02-27 07:25:43 +00:00
gbeauche
74c62b9095 - Try to allocate Mac memory only once on 32-bit systems
- Cap Mac memory to 1023 MB, Apple Personal Diagnostics crashes at 1 GB
- Scratch memory is meant to be addressed from Mac programs too
2006-02-27 07:24:58 +00:00
gbeauche
f446d610f8 Start allocating memory from 0x10000000 with linker scripts since the system
sometimes has a problem to make a decision when next_address == 0.

NOTE: this makes it possible to allocate up to 1 GB with DIRECT_ADDRESSING
2006-02-27 07:16:40 +00:00
gbeauche
9aab8c7d85 Move up _start base 2006-02-27 07:14:39 +00:00
gbeauche
93d918097b Fix vm_acquire_mac() fallback to non 33-bit addressing mode. Support 33-bit
addressing in REAL_ADDRESSING mode. Only support platforms with proper
linker scripts to map the whole Mac memory from address 0. Warning fix.

NOTE: when compiled with --enable-addressing=real on Linux {x86,x86_64},
you can not address up to 1.5 GB in Basilisk II.
2006-02-27 00:15:39 +00:00
gbeauche
2ef9d6e708 Add linker scripts for correct REAL_ADDRESSING support 2006-02-27 00:11:49 +00:00
gbeauche
077a232acc Memory allocated through win32 VirtualAlloc() is zero-filled. Likewise for
memory mmap()'ed with MAP_ANONYMOUS (equivalent to /dev/zero mapping but
faster)
2006-02-27 00:04:12 +00:00
gbeauche
735c332ab7 add 33-bit addressing support to vm_acquire_fixed() 2006-02-26 23:45:07 +00:00
gbeauche
360a9457c6 fix logic 2006-01-27 23:49:01 +00:00
gbeauche
9d984b3b34 Check whether compiler supports byte bit-fields. If so, we can enable slirp
emulation code since it pure C+sockets code.
2006-01-27 23:41:43 +00:00
gbeauche
a615a4ac24 Use the most portable POSIX-style non-blocking I/O (O_NONBLOCK) instead of
BSD-style through FIONBIO. It turns out Tru64 and probably IRIX don't support
the latter when fd is a pipe (slirp case).
2006-01-24 23:46:19 +00:00
gbeauche
064973dbc7 ugly cast games 2006-01-24 21:33:26 +00:00
gbeauche
e0a966ee15 Code I wrote yesterday was totally broken. It's enough to make sure nPC is
correctly updated too... Instruction skipper now works on Solaris/SPARC.
2006-01-23 23:57:41 +00:00
gbeauche
99f5dcf66f - Fix SPARC Store Doubleword transfer_size in decoder.
- In the instruction skipper code, add a huge kludge (trampoline) to forcibly
  zero out %global registers when requested. Otherwise, Solaris/SPARC turned
  out to use %g1 during signal handling, and the zero we could have written
  to there vanished. This assumes [%sp-8] is valid to use (ABI states data
  below %sp is undefined though)
2006-01-22 23:14:48 +00:00
gbeauche
100a3e1abd Adapt for MacOS X for Intel, also fix thread_state type in forward_exception() 2006-01-22 00:05:05 +00:00
gbeauche
f0f76cd7ad Remove nigel's hack, I am confident the problem was MacOS X implementation of
poll() that was not a cancellation point, which I fixed (OSX/Intel 10.4.4)
2006-01-21 20:48:17 +00:00
gbeauche
ceb7488a77 poll() and select() are still not cancellation points in MacOS X 10.4.4... 2006-01-21 16:19:47 +00:00
gbeauche
a6156a17b7 streamline for standalone VOSF performance testing 2006-01-21 16:00:17 +00:00
gbeauche
335a9dd7f3 MacOS X bundle 2006-01-21 13:06:32 +00:00
gbeauche
2bc7887bc1 fix framework detection on OSX/intel (thanks toshi for the remote access ;-) 2006-01-15 11:38:41 +00:00
gbeauche
a2840298b0 - factor out native_byte_order determination
- fix ExpandMap[] when client X image byte order is different than host's
  e.g. { mips, ppc } -> x86 in 8 bpp mode
2006-01-03 22:03:27 +00:00
nigel
5d09d2b6c4 Small hack for clean exits on Nigel's OS X port 2005-12-29 13:40:25 +00:00
gbeauche
bdcf8efe2e Link with math library (-lm) on IRIX so that to get support for long double
arithmetic. Also make sure to only use -IPA with MIPSPro Compilers.
2005-12-04 15:45:09 +00:00
gbeauche
dbd5736f1d Fix Serial build on IRIX, remove the STDC_HEADERS manually defined macro
since it now works (egrep was missing previously, IIRC)
2005-12-04 15:03:11 +00:00
cebix
9cdff5117f ignore floppy device open fail in Sys_open() so the floppy drive will be
operative even if no disk was inserted at startup
2005-11-24 17:23:43 +00:00
cebix
92551146fc modernized Linux sound device detection 2005-11-24 17:03:15 +00:00
cebix
f450308b2f modernized Linux floppy detection 2005-11-24 17:02:59 +00:00
gbeauche
1f66e31423 undo unwanted change for now (double check this one later) 2005-11-22 21:57:59 +00:00
gbeauche
af7973a79c fix build with gtk-1.2 2005-11-22 21:53:24 +00:00
gbeauche
4c4b24026f fix copyright dates 2005-11-22 20:29:46 +00:00
gbeauche
a7da877356 Remove obsolete Cygwin/X11 addressing hack. Fix DirectX fullscreen mode
with hardware surface. On the other hand, DIB (SDL_VIDEODRIVER=windib)
always seems the fastest on my system for both windowed and fullscreen
modes.
2005-11-21 23:38:46 +00:00
gbeauche
9c06a00dd2 GUI cosmetics from the Windows port: add "browse" button to ROM & keycodes
file selectors, improve "Memory/Misc" pane to be more attractive and simplify
RAM size selection, rename to "Keyboard/Mouse" pane to match the actual order
of elements in the pane, make "<control>-S" save/start the config.
2005-11-21 21:39:08 +00:00
gbeauche
a750963a94 don't grab in -mdynamic-no-pic with icc, note that you need icc >= 9.0.25
to have a working build
2005-08-18 22:10:15 +00:00
gbeauche
e694311703 Drop the old _llseek() hack. That was causing problems and we "now" use the
right approach with LFS for a few years now.
2005-08-01 05:23:02 +00:00
gbeauche
77208f85b0 sys_darwin.cpp depends on CoreFoundation stuff, disable it for OpenDarwin 2005-07-10 16:42:04 +00:00
gbeauche
43c8792b6e Fix detection of GCC versions (J.P. Larocque) 2005-07-06 05:25:05 +00:00
gbeauche
9d7e5017d9 Factor out stuff for SheepShaver compatibility. 2005-07-03 08:21:32 +00:00
gbeauche
858c3b9719 - Check for <stdint.h> ourselves if AC_HEADER_STDC didn't do that
- Build with -mdynamic-no-pic on MacOS X, this brings up to 20% performance
  improvement in the CPU core.
2005-07-01 05:57:07 +00:00
gbeauche
01b34da3d9 Don't remove config.h.in in distclean rule if we are still keeping configure 2005-07-01 05:54:58 +00:00
gbeauche
eaa0f6576b Import m4 macros for external packages in case one would want to regenerate
a configure script without having those installed (e.g. on MacOS X).
2005-07-01 05:54:20 +00:00
cebix
fa5ae3ab6e minor cleanups 2005-06-30 21:25:26 +00:00
gbeauche
e867749999 POSIX conforming use of pthread_cond_wait(). 2005-06-30 10:34:31 +00:00
gbeauche
e355c83f59 Add system-specific implementations of idle_{wait,resume} functions. 2005-06-30 10:20:18 +00:00
gbeauche
a8ba24aecf Use fast spinlocks only for small enough atomic operations. Otherwise, you
run into some performance problems in e.g. video graphics experience because
of busywaits in the current spin_lock() implementation.
2005-06-25 11:40:29 +00:00
gbeauche
1421bca4a7 Comment typo and return handled status in handle_selection() 2005-06-22 08:50:07 +00:00
gbeauche
3a0b4ed999 Get real page size on Windows for vm_get_page_size() [64 KB] 2005-06-20 03:54:46 +00:00
gbeauche
d0fd88f7b2 gtk2 gui support 2005-06-19 15:52:09 +00:00
gbeauche
7f3e40883a Only close clipboard hidden window only if created. This fixes errors on
early exit from the GUI.
2005-06-19 15:50:52 +00:00
gbeauche
fe99211e75 Support USE_CPU_EMUL_SERVICES in SDL/video driver. Only trigger ethernet
interrupt in one_tick() if no pthreads at all are used, i.e. ether_dummy
is effective in that case. Otherwise, don't trigger ethernet again if
pthreads are available (and ether_unix) and cpu emul services are active.
2005-06-14 22:35:42 +00:00
gbeauche
957bee00cf Always allocate RAM and ROM areas at the same time. This avoids having ROM
suddenly allocated below RAM and thus not working. Besides, this may fix a
latent deallocation bug in real addressing mode (i.e. release the whole
block allocated at once, not separately).

Side effect: this makes Basilisk II work in direct addressing mode with JIT
on Darwin 8.0.1 for x86.
2005-06-13 20:19:15 +00:00
gbeauche
334f9ce018 Check for CoreFoundation framework (Darwin 8.0.1). Likewise for
IOKit/storage/IOBlockStorageDevice.h which is not available there on x86
2005-06-12 23:36:34 +00:00
gbeauche
2bc79fd857 Enable Basilisk II to work even if slirp_init() failed. Disable ethernet
emulation in that case, don't exit(1).
2005-06-12 22:48:48 +00:00
gbeauche
e308e5441b Mach exception recovery and instruction skipping for Darwin/x86. 2005-06-12 21:47:46 +00:00
gbeauche
369d01cf16 %Ld is for long double, not long long (%lld) 2005-06-11 06:52:22 +00:00
gbeauche
0f0b06b099 Much improved responsiveness on NetBSD systems.
On those systems, it's really hard to get high resolution timings and the
system oftens fails to honour a timeout in less than 20 ms. The idea here
is to have an average m68k instruction count (countdown quantum) that
triggers real interrupt checks. The quantum is calibrated every 10 ticks
and has a 1000 Hz resolution on average.
2005-06-11 06:43:24 +00:00
gbeauche
8532e34485 Update GTK Prefs Editor with support for "jitinline" and "slirp" ethernet. 2005-06-06 20:11:50 +00:00
gbeauche
6b9f8e85c5 Robustify: only close zero_fd if actually allocated 2005-06-06 19:40:17 +00:00
gbeauche
452b7b9638 Properly QuitEmulator() on unhandled SIGSEGV even if not ENABLE_MON. 2005-06-06 19:39:36 +00:00
gbeauche
f784bf5c05 Restrict mandatory SLIRP_CFLAGS to minimum, i.e. -fno-strict-aliasing. 2005-06-06 19:31:22 +00:00
gbeauche
a4caa8ab09 Handle all slirp input/output from a single thread, thus fixing occasional
hangs on slower systems (concurrent read/write in 68k mode). Reduce timeout
to 10 ms.
2005-05-21 17:48:21 +00:00
gbeauche
02714e46a8 Fix and factor out ether_exit(). Pitifully, MacOS X 10.2 does not make select()
a cancellation point when it is passed a NULL timeout. Workarounded in
receive_func() with a full inline of poll_fd() + pthread_testcancel().
2005-05-15 17:22:12 +00:00
gbeauche
dab65b1211 Enable ethernet on MacOS X even though slirp seems to have some small
problems on big endian systems. IOW, Basilisk II can hang there. I also
noticed that on Linux/ppc so that's probably not MacOS X specific, assuming
the same problem. ==> A packet arrives but Basilisk II can't seem to trigger
an interrupt (need to try sheep_net/tun in linux to make sure)
2005-05-14 17:40:05 +00:00
gbeauche
77446db25d fix poll() emulation 2005-05-14 17:33:57 +00:00
gbeauche
1b53603138 MacOS X doesn't implement unnamed POSIX semaphores even though their libc
defines the functions. Use Mach semaphores instead.
2005-05-14 17:32:55 +00:00
gbeauche
85db30f78d add missing rule to build extfs_macosx.mm 2005-05-14 16:37:21 +00:00
gbeauche
fd61ad2b0c Try to improve the documentation concerning the "tun" interface. Take note
that that kernel module must be loaded and IP forwarding enabled. Also add
slight improvements to the "tunconfig" script so that sudo /sbin/ifconfig
and sudo /sbin/iptables are really supported for current user if not root.
2005-05-14 16:08:17 +00:00
gbeauche
722eedd6e2 ethernet/slirp works on netbsd too 2005-05-14 08:42:39 +00:00
gbeauche
eff6830415 detect slirp at configure time, aka fix build when ether_dummy.cpp is used 2005-05-14 08:10:49 +00:00
gbeauche
63015fd6d3 Use a custom poll_fd() function implemented as select() on platforms that
don't support poll() natively, e.g. MacOS X and some older BSDs.
2005-05-13 17:43:38 +00:00
gbeauche
d9839e7079 Fix build on MacOS X: dedicated extfs_macosx.mm & static SDL libs 2005-05-13 17:32:13 +00:00
gbeauche
fdfcd3eb86 Some 64-bit fixes to bootp, icmp, udp (cu-seeme). However, it can happen
that on certain occasions, it doesn't work. Some timing problem?
2005-05-13 14:02:37 +00:00
gbeauche
745bc86678 fix CFLAGS preservation 2005-05-13 11:13:26 +00:00
gbeauche
20fcf38e30 Recognize Intel Compilers. Add user mode network stack with slirp from qemu.
Simply use "ether slirp" in the prefs file, no kernel module required. I
could perform up to 450 KB/sec on my DSL line.
2005-05-13 09:21:21 +00:00
gbeauche
a532ff64c8 Improve SDL/fullscreen mode when not used in DGA mode, i.e. cases when
screen needs to be updated too. This needs better boxes characterisation.
2005-05-12 16:55:16 +00:00
gbeauche
9f8b4bcc0d Fix SDL/DGA build. Drop useless "inline" for updates. Overlapping scanlines
optimization.
2005-05-12 14:39:56 +00:00
gbeauche
31f80e338b Fix DGA when visible screen is smaller than virtual display, aka fix
fullscreen mode when VidMode extension is enabled. Also fix SDL fullscreen
to really update the screen as this is necessary by default on Linux since
simple windowed is used (and not DGA for fullscreen).

Always prefer the 64 pixel chunks update code.

Rearrange B2 video_x.cpp to match video_vosf.h updates
2005-05-12 11:09:31 +00:00
gbeauche
b4152fc466 cosmetics 2005-04-02 09:56:12 +00:00
gbeauche
85246b8408 Rewrite update_display_dga_vosf() for much improved performance and cope
with palette changes. Also slightly improve the generic code when we need
to further update the screen (e.g. SDL without hardware surface)
2005-04-02 09:50:17 +00:00
gbeauche
e8ac4897b6 Enable multiple depths in fullscreen DGA modes, i.e. add 1-bit to 16/32-bit
blitters, rewrite update_display_dga_vosf() to actually work with sub byte
pixels. Factor out update_display_window_vosf() since it's long time that
it is no longer checking for first column and last column that have changed.
2005-03-28 16:14:25 +00:00
gbeauche
7dedb433fd Gracefully catch SIGSEGV & SIGBUS for TEST_VM_PROT_* test cases. This should
avoid dumping core, and especially Windows fault alerts when natively
configuring with MinGW32.
2005-03-24 23:45:40 +00:00
gbeauche
35e8c8c9cd Enable instruction skipping for OpenBSD 3.4 on i386 2005-03-23 22:00:06 +00:00
gbeauche
f2908fe7bf instruction skipper for Solaris/i386 (Solaris 9) 2005-03-23 21:37:24 +00:00
gbeauche
569d916664 fix for 2.4.21 2005-03-22 13:43:50 +00:00
gbeauche
afe033a63d fix build with kernels >= 2.6.9 2005-03-22 13:31:13 +00:00
gbeauche
04a331e827 Avoid use of pthread_cancel() for redraw thread cancellation. Use an extra
variable to acknowledge cancellation. This avoids Xserver events queue
corruption when clipboard is in use. Concretely, this fixes following errors:
Xlib: unexpected async reply (sequence 0xHEX)!
2005-03-21 23:57:34 +00:00
gbeauche
143b18c752 Make ethernet really work on 64-bit platforms, especially x86-64 2005-03-19 17:43:03 +00:00
gbeauche
f29eb7dd1d nanosleep() delays seem better suited to MacOS X, instead of select() 2005-02-21 22:57:03 +00:00
gbeauche
10f38d4b50 NetBSD/ppc support 2005-02-20 11:39:12 +00:00
gbeauche
3aeed84471 <machine/soundcard.h> was simply a compatibility symlink on FreeBSD and it
is now gone away.
2005-02-13 17:56:55 +00:00
gbeauche
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
fd7d8cd625 Implement RGB555 mode on 16-bit displays, big endian, native byte order (MacOS X) 2005-01-19 20:27:14 +00:00
gbeauche
09d6712bdb Fixes for NetBSD 2.0 2005-01-04 23:38:01 +00:00
gbeauche
3032cb417c enable build with kernel 2.6 2004-12-19 15:55:31 +00:00
gbeauche
50eee913b8 s/vm_page_size/vm_get_page_size/ to avoid name clash on MacOS X 2004-12-18 22:20:27 +00:00
gbeauche
61e223471b Force use of MacX mappings with Apple's X server 2004-12-18 19:28:33 +00:00
gbeauche
1406b615c7 Make EtherInterrupt/packet[] "static" so that it is allocated in the .data
section, which is likely accessible under 32-bit address on 64-bit platforms
2004-12-18 18:10:40 +00:00
gbeauche
854478a048 support for kernel 2.6 (from MOL) 2004-12-18 17:49:12 +00:00
gbeauche
c10046c137 Check that we can really read at the faulty eip in Windows prior to decoding
the instruction. Also fix the unrecoverable fault dump to really be useful.
2004-12-11 13:07:38 +00:00
gbeauche
a80e76111f remove obsolete headers inclusion, implement vosf lock with native windows
mutexes, use new vm_page_size() accessor
2004-12-11 10:20:32 +00:00
gbeauche
fc47096ef8 implement vm_page_size() to get the actual size of a page 2004-12-11 10:19:34 +00:00
gbeauche
0e52edfbd0 ppc64 fixes 2004-12-02 23:29:52 +00:00
gbeauche
fbff8b1b3c typos 2004-11-29 21:59:03 +00:00
gbeauche
01a1d4e8b2 Use Windows clipboard code with SDL graphics only. X11 output will use
the X server glue anyway
2004-11-17 00:59:04 +00:00
gbeauche
ce67261af4 lock X11 display better around update_display_window_vosf() 2004-11-15 23:40:23 +00:00
gbeauche
e85f4397c8 Backport copy-paste of 'TEXT' from SheepShaver 2004-11-15 23:27:43 +00:00
gbeauche
e7fb4be12f Fast spinlocks from SheepShaver for X11 clipboard handling 2004-11-15 23:24:09 +00:00
gbeauche
dc13732db0 Add Lauri's icon for Basilisk II builds on Windows 2004-11-15 00:07:54 +00:00
gbeauche
5f44aa0266 Check for egrep early, as AC_EGREP_CPP wouldn't work correctly otherwise
(e.g. GCC version not detected, likewise for ANSI C headers). Add check
for Windows exceptions support. Some cosmetics for Cygwin.
2004-11-14 23:24:51 +00:00
gbeauche
cb99e7673d Don't use pthread_mutexattr_setprotocol() on Cygwin targets as
PTHREAD_PRIO_INHERIT is not defined correctly and it probably wouldn't
work as expected anyway.
2004-11-14 23:23:07 +00:00
gbeauche
adf82c8f45 Handle .exe suffix for Windows builds. Remove obsolete rules for cpuopti. 2004-11-14 23:21:54 +00:00
gbeauche
48b39b9eb1 Implement RGB555 mode on 16-bit displays (Windows) 2004-11-14 21:41:46 +00:00
gbeauche
68083d1102 Integrate SIGSEGV recovery from libsigsegv for Windows and Cygwin.
Also implement instruction skipper for Windows/x86.
2004-11-13 23:44:11 +00:00
gbeauche
347f7ce77b Windows memory allocators 2004-11-13 23:39:58 +00:00
gbeauche
a4a6233dab fix detection of <linux/if.h> (thanks Bob Deblier) 2004-11-10 07:33:15 +00:00
gbeauche
e3c5f1769d Enable 33-bit memory addressing on 64-bit JIT capable platforms (e.g. x86-64).
This is useful to get rid of address offset sign extensions. It uses POSIX
shared memory to create aliased regions, fallback to usual sign-extension
way if shm_open et al. don't work (e.g. no /dev/shm mounted)
2004-11-08 21:07:07 +00:00
gbeauche
cfaddce448 disable store motion on gcc >= 3.3-hammer (and normal 3.4), where the option
is available actually
2004-11-02 20:40:54 +00:00
gbeauche
382294ef55 enable JIT on x86_64 2004-11-01 16:07:39 +00:00
gbeauche
eed5724b80 SDL audio support 2004-07-19 19:25:07 +00:00
gbeauche
a4eb3b19ab Don't try to make a cast value an lvalue (Brian Johnson). Add some explicit
casts to (int) in order to avaoid this warning:
warning: comparison between `const enum video_depth' and `enum <anonymous>'
2004-06-29 21:50:23 +00:00
gbeauche
f3fbf06674 Add configure macros to check for -framework Carbon & -framework IOKit so
that we choose to include ../MacOSX/clip_macosx.cpp, sys_darwin.cpp or not.
2004-06-27 22:06:02 +00:00
gbeauche
4b7c7d22a1 Handle SDL scancode -> Mac keycode map files 2004-06-27 18:14:43 +00:00
gbeauche
4ea24edaf3 Fix video_vosf_init() for BasiliskII/SDL 2004-06-26 17:20:35 +00:00
gbeauche
6482f7b7a6 Try a better VOSF run-time performance check heuristic. 2004-06-26 16:26:07 +00:00
gbeauche
808b3e34c8 Add heuristic to deitermine run-time effect of VOSF acceleration, and
disable it if it turns out to not be profitable
2004-06-26 15:22:02 +00:00
gbeauche
1b5a3a6069 Check for the "true" command better with AC_PATH_PROG. aka fix BLESS
command checking on MacOS X.
2004-06-24 22:34:43 +00:00
gbeauche
b76aab08e4 Move VideoMode wrappers to video_blit.h. 2004-06-24 15:19:56 +00:00
gbeauche
8948ce2a49 Use atexit(SDL_Quit) idiom. XCloseDisplay() only when using X11 graphics. 2004-06-24 15:18:42 +00:00
gbeauche
c6ff8bc709 Use clip_unix.cpp only with X11 targets. Otherwise, default to clip_dummy.cpp 2004-06-23 22:33:45 +00:00
gbeauche
19494038b3 Initial SDL/video support. Fix VOSF code could lead to a crash on run-time
resolution/depth switching. Rearrange blitter lookup code, aka make it cleaner.
2004-06-23 14:30:48 +00:00
gbeauche
25f205c535 Fix double mappings in "MacX" section, aka do recognize 'r' key. 2004-06-22 22:42:37 +00:00
gbeauche
342db1fb26 Handle Control key in "MacX" mappings. 2004-06-22 20:04:51 +00:00
gbeauche
9445ccb5ad typos 2004-05-12 11:46:34 +00:00
gbeauche
a8c8c1d4d9 Move and fix tun interface shutdown call 2004-05-09 16:32:12 +00:00
gbeauche
2ce9491e96 TUN/TAP support 2004-05-09 16:16:05 +00:00
gbeauche
815390707a Decode MOVSX r32, r/m16 (generated by icc v8.0 on x86) 2004-02-16 16:02:48 +00:00
nigel
9c57351dba Tidy up Aqua/Darwin specific code 2004-01-26 11:08:52 +00:00
gbeauche
93c472ec0a cosmetic fixes when printing movsbq operation summary 2004-01-22 00:00:55 +00:00
gbeauche
7a0681c44b handle (skip) x86 movsbl instructions 2004-01-21 23:50:06 +00:00
gbeauche
1a6c128ab2 Summary: possible support of SheepShaver on Zaurus PDAs
Add Linux/ARM instruction skipping, includes support for ARMv4+ halfword
and signed data transfer instructions. Note that load/store multiple are
not handled and someone has to make sure post-incr/write-back logic is
correctly implemented.
2004-01-21 23:14:28 +00:00
nigel
2208c5460b Added missing switch value to eliminate a warning 2004-01-20 23:49:32 +00:00
nigel
3d4961887c Make distclean remove some extra files/dirs generated by autoconf,
and some Darwin test programs generated by configure.
Note - Ideally it would also remove configure?
2004-01-20 03:30:52 +00:00
gbeauche
d09df6d1fa ARM/linux sigsegv handler. Instruction skipper yet to be written for
happy Zaurus owners.
2004-01-19 16:59:13 +00:00
cebix
5098c8ae83 Happy New Year! 2004-01-12 15:55:51 +00:00
cebix
9e7932abf0 Happy New Year! :) 2004-01-12 15:29:31 +00:00
gbeauche
866919579f Force DSP_RESET on AudioExit() so that we don't get "clicks" (?). 2004-01-04 16:35:32 +00:00