Commit Graph

50 Commits

Author SHA1 Message Date
kanjitalk755
1199f8115e BII: High-precision timer backported from SS 2023-05-02 18:05:09 +09:00
robxnano
ae9d917d5e Apply NetBSD pkgsrc patches
Patches obtained from
https://github.com/NetBSD/pkgsrc/blob/trunk/emulators/BasiliskII/
2022-10-11 19:31:36 +01:00
robxnano
1dd1d2713d Fixes for building on FreeBSD and other platforms
FreeBSD current status:
Basilisk II: Builds and runs successfully using gcc and gmake
SheepShaver: Doesn't work because FreeBSD doesn't support mapping
the zero memory page. SheepShaver would only work on *BSD if the
direct addressing mode worked.
2022-10-08 00:12:52 +01:00
robxnano
7482de353b Added sys/stat.h to sysdeps.h
Needed on BSD for S_* ioctl constants and macros
2022-10-01 20:21:37 +01:00
kanjitalk755
9009a2741f skip checking STDC_HEADERS 2022-05-17 11:33:26 +09:00
kanjitalk755
1aaeaf05c4 fixed merge error and deleted unnecessary files 2021-05-04 18:33:50 +09:00
kanjitalk755
6985ad67fe BII: prepare JIT 2020-08-13 21:00:42 +09:00
Seth
64d6c0668f Added helper functions and strings so BII compiles with bin/cue support 2019-06-16 12:52:29 -05:00
kanjitalk755
e01129b748 Merge commit '01f63e605a68856718dd16e07835cd2d61ba6727' into DavidLudwig_and_jvernet 2018-06-14 17:33:25 +09:00
Alexei Svitkine
bb2a197c98 clean up some code 2017-12-10 11:27:32 -05:00
jvernet
1316b64bb7 Some Warning removed and 64bits 2017-10-03 21:37:24 +02:00
David Ludwig
145ca0c210 fixed issue #15: BasiliskII: running an autotools build breaks ability to build with Xcode 2017-08-27 17:37:20 -04:00
Ricky Zhang
b32a8c8588 Fix Sierra clock_gettime issue
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2017-08-07 10:52:11 -04:00
James Touton
f05cd77eb4 Renamed ASM_SYM_FOR_FUNC to ASM_SYM.
Use ASM_SYM in place of __asm__ in a couple places.
2015-08-06 00:54:21 -07:00
Alexei Svitkine
8376a21804 Fix build with SnowLeopard SDK. 2012-07-04 22:22:00 -04:00
asvitkine
5a8dfa1b36 [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.
2009-08-17 20:44:30 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +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
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
e7fb4be12f Fast spinlocks from SheepShaver for X11 clipboard handling 2004-11-15 23:24:09 +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
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
3711aa4520 Update ASM_SYM_FOR_FUNC to match x86-64 too, may be useful later. 2002-11-16 15:38:53 +00:00
gbeauche
3bf7843db1 x86-64 can do unaligned accesses 2002-11-05 10:32:05 +00:00
gbeauche
d16a54362c #include <pthread.h> to get pthread_attr_t definition 2002-09-16 14:48:53 +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
cebix
7627f346ee cleaned up pthread attributes [Brian Johnson] 2002-02-07 16:10:57 +00:00
cebix
628533940d - documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0
2002-01-15 14:58:43 +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
e7a13421df replaced TIME_OFFSET constant by portable TimeToMacTime() function 2001-07-06 17:36:09 +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
c23567ab14 - bumped version number to 0.9
- updated copyright dates
2001-02-02 20:53:00 +00:00
gbeauche
97d7dcc005 - added do_byteswap_16() and do_byteswap_32() 2001-01-28 14:03:19 +00:00
cebix
a27c99d440 - removed USE_MAPPED_MEMORY (unused)
- fixed Delay_usec() on Solaris
2000-11-30 16:20:52 +00:00
cebix
efc60c7f60 works again under NetBSD/m68k 2000-10-09 17:05:17 +00:00
gbeauche
e8d4a865e2 - added [u]intptr types
- set rom protection flag according to the addressing mode used
- set use_prefetch_buffer to 0
2000-09-22 17:14:46 +00:00
cebix
ce02e4fc56 - improved timing of periodic threads 2000-07-22 18:12:35 +00:00
cebix
ff5fcd83a7 - first version to run natively on NetBSD/m68k 2000-07-13 13:47:12 +00:00
cebix
97d96bddea - updated copyright info: 1999->2000 2000-04-10 18:53:46 +00:00
cebix
90312d104c - 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)
1999-11-03 10:56:43 +00:00
cebix
a60677e7f0 - provided VAL64() and UVAL64() macros 1999-10-27 17:50:08 +00:00
cebix
bf765a5be8 - 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
1999-10-27 16:59:54 +00:00
cebix
f41718608c - ExtFS works under AmigaOS
- fixed erroneous __regargs attributes in prefs_editor_amiga.cpp
  and audio_amiga.cpp for GCC
1999-10-21 22:40:04 +00:00
cebix
d92b13e550 - added external file system
- moved most init/deinit code to InitAll()/ExitAll() in main.cpp
1999-10-19 17:41:44 +00:00
cebix
bb36e3fa18 - 680x0 added to list of CPU that can handle unaligned accesses 1999-10-18 11:44:20 +00:00
cebix
6d926e553a - 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
1999-10-12 20:00:56 +00:00
cebix
183447c2d7 - improved configuration and installation 1999-10-04 21:07:18 +00:00
cebix
8e491572ca Imported sources 1999-10-03 14:16:26 +00:00