[Charles Srstka] Attached is a set of patches to port the precise timer that is currently used in the Linux and BeOS builds of SheepShaver to Mac OS X (and any other Mach-based operating systems). Currently, the Linux build uses the clock_gettime() function to get nanosecond-precision time, and falls back on gettimeofday() if it is not present. Unfortunately, Mac OS X does not currently support clock_gettime(), and gettimeofday() has only microsecond granularity. The Mach kernel, however, has a clock_get_time() function that does very nearly the same thing as clock_gettime(). The patches to BasiliskII cause the timing functions such as timer_current_time() to use clock_get_time() instead of gettimeofday() on Mach-based systems that do not support clock_gettime(). The changes to SheepShaver involve the precise timer. The existing code for Linux uses pthreads and real-time signals to handle the timing. Mac OS X unfortunately does not seem to support real-time signals, so Mach calls are again used to suspend and resume the timer thread in order to attempt to duplicate the Linux and BeOS versions of the timer. The code is somewhat ugly right now, as I decided to leave alone the pre-existing style of the source file, which unfortunately involves #ifdefs scattered throughout the file and some duplication of code. A future patch may want to clean this up to separate out the OS-specific code and put it all together at the top of the file. However, for the time being, this seems to work. This has not been extensively tested, because I have not been able to get my hands on a good test-case app for the classic Mac OS that would run inside the emulator and try out the timer. However, performance does seem to be better than with the pre-existing code, and nothing seems to have blown up as far as I can tell. I did find a game via a Google search - Cap'n Magneto - that is known to have problems with Basilisk/SheepShaver's legacy 60 Hz timer, and the opening fade-to-color for this game appears to run much more smoothly with the precise timer code in place.
Happy New Year!
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.
Happy New Year!
Fast spinlocks from SheepShaver for X11 clipboard handling
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! :)
fix loff_t & caddr_t type checks
Compile fix for OS X (which does not define loff_t)
Update ASM_SYM_FOR_FUNC to match x86-64 too, may be useful later.
x86-64 can do unaligned accesses
#include <pthread.h> to get pthread_attr_t definition
- Make "ieee" core default, where applicable - Import gcc configury to determine HOST_FLOAT_FORMAT
cleaned up pthread attributes [Brian Johnson]
- documentation updates - 2001 -> 2002 - version 0.9 -> 1.0
- 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.
replaced TIME_OFFSET constant by portable TimeToMacTime() function
- 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)
- bumped version number to 0.9 - updated copyright dates
- added do_byteswap_16() and do_byteswap_32()
- removed USE_MAPPED_MEMORY (unused) - fixed Delay_usec() on Solaris
works again under NetBSD/m68k
- added [u]intptr types - set rom protection flag according to the addressing mode used - set use_prefetch_buffer to 0
- improved timing of periodic threads
- first version to run natively on NetBSD/m68k
- updated copyright info: 1999->2000
- 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)
- provided VAL64() and UVAL64() macros
- 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
- ExtFS works under AmigaOS - fixed erroneous __regargs attributes in prefs_editor_amiga.cpp and audio_amiga.cpp for GCC
- added external file system - moved most init/deinit code to InitAll()/ExitAll() in main.cpp
- 680x0 added to list of CPU that can handle unaligned accesses
- disk insertions are now checked for by the 60Hz interrupt routine - localizable strings are split into a common and a platform-specific set - fixed bug in CR->LF translation in AmigaOS/clip_amiga.cpp
- improved configuration and installation
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.