Commit Graph

864 Commits

Author SHA1 Message Date
bvarner
2210c87233 Updates to signal handling detection, enabling vosf for cross-compiled overrides. 2017-07-20 18:53:04 -04:00
bvarner
87ae776a41 Consistency... 2017-07-20 18:28:24 -04:00
bvarner
02ec5fc7d4 Added environment variable overrides for cross-compile defaults using AC_ARG_VAR.
This lets you setup an environment to cross-compile, with extended support for how things will behave.
This should let the build play nicely with bitbake, without changing the --flags, and without breaking existing behaviors.
2017-07-20 17:18:55 -04:00
bvarner
1eae4613c6 Added gitignores for quilt patches 2017-07-14 15:08:02 -04:00
bvarner
bd3ef905fb Don't do that. 2017-07-14 15:07:31 -04:00
bvarner
df6d21c394 I'm stashing there here, even though i probably shouldn't. 2017-07-14 15:06:12 -04:00
bvarner
1bfd163cf5 Better handling of SDL. 2017-07-14 12:50:45 -04:00
bvarner
cc3c3edcc0 Updates 2017-07-14 12:42:10 -04:00
bvarner
ca56f6f263 Ah, yeah. whoopse. 2017-07-14 12:30:53 -04:00
bvarner
35de22c444 Undo the SDL bits to favor the pkg-config bits. This should be more portable. I'm not sure if I'm breaking the cygwin build here, so I may have to give that a shot. 2017-07-14 12:25:37 -04:00
bvarner
65d44391c3 Other generated sources when not using JIT 2017-06-29 00:19:40 -04:00
bvarner
9f9893f178 move some things around here. 2017-06-28 23:37:55 -04:00
bvarner
c93058f9a6 Use SDL 1. This isn't an SDL2 App. D'oh 2017-06-28 18:06:16 -04:00
bvarner
859c4f29b5 Undo a debug output and set sigsegv_recovery if we force ac_cv_have_extended_signals. 2017-06-28 18:02:37 -04:00
bvarner
89cf05aec6 Adding an echo here to see if it's testing under a cross-build. 2017-06-28 17:57:51 -04:00
bvarner
b5790efba9 Added an enable option to force cross-compiles to use extended signal handling. 2017-06-28 17:53:45 -04:00
bvarner
9dc8bba39a Added SDL2 macros 2017-06-28 16:14:09 -04:00
bvarner
023d0d57c7 Condense to guilty until proven innocent. 2017-06-28 15:54:00 -04:00
bvarner
9735385a47 Testing this out just to see what the output is underbitbake 2017-06-28 15:48:29 -04:00
bvarner
7ae960e4eb Add npth to the search path. 2017-06-28 15:00:45 -04:00
bvarner
a1bea9b897 Oh yeah, use a list. 2017-06-28 13:20:15 -04:00
bvarner
94a385352e bitbake still couldn't find it, so let's try brackets. 2017-06-28 13:17:12 -04:00
bvarner
ffa877ee6c Use AC_SEARCH_LIBS for pthread location. 2017-06-28 13:10:59 -04:00
bvarner
f2acf91add Adding addtional Quote around expressions in AC_TRANSLATE_DEFINE. During cross-compile builds, when values contain 'guessing yes' the single-bracket expands to multiple argments. Adding the additional quote around the entire expression avoids this. The translate call to was missing quotes, which was inconsistent with the rest of the translate calls. 2017-06-28 12:38:50 -04:00
bvarner
e671489ad1 Updated configure.ac with openssl cross-compiling updates for /dev/ptc and /dev/ptmx 2017-06-28 11:58:55 -04:00
Alexei Svitkine
14f2e85c6f silence some warnings 2017-04-20 20:44:03 -04:00
Alexei Svitkine
181634ab31 Fix more Xcode8 warnings and tweak project settings. 2016-12-17 23:31:03 -05:00
Alexei Svitkine
1f211fb37b fix some warnings in Xcode8 build 2016-12-17 22:04:57 -05:00
Alexei Svitkine
5538376dc8 Add an Xcode 8 project for SheepShaver that builds an x86 32-bit
application (since 64-bit doesn't work with current OS X) and uses
pre-built (by GCC) compiler JIT source files.
2016-12-17 21:38:25 -05:00
asvitkine
84dfc1e98d Merge pull request #87 from runn1ng/master
Making tunconfig working
2016-11-20 20:08:55 -05:00
Ricky Zhang
042574382e 1. Added document for sheep_net module.
2. Fixed wrong use of ipip_hdr. It is for IP tunnel. This caused serious issues in IP packet filtering. Basically, it filtered out most packets sent from outsides. The correct way to get IP header destination IP address is ip_hdr.
3. Fixed ARP spoofing from guest OS to host OS. At anytime fake MAC address should be hided.
4. Changed module init and remove as non debug message.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2016-08-18 14:00:09 -04:00
Ricky Zhang
27cb1ef84a
Explictly pass SheepVars by af_packet_priv. 2016-08-13 07:33:35 -04:00
Ricky Zhang
212b8237b6
Fix sk_alloc function change since 4.2 Linux kernel. 2016-08-12 11:13:31 -04:00
Dmitry Brant
e1693eb92b Correctly set last-modified time on exported files. 2016-07-29 11:45:51 -04:00
Karel Bilek
c40e8516ce Making tunconfig working 2016-05-28 02:20:35 +02:00
Dan Sumorok
dee3f7e1c5 Added tap/bridge support to ether helper. 2016-03-19 19:17:48 -04:00
Dan Sumorok
1d84d40518 Linux etherhelper build updates. 2016-03-16 18:40:33 -04:00
Dan Sumorok
7710322fd3 Linux etherhelper support. 2016-03-15 20:03:59 -04:00
Dave Vasilevsky
4b5f3bd87b Enable real addressing by disabling PIE 2015-12-27 21:15:26 -05:00
Alexei Svitkine
ee25ed7142 Fix configure script following move of files to CrossPlatform. 2015-08-09 18:41:01 -04:00
asvitkine
7e111f6fc5 Merge pull request #73 from Masaq-/macipx
Patch to make MacIPX work in SheepShaver
2015-08-09 18:14:18 -04:00
James Touton
284900f905 Moved cross-platform sources into their own directory so that Windows builds don't need to add Unix to the include directory list. 2015-08-06 01:53:29 -07: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
d3cb3ca95f Fix some warnings when building Xcode project. 2015-06-29 11:50:50 -04:00
Masaq-
c5dc44e117 fix sheep_net kernel panic when combined with Linux AppleTalk module 2015-06-20 01:56:34 +00:00
Masaq-
7091c56ccd randomize fake Ethernet address to be used as IPX node number 2015-06-12 01:28:19 +00:00
Masaq-
9ae8499d64 make sheep_net removable from Linux 2.6.31 onward 2015-05-28 02:10:59 +00:00
Masaq-
3a36a1e456 fix memory leak reported by kmemleak 2015-05-28 02:10:45 +00:00
Masaq-
d77100ae1f fix sheep_net Linux kernel panic on n2n edge0 tap device 2015-05-28 02:10:23 +00:00
Dan Sumorok
fcc1598086 Add no_pie linker flag for Mac OS X 10.6 and later. 2015-01-14 19:23:26 -05:00
Dan Sumorok
b8fb05fbd0 Minor build fixes
Removed OS X -no_pie linker flag
Fixed copy/paste error in ether helper help string
Added missing distclean targets.
2014-12-31 09:36:17 -05:00
Dan Sumorok
24005dc4ed Merge remote-tracking branch 'us/master' into mergetest 2014-12-30 09:16:27 -05:00
Dan Sumorok
b1270264a1 Changed page zero size to 4 kB to fix problem on OS X 10.10. 2014-11-29 19:45:47 -05:00
Dan Sumorok
4f162dc6e3 Minor build fixes. 2014-11-29 19:25:31 -05:00
Ricky Zhang
5192d60805
Fix space/tab indention 2014-09-19 09:59:23 -04:00
Ricky Zhang
39be6a0ac9
Use atomic operation 2014-09-18 16:10:41 -04:00
Ricky Zhang
b5b415da0d
Apply patch for 3.15 kernel 2014-09-18 11:38:06 -04:00
Dave Vasilevsky
4dd7f9236f Change GUI object extension, so GCC doesn't think we're Go 2014-03-05 20:11:55 -05:00
Dan Sumorok
3c6788fd26 Tweak of the linker commands. 2013-07-08 06:51:24 -04:00
Dan Sumorok
c01bd008db Hack to load code below 4GB, and to make 32-bit vm allocates work. 2013-07-06 17:09:37 -04:00
Dan Sumorok
1c99d52b91 Added missing file. 2013-06-28 07:12:38 -04:00
Dan Sumorok
c4276955ba Fixed some 64-bit releated problems on os x. 2013-06-28 07:11:52 -04:00
Dan Sumorok
3583b00a77 Copy etherhelpertool into application bundle.
Ignore -psn_ command line argument so OS X application bundle
can be launched.
2013-06-21 18:59:04 -04:00
Dan Sumorok
eedf6880db A bit of apple sound chip support. 2013-06-09 16:27:24 -04:00
asvitkine
44c7e447a7 Merge pull request #35 from dsumorok/buildfix
Buildfix
2013-06-02 22:32:57 -07:00
Dave Vasilevsky
e3710843b1 FreeBSD amd64 fixups
* Look for CPU named "amd64" as well as "x86_64"
* Don't use /dev/ptmx on FreeBSD
* On amd64 FreeBSD uses SIGSEGV, not SIGBUS
* Use MAP_FIXED to force allocations within 32-bits, it's the only way
* Need <sys/param.h> for SHMLBA
* The old offsetof() fix is no longer needed
* Preliminary work on instruction skipping
2013-05-30 21:34:30 -04:00
Dan Sumorok
8a02128473 More changes of etherslave to etherhelper. 2013-05-29 19:42:59 -04:00
Dan Sumorok
5aa782acc0 Changed ethernet address when using tap interface. 2013-05-27 13:55:38 -04:00
Dan Sumorok
f994087291 More work on new tap interface. 2013-05-26 20:58:03 -04:00
Dan Sumorok
19b53082a3 Added tap support to etherslave tool. 2013-05-25 22:01:21 -04:00
Dan Sumorok
c939be2d2d Removed objective-c from runtool source so it can be built with
newer (not from Apple) versions of gcc.
2013-05-25 10:48:15 -04:00
Dan Sumorok
531b1d7df4 Merge branch 'etherslave'
Conflicts:
	BasiliskII/src/Unix/configure.ac
2013-05-14 06:39:11 -04:00
Dan Sumorok
0e667be7be Merge branch 'osx-video-fix' 2013-05-14 06:37:47 -04:00
Dan Sumorok
241162f261 Fixed code that removed 15-bit color mode.
15-bit color mode is now removed on all platforms.
The removal of 15-bit color mode now happens before the sort.
Updated a variable name.
Changed list length calculation to use C++'s clever pointer
subtraction.
2013-05-05 16:20:37 -04:00
Dan Sumorok
e91a03f40f Added clean rule for etherslavetool. 2013-05-05 14:20:33 -04:00
Dan Sumorok
1bc3691805 Removed clean rule for etherslavetool. 2013-05-05 14:18:10 -04:00
Dan Sumorok
57b9ad0d95 Remove 15 bit video for OS X. This mode doesn't seem to work.
This also fixes 2-bit, 4-bit, and 8-bit modes.
2013-05-05 14:11:09 -04:00
Dan Sumorok
01ba04139f Updated coding style. 2013-05-04 20:36:11 -04:00
Dan Sumorok
93effd9192 Darwin/lowmem and Darwin/pagezero do not need to be removed for clean. 2013-05-01 06:55:49 -04:00
Dan Sumorok
a250b40c80 Added new etherlave network option for OS X. 2013-04-30 20:46:31 -04:00
Dan Sumorok
a421d35b9d Fix for OS X build under x-windows. Separated out sound option. 2013-04-30 20:41:50 -04:00
Dave Vasilevsky
d0648a7039 SDL: Make VOSF update functions apply to driver_base
They don't use anything special from fullscreen/windowed derived classes.
Also, get rid of unneeded friend declarations.
2013-04-24 03:30:51 -04:00
Dave Vasilevsky
8f27d4af9b Standalone GUI doesn't need to pull in all the generic disks 2013-03-28 06:30:08 -04:00
Hans de Goede
2226aa4752 don't strip -g option to GCC for B2 2013-03-12 19:08:11 -04:00
Hans de Goede
90c113c43b check for WANT_SDL_VIDEO rather than WANT_SDL when deciding to use X11 2013-03-12 18:59:58 -04:00
Hans de Goede
cb42ef255b fix linux crash on sscanf failure 2013-03-12 18:55:58 -04:00
asvitkine
3b177f141f Merge pull request #22 from vasi/dmg-sparsebundle
Sparsebundle support
2013-03-11 18:53:54 -07:00
Dave Vasilevsky
912d2e05be disk_generic: Iterate using index instead of pointers 2013-03-11 17:10:38 -04:00
Dave Vasilevsky
c79a52f3b8 disk_generic: Distinguish between unknown disks, and unmountable disks 2013-03-11 17:08:27 -04:00
Dave Vasilevsky
cdb0338883 sparsebundle: Handle locking properly 2013-03-11 16:50:12 -04:00
Dave Vasilevsky
9953374b25 sparsebundle: Don't write zeros in unallocated space
Also close files when we're done with them.
2013-03-11 16:18:43 -04:00
Dave Vasilevsky
127441afb7 sparsebundle: Use pointers to member functions 2013-03-10 12:12:24 -04:00
Dave Vasilevsky
753a5c40fe sparsebundle: Remove old TODOs 2013-03-10 12:05:43 -04:00
Dave Vasilevsky
0c8292aea3 sparsebundle: Minor fixes
- Allocate memory in disk_sparsebundle() constructor
- Constify constructor parameter
- Be careful with invalid fds
2013-03-10 12:03:34 -04:00
Doug Brown
ed358ca618 Fix case sensitivity of MinGW basetsd.h header when compiling inside Linux. 2013-03-01 03:08:29 -08:00
asvitkine
ef5a6ef3a7 Merge pull request #19 from landonf/landonf-pty-fix
Set tty raw mode when using a pty.
2013-02-28 20:56:14 -08:00
Landon Fuller
2c8507ea97 Set tty raw mode when using a pty. 2013-02-25 20:24:56 -05:00
Dave Vasilevsky
17aabc4c40 Generify vhd, too 2013-02-24 15:57:18 -05:00
Dave Vasilevsky
5c7af60f16 generically search for disk types 2013-02-24 15:43:54 -05:00
Dave Vasilevsky
3af3834b8e Basilisk deserves sparse bundles too! 2013-02-24 14:40:41 -05:00
Dave Vasilevsky
917984e6ec Add to make links 2013-02-24 14:15:21 -05:00
Dave Vasilevsky
2a15911938 Full sparsebundle implementation 2013-02-24 14:11:29 -05:00
Dave Vasilevsky
091db05aac Partial implementation of sparsebundles; still needs Info.plist parsing 2013-02-24 13:02:16 -05:00
Charles Lehner
76911be266 Fix compilation error on OS X. 2012-10-30 09:34:10 -04:00
Charles Lehner
349fad4d2f Add port redirection option for networking with slirp.
Port forwarding allows the emulator to host servers that can be
accessed from outside the virtual network.

The code for parsing the preference option "redir" is adapted from
qemu code. The rest was already implemented.
2012-10-30 01:32:38 -04:00
Christian Bauer
b4940ae29d more cleanups (unused/uninitialized variables, forgotten free()s, etc.) 2012-09-08 12:33:39 +02:00
Alexei Svitkine
243307f05c Fix typo. 2012-08-19 10:17:10 -04:00
Alexei Svitkine
3b6fdddfa1 Use a diff var name in configure.ac to avoid erroneous caching. 2012-08-12 13:01:55 -04:00
Alexei Svitkine
3c8856bcca Include unistd.h in config signal checks. 2012-08-12 12:41:03 -04:00
Alexei Svitkine
fa7da794c3 Trying to fix linux/arm build. 2012-08-12 12:25:19 -04:00
Charles
6f2635ee31 More clipboard-related fixes for Basilisk / SheepShaver
This patch fixes one lingering problem with the 64-bit clipboard code; the way it was designed, the Mac clipboard was being cleared every time a single item was being requested by GetScrap, causing clipboards with multiple items to be unceremoniously whittled down to one. On the other hand, a similar issue was causing some items to get duplicated on the host pasteboard. This patch fixes the issue by making conversion between the host pasteboard and the Mac clipboard a singular operation; when the pasteboard data changes on the host side, it is all converted and sent to the Mac pasteboard at once, and similarly, all Mac clipboard data is sent to the host pasteboard in one operation. Also, data from the host side is copied to the Mac clipboard only if it has changed since the last check, which should improve performance as conversions will not be done over and over every time the Mac side checks whether the scrap has changed.

In addition, I've added a rudimentary PICT converter. It's rudimentary at the moment, only going in one direction, converting to PICT and not from PICT, and currently it always rasterizes the source image and creates a PICT containing bitmap data. However, it's a start, and it should solve Ronald's issue with copying images from OS X to Mac OS. In the future, more could possibly be added. I've put the new PICT code in the main source directory instead of in the MacOSX subdirectory, so that it can be used by other platforms if needed.

I would like to leave the license on the new PICT code as "Public Domain" if that is okay.

Thanks,
Charles
2012-07-07 11:30:21 -04:00
Alexei Svitkine
e1d132083b Fix a logic error. 2012-07-05 22:52:39 -04:00
Alexei Svitkine
94fe1df163 Fix Mac OS X GUI configure option. 2012-07-04 22:44:24 -04:00
Alexei Svitkine
8376a21804 Fix build with SnowLeopard SDK. 2012-07-04 22:22:00 -04:00
Alexei Svitkine
145f6c3d02 Copy help files into BasiliskII bundle. 2012-07-03 22:49:28 -04:00
Alexei Svitkine
702db1dfec Allow building MacOSX GUI version from src/Unix by building with:
./configure --enable-macosx-gui

The goal is to get rid of the build files under src/MacOSX by
allowing the ones under src/Unix to produce the same outputs.

Note: This currently has video problems, but this is consistent
with what you get when building out of src/MacOSX.
2012-07-03 21:54:35 -04:00
Alexei Svitkine
42ae7000b5 Use clip_macosx64.mm for BasiliskII 64-bit builds too. 2012-07-02 00:45:59 -04:00
Alexei Svitkine
a70f9b44f1 Fix configure warning in BasiliskII's configure.ac too. 2012-07-02 00:40:08 -04:00
CharlesJS
ed28705ee3 Patch for copying and pasting styled text in Basilisk II / SheepShaver
Added code to parse the Classic Mac OS 'styl' resources, allowing formatted text to be copied and pasted out of SheepShaver, not just plain text. In order to do this, I made some changes to the emul_op mechanism, patching ZeroScrap() in addition to the scrap methods that were already being patched. The reason for this is that since we need to read data from multiple items that are on the clipboard at once, we cannot simply assume a zero at the beginning of each PutScrap() operation.

This patch uses RTF to store styled text on the host side; unfortunately, since the APIs to convert to and from RTF data are in Cocoa but not in CoreFoundation, I had to write the new portions in Objective-C rather than C, and changed the extension from .cpp to .mm accordingly. In the future, if we are confident that this file will only be used on Mac OS X 10.6 and up, we can rewrite the Pasteboard Manager code to use NSPasteboardReading/Writing instead. This would allow us to read and write NSAttributedString objects directly to and from the pasteboard, which would make sure we were always using the OS's preferred rich text format internally instead of hard-coding it specifically to RTF as in the current implementation.

I believe that this patch should also fix the problem Ronald reported with copying accented characters.

Since I am new to 68k assembly and the emul_op mechanism, I would appreciate if someone could double-check all my changes to make sure that I have done everything correctly.

Thanks,
Charles
2012-06-30 22:20:55 -04:00
Alexei Svitkine
58f4fa8425 Lock opened disk image files with O_EXLOCK (same as flock()) on
Mac OS X to prevent concurrent access from the Finder.
2012-06-25 12:56:58 -04:00
Alexei Svitkine
5a5b7176da Fix an unused function warning. 2012-06-18 19:00:25 -04:00
Christian Bauer
3c66c348c2 ignore generated files 2012-06-18 20:14:22 +02:00
Christian Bauer
ca96911c07 add SheepShaver -> BasiliskII symlinks 2012-06-18 20:02:42 +02:00
asvitkine
d931e6ff78 another try to get sshpty.c compiling on bsd 2012-06-17 23:15:10 +00:00
asvitkine
b417d95f25 fixing FreeBSD build hopefully 2012-06-17 16:41:01 +00:00
asvitkine
16c4802d7b oops, sig should have been signal 2012-06-17 04:23:17 +00:00
asvitkine
bc315e9942 Hopefully make the HAVE_DEV_PTMX path work. 2012-06-15 21:56:52 +00:00
asvitkine
d63422a733 |Description: fixes configure script generation on some systems.
|Author: Giulio Paci <giuliopaci@gmail.com>
2012-04-01 16:34:26 +00:00
asvitkine
c8b85735c4 |Description: avoid stripping binaries
|Author: Jonas Smedegaard <dr@jones.dk>
|Last-Update: 2012-03-04
2012-04-01 15:14:56 +00:00
asvitkine
c154497f17 |Description: enable out-of-tree compilation of Basilisk II
| This patch affects the Makefile.in used to compile Basilisk II in
| order to allow out-of-tree compilation. This is useful for building
| multiple flavours of the Debian package.
|Author: Giulio Paci <giuliopaci@gmail.com>
2012-04-01 15:12:31 +00:00
asvitkine
f26747520e |Description: fix to the documentation
| This patch aims at improving the man page.
|Author: Giulio Paci <giuliopaci@gmail.com>
|Forwarded: no
|Last-Update: 2012-03-04
2012-04-01 15:07:53 +00: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
asvitkine
81ab1a3f6c another warning fix 2012-03-01 04:27:42 +00:00
asvitkine
bad472294c fix a warning 2012-03-01 04:24:45 +00:00
asvitkine
62956816ed rename file_handle to mac_file_handle since file_handle is defined in system headers on some systems 2012-03-01 04:22:27 +00:00
asvitkine
c972658d81 cleanup ifdef chain syntax 2012-01-01 22:32:24 +00:00
asvitkine
2fb4e0aa4e make the ifdef chain more readable 2011-12-31 19:47:16 +00:00
asvitkine
1a2566b58e Fix CrashReporter poping up when PPC is not emulated on pre-10.5 systems. 2011-12-30 20:37:30 +00:00
asvitkine
dcf65b4d27 move NSAutoReleasePool_wrap() into its own file 2011-12-29 07:39:56 +00:00
asvitkine
3d09f85dc9 fix some unused var/function warnings 2011-12-28 20:22:25 +00:00
asvitkine
2d14b5fb8b get file size using stat, which seems to be more reliable 2011-12-27 21:01:32 +00:00
asvitkine
521da856b5 check for MAP_FAILED result 2011-12-27 20:50:27 +00:00
asvitkine
b48405744e remove extra comment start 2011-12-27 19:50:38 +00:00
asvitkine
9baf8b4156 Fix fatal() macro 2011-03-11 16:41:18 +00:00
asvitkine
5f8683b346 [Amadeusz Sławiński]
Patch fixing build on 2.6.35 and 2.6.36 kernels.
2010-11-27 00:14:09 +00:00
asvitkine
7a093cb1fb Fix issue from my last change where it ended up not defining
SIGSEGV_FAULT_ADDRESS_FAST at all on PPC builds.
2010-10-23 21:13:21 +00:00
asvitkine
1170b925ee fix sentinel warning 2010-10-19 03:30:20 +00:00
asvitkine
7665252790 [Geoffrey Brown]
For my work on digital preservation it's important to have "golden"
disk images that are not corrupted by user action.  In order to enable
this, I've added support for VHD virtual disks (especially snapshots !)
to the Linux and OS X versions of BasiliskII and SheepShaver.

The support uses the open source libvhd library which is part of xen,
available here:
  http://www.xen.org/products/xen_source.html

The piece that's needed is libvhd which is in tools/blktap2 and it can
be separately compiled.
The vhd-util enables creation of vhd disks and snapshots.

Compiling libvhd for OS X is non-trivial and required  1) a new config
and 2) a number of small changes to the include files and c files.
Compiling for linux is a snap.

I use this as follows.

1) create my "golden image"  gold.dsk in the usual way
2) create a snapshot:  vhd-util snapshot -n gold.vhd -p gold.dsk -m
3) use the snapshot in my prefs file

In my work the golden images are in an AFS system which means the golden
images can reside at "universal" addresses.   The snapshots are initially
tiny, so a complete virtual machine configuration -- prefs + snapshot is
quick to download for the end user.

The snapshots are copy on write which has the pleasant side effect of
letting the end user keep any changes.
2010-10-19 03:21:52 +00:00
asvitkine
90bdd12839 [Geoffrey Brown]
Add bin/cue support. The following should work:

1) Basilisk and SheepShaver with sdl-audio and bincue on linux and os x
2) SheepShaver with bincue and core audio on os x
2010-10-06 00:30:23 +00:00
asvitkine
7a9a6d18f2 . 2010-09-24 00:49:45 +00:00
asvitkine
7bb230abed apparently this makes newest SDL happy 2010-09-24 00:48:58 +00:00
asvitkine
556a42001b Some messy changes got into last commit that weren't supposed to be there. 2010-07-28 01:10:24 +00:00
asvitkine
930374bbc6 Do the right thing if host-triplet is a i386-i686, but gcc compiles by
default as x86_64. Fixes configure on Snow Leopard.
2010-07-28 01:07:45 +00:00
asvitkine
853db27159 Fixing sigsegv on Mach x86_64 - possibly a hack; I'm not sure why the
address returned doesn't have that bit set already.
2010-07-27 22:52:33 +00:00
asvitkine
812db6ed4f [Howard Spoelstra and Joel Mauras]
Patches to update Linux NetDriver to work with newer kernel versions.
2010-04-08 03:58:26 +00:00
asvitkine
8a0002de43 [Joel Mauras]
GCC has become too smart - we need to slice the binary created to be sure the
address of the trap is within the test addresses. This is why each trap occurs
between two case labels and a new section of assembly code is set in between.
2010-04-08 03:53:27 +00:00
asvitkine
ebfe00ba48 [Amadeusz Sławiński]
fix check on gcc 4.4.3
2010-03-10 01:05:49 +00:00
asvitkine
78027e7a46 [Amadeusz Slawinski]
These patches fix the issues with using newer versions of autoconf,
which led to generating broken configure script.
2010-03-07 00:45:10 +00:00
cebix
dca3b18d9d fixed warnings 2010-02-21 12:00:42 +00:00
cebix
1fbacc9c73 fixed missing INT_MAX 2010-02-21 09:58:00 +00:00
cebix
71852dae82 fixed compiler warnings 2010-02-21 09:55:52 +00:00
asvitkine
989f5036fc Fix PrefsInit() calls to take correct number of parameter 2010-01-15 01:53:31 +00:00
asvitkine
6f230efee8 [ Patch from Jean-Pierre <chombier@free.fr> ]
Make lowmem be able to deal with x86_64 binaries.
2009-11-13 01:57:48 +00:00
asvitkine
02313b55c2 [Joel Mauras]
Patch for network suppor on 2.6 Linux Kernel.
2009-10-20 01:55:03 +00:00
asvitkine
cb55b15d39 Change #include <mach/mach_host.h> to #include <mach/mach.h> 2009-08-21 17:39:58 +00: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
asvitkine
c6d88f213c [Michael Schmitt]
SheepShaver includes the C errno string in many error messages. One case is when it calls the memory allocation routines in the Basilisk II vm_alloc.cpp program.

This works when the memory allocation routine uses functions that set errno (such as mmap or malloc). For example, running SheepShaver on a Linux hosts produces meaningful error messages.

The problem is that when run on an OS X host, the memory allocation uses Mach routines such as vm_allocate, which do not set errno.

So when SheepShaver reported the error, it used a stale value of errno, which happened to be 17. The result was an extremely misleading error message: "Cannot map RAM: File already exists".

The fix is to change vm_alloc so that it translates Mac return codes into POSIX errno values.

It also initializes errno to 0 at the start of the memory allocation routine, so that no matter what path it takes, it won't return a stale value.
2009-08-11 07:43:46 +00:00
asvitkine
d0c46de7c3 BasiliskII side of changes to support .sheepvm bundles for SheepShaver 2009-07-23 19:19:14 +00:00
asvitkine
8ad0bbcc80 windows fix try#2 2009-04-13 23:13:20 +00:00
asvitkine
abb9d2eb24 make sigsegv work better with cygwin 2009-04-13 19:57:08 +00:00
asvitkine
da540a74f6 [patch by Mike Sliczniak]
Here is a patch to allow compiling of SS and B2 with an SDL Framework. You can
get this by downloading from:

http://www.libsdl.org/release/SDL-1.2.13.dmg

Here is how I tested on an intel 32-bit mac with Mac OS X 10.5.6:

SS ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --disable-sdl-audio --enable-addressing=real
--without-esd --without-gtk --without-mon --without-x

SS /autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --with-x

B2 ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --enable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x --enable-jit-compiler

B2 ./autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --with-esd --without-gtk --without-mon --with-x --enable-jit-compiler

(esound does not really work on mac, it needs some better coreaudio patches.)

configure.ac for SS has two little additional fixes so that the Cocoa prefs gui
does not get built if you are building for X11 and so that you can use esd, sdl,
or coreaudio for sound.
2009-03-03 08:07:22 +00:00
asvitkine
3e12a80a3b [Patch by Mike Sliczniak]
I was testing some other SS patches and I noticed that when I ran an X11
build of SS there were not all the video modes I expected in the the
control strip. Mac OS X 10.5 changed the form of the DISPLAY environment
variable. The reason for this is that the DISPLAY variable looks like
this in Leopard:

/tmp/launch-XXXXXX/:0

The Xs are like in mktemp.
2009-02-19 07:09:35 +00:00
asvitkine
65eac29142 [patch from Mike Sliczniak]
Here is a patch that has a shell script cpr.sh to recursively copy directories but
discarding things that cause problems at least on 10.4 when making the .app bundles.
2009-02-19 06:52:03 +00:00
asvitkine
8375c57047 move sigsegv_info_t declaration to header 2009-02-11 20:44:10 +00:00
asvitkine
ca2b9b5832 [Patch from Mike Sliczniak]
This first patch gets B2 and SS to build under Leopard and Tiger.

I tested this on a 32-bit intel 10.5.6 mac like so:

B2
./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-video --enable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x

SS
./autogen.sh --disable-standalone-gui --enable-vosf -enable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x --enable-jit

There is also a little tweak so that you can use sdl audio in SheepShaver when building for Mac OS X.
2009-02-11 19:23:53 +00:00
asvitkine
a370638388 some changes to make Basillisk build better on Leopard 2008-12-09 18:03:35 +00:00
gbeauche
3f15f4ed26 64-bit Mach exceptions support. Note that mach_exc_server() et al. must be
explicitly generated from mig. The advantage of that is to provide a "fast"
path for x86_64 on Leopard too (fault address in code[1]).

By "fast", this means +33% faster wrt. explicitly thread_get_state() but
still pretty slow (40 usec/fault). This is on par with the i386 code path though.
2008-01-20 22:24:53 +00:00
gbeauche
68668bb4e2 Add support for Windows/ia64. 2008-01-20 17:09:34 +00:00
gbeauche
62697e13c1 Err, restore a reasonnable value for the emulators. ;-) 2008-01-20 11:52:13 +00:00
gbeauche
a4209f5db0 Arrangements for the SIGSEGV perf tester. 2008-01-20 11:51:08 +00:00
gbeauche
2bdb300da1 HPPA support. 2008-01-20 00:39:51 +00:00
gbeauche
acd35671b8 HP-UX does support 32-bit memory mappings. 2008-01-20 00:38:52 +00:00
gbeauche
88ea04a365 Add support for HP-UX/ia64. It would be best to use libunwind so that to
handle stacked registers access with ease...
2008-01-19 22:27:29 +00:00
gbeauche
3615be1d4d Use fixed-size integer types, especially for 64-bit quantities. HP-UX for IPF
is essentially an ILP32 platform but machine registers are 64-bit wide. Make
IA64_SET_GR() set the NaT bit at the same time as the register value.
2008-01-19 22:25:27 +00:00
gbeauche
b5ac45434a Fix build on 64-bit Vista. 2008-01-17 23:19:01 +00:00
gbeauche
69376f61ca Wrap the Windows write-watch API. 2008-01-16 22:36:35 +00:00
gbeauche
ef39e46cb2 Fix build on MacOS X Leopard.
Leopard kernel faster? This is pure marketing hype. For 32-bit applications,
Mach exception recovery is 60% slower. For 64-bit applications, this is up
to 40% faster though. In any case, MacOS X remains pretty slow wrt. Linux...
2008-01-14 19:29:29 +00:00
gbeauche
df3475ed16 64-bit Windows support 2008-01-12 23:01:40 +00:00
gbeauche
f5e5da6916 LLP64 fixes (64-bit Windows) 2008-01-12 21:43:02 +00:00
gbeauche
b1fa25128a Make it possible to override the Mach fault recovery scheme through an
environment variable: SIGSEGV_MACH_FAULT. It can be set to "direct" to
assume the fault address comes from code[1] argument, or "slow" to use
the slow path through thread_get_status(EXCEPTION_STATE)->faultvaddr.
2008-01-07 22:44:39 +00:00
gbeauche
58ff9aba45 The Linux kernel actually allows to restart execution from the specified slot
in the bundle. This is faster and more accurate as this avoids emulation.

Also clean-up code so that to prepare the use of lib uaccess on hpux/ia64.
XXX: this will need explicit use of uint64_t to define registers because
HP/UX is ILP32 capable and all registers are 64-bit capable so "unsigned long"
won't fit.
2008-01-06 17:22:19 +00:00
gbeauche
8aadf8e455 Further comment the ia64 decoder and (minimal) emulator. 2008-01-06 16:36:00 +00:00
gbeauche
57ae6ed470 Add initial support for instruction skipping on Linux/ia64. It was more
complex than expected but it was fun to play with. Who designed this ISA?
I'd love to see how the decoder is implemented in HW, by all means it is
not "simplified" unless I missed some pattern...
2008-01-06 16:25:03 +00:00
gbeauche
a56e4b9be0 Hack around over-optimized labels-as-values extension from GCC. 2008-01-06 16:19:27 +00:00
gbeauche
e08bb16edf ISO C++ conformance fixes: remove superfluous coma at the end of enum definitions. 2008-01-06 16:10:30 +00:00
gbeauche
a93bec88fd Don't clobber "sip" arg from our sigsegv_info wrapper (renamed to SIP). 2008-01-05 08:35:08 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
26f9b1d38b Fix instruction skipping on MacOS X in the fast path case. 2007-12-31 18:07:01 +00:00
gbeauche
b5ac365858 Add support for 64-bit MacOS X for PowerPC (untested beyond "it compiles"). 2007-12-31 06:59:39 +00:00
gbeauche
9fa1bbd972 According to kernel sources, that is XNU 344.49 (10.2.8), XNU 517.12.7 (10.3.9),
XNU 792.21.3 (10.4.10) and XNU 1228 (10.5.0), exception handler code[1] always
contains the fault address nowadays. So make it the default fast path but keep
provisions to check that at run-time first.

This yields a nearly 4x improvement in SIGSEGV recovery but MacOS X is still
suboptimal wrt. Linux, so VOSF is still not possible with frameskip == 0.

XXX: the ppc kernel had bugs that caused DAR (put into code[1]) to be incorrectly
decoded. This would need a broader test audience or more careful audit of the
sources changes.
2007-12-30 12:11:17 +00:00