Commit Graph

86 Commits

Author SHA1 Message Date
Alexei Svitkine
b150b42fc6 Fix some string conversion warnings. 2017-12-10 11:27:08 -05:00
Ricky Zhang
cba9b032fb
Fix several minor issues.
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2017-10-06 20:01:55 -04:00
Ricky Zhang
175fbfde43 Enhance ROM break point feature.
1. Change --break input option format. Too much typing by taking decimal address. Change to hexadecimal input.
2. Allow ROM break point to continue to execution. The original ROM break point just replace instruction in ROM break point address with emul_op M68K_EMUL_BREAK. This just halts emulation right at the break point. The patch is less invasive than the original approach. It allows emulation to continue to run by pressing 'x' to exit from cxmon.
3. Add option --loadbreak which load break point from file before emulation start.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2017-09-15 21:36:16 -04:00
Ricky Zhang
6dbfa73dbd Fix mon option
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2017-08-21 17:14:07 -04: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
cebix
dca3b18d9d fixed warnings 2010-02-21 12:00:42 +00:00
asvitkine
d0c46de7c3 BasiliskII side of changes to support .sheepvm bundles for SheepShaver 2009-07-23 19:19:14 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
016dfddd79 Sync with the new SIGSEGV API. 2007-12-30 08:47:34 +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
24af8d27c3 Fix for LAZY_FLUSH_ICACHE_RANGE. Blocks are indexed by native addresses. 2006-05-08 16:56:07 +00:00
gbeauche
6d15429156 Always build the STANDALONE_GUI hooks into Basilisk II. 2006-04-19 06:55:54 +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
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
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
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
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
452b7b9638 Properly QuitEmulator() on unhandled SIGSEGV even if not ENABLE_MON. 2005-06-06 19:39:36 +00:00
gbeauche
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
e85f4397c8 Backport copy-paste of 'TEXT' from SheepShaver 2004-11-15 23:27:43 +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
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
eed5724b80 SDL audio support 2004-07-19 19:25:07 +00:00
gbeauche
8948ce2a49 Use atexit(SDL_Quit) idiom. XCloseDisplay() only when using X11 graphics. 2004-06-24 15:18:42 +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
cebix
9e7932abf0 Happy New Year! :) 2004-01-12 15:29:31 +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
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
006f72c9fe Report failure to install the SIGSEGV handler correctly 2003-10-12 21:21:35 +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
cebix
2257e7be3f fix for no-threads case for an emulated 68k [Todd Vierling] 2003-07-25 13:41:58 +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
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
6f3a214a15 Make FlushCodeRange aware of the JIT compiler's flush_icache() 2002-09-17 16:08:07 +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
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
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
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
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
cebix
7627f346ee cleaned up pthread attributes [Brian Johnson] 2002-02-07 16:10:57 +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
628533940d - documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0
2002-01-15 14:58:43 +00:00
cebix
b36675d9c2 prepared XPRAM code for PowerMac emulation (8192 bytes NVRAM) 2001-10-07 19:50:21 +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
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
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
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