Commit Graph

1979 Commits

Author SHA1 Message Date
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
asvitkine
150a577e4e [patch from Kelvin Delbarre] If you move the mouse cursor in and out of the
SheepShaver window a number of times (somewhere around 30 or 40 times will do
it), SheepShaver appears to lock up. This occurs because SDL posts application
activate/deactivate events to its event queue when the mouse moves in/out of the
SheepShaver window, but these events are never consumed, and as a result, the
event queue fills up. Thereafter, no new events can be posted, and user inputs
are ignored. The fix is to consume SDL_ACTIVEEVENT in handle_events().
2008-06-20 00:45:27 +00:00
asvitkine
682853da42 [patch from Kelvin Delbarre] Fix file corruption experienced when doing random-access
file I/O to the external filesystem. The application-specified ioPosMode parameter must
be masked off appropriately in extfs.cpp:fs_set_fpos(), as is done elsewhere in the file.
2008-06-20 00:39:47 +00:00
asvitkine
1002714623 Add frameskip 0 ("Dynamic") to MacOSX Prefs Editor, and fix line endings
and deprication warnings in the Objective-C code. Also, don't specify array
size with a macro in a header file.
2008-06-17 04:26:56 +00:00
gbeauche
159acc29b0 Cope with assembler updates. 2008-02-16 22:15:00 +00:00
gbeauche
50ed43d6f0 Use D suffix for 64-bit real, even though L is the actual GNU assembler suffix. 2008-02-16 22:14:41 +00:00
gbeauche
f6aecb472d Add FPU instructions. 2008-02-16 19:01:42 +00:00
gbeauche
b083b08fd1 Cope with recent run-time assembler changes. 2008-02-12 14:52:25 +00:00
gbeauche
736975460b Add MMX instructions 2008-02-12 14:42:09 +00:00
gbeauche
8083bc1bd3 - Fix tests for 32-bit code generation
- Simplify parse_imm() and factor out failure messages to show_instruction()
2008-02-12 09:55:36 +00:00
gbeauche
d03033c19f Fix decoding of 64-bit values on 32-bit hosts. Improve register decoding speed
by more than 2x, aka use a big switch/tree to lookup the register ID from string.
2008-02-12 00:45:24 +00:00
gbeauche
5adc268bcc Fix and add other SSE conversion instructions. 2008-02-11 19:05:17 +00:00
gbeauche
382b44ffaf Add more tests in mem,reg cases: scale factor 8, base-only (e.g. mov (%breg),%dreg). Don't test for %rip relative addressing yet, need to improve the parser first. 2008-02-11 17:17:56 +00:00
gbeauche
250366fd94 Use symbolic constants for Jcc and SETcc instructions. Don't emit extraneous REX bits for JMP and CALL instructions. 2008-02-11 16:50:40 +00:00
gbeauche
3ea69bfc5c - Fix CMPSD, COMISS, COMISD, UCOMISS, UCOMISD, MOVD/MOVQ %xmm,%reg
- Rename X86_SSE_CC_NE to X86_SSE_CC_NEQ (match Intel reference manual)
- Rename MOVDLX to MOVDXD (%Xmm register as Destination)
- Rename MOVDQX to MOVQXD (%Xmm register as Destination)
- Rename MOVDXL to MOVDXS (%Xmm register as Source)
- Rename MOVDXQ to MOVQXS (%Xmm register as Source)
2008-02-11 16:13:47 +00:00
gbeauche
f8e11d9aba Enable/disable some tests at compile time. Show status while verifying hundred thousands variants. 2008-02-11 13:21:15 +00:00
gbeauche
1ad1f0a795 Fix for newer binutils (2.17). Skip extraneous REX prefix (FIXME?) in disassembly,
fix decoding for pushq/popq.
2008-02-11 10:14:16 +00:00
nigel
5f0e7847d5 Remove a few 'warning: NULL used in arithmetic' 2008-02-04 01:02:58 +00:00
nigel
2b4e8b9cbb Add a dummy Screen_fault_handler so this builds again,
whitespace changes, set a working directory other than /,
allow the file ROM to be opened from the bundle.
2008-02-04 01:00:53 +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