|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
fixed warnings
BasiliskII side of changes to support .sheepvm bundles for SheepShaver
Happy New Year!
Sync with the new SIGSEGV API.
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.
Fix for LAZY_FLUSH_ICACHE_RANGE. Blocks are indexed by native addresses.
Always build the STANDALONE_GUI hooks into Basilisk II.
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.
Enable build of a standalone GUI (first step).
- 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
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.
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.
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.
%Ld is for long double, not long long (%lld)
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.
Properly QuitEmulator() on unhandled SIGSEGV even if not ENABLE_MON.
Happy New Year!
Backport copy-paste of 'TEXT' from SheepShaver
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.
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)
SDL audio support
Use atexit(SDL_Quit) idiom. XCloseDisplay() only when using X11 graphics.
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.
Happy New Year! :)
Implement lazy icache range invalidation. Disable for now until it shows a real benefit over only 2%
Merge in __PAGEZERO hack from Michael Z. Sliczniak so that REAL_ADDRESSING mode can work under Darwin.
Report failure to install the SIGSEGV handler correctly
New SIGSEGV API so that skip-instruction requests are more explicit. Yes, that's api change, but that's cooler now for SheepShaver. ;-)
fix for no-threads case for an emulated 68k [Todd Vierling]
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.
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
Make FlushCodeRange aware of the JIT compiler's flush_icache()
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
- 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
- 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.
Implement the "ignoresegv" feature from SheepShaver. This is Unix-specific so far. Target platform is currently Linux/x86.
- default floppy device under Linux is now /dev/fd?u1440 because /dev/fd?H1440 is deprecated
cleaned up pthread attributes [Brian Johnson]
GNOME-style about box and GNOME file entries are used if libgnomeui is present
- documentation updates - 2001 -> 2002 - version 0.9 -> 1.0
prepared XPRAM code for PowerMac emulation (8192 bytes NVRAM)
- 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)
- 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
- 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)
- 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)
- experimental gamma table support - restructured video_x.cpp: uses classes for display types
- 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
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.
- added SIGSEGV support for Linux/Alpha (to be checked), Darwin/PPC - added uniform virtual memory allocation (supports mmap(), vm_allocate(), or fallbacks to malloc()/free()) - cleaned up memory allocation in main_unix.cpp
- added help for command line options - PrefsInit() removes all processed options
- "-Ofast" option is supplied to MIPSPro compiler [Brian J. Johnson - workaround for IRIX pthreads bug in Delay_usec() [Brian J. Johnson]
- bumped version number to 0.9 - updated copyright dates
- AmigaOS: implemented XPRAM watchdog thread - AmigaOS: disabled 68060 Super Bypass mode because of CPU bug triggered by MacOS 8 - minor documentation updates
- removed the INT16 prefs item type; use INT32 instead - AmigaOS/Unix: it's now possible to specify preferences items on the command line - Unix: command line options now take "--"-prefix, e.g. "--rominfo"
- removed USE_MAPPED_MEMORY (unused) - fixed Delay_usec() on Solaris
- fixed Delay_usec() on IRIX - xpram_func() calls Delay_usec() with a time of <1 second
- added audio support for IRIX [Brian J. Johnson] - improved Delay_usec() under FreeBSD and IRIX - fixed typo ("HAVE_PTHREDS") in video_x.cpp
- FPU is now available under NetBSD/m68k - main_unix.cpp: added more emulated privileged instructions
- updated spec file - make install/uninstall targets support DESTDIR variable - fixed compilation problem with DIRECT_ADDRESSING
works again under NetBSD/m68k
- adapted for mon V3.0 which is now the required minimum - fixed gcc 2.96 compiler warnings
- added USE_SCRATCHMEM_SUBTERFUGE - added memory allocation in real and direct addressing modes through mmap() - added the possibility to allocate the whole mac memory from zero
- one_tick() is casted to the correct type when used as a POSIX.4 signal handler
- CD-ROM under Linux only worked when a CD was in the drive when B2 was started - Unix/main_unix.cpp: 1Hz interrupt wasn't triggered
- Mac ROM and RAM are allocated with malloc() instead of "new" (because -fomit-frame-pointer breaks exceptions), and an error message is displayed if the allocation fails
- improved timing of periodic threads
- new FOURCC() macro in macos_util.h
- AmigaOS bug fixes by J.Lachmann (floppy, 2060scsi.device, "Add Volume" in prefs editor) - imported some changes from the Windows source (1Hz interrupt, FPU fixes)
- DGA and SHM are only tried on local X11 displays - re-integrated old window update method (better performance over a networked display connection), frameskip=0 selects new method, other values select old method - fixed compilation errors
- first version to run natively on NetBSD/m68k
- updated copyright info: 1999->2000
- size of ExtFS finf helper file extended to 32 bytes to allow future expansion (the complete FInfo/FXInfo could be stored in it) - main_unix.cpp: replaced TIMER_RELTIME (which doesn't seem to exist on Irix) by 0
- imported UAE CPU 0.8.10 changes - new utility functions Mac_memset, Mac2Host_memcpy, Host2Mac_memcpu and Mac2Mac_memcpy - extfs.cpp: fixed bug in fs_rename() and fs_cat_move() (auxiliary IOParam block was not in Mac address space) - some provisions for using UAE CPU compiler (doesn't work yet)
- removed MemoryDispatch() replacement; routine from ROM is now used if possible - rom_patches.cpp: check for double PACK 4 resources; if only one is found, assume that the ROM requires an FPU and issue a warning if FPU emulation is turned off - UAE CPU opcode routines no longer return the cycle count - main_unix.cpp: pressing Ctrl-C dumps the UAE CPU state before entering mon - sys_unix.cpp: under Linux, partition sizes are read with BLKGETSIZE instead of llseek()
- added some 68040 instructions: CINV, CPUSH, MOVE16 (Ax)+,(Ay)+, MOVEC regs, and FPU state frames; enough to boot MacOS - CPU type can be selected in GTK prefs editor
- imported fixed UAE FPU from Lauri - extfs.cpp: fixed bug with fsResolveWDCB in fs_get_wd_info() - ExtFS: MAX_PATH_LENGTH is global, removed third parameter to add_path_component() - rom_patches.cpp: added print_rom_info() - Unix: added "-rominfo" command line argument - extfs_unix.cpp: supports finder info and resource forks - prefs_editor_gtk.cpp: tab widget is no longer scrollable
- small fixes to Makefile.in and configure script - main_unix.cpp tested ENABLE_DGA instead of ENABLE_XF86_DGA
- mon is called for illegal EMUL_OP selectors and when pressing Ctrl-C (Unix) - moved MemoryDispatch() patch routine from PatchAfterStartup() to InstallDrivers() - fixed one place where ROM replaces MemoryDispatch() by unimplemented trap when no MMU is present - Unix: ROM breakpoint can now be set with "-break" command line argument - some changes to configure script, mon is now compiled with readline support
- added external file system - moved most init/deinit code to InitAll()/ExitAll() in main.cpp
- disabled X backing store
Initial revision
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.