Commit Graph

142 Commits

Author SHA1 Message Date
gbeauche
0dcb2b4516 SDL support in SheepShaver too, though it doesn't work in native mode
on Linux/ppc as libSDL is pulling in libpthread which conflicts with
our sheepthreads.
2004-06-24 15:37:26 +00:00
gbeauche
e0a76f9e38 Don't handle XLM_IRQ_NEST atomically in emulated mode. That's useless since
this variable is modified only within a single thread and interrupts are
not handled asynchronously.
2004-06-22 17:10:08 +00:00
gbeauche
f2324520b7 Improve timing of periodic threads (from Basilisk II), aka. make 10 seconds
really last 10 seconds, not 18. ;-)
2004-06-22 12:20:17 +00:00
gbeauche
cb46ffe97a Get PVR information et al. through (slow) ioreg -c IOPlatformDevice 2004-06-17 05:15:25 +00:00
gbeauche
374101ee9e Make DR Cache executable by default in native PowerPC mode. 2004-05-31 10:55:42 +00:00
gbeauche
a533a9c455 Enable DR emulator with OldWorld ROMs too. It turned out that translated
code was also trying to access Serial memory.

Note however that I noticed some rare crashes with the DR emulator.
Probably caused by nested runs from EmulOps? We'd really want a native
68k emulator too for Execute68k() things.
2004-05-31 10:02:20 +00:00
gbeauche
7bc86b27ee Enable Apple DR emulator from NewWorld ROMs only. 2004-05-31 09:04:44 +00:00
gbeauche
bd6eaf680a Get rid of old (and broken) ASYNC_IRQ / MUTICORE code 2004-05-20 12:33:58 +00:00
gbeauche
65e1edb5b2 Fix bus frequency detection for more realistic timers.
Also add bus-frequency and timebase-frequency values to the Name Registry.
2004-05-15 11:07:11 +00:00
gbeauche
123a5210e4 Fix nested ppc_interrupt() stack corruption problem by allocating yet
another stack when next signal is triggered. I am still unsure if
even MacOS would normally handle nested calls to NanoKernel interrupt
routine.
2004-04-14 20:25:26 +00:00
gbeauche
ec2511fd99 Load XPRAM default values if signature not found. i.e. don't hang on first
boot.
2004-04-06 19:47:56 +00:00
gbeauche
ae93ea2f16 Make SheepShaver work with OS 8.6 out-of-the-box with no extra patch for
the time being. i.e. ignore writes to the zero page when faking SCSIGlobals
2004-02-24 11:12:54 +00:00
gbeauche
546f65a365 Now that we have AltiVec emulation, we can pretend for a G4 processor
Also make sure to actually fix PVR code for 7400
2004-02-15 17:20:36 +00:00
gbeauche
8d4108dd3a Recognize 7400 & 7410 cpus 2004-01-31 11:10:49 +00:00
gbeauche
324fba4137 Post-merge fixups: machine state wrappers, Apple assembler perticularities. 2004-01-18 22:59:06 +00:00
gbeauche
0665ab1139 No need to map ROM executable on emulated/ppc. Make sure to detect unaligned
EA for lmw/stmw with real addr instead of relying on the signal number.
2004-01-18 22:22:28 +00:00
gbeauche
7f13ce6fed Wrappers around machine state registers within signal handlers. 2004-01-18 22:14:31 +00:00
cebix
2d5de1af9d Happy New Year! :) 2004-01-12 15:37:24 +00:00
gbeauche
1b0e88041e Also cache native routine descriptor instead of recreating them at each
invokation to ExecuteNative().
2004-01-07 18:24:45 +00:00
gbeauche
dd3a208906 Emulated lmw/stmw with unaligned EA. e.g. for BBEdit under MacOS 8.6.
This may be due to some switch mode that needs to save r13 and upwards.
The faultive code seems to explicitly add 0xee to r1, which causes it to
be unaligned for upcoming lmw/stmw.
2004-01-04 18:35:21 +00:00
gbeauche
e346de3199 Fix ADB problems with unitinialized mutex 2004-01-04 05:45:50 +00:00
gbeauche
e291c6d065 Add fast X11 display locking routines based on spinlocks, or on pthreads
in the worst case. Optimize out GetScrap() case when we already own the
selection. i.e. make it smoother. Use our own XDisplay{Un,}Lock() routines.
2003-12-31 18:16:55 +00:00
gbeauche
bbde2a2054 Use an alternate stack base while servicing PowerPC interrupts. 2003-12-05 13:37:56 +00:00
gbeauche
c3bb2eabf1 Really clear the zero page. 2003-12-05 12:41:19 +00:00
gbeauche
44e54f730a Add XLM_ZERO_PAGE globals which points to a read-only page with all bits
set to zero.
2003-12-05 12:36:11 +00:00
gbeauche
091a219280 Use a unique ExecuteNative() interface in any case, i.e. native & emulated 2003-12-04 23:37:38 +00:00
gbeauche
ddbebd7111 Fix ExecutePPC() merge with new SheepRoutineDescriptor 2003-12-04 22:33:24 +00:00
gbeauche
328bb9f239 Add new thunking system for 64-bit fixes. 2003-12-04 17:26:38 +00:00
gbeauche
26ec1b8899 Merge Set_pthread_attr() from Basilisk II. 2003-11-10 16:05:52 +00:00
gbeauche
a42281aad1 Implement partial block cache invalidation. Rewrite core cached blocks
execution loop with a Duff's device. Gather some predecode time statistics.
This shows that only around 2% of total emulation time is spent for
predecoding the instructions.
2003-11-03 21:28:32 +00:00
gbeauche
d766049d59 - enable multicore cpu emulation with ASYNC_IRQ
- move atomic_* operations to main_unix so that they could use spinlocks or
  other platform-specific locking mechanisms
2003-10-26 09:14:14 +00:00
gbeauche
46a1b4ada5 allow DGA & Xshm only on local displays 2003-10-26 07:54:02 +00:00
cebix
5f0a739cc7 - fixed compilation problems under BeOS
- boot drive wasn't set correctly
2003-10-26 00:32:31 +00:00
gbeauche
7e0dccc544 - Handle MakeExecutable() replacement
- Disable predecode cache in CVS for now
- Fix flight recorder ordering in predecode cache mode
2003-10-12 05:44:17 +00:00
gbeauche
b8b139faf2 - Share EmulatorData & KernelData struct definitions
- Introduce new SheepShaver data area for alternate stacks, thunks, etc.
- Experimental asynchronous interrupts handling. This improves performance
  by 30% but some (rare) lockups may occur. To be debugged!
2003-09-29 15:46:09 +00:00
gbeauche
28ae4b0028 Disable SIGUSR2 handler in EMULATED_PPC mode for now 2003-09-28 21:20:38 +00:00
gbeauche
cb1dd6dac5 - Integrate new NativeOp instructions to be used as trampolines to call
native functions from ppc code.
- Little endian fixes in emul_op.cpp
- Add new 'gpch' 750 patch to workaround crash with MacOS 8.6
- Don't crash in Process Manager on reset/shutdown with MacOS 8.6
- We also have an experimental interrupt thread in emulation mode
2003-09-07 14:33:54 +00:00
gbeauche
9e7670c922 Import VOSF from Basilisk II for faster and more accurate video refresh.
There may be some bugs left though. Rework sigsegv_handler() a little to
accomodate VOSF way of life.

TODO: merge video drivers infrastructure from B2.
2003-05-22 22:12:05 +00:00
gbeauche
94ec8c82ca Use vm_acquire/vm_acquire_fixed/vm_release API. Prepare use of SIGSEGV
handlers and instruction skippers. Fix test prior to including posix_sem.cpp.
2003-05-13 16:59:57 +00:00
gbeauche
665c64b4aa Add support to decode parcels-based ROMs
- include/rom_patches.h (DecodeROM): Declare.
- rom_patches.cpp (DecodeROM): Define.
- Unix/main_unix.cpp, BeOS/main_beos.cpp (decode_lzss): Move to...
- rom_patches.cpp (decode_lzss): ... here.
- Unix/main_unix.cpp (main): Call DecodeROM().
- BeOS/main_beos.cpp (SheepShaver::load_rom): Call DecodeROM().
2002-04-21 15:07:09 +00:00
cebix
b7e0269519 added dummy Set_pthread_attr() 2002-02-21 15:12:12 +00:00
cebix
8e4d5e5f40 Imported sources 2002-02-04 16:58:13 +00:00