Commit Graph

600 Commits

Author SHA1 Message Date
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
gbeauche
f054ce8648 Always prefer our (inlined) spinlocks. 2004-01-04 06:11:49 +00:00
gbeauche
3fd927f404 Force device to stop immediately with an SNDCTL_DSP_RESET. Otherwise, a
regular close() sends SNDCTL_DSP_SYNC which can hang (and does on PPC)
2004-01-04 05:47:08 +00:00
gbeauche
c48515b6d5 Instruction skipper for Solaris/SPARC. 2003-12-20 23:22:25 +00:00
gbeauche
47f64bdcb8 Add support for Linux/hppa, FreeBSD/alpha. Misc debugging output. 2003-12-20 21:50:08 +00:00
gbeauche
36ee9370a6 Fix build with DEC C++ compiler on Tru64. 2003-12-20 21:44:52 +00:00
gbeauche
9b99a095f0 MIPS instruction skipper. TODO: check LWL/LWR semantics. 2003-12-20 10:06:18 +00:00
gbeauche
fdf5970c28 Fix subterfuge mode on IRIX/mips. Get PC in both modes for Irix too 2003-12-20 07:43:56 +00:00
cebix
ea0d909ce5 run depmod after installing module 2003-11-28 15:49:16 +00:00
gbeauche
10c04e2654 Enable possibility to manually pass VM_MAP_32BIT & friends. This is needed
for the PowerPC "JIT1" engine.
2003-11-24 23:27:18 +00:00
gbeauche
45df157a5e Implement lazy icache range invalidation. Disable for now until it shows
a real benefit over only 2%
2003-11-21 14:20:01 +00:00
gbeauche
1af0362296 fix loff_t & caddr_t type checks 2003-11-21 14:16:02 +00:00
nigel
ee0958380c Compile fix for OS X (which does not define loff_t) 2003-11-18 11:14:43 +00:00
gbeauche
d4ad77d734 really fix writes to byte registers 2003-11-11 00:10:39 +00:00
gbeauche
4bce0876c0 fix configure tests. i.e. move up arch_insn_skipper_tests() 2003-11-10 23:54:31 +00:00
gbeauche
1169001df7 Extend x86 instruction skipper to AMD64. Add plenty of arch dependent
opcodes to test it. Also fix DEBUG output & writes (zero'ing) to %xH regs
2003-11-10 23:47:39 +00:00
gbeauche
9057fda327 - FreeBSD/i386 sigcontext subterfuge support for instruction skipper
- NetBSD/alpha support from Boehm GC
- NetBSD/i386 won't work in sigcontext subterfuge mode unless instruction
  is decoded more accurately to compute the effective address. Also note
  that NetBSD 1.6 does not support siginfo_t yet.
2003-10-21 23:10:19 +00:00
gbeauche
f8a0f363ea Solaris/SPARC support for SIGSEGV_FAULT_INSTRUCTION 2003-10-21 21:59:41 +00:00
gbeauche
75df809ff7 fix merge with Mach exception filters, we have preconditions to check 2003-10-13 20:15:41 +00:00
gbeauche
6a60d56bf2 indentation fixes, optimize handle_badaccess() to receive only necessary
data and don't copy a struct sigcontext again on x86.
2003-10-13 19:56:17 +00:00
gbeauche
14b51b9519 return something more convenient to debug on errors 2003-10-13 19:43:09 +00:00
gbeauche
45c30ba9f2 Merge in __PAGEZERO hack from Michael Z. Sliczniak so that REAL_ADDRESSING
mode can work under Darwin.
2003-10-12 22:39:59 +00:00
gbeauche
4641be3209 Really make sure VERSION & PACKAGE macros are defined when generating a
configure script with autoconf 2.52.
2003-10-12 21:58:02 +00:00
gbeauche
c04603adce Add hacks to disable "floppy" & "serial[ab]" entries that would cause
Basilisk II to hang on MacOS X as an X11 build. I am not sure this is
supposed to work in an Aqua build so I leave that enable there, assuming
<AvailabilityMacros.h> is included somehow, thus defining MAC_OS_X_VERSION_*
and friends.
2003-10-12 21:55:44 +00:00
gbeauche
46dc8c5391 Make sure reported fault instruction address falls into the expected code
range. This is a configure-time safety net that depends on the GCC "Labels
as Values" extension.
2003-10-12 21:41:19 +00:00
gbeauche
006f72c9fe Report failure to install the SIGSEGV handler correctly 2003-10-12 21:21:35 +00:00
gbeauche
cf3d36a3a7 Mach memory fault recovery from Michael Z. Sliczniak 2003-10-12 21:15:52 +00:00
gbeauche
b2fee2f576 Mach bad access recovery support from Michael Z. Sliczniak 2003-10-12 15:56:00 +00:00
gbeauche
192943f46c Fix vm_acquire() and friend on MacOS X 2003-10-12 11:00:12 +00:00
gbeauche
b66f5972f9 Make sure a 32-bit B2/JIT works reasonnably well on AMD64 too. This implies
to force RAMBaseHost < 0x80000000. This is empirically determined to work on
Linux/x86 and Linux/amd64.
2003-10-03 18:18:15 +00:00
gbeauche
f9dd276a47 use spinlocks on SheepShaver/Linux/PPC, and possibly others where spinlocks
are available. TODO: check the fastest & safest means to lock VOSF stuff.
2003-09-29 08:27:24 +00:00
gbeauche
23c4ebcdf3 really fix typo! 2003-09-29 08:04:22 +00:00
gbeauche
aa61c47591 fix typo 2003-09-29 08:02:04 +00:00
gbeauche
a48a804c15 New SIGSEGV API so that skip-instruction requests are more explicit. Yes,
that's api change, but that's cooler now for SheepShaver. ;-)
2003-09-29 07:02:58 +00:00
gbeauche
505455c8c4 Check for readline headers in the headers check section as otherwise, and
I don't exactly know why, AC_HEADER_STDC would fail with newer autoconf
versions.
2003-08-17 11:58:00 +00:00
gbeauche
ac027954dc Bring x86 instruction skipper back to life 2003-08-17 10:52:52 +00:00
gbeauche
797cb8825a Aliases for PACKAGE and VERSION used for localisation if compiling cxmon
now that we check for AM_GNU_GETTEXT. Yes, life sucks sometimes.
2003-08-17 10:35:18 +00:00
gbeauche
ff483b7800 #define log printf in B2 stubs 2003-08-17 10:20:22 +00:00
gbeauche
f40f7ab91f AM_GNU_GETTEXT for gnome stuff 2003-08-17 10:16:23 +00:00
cebix
91c9cf1879 fixed the test for GCC [Brian J. Johnson] 2003-07-25 13:45:25 +00:00
cebix
2257e7be3f fix for no-threads case for an emulated 68k [Todd Vierling] 2003-07-25 13:41:58 +00:00
cebix
16b21014ef added format switching and other improvements [Brian Johnson] 2003-07-12 11:04:38 +00:00
cebix
0074b3346e modernized the autoconf stuff 2003-07-01 18:10:38 +00:00
cebix
c945f0484e updated autoconf auxiliary files 2003-06-27 13:59:16 +00:00
gbeauche
548e5a3dfd Rearrange video_vosf.h to accomodate both SheepShaver and BasiliskII video
infrastructure. Make video_blit.cpp a little more emulator independent.
2003-05-22 22:13:56 +00:00
gbeauche
deb3da2e9f New API to ignore a SIGSEGV fault. This should help on SheepShaver/x86 for now
since I still don't know why MacOS would like to write to ROM on a particular
test.
2003-05-14 06:50:05 +00:00
gbeauche
61e40b3e55 Fix check against return value of memset() in vm_acquire_fixed 2003-05-13 16:56:37 +00:00
gbeauche
f5a1a93d2c Fix check for mmap()'able low mem globals 2003-05-13 16:33:06 +00:00
nigel
fda7b93625 Darwin-specific prefs and initial CD code. Since some of the CD code is just too weird to include here, I just call extern functions which I currently implement in a file sys_darwin.cpp 2003-03-21 07:03:05 +00:00
cebix
a69dcbb18f some cleanups 2003-02-06 19:24:09 +00:00
cebix
4bca966e18 added "install" target 2003-02-06 19:10:08 +00:00
gbeauche
1477b501d1 Add changes from Brian Johnson:
- Update MIPSpro compiler flags
- Only define static variables if they are to be used
- Try to lock the pthreads mutex prior to unlocking/destroying it
2002-11-24 20:07:25 +00:00
gbeauche
3711aa4520 Update ASM_SYM_FOR_FUNC to match x86-64 too, may be useful later. 2002-11-16 15:38:53 +00:00
gbeauche
abaa9fb2cd Add configury for x86-64 2002-11-05 11:58:40 +00:00
gbeauche
58b3aaba5b Get rid of CPU_* defines as nobody actually used them and are useless 2002-11-05 10:32:42 +00:00
gbeauche
3bf7843db1 x86-64 can do unaligned accesses 2002-11-05 10:32:05 +00:00
cebix
466fc971f6 Unix: new prefs options "dsp" and "mixer" to set the OSS device names instead
of the hardcoded '/dev/dsp' and '/dev/mixer'
2002-10-15 16:25:04 +00:00
gbeauche
177cdee820 configure script is reportedly no longer crashing on FreeBSD when
SIGSEGV_SKIP_INSTRUCTION is set.
2002-10-03 15:49:14 +00:00
gbeauche
3efbc30695 B2 maintainer for FreeBSD reported <sys/soundcard.h> is the one to use in all
recent versions of FreeBSD.
2002-10-03 15:47:59 +00:00
gbeauche
518f982775 - CAN_JIT=yes has to be moved into the actual block containing JITSRCS.
- Optimistically reenable gas/x86 assembly optimizations and JIT for FreeBSD
  as it used to work in the past there. If not, beat me.
2002-10-01 09:58:08 +00:00
gbeauche
13e8cb3eec Huh, am I still asleep? Actually use the cpuemuX_nf.cpp pattern rather
than the *.s variant.
2002-10-01 09:51:09 +00:00
gbeauche
c492269143 Drop cpuopti on x86 now that we have a fast JIT. I don't want to bother
fixing cpuopti or workarounding code for any known and unknown gcc bug.
2002-10-01 09:34:47 +00:00
gbeauche
98d1246815 - Let fullscreen DGA mode work again, even with a DirectColor visual. In
that case, we do need add it when creating the window otherwise we
  result int a nice BadMatch for X_CreateWindow request. FIXME?
- Fix typo and do enable VOSF in DGA mode, if necessary.
2002-09-28 12:42:39 +00:00
gbeauche
f2a9938685 Ensure the IEEE fpu core is used when building the JIT compiler 2002-09-18 13:06:49 +00:00
gbeauche
54ac7a1493 Move -DSAHF_SETO_PROFITABLE down in x86 & gas specific block. Also ensure
SAHF_SETO_PROFITABLE is defined when compiling the JIT. Aka I don't want
to support obsolete and probably bogus code nowadays.
2002-09-18 11:41:56 +00:00
gbeauche
e268a5a072 Define SAHF_SETO_PROFITABLE on x86, aka restore full performance of the
JIT compiler. ;-) BTW, also fixes some valgrind warnings.
2002-09-18 10:25:05 +00:00
gbeauche
5df172aa53 Additions for the JIT compiler opcode translators + NOFLAGS variant of
regular instruction handlers.
2002-09-17 16:09:25 +00:00
gbeauche
8c7254e4c8 Additions for the JIT compiler (--enable-jit-compiler, --enable-jit-debug) 2002-09-17 16:08:41 +00:00
gbeauche
6f3a214a15 Make FlushCodeRange aware of the JIT compiler's flush_icache() 2002-09-17 16:08:07 +00:00
gbeauche
ea8bdf1941 Update prefs editor with "JIT Compiler" pane 2002-09-17 16:06:37 +00:00
gbeauche
ba346aa0d2 Check for for C99 math functions in the form *l() 2002-09-16 15:40:48 +00:00
gbeauche
ea98d02ce8 Conditionalize use of pthread_mutexattr_setpshared() as this is an optional
POSIX feature from _POSIX_THREAD_PROCESS_SHARED group. Besides, Ulrich Drepper
mentions "the kernel support for this option wasn't available until 2.5.7.
Future versions of the thread library will support this option."
<http://people.redhat.com/drepper/posix-option-groups.html>

BTW, this nukes a warning when build on FreeBSD 4.6
2002-09-16 15:06:24 +00:00
cebix
7c1352a5f7 updated autogen.sh to AutoGen(TM) 8.0 Professional :-) 2002-09-16 14:54:19 +00:00
gbeauche
d16a54362c #include <pthread.h> to get pthread_attr_t definition 2002-09-16 14:48:53 +00:00
gbeauche
a04889fe03 Portability fixes: use a switch to test for ac_cv_c_float_format 2002-09-16 14:17:20 +00:00
gbeauche
a0d72c749b Remove acconfig.h, obsoleted by new autoconf2.5 stuff 2002-09-16 14:10:21 +00:00
gbeauche
453c6de0e2 Now use autoconf 2.52+ as it provides nice AC_SYS_LARGEFILE check and a
fixed check for exit() prototype.
2002-09-16 13:29:33 +00:00
gbeauche
5be5714a9e Remove TYPE_SOCKLEN_T check as it was merged in main configure script already. 2002-09-16 13:28:17 +00:00
gbeauche
9cc4185fa2 - Make "ieee" core default, where applicable
- Import gcc configury to determine HOST_FLOAT_FORMAT
2002-09-16 12:03:07 +00:00
gbeauche
dbc92fb334 Updates for new FPU core architecture, add "ieee" core (x86 for now) 2002-09-13 12:51:24 +00:00
cebix
3d2bac9f15 - it is now possible to make the serial drivers pipe their input/output
to programs by using a '|' followed by a command line as the modem or
  printer port setting (instead of a device name like '/dev/ttyS0')
  [Brian Johnson]
- the option "--config FILE" tells B2 to use a different config file
2002-07-31 16:46:14 +00:00
cebix
586d299bfc fixes by Steven N. Hirsch (versioned symbols, module license) 2002-07-23 18:02:47 +00:00
gbeauche
281460fba0 - New arch support for IP retrieval on SIGSEGV. 2002-07-17 06:51:05 +00:00
gbeauche
69847c3ea2 Correctly guard FreeBSD bits 2002-06-27 14:28:59 +00:00
gbeauche
d7c4d7afbf Backout "ignoresegv" support on FreeBSD/x86 for now. Unfortunately, the
configure script would hang whereas standalone testing will pass all tests.
Any idea why??
- Unix/sigsegv.cpp (ix86_skip_instruction): Add decoder for mozbl instruction.
  (SIGSEGV_REGISTER_FILE [FreeBSD/x86]): Note why we start at EDI offset
  rather than plain sigcontext pointer. i.e. I don't know sigset_t size
  beforehand and don't intend to.
2002-05-20 18:12:01 +00:00
gbeauche
2bd9ee71e8 Implement "ignoresegv" feature on FreeBSD/x86 (tested on FreeBSD 4.5)
- sigsegv.cpp (ix86_skip_instruction): Add decoder for movzwl instructions.
  (main): oddly, FreeBSD doesn't seem to let a write to a page if it is
  write-only. Aka. make the page readable too.
2002-05-20 17:49:04 +00:00
gbeauche
ae93f1e0d8 - Fix compilation on Linux/x86 with SIGCONTEXT_SUBTERFUGE 2002-05-20 16:03:37 +00:00
gbeauche
c2d3d08a7a - sigsegv.cpp (ix86_skip_instruction): Fix DEBUG compilation. 2002-05-20 16:00:07 +00:00
gbeauche
e81b9ace6d Implement "ignoresegv" feature on Darwin/ppc (tested on MacOS X)
- Unix/sigsegv.cpp (powerpc_decode_instruction): New.
  (get_fault_instruction [MacOS X]): Factorize code.
  (get_fault_instruction [Linux/m68k]): Don't use expression statement.
- README (ignoresegv): Add Darwin/ppc to list of supported platforms.
2002-05-20 15:56:13 +00:00
gbeauche
c47819020c Implement "ignoresegv" feature on Linux/ppc:
- Unix/sigsegv.cpp (powerpc_skip_instruction): New from SheepShaver code.
- README (ignoresegv): Add Linux/ppc to list of supported platforms.
2002-05-19 21:58:42 +00:00
gbeauche
39d97f5b04 - video_vosh.h (Screen_fault_handler): Move unrecoverable fault case to...
- main_unix.cpp (sigsegv_dump_state): ... Here.
- sigsegv.h (sigsegv_fault_handler_t): Rename from sigsegv_handler_t.
- sigsegv.h (sigsegv_state_dumper_t): New.
2002-05-16 15:48:06 +00:00
gbeauche
d5be07f449 - Merge with clisp SIGSEGV library version 1.2 with support added for
HP-UX (contributed by Paolo Bonzini)
- Add missing? include <ucontext.h> for Irix and OSF/1 support
2002-05-12 13:51:22 +00:00
gbeauche
266fc18f8a Implement the "ignoresegv" feature from SheepShaver. This is Unix-specific
so far. Target platform is currently Linux/x86.
2002-05-12 11:10:50 +00:00
cebix
cc423d283f default CD-ROM drive is /dev/cd0c on NetBSD 2002-04-28 14:06:17 +00:00
cebix
00a32a9afb fixed compilation problem in fbdev code 2002-04-28 12:09:23 +00:00
cebix
8871da753d - added infrastructure for multi-monitor support; only video_x.cpp is
converted for the new scheme; not actually tested with a mult-monitor
  setup yet but at least single-monitor display doesn't seem to be broken
  (UAE banked addressing would definitely require some extensions to handle
  multiple frame buffers)
- struct video_mode has an extra field that is free for use by platform-
  specific code
2002-04-25 11:00:31 +00:00
gbeauche
c9563ddb5c - Clarified test of access() return value
- s/strcpy/sprintf/ for cd_dev concatenation
- Statically allocate fd_dev[] and cd_dev[]
Better testing is yet to be done
2002-03-29 16:24:18 +00:00
cebix
5f9f63dea3 support for Linux devfs 2002-03-27 20:11:12 +00:00
cebix
ed628a548b fix for IRIX [Marcus Herbert] 2002-03-20 19:37:37 +00:00
cebix
78254ebddd added missing return values 2002-03-20 19:03:41 +00:00
gbeauche
097b4509ee - Add even more term libs and prefer ncurses over the rest. 2002-03-18 13:30:07 +00:00
gbeauche
faa3d07211 - Invert AC_CHECK_LIB for readline and termcap so that the test program
for readline detection is actually linked against -ltermcap -lreadline.
2002-03-18 12:59:44 +00:00
gbeauche
b8ffa860a2 - Add fault instruction recovery for Linux/ppc and siginfo_t handlers 2002-03-16 21:36:12 +00:00
gbeauche
2161b984ab - Large File support is now specific to Linux since it breaks build on
other platforms like Solaris/SPARC and I could only test under Linux.
  TODO: Better use the AC_SYS_LARGEFILE macro from autoconf-2.5.
2002-03-16 10:58:22 +00:00
gbeauche
99efbfc712 - Check for caddr_t. On some systems like Solaris/SPARC, mmap() address
type (first parameter) is caddr_t instead of void *. Explicitly cast
  address to (caddr_t) type and C++ implicit pointer conversion rules
  will do the rest. aka. caddr_t -> void * is OK unlike the opposite.
2002-03-16 10:51:17 +00:00
gbeauche
7ec7300784 - Also include <sys/types.h> if system has <unistd.h> 2002-03-16 10:49:00 +00:00
gbeauche
00a63b5e88 - Expand TYPE_SOCKLEN_T as it is a non-standard autoconf macro that lives
in ac-archive/Miscellaneous. Extracted from version 1.2 (2000/07/19) by
  Lars Brinkhoff <lars@nocrew.org>.
2002-03-16 10:12:49 +00:00
cebix
3e58028cb1 fixed floppy disk change detection problems under Linux 2002-02-23 17:54:24 +00:00
cebix
5ac532edfd - default floppy device under Linux is now /dev/fd?u1440 because /dev/fd?H1440
is deprecated
2002-02-22 17:48:31 +00:00
gbeauche
2f652a42e5 - vm_acquire_fixed: Fix memset() and vm_protect() calls so that the address
is really the one specified instead of always zero.
2002-02-11 14:28:02 +00:00
cebix
7627f346ee cleaned up pthread attributes [Brian Johnson] 2002-02-07 16:10:57 +00:00
cebix
dc4d9a56c7 direct addressing works under FreeBSD (says Michael Alyn Miller :-) 2002-02-01 19:25:49 +00:00
cebix
d6d7976939 - scsi_linux.cpp uses SCSI generic interface version 2
- slightly more verbose SCSI debugging messages
2002-01-26 18:10:13 +00:00
cebix
0662d7a1f1 added missing file 2002-01-25 12:14:21 +00:00
cebix
7385602242 GNOME-style about box and GNOME file entries are used if libgnomeui is present 2002-01-22 17:15:10 +00:00
cebix
3c7535d252 aclocal.m4 is generated by aclocal via autogen.sh 2002-01-22 16:07:29 +00:00
cebix
e3cfaffb1c 2001 -> 2002 2002-01-20 16:58:56 +00:00
cebix
53509f02d7 added mon_lowmem.cpp to mon sources 2002-01-18 19:14:46 +00:00
cebix
628533940d - documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0
2002-01-15 14:58:43 +00:00
gbeauche
00ef1ff5da - Add EIP recovery on Linux/x86 when using siginfo_t based signal handlers 2002-01-07 16:30:39 +00:00
cebix
8fb29cf11b updated for kernel 2.4.9 2002-01-06 14:05:35 +00:00
gbeauche
74e6688987 - Add 64-bit file size support, at least for Linux 2002-01-06 08:22:08 +00:00
cebix
b36675d9c2 prepared XPRAM code for PowerMac emulation (8192 bytes NVRAM) 2001-10-07 19:50:21 +00:00
cebix
3492bae5e2 updated autoconf/automake helper files 2001-09-18 17:16:47 +00:00
cebix
67eddf896a - added IRIX patches from Brian Johnson
- the existence of socklen_t is now checked by the configure script
2001-09-02 13:50:05 +00:00
gbeauche
4852a06dd2 - 64-bit blitters will use native "quad"-sized loads/stores, if available. 2001-08-19 17:38:11 +00:00
gbeauche
bcc6b4b0ac - configure.in: actually save CXXFLAGS instead of CFLAGS in the code to
detect whether the compiler supports -fno-merge-constants or not
- Makefile.in: make sure to link gencpu with g++ since it contains objects
  compiled from C++ code. Fix build problems with gcc 3.0.1
2001-08-19 16:18:30 +00:00
gbeauche
d64a00ed62 * Don't merge constants (pass -fno-merge-constants to the compiler) since
it breaks B2 in fpu/fpu_x86.cpp on the second call to fpu_init(), at the
  fsave instruction. This problem appeared with the following compilers:
  - "Official" : gcc-3.1 (mainline CVS)
  - Mandrake   : gcc-2.96 >= 0.59mdk, gcc-3.0.1 >= 0.1mdk
  - Red Hat    : gcc-2.96 >= 89, gcc-3.0 >= 1
2001-08-02 13:52:24 +00:00
cebix
52e18c5874 fstab parsing ignores comment lines 2001-07-31 14:10:35 +00:00
gbeauche
3e27acb9d4 - audio_oss_esd.cpp (open_esd): even return false if !ENABLE_ESD and shut
up the compiler by the way
2001-07-15 05:40:12 +00:00
cebix
54bfc83cfe - disk.cpp looks for HFS partition info in the disk image; this makes it
possible to, for example, use MacOS-partitioned hard disks and removable
  media under B2/Unix even if the OS doesn't understand Mac partition maps
  by specifying the appropriate block device name as a Mac volume
- fixed typo in audio_dummy.cpp
- added minimally required UDP tunneling code to ether_dummy.cpp
- main_unix.cpp: if pthreads are not supported, we trigger the Ethernet
  interrupt in the 60Hz ticker; this makes UDP tunneling work under
  NetBSD/m68k (as the only form of networking)
2001-07-14 20:01:20 +00:00
gbeauche
55df210d27 - video_x.cpp: the_buffer shall always be mapped through vm_alloc() so
that it can be vm_protect()'ed at will afterwards
- video_x.cpp: let driver_base free() the_buffer_copy and the_host_buffer,
  if necessary
- video_vosf.h: reverted to use malloc() for mainBuffer.dirtyPages and
  mainBuffer.pageInfo
- vm_alloc.cpp: small cleanups
- fixed typos
2001-07-14 18:41:05 +00:00
cebix
20db0c7260 - 1-bit mode under X11 always uses default visual
- fixed possible crash in driver_window dtor (image data would be freed twice,
  once by XDestroyImage() and once in driver_base dtor)
- fixed compilation problems with banked memory
- fixed typos
2001-07-14 15:02:49 +00:00
cebix
78c97c3f20 - outgoing packet source address is set in ether.cpp
- UDP tunnelling sends packets to Ethernet broadcast address as IP broadcasts
2001-07-13 18:49:29 +00:00
cebix
72c7f0db7a - updated the TECH document
- EtherReset() clears the UDP protocol list
- audio_oss_esd.cpp: AudioExit() calls close_audio()
- ether_unix.cpp: uses map<> for protocol handlers
- updated audio_dummy.cpp and ether_dummy.cpp
2001-07-13 15:39:25 +00:00
cebix
6c35c2a9e8 - Implemented AppleTalk-over-UDP tunnelling, activated by setting "udptunnel"
to "true". This uses the BSD socket API, so it's fairly portable (currently
  only imeplemented under Unix, though). This works by sending raw Ethernet
  packets as UDP packets to a fixed port number ("udpport", default is 6066),
  using IP broadcasts to simulate Ethernet broad- and multicasts. Currently
  only tested with AppleTalk.
2001-07-12 19:48:28 +00:00
cebix
90c7198b75 fixed a couple of compiler warnings 2001-07-11 19:26:14 +00:00
cebix
5fa9b2abe9 - find_visual_for_depth() did not return true on success 2001-07-11 17:04:41 +00:00
cebix
456830630c - background_pixel, border_pixel and colormap attributes of window are now
always set as this seems to be required for non-default visuals
2001-07-10 15:50:57 +00:00
cebix
305b9ef7f2 Irix needs pthread cond variables which need the pthread.h header file 2001-07-09 15:44:58 +00:00
cebix
5868a40a37 - ADB has its own interrupt flag, INTFLAG_ADB
- ADBMouseMoved(), ADBMouseDown/Up() and ADBKeyDown/Up() trigger the ADB
  interrupt
- ADB mutex is only used for mouse movement (the only input state where it
  matters)
- adb.cpp: toggling relative mouse mode resets mouse_x/y
- PrimeTime(0) schedules a timer task with 0 delay time; this is still not
  the correct implementation, but it makes MacSyndicate work...
- Unix: pthreads are preferred to POSIX.4 timers for 60Hz ticks because the
  timers drift badly under Linux and the thread can compensate for drifting
  well enough
- Unix: moved GetTicks_usec() and Delay_usec() to timer_unix.cpp
- video_x.cpp: X mouse acceleration is disabled in relative mouse mode because
  MacOS does its own acceleration
- video_x.cpp: palette[].pixel and palette[].flags are always preset
- video_x.cpp: decoupled X event handling from 60Hz video refresh cycle by
  using select() with a timeout on the X fd
2001-07-09 11:22:01 +00:00
gbeauche
8d733ed691 - added video_vosf_init()/video_vosf_exit() for initialization and destruction
of the internal structures used for the VOSF system
- use vm_acquire()/vm_release() for VOSF buffers and hope the_buffer is
  allocated above RAM address space (temporary workaround for 64-bit
  addressing systems)
- don't free() screen buffers in driver_base dtor
- don't free() memory mapped buffers in driver_base dtor
2001-07-07 09:14:47 +00:00
gbeauche
054e33c8fc - small fixes for Linux/ia64 2001-07-07 09:12:15 +00:00
gbeauche
3896344ca1 - Try to map memory contiguously with base addresses returned in increasing
order. No host memory region used for Mac emulation (ScratchMem, RAM, ROM,
  frame buffer) shall be allocated below the RAM space. Actually, MEMBaseDiff
  should be set to the min(above-mentioned address spaces).
  ==> Temporary fix for 64-bit addressing systems (e.g. Linux/ia64)
2001-07-07 09:07:38 +00:00
cebix
64eb0dcad1 fixed memory leaks in video mode switching 2001-07-06 22:37:23 +00:00
cebix
0e7b5acffe added support for 2/4-bit modes on 8-bit visuals 2001-07-06 22:00:39 +00:00
cebix
6ff613c341 small fixes 2001-07-06 21:04:52 +00:00
cebix
1186b42a20 - an appropriate visual is selected for the requested Mac color depth
- the list of supported Mac color depths is constructed from the list of
  depth and visuals supported by the X server
2001-07-06 20:49:53 +00:00
cebix
e7a13421df replaced TIME_OFFSET constant by portable TimeToMacTime() function 2001-07-06 17:36:09 +00:00
cebix
791baa8f6f some cleanups 2001-07-05 21:24:45 +00:00
cebix
7eb6ed2b86 - supported audio formats are now kept in STL vectors
- added run-time audio parameter switching for OSS/ESD audio output
- setting ESPEAKER env variable causes B2 to try ESD before OSS
2001-07-05 20:30:54 +00:00
cebix
d0a4b3e5fc - improved compatibility of multiple depth/resolution handling with versions
of MacOS before 7.6:
   - Apple mode IDs are now allocated contiguously from 0x80 (the video_*.cpp
     module must call video_init_depth_list() after adding all modes)
   - if the video driver didn't receive a GetVideoParameters call, it patches
     ScrnBase and the main GDevice upon a video mode switch (otherwise MacOS
     will continue to use the old frame buffer base)
   - the rowBytes values in the video parameters slot resources are correct
     for all bit depths
2001-07-03 19:20:47 +00:00
cebix
cf22cb032a - added support for platform-independant mutexes, currently only properly
implemented under Unix
- adb.cpp uses mutexes for thread-safe mouse handling
- video_x.cpp: pressing Ctrl-F5 in windowed mode switches to a "grabbed"
  relative mouse mode, useful for some games
- video_x.cpp: fixed some bugs relating to the hotkeys (key releases are no
  longer treated as hotkeys)
2001-07-03 15:59:49 +00:00
cebix
5bd08dac88 - video_set_palette() gets passed the number of used palette entries
- video_x.cpp supports 2- and 4-bit modes on truecolor screens
2001-07-01 21:09:30 +00:00
cebix
f4243a191b added support for 8-bit windowed modes on 16 and 32-bit screens (for the
games, man, the games! :-)
2001-07-01 19:57:55 +00:00
cebix
af35353cf0 - sony.cpp/disk.cpp/cdrom.cpp use vector<> of drive_info objects instead of
linked list
- color depth switching updates slot ROM
- video_x.cpp always supports 1-bit window modes
- timer_create()/clock_gettime() are pulled from librt if present
2001-07-01 14:38:03 +00:00
cebix
a4b36fd674 - added some documentation
- VidLocal.sp -> VidLocal.slot_param
- X11 color map is loaded with ramp upon startup to avoid the annoying black
  screen during initialization
2001-07-01 00:46:38 +00:00
cebix
50520dcf2f gamma tables work with X11 2001-06-30 22:23:44 +00:00
cebix
a3ea4f3ead - fixed compilation problems in fbdev DGA code
- nicer "about" dialog in GTK prefs editor
- display refresh is inhibited during mode switch if !HAVE_PTHREADS
2001-06-30 20:18:36 +00:00
cebix
b0b21f7fe6 - experimental gamma table support
- restructured video_x.cpp: uses classes for display types
2001-06-30 17:21:56 +00:00
cebix
f17b9006d6 - fixed compilation problems under AmigaOS
- fsave/frestore on AmigaOS and NetBSD/m68k always use a 68882/68040-style
  FPU frame, eliminating the need for 68060 FPU patches
2001-06-30 12:58:08 +00:00
gbeauche
d011594d4e zero_fd is not longer used since vm_alloc.cpp should handle that correctly.
However, vm_init() and vm_exit() are called in main_unix.cpp to ensure proper
initialization of the internal zero_fd descriptor, if needed. i.e. no
anonymous mapping for mmap()-based memory allocation.
2001-06-28 22:06:18 +00:00
cebix
0cf3f32b7d video_x.cpp supports resolution switching in windowed mode: the available
resolutions are 512x384, 640x480, 800x600, 1024x768 and 1280x1024 (the prefs
editor has to be updated to reflect this). The resolution selected in the
prefs editor is used as the default, but it can be changed in the Monitors
control panel. So far only tested with direct addressing.
2001-06-28 21:20:02 +00:00
cebix
0fe2584d92 depth/resolution switching infrastructure should be complete now; slot ROM
contains all supported depths, default mode is stored in XPRAM upon startup,
and added video_switch_to_mode() call (currently unimplemented in all drivers)
2001-06-27 20:05:31 +00:00
cebix
1be8a821a8 added infrastructure for resolution/depth switching (currently, all video
drivers only support one mode, the one selected by the user)
2001-06-27 19:03:38 +00:00