Commit Graph

1765 Commits

Author SHA1 Message Date
gbeauche
7ef09b90bb NQD dirty boxes, BeOS backend -- no-op. 2006-05-14 08:35:35 +00:00
gbeauche
5e4c2b7bb9 NQD dirty boxes, X11 backend. 2006-05-14 08:32:33 +00:00
gbeauche
98675da523 Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard. 2006-05-14 08:32:05 +00:00
gbeauche
757f849ad0 Optimize generated code to NQD & CheckLoad functions. They don't call into
68k or MacOS code, so they don't need to be a termination point. i.e. don't
split into two basic blocks and thus avoid a full hash search.

Also add missing NQD_unknown_hook NativeOp from previous commit.
2006-05-14 07:21:10 +00:00
gbeauche
26a71e5417 Fix page alignment 2006-05-14 07:11:23 +00:00
gbeauche
74a5024be4 NQD dirty boxes, generic code
+ while we are at it, also rename a few NQD related NativeOps.
2006-05-13 17:12:18 +00:00
gbeauche
1470a8af13 NQD dirty boxes, SDL backend.
This reduces the number of Screen_fault_handler() calls by 80%. i.e. VOSF
is now viable on this turtle MacOS X. Besides, since there is no buffer
comparison, idle sleep can really be effective. SheepShaver in idle mode
on my PBG4 now goes below 8% of CPU resources instead of 70-80% with
bounding boxes based video refreshes.

Caveat: if your program doesn't use standard MacOS routines that call NQD,
then you can expect slower (visual) performance. However, I do think the
new default behavior (VOSF+NQD) is the most common.
2006-05-13 16:58:44 +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
3b07ba27e4 Introduce a new video refresh function that uses smaller bounding boxes.
This does not improve graphics performance but helps CPU because it reduces
the number of bytes transfered to actual screen. I saw an improvement by up
to 26% in frameskip 4 800x600x16 but also a hit by 3% with frameskip 0.

The next step is to use NQD bounding boxes to help detecting dirty areas.

So far, this is the best I can do without VOSF working (MacOS X performance
bugs -- pitifully slow Mach syscalls)
2006-05-11 07:51:32 +00:00
gbeauche
5019174a22 SDL Video updates:
- Properly handle migration from "screenmodes" and "windowmodes" to "screen"
- Fix has_mode() logic to really test for actual mode availability. i.e.
  no longer start in large screen mode if user specified a max size.
2006-05-09 21:41:02 +00:00
gbeauche
484469962b Don't let SDL catch SIGINT and SIGTERM signals. This is not suitable for
SheepShaver since we are typically translating SDL_QUIT events to PowerOff()
on MacOS side. And, if MacOS is not fully booted, it's not really convenient
to shut it down, even with ctrl-C. i.e. you had to kill -9 it.
2006-05-09 19:53:31 +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
0af4721cb6 Don't read from 0xf8000090 during MacOS (8.5, 9.0) installation. Is this an
OpenFirmware check for OldWorld 604-based machines?

XXX I have code pending that makes it possible to use PowerMac ID #3035 and
model 510 (PowerMac G3 Series). However, I have a regression with one of my
MacOS 8.6 disks. This is non-standard anyway since it was installed from the
iMac DV 8.6 discs ("yellow" not generic) with MOL -- SheepShaver can't cope
with it.

So I am not surprised it breaks. Otherwise, 8.5 -> 9.0.4 were fine with it.

BTW, the "regression" is Native Resource Manager is not installed and the
boot gets mad later. FWIW, it's the same as for MacOS 9.1. A resource is
very likely not loaded.
2006-05-08 23:32:58 +00:00
gbeauche
0a37b8f5e9 Fix MacOS X GUI (new fake DarwinSys*() functions) 2006-05-08 17:20:20 +00:00
gbeauche
8bd38cff75 Also nuke MacOS X GUI binary and bundle for make clean 2006-05-08 17:19:45 +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
12195c32b5 Define UNALIGNED_PROFITABLE on x86 platforms 2006-05-07 16:54:58 +00:00
gbeauche
75f3bdea68 Fix NQD_bitblt_hook() to perform sign check correctly 2006-05-07 10:49:48 +00:00
gbeauche
bc13355b57 Add linker scripts from Basilisk II and make it possible to allocate up to
1 GB of Mac memory. Only tested on Linux/x86_64 so far but with a somewhat
interesting (MacOS, ROM, RAM size) matrix.

XXX: It should be possible to allocate up to 1.5 GB by relocating the ROM
base to something like 0x60800000.
2006-05-06 10:42:51 +00:00
gbeauche
6da4032ab7 Add a few FE0A opcode patches. This slightly improves stability. 2006-05-06 10:30:00 +00:00
gbeauche
80c87484f3 Add 'nsrd' 1 and 'gpch' 650 patches for MacOS 7.5.3 Revision 2.2 2006-05-06 09:23:28 +00:00
gbeauche
3bd5d0c787 Instructions that trap are now an end-of-block condition. This should avoid
the compilation of illegal instructions and thus stopping execution earlier.
2006-05-06 07:19:39 +00:00
gbeauche
e88961bc45 Review MacOS 8.6 vs 9.0 patches:
- 'boot' 3: set boot stack pointer only once at the correct place
- 'gpch' 750: fix FE0A opcode replacement (selector #$0a is virt2phys on pgidx)
- 'gpch' 750: remove bogus patch for SonyVars
- Mark patches "9.0" verified accordingly vs. 8.6
2006-05-05 19:05:24 +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
4578abcbd4 Add native GetNamedResource() and Get1NamedResource() patches for PPC Unix.
Only tested on MacOS X so far. It shouldn't be a problem for Linux/PowerPC.
2006-05-03 22:11:49 +00:00
gbeauche
812682fda6 update 2006-05-03 21:53:47 +00:00
gbeauche
f3ba2f0d64 Don't access ROM85 as it it was a pointer to a ROM version number (8.0, 8.1)
aka. fix bogus AppleShare extension, it was trying to dereference 0x3fff.

XXX: why is this code called in the first place?
2006-05-03 21:53:33 +00:00
gbeauche
21f35a34f0 Add patches for native GetNamedResource() and Get1NamedResource(). This will
be useful to fix a bug in the AppleShare extension (see DRVR .AFPTranslator
in Basilisk II)

Unrelated improvement: call sheepshaver_cpu::get_resource() directly, don't
get it through another global function.
2006-05-03 21:45:14 +00:00
gbeauche
828b53b990 fix rev 1.22 commit for windows (extraneous return -1 left) 2006-05-02 19:49:25 +00:00
gbeauche
0f5f874e11 Huh, committed wrong changelog for configure.ac, it should have been the
following: fix build of the CPU emulator (check for additional math functions)
2006-05-02 19:36:57 +00:00
gbeauche
8123813cad Add SLiRP support to SheepShaver for Windows 2006-05-02 19:35:39 +00:00
gbeauche
22110cb4f3 Make GetMainWindowHandle() a globally exported function as it is used e.g.
in clip_windows.cpp & video_sdl.cpp
2006-05-02 19:34:04 +00:00
gbeauche
e5051464bf Move likely() definitions to dyngen-exec.h, they are only used in the CPU
core where it's most useful (give a stronger hint to gcc4)
2006-05-02 19:33:10 +00:00
gbeauche
b9b1fd4e22 Don't build a built-in GUI with --enable-standalone-gui was requested 2006-05-02 05:50:38 +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
085253dc9b - Fix build on ppc (paranoia.cpp -- one extra STR_SIGUSR2_INSTALL_ERR left)
- Fix for GTK+ 1.2 GUI on ppc (notebook's panes redraw)
- Add run-time detection of the underlying arch for "jit" detection (MacOS X)
2006-05-01 23:01:53 +00:00
gbeauche
9b60acb2da Port --enable-standalone-gui support to SheepShaver
Others changes include:
- Factor out STR_SIG_INSTALL_ERR messages
- Process command line arguments early (prior to calling PrefsInit())
- GUI: set start_clicked only if the "Start" button was clicked
- GUI: save changes to the "Input" pane when the "Start" button was clicked
2006-05-01 22:33:34 +00:00
gbeauche
daa0af4da6 improve locks 2006-05-01 13:13:18 +00:00
gbeauche
f853ce6c5b Handle compatibility with older preferences files.
- routerenabled true
- ether GUID
both have priority over regular options.
2006-05-01 10:42:00 +00:00
gbeauche
c9c21cf70d Add ether "tap" support to the GUI. Also fix "slirp" callback. 2006-05-01 10:27:17 +00:00
gbeauche
11ff11d205 Add experimental TAP-Win32 support. It looks rather sluggish to me, something
is probably wrong somewhere...
2006-05-01 10:23:47 +00:00
gbeauche
6590198dd8 aha, quick fix ;-) 2006-05-01 06:14:08 +00:00
gbeauche
5fed65456b Implement better Windows suspend/resume routines so that we don't oversleep.
i.e. really wake up the thread on next TriggerInterrupt().
2006-05-01 06:12:50 +00:00
gbeauche
2e6ae14c4c Note new "idlewait" feature 2006-04-30 21:49:50 +00:00