├── .gitignore ├── .travis.yml ├── HISTORY.md ├── LICENSE ├── Makefile ├── README.md ├── appveyor.yml ├── doc ├── BeOS │ ├── acknowledgements.html │ ├── contact.html │ ├── graphics.gif │ ├── history.html │ ├── icon.gif │ ├── iconsmall.gif │ ├── index.html │ ├── installation.html │ ├── introduction.html │ ├── memory.gif │ ├── quickstart.html │ ├── serial.gif │ ├── settings.html │ ├── troubleshooting.html │ ├── using.html │ └── volumes.gif ├── Linux │ ├── acknowledgements.html │ ├── contact.html │ ├── graphics.gif │ ├── history.html │ ├── icon.gif │ ├── iconsmall.gif │ ├── index.html │ ├── installation.html │ ├── introduction.html │ ├── memory.gif │ ├── quickstart.html │ ├── serial.gif │ ├── settings.html │ ├── troubleshooting.html │ ├── using.html │ └── volumes.gif └── PowerPC-Testsuite.md └── src ├── BeOS ├── CreatePCIDrivers │ ├── Ethernet.cpp │ ├── Makefile │ ├── Video.cpp │ └── hexconv.cpp ├── Makefile ├── NetPeek │ ├── Makefile │ └── NetPeek.cpp ├── SaveROM │ ├── Makefile │ ├── README │ ├── SaveROM.cpp │ └── SaveROM.rsrc ├── SheepDriver │ ├── Makefile │ ├── sheep_driver.c │ └── sheep_driver.h ├── SheepNet │ ├── Makefile │ ├── sheep_net.cpp │ └── sheep_net.h ├── SheepShaver.rsrc ├── about_window_beos.cpp ├── audio_beos.cpp ├── clip_beos.cpp ├── ether_beos.cpp ├── extfs_beos.cpp ├── main_beos.cpp ├── prefs_beos.cpp ├── prefs_editor_beos.cpp ├── scsi_beos.cpp ├── serial_beos.cpp ├── sys_beos.cpp ├── sysdeps.h ├── timer_beos.cpp ├── user_strings_beos.cpp ├── user_strings_beos.h ├── video_beos.cpp ├── video_screen.h ├── video_window.h └── xpram_beos.cpp ├── CrossPlatform ├── sigsegv.cpp ├── sigsegv.h ├── video_blit.cpp ├── video_blit.h ├── video_vosf.h ├── vm_alloc.cpp └── vm_alloc.h ├── EthernetDriver ├── .finf │ ├── Ethernet.mcp │ └── ethernet.ndrv ├── .rsrc │ └── ethernet.ndrv ├── Ethernet Data │ ├── .finf │ │ ├── CWSettingsMacOS.stg │ │ ├── PPC Debug MacOS Toolbox │ │ └── PPC Final MacOS Toolbox │ ├── CWSettingsMacOS.stg │ ├── PPC Debug MacOS Toolbox │ │ ├── .finf │ │ │ └── TargetDataMacOS.tdt │ │ ├── .rsrc │ │ │ └── TargetDataMacOS.tdt │ │ └── TargetDataMacOS.tdt │ └── PPC Final MacOS Toolbox │ │ ├── .finf │ │ └── TargetDataMacOS.tdt │ │ ├── .rsrc │ │ └── TargetDataMacOS.tdt │ │ └── TargetDataMacOS.tdt ├── Ethernet.cpp ├── Ethernet.mcp ├── cpu_emulation.h ├── debug.h ├── ether.cpp ├── ether.h ├── ether_defs.h ├── ethernet.ndrv ├── macos_util.cpp ├── macos_util.h ├── sysdeps.h └── xlowmem.h ├── EthernetDriverFull.i ├── EthernetDriverStub.i ├── MacOSX ├── .gitignore ├── AudioBackEnd.cpp ├── AudioBackEnd.h ├── AudioDevice.cpp ├── AudioDevice.h ├── Info.plist.in ├── Launcher │ ├── AppController.h │ ├── AppController.mm │ ├── DiskType.h │ ├── DiskType.m │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ ├── MainMenu.nib │ │ │ ├── classes.nib │ │ │ ├── info.nib │ │ │ └── keyedobjects.nib │ │ ├── VMListWindow.nib │ │ │ ├── designable.nib │ │ │ └── keyedobjects.nib │ │ └── VMSettingsWindow.nib │ │ │ ├── designable.nib │ │ │ └── keyedobjects.nib │ ├── Info.plist │ ├── LauncherPrefix.h │ ├── SheepShaverLauncher.xcodeproj │ │ └── project.pbxproj │ ├── VMListController.h │ ├── VMListController.mm │ ├── VMSettingsController.h │ ├── VMSettingsController.mm │ └── main.m ├── MacOSX_sound_if.cpp ├── MacOSX_sound_if.h ├── PrefsEditor │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── MainMenu.nib │ │ │ ├── classes.nib │ │ │ ├── info.nib │ │ │ └── keyedobjects.nib │ ├── Info.plist │ ├── PrefsEditor.h │ ├── PrefsEditor.mm │ ├── SheepShaverPrefs.xcodeproj │ │ └── project.pbxproj │ ├── main.m │ └── standalone_nib │ │ └── English.lproj │ │ ├── InfoPlist.strings │ │ └── MainMenu.nib │ │ ├── classes.nib │ │ ├── info.nib │ │ └── keyedobjects.nib ├── SheepShaver.icns ├── SheepShaver.xcodeproj │ └── project.pbxproj ├── SheepShaver_Xcode8.xcodeproj │ └── project.pbxproj ├── XcodeBuildHowTo.txt ├── audio_macosx.cpp ├── autorelease.h ├── clip_macosx.cpp ├── clip_macosx64.mm ├── config │ ├── config-macosx-ppc_32.h │ ├── config-macosx-x86_32.h │ ├── config-macosx-x86_64.h │ └── config.h ├── extfs_macosx.cpp ├── macos_util_macosx.h ├── prefs_macosx.mm ├── sys_darwin.cpp ├── utils_macosx.h └── utils_macosx.mm ├── SDL ├── SDLMain.h ├── SDLMain.m ├── audio_sdl.cpp ├── keycodes ├── prefs_sdl.cpp ├── video_sdl.cpp ├── video_sdl2.cpp └── xpram_sdl.cpp ├── Unix ├── .gitignore ├── Darwin │ ├── .gitignore │ ├── lowmem.c │ ├── mkstandalone │ ├── pagezero.c │ └── testlmem.sh ├── Irix │ └── audio_irix.cpp ├── Linux │ ├── NetDriver │ │ ├── README.md │ │ └── sheep_net.c │ ├── scsi_linux.cpp │ └── sheepthreads.c ├── Makefile.in ├── NetBSD │ └── sheepthreads.c ├── SheepShaver.1 ├── about_window_unix.cpp ├── audio_oss_esd.cpp ├── autogen.sh ├── bincue_unix.cpp ├── bincue_unix.h ├── clip_unix.cpp ├── config.guess ├── config.sub ├── configure.ac ├── cpr.sh ├── disk_sparsebundle.cpp ├── disk_unix.h ├── dyngen_precompiled │ ├── basic-dyngen-ops-x86_32.hpp │ ├── basic-dyngen-ops-x86_64.hpp │ ├── basic-dyngen-ops-x86_64_macos.hpp │ ├── basic-dyngen-ops.hpp │ ├── patch_jit.pl │ ├── ppc-dyngen-ops-x86_32.hpp │ ├── ppc-dyngen-ops-x86_64.hpp │ ├── ppc-dyngen-ops-x86_64_macos.hpp │ ├── ppc-dyngen-ops.hpp │ └── ppc-execute-impl.cpp ├── ether_unix.cpp ├── extfs_unix.cpp ├── install-sh ├── keycodes ├── ldscripts │ ├── freebsd-i386.ld │ ├── linux-i386.ld │ ├── linux-ppc.ld │ └── linux-x86_64.ld ├── m4 │ ├── egrep.m4 │ ├── esd.m4 │ ├── gettext.m4 │ ├── gtk-2.0.m4 │ └── gtk.m4 ├── main_unix.cpp ├── mkinstalldirs ├── paranoia.cpp ├── posix_sem.cpp ├── ppc_asm.S ├── ppc_asm.tmpl ├── prefs_editor_gtk.cpp ├── prefs_unix.cpp ├── rpc.h ├── rpc_unix.cpp ├── semaphore.h ├── serial_unix.cpp ├── sigregs.h ├── sshpty.c ├── sshpty.h ├── strlcpy.c ├── strlcpy.h ├── sys_unix.cpp ├── sysdeps.h ├── timer_unix.cpp ├── tinyxml2.cpp ├── tinyxml2.h ├── tunconfig ├── user_strings_unix.cpp ├── user_strings_unix.h ├── vhd_unix.cpp ├── video_x.cpp └── xpram_unix.cpp ├── VideoDriverStub.i ├── Windows ├── Makefile.in ├── SheepShaver.ico ├── SheepShaver.rc ├── SheepShaverGUI.ico ├── SheepShaverGUI.rc ├── about_window_windows.cpp ├── b2ether │ ├── driver │ │ ├── DEBUG.H │ │ ├── MAKEFILE │ │ ├── OEMSETUP.INF │ │ ├── SOURCES │ │ ├── b2ether.c │ │ ├── b2ether.h │ │ ├── b2ether_openclose.c │ │ ├── b2ether_read.c │ │ └── b2ether_write.c │ ├── inc │ │ ├── b2ether_hl.h │ │ └── ntddpack.h │ ├── multiopt.h │ ├── nt5 │ │ ├── B2Win2k.inf │ │ ├── B2Win7Vista-x64.inf │ │ ├── MAKEFILE │ │ ├── NTDDPACK.H │ │ ├── SOURCES │ │ ├── b2ether.c │ │ ├── b2ether.h │ │ ├── b2ether.rc │ │ ├── b2ether64.sln │ │ ├── b2ether64.vcxproj │ │ ├── b2ether_openclose.c │ │ ├── b2ether_read.c │ │ └── b2ether_write.c │ └── packet32.cpp ├── cd_defs.h ├── cdenable │ ├── cache.cpp │ ├── cache.h │ ├── cdenable.h │ ├── eject_nt.cpp │ ├── eject_nt.h │ ├── ntcd.cpp │ └── ntcd.h ├── clip_windows.cpp ├── configure.ac ├── ether_windows.cpp ├── ether_windows.h ├── extfs_windows.cpp ├── kernel_windows.cpp ├── kernel_windows.h ├── main_windows.cpp ├── posix_emu.cpp ├── posix_emu.h ├── prefs_editor_gtk.cpp ├── prefs_windows.cpp ├── router │ ├── arp.cpp │ ├── arp.h │ ├── dump.cpp │ ├── dump.h │ ├── dynsockets.cpp │ ├── dynsockets.h │ ├── ftp.cpp │ ├── ftp.h │ ├── icmp.cpp │ ├── icmp.h │ ├── iphelp.cpp │ ├── iphelp.h │ ├── ipsocket.cpp │ ├── ipsocket.h │ ├── mib │ │ ├── interfaces.cpp │ │ ├── interfaces.h │ │ ├── mibaccess.cpp │ │ └── mibaccess.h │ ├── router.cpp │ ├── router.h │ ├── router_types.h │ ├── tcp.cpp │ ├── tcp.h │ ├── udp.cpp │ └── udp.h ├── serial_windows.cpp ├── sys_windows.cpp ├── sysdeps.h ├── timer_windows.cpp ├── user_strings_windows.cpp ├── user_strings_windows.h ├── util_windows.cpp ├── util_windows.h └── xpram_windows.cpp ├── adb.cpp ├── audio.cpp ├── cdrom.cpp ├── disk.cpp ├── dummy ├── audio_dummy.cpp ├── clip_dummy.cpp ├── ether_dummy.cpp ├── prefs_dummy.cpp ├── prefs_editor_dummy.cpp ├── scsi_dummy.cpp └── serial_dummy.cpp ├── emul_op.cpp ├── emul_ppc └── emul_ppc.cpp ├── ether.cpp ├── extfs.cpp ├── gfxaccel.cpp ├── include ├── about_window.h ├── adb.h ├── audio.h ├── audio_defs.h ├── cdrom.h ├── clip.h ├── cpu_emulation.h ├── debug.h ├── disk.h ├── emul_op.h ├── ether.h ├── ether_defs.h ├── extfs.h ├── extfs_defs.h ├── macos_util.h ├── main.h ├── name_registry.h ├── pict.h ├── prefs.h ├── prefs_editor.h ├── rom_patches.h ├── rsrc_patches.h ├── scsi.h ├── serial.h ├── serial_defs.h ├── sony.h ├── sys.h ├── thunks.h ├── timer.h ├── user_strings.h ├── version.h ├── video.h ├── video_defs.h ├── xlowmem.h └── xpram.h ├── kpx_cpu ├── dis-asm.h ├── include │ ├── a.out-defs.h │ ├── basic-blockinfo.hpp │ ├── basic-cpu.hpp │ ├── basic-plugin.hpp │ ├── block-alloc.hpp │ ├── elf-defs.h │ ├── nvmemfun.hpp │ └── task-plugin.hpp ├── ppc-dis.c ├── sheepshaver_glue.cpp └── src │ ├── cpu │ ├── block-cache.hpp │ ├── jit │ │ ├── amd64 │ │ │ ├── dyngen-target-exec.h │ │ │ ├── jit-target-cache.hpp │ │ │ └── jit-target-codegen.hpp │ │ ├── basic-dyngen-ops.cpp │ │ ├── basic-dyngen.cpp │ │ ├── basic-dyngen.hpp │ │ ├── cxxdemangle.cpp │ │ ├── cxxdemangle.h │ │ ├── dummy │ │ │ └── jit-target-cache.hpp │ │ ├── dyngen-exec.h │ │ ├── dyngen.c │ │ ├── jit-cache.cpp │ │ ├── jit-cache.hpp │ │ ├── jit-codegen.hpp │ │ ├── jit-config.hpp │ │ ├── jit-target-dispatch.h │ │ ├── mips │ │ │ ├── dyngen-target-exec.h │ │ │ └── jit-target-cache.hpp │ │ ├── ppc │ │ │ ├── dyngen-target-exec.h │ │ │ └── jit-target-cache.hpp │ │ └── x86 │ │ │ ├── codegen_x86.h │ │ │ ├── dyngen-target-exec.h │ │ │ ├── jit-target-cache.hpp │ │ │ └── jit-target-codegen.hpp │ ├── ppc │ │ ├── genexec.pl │ │ ├── ppc-bitfields.hpp │ │ ├── ppc-blockinfo.hpp │ │ ├── ppc-config.hpp │ │ ├── ppc-cpu.cpp │ │ ├── ppc-cpu.hpp │ │ ├── ppc-decode.cpp │ │ ├── ppc-dyngen-ops.cpp │ │ ├── ppc-dyngen.cpp │ │ ├── ppc-dyngen.hpp │ │ ├── ppc-execute.cpp │ │ ├── ppc-execute.hpp │ │ ├── ppc-instructions.hpp │ │ ├── ppc-jit.cpp │ │ ├── ppc-jit.hpp │ │ ├── ppc-operands.hpp │ │ ├── ppc-operations.hpp │ │ ├── ppc-registers.hpp │ │ └── ppc-translate.cpp │ ├── spcflags.hpp │ └── vm.hpp │ ├── mathlib │ ├── ieeefp-i386.cpp │ ├── ieeefp-i386.hpp │ ├── ieeefp-mips.hpp │ ├── ieeefp.cpp │ ├── ieeefp.hpp │ ├── mathlib-i386.cpp │ ├── mathlib-i386.hpp │ ├── mathlib-ppc.hpp │ ├── mathlib-x86_64.hpp │ ├── mathlib.cpp │ └── mathlib.hpp │ ├── test │ └── test-powerpc.cpp │ └── utils │ ├── utils-cpuinfo.cpp │ ├── utils-cpuinfo.hpp │ └── utils-sentinel.hpp ├── macos_util.cpp ├── main.cpp ├── name_registry.cpp ├── pict.c ├── prefs.cpp ├── prefs_items.cpp ├── rom_patches.cpp ├── rsrc_patches.cpp ├── scsi.cpp ├── serial.cpp ├── slirp ├── COPYRIGHT ├── VERSION ├── bootp.c ├── bootp.h ├── cksum.c ├── ctl.h ├── debug.c ├── debug.h ├── icmp_var.h ├── if.c ├── if.h ├── ip.h ├── ip_icmp.c ├── ip_icmp.h ├── ip_input.c ├── ip_output.c ├── libslirp.h ├── main.h ├── mbuf.c ├── mbuf.h ├── misc.c ├── misc.h ├── sbuf.c ├── sbuf.h ├── slirp.c ├── slirp.h ├── slirp_config.h ├── socket.c ├── socket.h ├── tcp.h ├── tcp_input.c ├── tcp_output.c ├── tcp_subr.c ├── tcp_timer.c ├── tcp_timer.h ├── tcp_var.h ├── tcpip.h ├── tftp.c ├── tftp.h ├── udp.c └── udp.h ├── sony.cpp ├── thunks.cpp ├── timer.cpp ├── user_strings.cpp ├── video.cpp └── xpram.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | 4 | # Backups 5 | *~ 6 | 7 | # Mac OS X metadata 8 | *.DS_Store 9 | 10 | # 11 | # Xcode gitignore settings are from https://github.com/github/gitignore/blob/master/Global/Xcode.gitignore 12 | # 13 | 14 | ## Xcode, Build generated 15 | build/ 16 | DerivedData/ 17 | 18 | ## Xcode, Various settings 19 | *.pbxuser 20 | !default.pbxuser 21 | *.mode1v3 22 | !default.mode1v3 23 | *.mode2v3 24 | !default.mode2v3 25 | *.perspectivev3 26 | !default.perspectivev3 27 | xcuserdata/ 28 | 29 | ## Xcode, Other 30 | *.moved-aside 31 | *.xccheckout 32 | *.xcscmblueprint 33 | 34 | # 35 | # JetBrains IDE settings 36 | # 37 | *.idea 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | matrix: 4 | include: 5 | - os: linux 6 | dist: trusty 7 | sudo: required 8 | compiler: gcc 9 | env: BADGE=linux 10 | addons: 11 | apt: 12 | packages: 13 | - libsdl1.2-dev 14 | - libgtk2.0-dev 15 | script: 16 | - true 17 | - os: osx 18 | env: BADGE=osx 19 | script: 20 | - true 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SheepShaver 2 | MacOS run-time environment for BeOS and Linux 3 | 4 | Platform | CI Status| 5 | ---------|:---------------- 6 | AmigaOS | Deprecate 💀 7 | BeOS | Deprecate 💀 8 | FreeBSD | [Costs 💰](https://cirrus-ci.org/pricing/) 9 | Linux | [![Linux Build Status](http://badges.herokuapp.com/travis/emaculation/SheepShaver?env=BADGE=linux&label=build&branch=master)](https://travis-ci.org/emaculation/SheepShaver) 10 | OSX | [![OSX Build Status](http://badges.herokuapp.com/travis/emaculation/SheepShaver?env=BADGE=osx&label=build&branch=master)](https://travis-ci.org/emaculation/SheepShaver) Null ⚠️ 11 | Windows | [![Windows Build status](https://ci.appveyor.com/api/projects/status/pxw2cf78ls0ee3ff/branch/master?svg=true)](https://ci.appveyor.com/project/ianfixes/SheepShaver) Null ⚠️ 12 | 13 | Originally hosted at https://sheepshaver.cebix.net/ 14 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | install: 2 | - set PATH=C:\cygwin\bin;C:\cygwin64\bin;%PATH% 3 | - '%CYG_ROOT%\setup-%CYG_ARCH%.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l %CYG_ROOT%/var/cache/setup -P autoconf -P automake -P bison -P libgmp-devel -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl' 4 | 5 | environment: 6 | matrix: 7 | - CYG_ARCH: x86_64 8 | CYG_ROOT: C:/cygwin64 9 | 10 | build: off 11 | 12 | before_test: 13 | - gcc -v 14 | - g++ -v 15 | 16 | test_script: 17 | # https://help.appveyor.com/discussions/problems/5170-progresspreference-not-works-always-shown-preparing-modules-for-first-use-in-stderr 18 | - ps: $ProgressPreference = "SilentlyContinue" 19 | -------------------------------------------------------------------------------- /doc/BeOS/acknowledgements.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Acknowledgements 4 | 5 | 6 | 7 |

Acknowledgements

8 | 9 | The following persons/companies deserve special thanks from us as they 10 | made a significant contribution to the development of SheepShaver: 11 | 12 |

13 |

18 | 19 |
20 |
21 | SheepShaver User's Guide 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /doc/BeOS/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Contact Information 4 | 5 | 6 | 7 |

Contact Information and Copyright

8 | 9 | SheepShaver was brought to you by 10 | 14 | 15 |

SheepShaver WWW Site:

16 |
17 | www.sheepshaver.com
18 |
19 | 20 |

EMail:

21 |
22 | Christian.Bauer@uni-mainz.de
23 |
24 | 25 |

License

26 | 27 |

SheepShaver is available under the terms of the GNU General Public License. 28 | See the file "COPYING" that is included in the distribution for details. 29 | 30 |

© Copyright 1997-2004 Christian Bauer and Marc Hellwig 31 | 32 |

Names of hardware and software items mentioned in this manual and 33 | in program texts are in most cases registered trade marks of the respective 34 | companies and not marked as such. So the lack of such a note may not be 35 | used as an indication that these names are free. 36 | 37 |

SheepShaver is not designed, intended, or authorized for use as a component 38 | in systems intended for surgical implant within the body, or other applications intended 39 | to support or sustain life, or for any other application in which the failure of SheepShaver 40 | could create a situation where personal injury or death may occur (so-called "killer application"). 41 | 42 |


43 |
44 | SheepShaver User's Guide 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /doc/BeOS/graphics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/graphics.gif -------------------------------------------------------------------------------- /doc/BeOS/history.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Revision History 4 | 5 | 6 | 7 |

SheepShaver Revision History

8 | 9 |

V2.2 (04-Feb-2002)

10 | 14 | 15 |

V2.1 (31-Mar-2001)

16 | 25 | 26 |

V2.0 (20-Jan-1999)

27 | 38 | 39 |

V1.1 (13-Jul-1998)

40 | 48 | 49 |

V1.0 (18-May-1998)

50 | 53 | 54 |
55 |
56 | SheepShaver User's Guide 57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /doc/BeOS/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/icon.gif -------------------------------------------------------------------------------- /doc/BeOS/iconsmall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/iconsmall.gif -------------------------------------------------------------------------------- /doc/BeOS/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The SheepShaver User's Guide 4 | 5 | 6 | 7 |

SheepShaver V2.2 Installation and User's Guide (BeOS)

8 | 9 |

Contents

10 | 11 | 22 | 23 |
24 |
25 | SheepShaver User's Guide 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /doc/BeOS/installation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Installation 4 | 5 | 6 | 7 |

Installation

8 | 9 | You need BeOS/PowerPC R4. R3 or earlier versions will not work. 10 | 11 |
    12 |
  1. Unpack the SheepShaver package (if you are reading this, you probably have already done this) 13 |
  2. On a BeBox, you need a copy of a PCI PowerMac ROM (4MB) in a file 14 | called "ROM" in the same folder SheepShaver is in (but you can select a different 15 | location in the settings window). SheepShaver can also use the "Mac OS ROM" file 16 | that comes with MacOS 8.5/8.6 (look in the System Folder on your MacOS CD). In 17 | order to legally use SheepShaver, you have to own the ROM the image file was taken from. 18 |
19 | 20 |
21 |
22 | SheepShaver User's Guide 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/BeOS/introduction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction 4 | 5 | 6 | 7 |

Introduction

8 | 9 | SheepShaver is a MacOS run-time environment for BeOS that allows you 10 | to run MacOS applications at native speed inside the BeOS multitasking 11 | environment on PowerPC-based BeOS systems. This means that both BeOS 12 | and MacOS applications can run at the same time and data can be exchanged 13 | between them. 14 | 15 |

SheepShaver is neither a MacOS replacement nor an emulator. It runs an 16 | unmodified PowerPC MacOS under control of the BeOS at full speed without 17 | any kind of emulation. So it also uses the MacOS 68k emulator to run 68k 18 | applications. In this way, SheepShaver is comparable to the "Blue Box" of 19 | Apple's Rhapsody operating system. 20 | 21 |

Some of SheepShaver's features:

22 | 23 | 39 | 40 |
41 |
42 | SheepShaver User's Guide 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /doc/BeOS/memory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/memory.gif -------------------------------------------------------------------------------- /doc/BeOS/quickstart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Quick Start 4 | 5 | 6 | 7 |

Quick Start

8 | 9 | The following is a step-by-step guide that shows you how to get SheepShaver 10 | up and running in the quickest possible way. We assume that you are running 11 | on a PowerMac that already has MacOS installed on a partition of your hard drive 12 | and that you have booted into BeOS. 13 | 14 |

15 |

    16 |
  1. Double-click the SheepShaver icon. The "SheepShaver Settings" window will appear. 17 |
  2. Click on "Start". SheepShaver will try to detect on which partition MacOS is installed and should then start booting MacOS. 18 |
  3. If this is the first time you start SheepShaver you will be asked if you want your 19 | network configuration to be modified to enable Ethernet networking under SheepShaver. 20 | If you want to use Ethernet with SheepShaver you should press "OK" (this will change the 21 | file /boot/home/config/settings/network; a backup of the the original file will 22 | be stored in network.orig). 23 |
  4. To quit SheepShaver, select "Shutdown" from the Finder's "Special" menu. 24 |
25 | 26 |

One word of caution:

27 | 28 | Volumes which are used by SheepShaver must not also be mounted under BeOS 29 | while SheepShaver is running. You will lose data and corrupt the 30 | volume if you do this! Don't press the "Mount all disks now" button in the 31 | BeOS "Disk Mount Settings" window while SheepShaver is running! 32 | 33 |
34 |
35 | SheepShaver User's Guide 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /doc/BeOS/serial.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/serial.gif -------------------------------------------------------------------------------- /doc/BeOS/volumes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/BeOS/volumes.gif -------------------------------------------------------------------------------- /doc/Linux/acknowledgements.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Acknowledgements 4 | 5 | 6 | 7 |

Acknowledgements

8 | 9 | The following persons/companies deserve special thanks from us as they 10 | made a significant contribution to the development of SheepShaver: 11 | 12 |

13 |

18 | 19 |
20 |
21 | SheepShaver User's Guide 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /doc/Linux/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Contact Information 4 | 5 | 6 | 7 |

Contact Information and Copyright

8 | 9 | SheepShaver was brought to you by 10 | 14 | 15 |

SheepShaver WWW Site:

16 |
17 | www.sheepshaver.com
18 |
19 | 20 |

EMail:

21 |
22 | sheep@sheepshaver.com
23 |
24 | 25 |

License

26 | 27 |

SheepShaver is available under the terms of the GNU General Public License. 28 | See the file "COPYING" that is included in the distribution for details. 29 | 30 |

© Copyright 1997-2004 Christian Bauer and Marc Hellwig 31 | 32 |

Names of hardware and software items mentioned in this manual and 33 | in program texts are in most cases registered trade marks of the respective 34 | companies and not marked as such. So the lack of such a note may not be 35 | used as an indication that these names are free. 36 | 37 |

SheepShaver is not designed, intended, or authorized for use as a component 38 | in systems intended for surgical implant within the body, or other applications intended 39 | to support or sustain life, or for any other application in which the failure of SheepShaver 40 | could create a situation where personal injury or death may occur (so-called "killer application"). 41 | 42 |


43 |
44 | SheepShaver User's Guide 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /doc/Linux/graphics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/graphics.gif -------------------------------------------------------------------------------- /doc/Linux/history.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Revision History 4 | 5 | 6 | 7 |

SheepShaver Revision History

8 | 9 |

V2.2 (04-Feb-2002)

10 | 14 | 15 |

V2.1 (31-Mar-2001)

16 | 19 | 20 |
21 |
22 | SheepShaver User's Guide 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/Linux/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/icon.gif -------------------------------------------------------------------------------- /doc/Linux/iconsmall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/iconsmall.gif -------------------------------------------------------------------------------- /doc/Linux/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The SheepShaver User's Guide 4 | 5 | 6 | 7 |

SheepShaver V2.2 Installation and User's Guide (Linux)

8 | 9 |

Contents

10 | 11 | 22 | 23 |
24 |
25 | SheepShaver User's Guide 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /doc/Linux/installation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Installation 4 | 5 | 6 | 7 |

Installation

8 | 9 | You need at least a 2.2.x kernel, glibc 2.1 and GTK+ 1.2. Earlier versions will not work. 10 | 11 |
    12 |
  1. Unpack the SheepShaver archive (if you are reading this, you probably have already done this) 13 |
  2. Even when running on a PowerMac, you need a copy of a PCI PowerMac ROM (4MB) in 14 | a file called "ROM" in the same folder SheepShaver is in (but you can select a different location 15 | in the settings window). SheepShaver can also use the "Mac OS ROM" file that comes with 16 | MacOS 8.5/8.6 (look in the System Folder on your MacOS CD). In order to legally use SheepShaver, 17 | you have to own the ROM the image file was taken from. 18 |
19 | 20 |
21 |
22 | SheepShaver User's Guide 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/Linux/introduction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction 4 | 5 | 6 | 7 |

Introduction

8 | 9 | SheepShaver is a MacOS run-time environment for Linux that allows you 10 | to run MacOS applications at native speed inside the Linux multitasking 11 | environment on PowerPC-based Linux systems. This means that both Linux 12 | and MacOS applications can run at the same time and data can be exchanged 13 | between them. 14 | 15 |

SheepShaver is neither a MacOS replacement nor an emulator. It runs an 16 | unmodified PowerPC MacOS under control of Linux at full speed without any 17 | kind of emulation. So it also uses the MacOS 68k emulator to run 68k 18 | applications. In this way, SheepShaver is comparable to the "Blue Box" of 19 | Apple's Rhapsody operating system. 20 | 21 |

Some of SheepShaver's features:

22 | 23 | 38 | 39 |
40 |
41 | SheepShaver User's Guide 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /doc/Linux/memory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/memory.gif -------------------------------------------------------------------------------- /doc/Linux/quickstart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Quick Start 4 | 5 | 6 | 7 |

Quick Start

8 | 9 | The following is a step-by-step guide that shows you how to get SheepShaver 10 | up and running in the quickest possible way. We assume that you are running 11 | on a PowerMac that already has MacOS installed on a partition of your hard drive 12 | and that you have booted into Linux. 13 | 14 |

15 |

    16 |
  1. Start the "SheepShaver" program. The "SheepShaver Settings" window will appear. 17 |
  2. Click on "Start". SheepShaver will try to detect on which partition MacOS is installed and should then start booting MacOS. 18 |
  3. To quit SheepShaver, select "Shutdown" from the Finder's "Special" menu. 19 |
20 | 21 | When SheepShaver hangs or crashes in fullscreen mode, pressing Ctrl-Esc should 22 | quit it and restore the display. 23 | 24 |

In fullscreen mode, press Ctrl-Tab to suspend SheepShaver and return to the 25 | normal X11 destop. Press space inside the "SheepShaver suspended" window to 26 | reactivate it. 27 | 28 |

One word of caution:

29 | 30 | Volumes which are used by SheepShaver must not also be mounted under Linux 31 | while SheepShaver is running. You will lose data and corrupt the 32 | volume if you do this! 33 | 34 |
35 |
36 | SheepShaver User's Guide 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /doc/Linux/serial.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/serial.gif -------------------------------------------------------------------------------- /doc/Linux/volumes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/doc/Linux/volumes.gif -------------------------------------------------------------------------------- /src/BeOS/CreatePCIDrivers/Makefile: -------------------------------------------------------------------------------- 1 | all: ../../EthernetDriverStub.i ../../VideoDriverStub.i 2 | 3 | clean: 4 | -rm *.o hexconv Ethernet Video 5 | 6 | ../../EthernetDriverStub.i: Ethernet hexconv 7 | hexconv $< $@ 8 | 9 | ../../VideoDriverStub.i: Video hexconv 10 | hexconv $< $@ 11 | 12 | hexconv: hexconv.cpp 13 | mwcc -o hexconv hexconv.cpp 14 | 15 | Ethernet.o: Ethernet.cpp 16 | mwcc -I.. -I../../include -o $@ -c $< 17 | 18 | Video.o: Video.cpp 19 | mwcc -I.. -I../../include -o $@ -c $< 20 | 21 | Ethernet: Ethernet.o 22 | mwldppc -xms -export pragma -nostdentry -nostdlib -o $@ $< 23 | 24 | Video: Video.o 25 | mwldppc -xms -export pragma -nostdentry -nostdlib -o $@ $< 26 | -------------------------------------------------------------------------------- /src/BeOS/CreatePCIDrivers/Video.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Video.cpp - SheepShaver video PCI driver stub 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "sysdeps.h" 22 | #include "xlowmem.h" 23 | 24 | 25 | /* 26 | * Driver Description structure 27 | */ 28 | 29 | struct DriverDescription { 30 | uint32 driverDescSignature; 31 | uint32 driverDescVersion; 32 | char nameInfoStr[32]; 33 | uint32 version; 34 | uint32 driverRuntime; 35 | char driverName[32]; 36 | uint32 driverDescReserved[8]; 37 | uint32 nServices; 38 | uint32 serviceCategory; 39 | uint32 serviceType; 40 | uint32 serviceVersion; 41 | }; 42 | 43 | #pragma export on 44 | struct DriverDescription TheDriverDescription = { 45 | 'mtej', 46 | 0, 47 | "\pvideo", 48 | 0x01008000, // V1.0.0final 49 | 6, // kDriverIsUnderExpertControl, kDriverIsOpenedUponLoad 50 | "\pDisplay_Video_Apple_Sheep", 51 | 0, 0, 0, 0, 0, 0, 0, 0, 52 | 1, 53 | 'ndrv', 54 | 'vido', 55 | 0x01000000, // V1.0.0 56 | }; 57 | #pragma export off 58 | 59 | 60 | // Prototypes for exported functions 61 | extern "C" { 62 | #pragma export on 63 | extern int16 DoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind); 64 | #pragma export off 65 | } 66 | 67 | 68 | /* 69 | * Do driver IO 70 | */ 71 | 72 | asm int16 DoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind) 73 | { 74 | lwz r2,XLM_TOC 75 | lwz r0,XLM_VIDEO_DOIO 76 | mtctr r0 77 | bctr 78 | } 79 | -------------------------------------------------------------------------------- /src/BeOS/CreatePCIDrivers/hexconv.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv) 4 | { 5 | if (argc != 3) { 6 | printf("Usage: %s \n", argv[0]); 7 | return 0; 8 | } 9 | 10 | FILE *fin = fopen(argv[1], "rb"); 11 | if (fin == NULL) { 12 | printf("Can't open '%s' for reading\n", argv[1]); 13 | return 0; 14 | } 15 | 16 | FILE *fout = fopen(argv[2], "w"); 17 | if (fout == NULL) { 18 | printf("Can't open '%s' for writing\n", argv[2]); 19 | return 0; 20 | } 21 | 22 | unsigned char buf[16]; 23 | while (!feof(fin)) { 24 | fprintf(fout, "\t"); 25 | int actual = fread(buf, 1, 16, fin); 26 | for (int i=0; i 9 | 10 | static area_id buffer_area; // Packet buffer area 11 | static net_buffer *net_buffer_ptr; // Pointer to packet buffer 12 | 13 | int main(void) 14 | { 15 | area_id handler_buffer; 16 | if ((handler_buffer = find_area("packet buffer")) < B_NO_ERROR) { 17 | printf("Can't find packet buffer\n"); 18 | return 10; 19 | } 20 | if ((buffer_area = clone_area("local packet buffer", &net_buffer_ptr, B_ANY_ADDRESS, B_READ_AREA | B_WRITE_AREA, handler_buffer)) < B_NO_ERROR) { 21 | printf("Can't clone packet buffer\n"); 22 | return 10; 23 | } 24 | 25 | uint8 *p = net_buffer_ptr->ether_addr; 26 | printf("Ethernet address : %02x %02x %02x %02x %02x %02x\n", p[0], p[1], p[2], p[3], p[4], p[5]); 27 | printf("read_sem : %d\n", net_buffer_ptr->read_sem); 28 | printf("read_ofs : %d\n", net_buffer_ptr->read_ofs); 29 | printf("read_packet_size : %d\n", net_buffer_ptr->read_packet_size); 30 | printf("read_packet_count : %d\n", net_buffer_ptr->read_packet_count); 31 | printf("write_sem : %d\n", net_buffer_ptr->write_sem); 32 | printf("write_ofs : %d\n", net_buffer_ptr->write_ofs); 33 | printf("write_packet_size : %d\n", net_buffer_ptr->write_packet_size); 34 | printf("write_packet_count: %d\n", net_buffer_ptr->write_packet_count); 35 | 36 | printf("\nRead packets:\n"); 37 | for (int i=0; iread[i]; 39 | printf("cmd : %08lx\n", p->cmd); 40 | printf("length: %d\n", p->length); 41 | } 42 | printf("\nWrite packets:\n"); 43 | for (int i=0; iwrite[i]; 45 | printf("cmd : %08lx\n", p->cmd); 46 | printf("length: %d\n", p->length); 47 | } 48 | return 0; 49 | } 50 | -------------------------------------------------------------------------------- /src/BeOS/SaveROM/README: -------------------------------------------------------------------------------- 1 | "SaveROM" is a program that allows you to save the ROM of 2 | a PowerMac running under BeOS to a file. 3 | 4 | 1. Copy "sheep_driver" to ~/config/add-ons/kernel/drivers. 5 | 2. Double-click the "SaveROM" icon. 6 | 7 | This will create a file called "ROM" which should be 4MB 8 | in size. 9 | -------------------------------------------------------------------------------- /src/BeOS/SaveROM/SaveROM.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/BeOS/SaveROM/SaveROM.rsrc -------------------------------------------------------------------------------- /src/BeOS/SheepDriver/sheep_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sheep_driver.h - Low memory and ROM access driver for SheepShaver and 3 | * Basilisk II on PowerPC systems 4 | * 5 | * SheepShaver (C) 1997-2008 Marc Hellwig and Christian Bauer 6 | * Basilisk II (C) 1997-2008 Christian Bauer 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef SHEEP_DRIVER_H 24 | #define SHEEP_DRIVER_H 25 | 26 | #include 27 | 28 | enum { 29 | SHEEP_UP = B_DEVICE_OP_CODES_END + 1, 30 | SHEEP_DOWN 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/BeOS/SheepNet/sheep_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sheep_net.h - Net server add-on for SheepShaver and Basilisk II 3 | * 4 | * SheepShaver (C) 1997-2008 Marc Hellwig and Christian Bauer 5 | * Basilisk II (C) 1997-2008 Christian Bauer 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef SHEEP_NET_H 23 | #define SHEEP_NET_H 24 | 25 | // Net buffer dimensions 26 | #define READ_PACKET_COUNT 10 27 | #define WRITE_PACKET_COUNT 10 28 | 29 | // Net packet 30 | struct net_packet { 31 | uint32 cmd; // Command 32 | uint32 length; // Data length 33 | uint32 card; // Network card ID 34 | uint32 reserved; 35 | uint8 data[1584]; 36 | }; 37 | 38 | // Net buffer (shared area) 39 | struct net_buffer { 40 | uint8 ether_addr[6]; // Ethernet address 41 | uint8 filler1[2]; 42 | sem_id read_sem; // Semaphore for read packets 43 | uint32 read_ofs; 44 | uint32 read_packet_size; 45 | uint32 read_packet_count; 46 | sem_id write_sem; // Semaphore for write packets 47 | uint32 write_ofs; 48 | uint32 write_packet_size; 49 | uint32 write_packet_count; 50 | uint8 filler[24]; 51 | net_packet read[READ_PACKET_COUNT]; 52 | net_packet write[WRITE_PACKET_COUNT]; 53 | }; 54 | 55 | // Packet commands 56 | #define SHEEP_PACKET 0 57 | #define ADD_MULTICAST 1 58 | #define REMOVE_MULTICAST 2 59 | #define ACTIVATE_SHEEP_NET 8 60 | #define DEACTIVATE_SHEEP_NET 9 61 | #define SHUTDOWN_SHEEP_NET 10 62 | 63 | #define IN_USE 1 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /src/BeOS/SheepShaver.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/BeOS/SheepShaver.rsrc -------------------------------------------------------------------------------- /src/BeOS/audio_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/audio_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/extfs_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/extfs_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/scsi_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/scsi_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/serial_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/serial_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/sys_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/sys_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/sysdeps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sysdeps.h - System dependent definitions for BeOS 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef SYSDEPS_H 22 | #define SYSDEPS_H 23 | 24 | // Do we have std namespace? 25 | #ifdef __POWERPC__ 26 | #define NO_STD_NAMESPACE 27 | #endif 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include "user_strings_beos.h" 34 | 35 | // Are we using a PPC emulator or the real thing? 36 | #ifdef __POWERPC__ 37 | #define EMULATED_PPC 0 38 | #define WORDS_BIGENDIAN 1 39 | #define SYSTEM_CLOBBERS_R2 1 40 | #else 41 | #define EMULATED_PPC 1 42 | #undef WORDS_BIGENDIAN 43 | #endif 44 | 45 | // High precision timing 46 | #define PRECISE_TIMING 1 47 | #define PRECISE_TIMING_BEOS 1 48 | 49 | #define POWERPC_ROM 1 50 | 51 | // Time data type for Time Manager emulation 52 | typedef bigtime_t tm_time_t; 53 | 54 | // 64 bit file offsets 55 | typedef off_t loff_t; 56 | 57 | // Data types 58 | typedef uint32 uintptr; 59 | typedef int32 intptr; 60 | 61 | // Timing functions 62 | extern void Delay_usec(uint32 usec); 63 | 64 | // Macro for calling MacOS routines 65 | #define CallMacOS(type, proc) (*(type)proc)() 66 | #define CallMacOS1(type, proc, arg1) (*(type)proc)(arg1) 67 | #define CallMacOS2(type, proc, arg1, arg2) (*(type)proc)(arg1, arg2) 68 | #define CallMacOS3(type, proc, arg1, arg2, arg3) (*(type)proc)(arg1, arg2, arg3) 69 | #define CallMacOS4(type, proc, arg1, arg2, arg3, arg4) (*(type)proc)(arg1, arg2, arg3, arg4) 70 | #define CallMacOS5(type, proc, arg1, arg2, arg3, arg4, arg5) (*(type)proc)(arg1, arg2, arg3, arg4, arg5) 71 | #define CallMacOS6(type, proc, arg1, arg2, arg3, arg4, arg5, arg6) (*(type)proc)(arg1, arg2, arg3, arg4, arg5, arg6) 72 | #define CallMacOS7(type, proc, arg1, arg2, arg3, arg4, arg5, arg6, arg7) (*(type)proc)(arg1, arg2, arg3, arg4, arg5, arg6, arg7) 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /src/BeOS/timer_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/timer_beos.cpp -------------------------------------------------------------------------------- /src/BeOS/user_strings_beos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_beos.h - BeOS-specific localizable strings 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef USER_STRINGS_BEOS_H 22 | #define USER_STRINGS_BEOS_H 23 | 24 | enum { 25 | STR_NO_SHEEP_DRIVER_ERR = 10000, 26 | STR_NO_ROM_AREA_ERR, 27 | STR_SHEEP_UP_ERR, 28 | STR_NO_NET_ADDON_WARN, 29 | STR_NET_CONFIG_MODIFY_WARN, 30 | STR_NET_ADDON_INIT_FAILED, 31 | STR_NET_ADDON_CLONE_FAILED, 32 | STR_NO_SHEEP_MEM_AREA_ERR, 33 | STR_NO_DR_CACHE_AREA_ERR, 34 | STR_NO_DR_EMULATOR_AREA_ERR 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/BeOS/xpram_beos.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/BeOS/xpram_beos.cpp -------------------------------------------------------------------------------- /src/CrossPlatform/sigsegv.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/sigsegv.cpp -------------------------------------------------------------------------------- /src/CrossPlatform/sigsegv.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/sigsegv.h -------------------------------------------------------------------------------- /src/CrossPlatform/video_blit.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/video_blit.cpp -------------------------------------------------------------------------------- /src/CrossPlatform/video_blit.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/video_blit.h -------------------------------------------------------------------------------- /src/CrossPlatform/video_vosf.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/video_vosf.h -------------------------------------------------------------------------------- /src/CrossPlatform/vm_alloc.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/vm_alloc.cpp -------------------------------------------------------------------------------- /src/CrossPlatform/vm_alloc.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/CrossPlatform/vm_alloc.h -------------------------------------------------------------------------------- /src/EthernetDriver/.finf/Ethernet.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/.finf/Ethernet.mcp -------------------------------------------------------------------------------- /src/EthernetDriver/.finf/ethernet.ndrv: -------------------------------------------------------------------------------- 1 | shlb???? -------------------------------------------------------------------------------- /src/EthernetDriver/.rsrc/ethernet.ndrv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/.rsrc/ethernet.ndrv -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/.finf/CWSettingsMacOS.stg: -------------------------------------------------------------------------------- 1 | TDATCWIE -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/.finf/PPC Debug MacOS Toolbox: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/.finf/PPC Final MacOS Toolbox: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/CWSettingsMacOS.stg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet Data/CWSettingsMacOS.stg -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Debug MacOS Toolbox/.finf/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- 1 | TDATCWIE -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Debug MacOS Toolbox/.rsrc/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet Data/PPC Debug MacOS Toolbox/.rsrc/TargetDataMacOS.tdt -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Debug MacOS Toolbox/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet Data/PPC Debug MacOS Toolbox/TargetDataMacOS.tdt -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Final MacOS Toolbox/.finf/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- 1 | TDATCWIE -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Final MacOS Toolbox/.rsrc/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet Data/PPC Final MacOS Toolbox/.rsrc/TargetDataMacOS.tdt -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet Data/PPC Final MacOS Toolbox/TargetDataMacOS.tdt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet Data/PPC Final MacOS Toolbox/TargetDataMacOS.tdt -------------------------------------------------------------------------------- /src/EthernetDriver/Ethernet.mcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/Ethernet.mcp -------------------------------------------------------------------------------- /src/EthernetDriver/cpu_emulation.h: -------------------------------------------------------------------------------- 1 | #ifndef CPU_EMULATION_H #define CPU_EMULATION_H static inline uint32 ReadMacInt32(uint32 addr) {return *(uint32 *)addr;} static inline uint32 Host2MacAddr(uint8 *addr) {return (uint32)addr;} static inline uint8 *Mac2HostAddr(uint32 addr) {return (uint8 *)addr;} static inline void *Mac_memset(uint32 addr, int c, size_t n) {return memset(Mac2HostAddr(addr), c, n);} static inline void *Mac2Host_memcpy(uint8 *dst, uint32 src, size_t n) {return memcpy(dst,Mac2HostAddr(src),n);} #endif /* CPU_EMULATION */ -------------------------------------------------------------------------------- /src/EthernetDriver/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_H #define DEBUG_H #define D(x) #include #define bug printf #endif /* DEBUG_H */ -------------------------------------------------------------------------------- /src/EthernetDriver/ethernet.ndrv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/EthernetDriver/ethernet.ndrv -------------------------------------------------------------------------------- /src/EthernetDriver/macos_util.h: -------------------------------------------------------------------------------- 1 | #ifndef MACOS_UTIL_H #define MACOS_UTIL_H // Macro for calling MacOS routines #define CallMacOS(type, tvect) call_macos((uintptr)tvect) #define CallMacOS1(type, tvect, arg1) call_macos1((uintptr)tvect, (uintptr)arg1) #define CallMacOS2(type, tvect, arg1, arg2) call_macos2((uintptr)tvect, (uintptr)arg1, (uintptr)arg2) #define CallMacOS3(type, tvect, arg1, arg2, arg3) call_macos3((uintptr)tvect, (uintptr)arg1, (uintptr)arg2, (uintptr)arg3) #define CallMacOS4(type, tvect, arg1, arg2, arg3, arg4) call_macos4((uintptr)tvect, (uintptr)arg1, (uintptr)arg2, (uintptr)arg3, (uintptr)arg4) #define CallMacOS5(type, tvect, arg1, arg2, arg3, arg4, arg5) call_macos5((uintptr)tvect, (uintptr)arg1, (uintptr)arg2, (uintptr)arg3, (uintptr)arg4, (uintptr)arg5) #define CallMacOS6(type, tvect, arg1, arg2, arg3, arg4, arg5, arg6) call_macos6((uintptr)tvect, (uintptr)arg1, (uintptr)arg2, (uintptr)arg3, (uintptr)arg4, (uintptr)arg5, (uintptr)arg6) #define CallMacOS7(type, tvect, arg1, arg2, arg3, arg4, arg5, arg6, arg7) call_macos7((uintptr)tvect, (uintptr)arg1, (uintptr)arg2, (uintptr)arg3, (uintptr)arg4, (uintptr)arg5, (uintptr)arg6, (uintptr)arg7) #ifdef __cplusplus extern "C" { #endif extern uint32 call_macos(uint32 tvect); extern uint32 call_macos1(uint32 tvect, uint32 arg1); extern uint32 call_macos2(uint32 tvect, uint32 arg1, uint32 arg2); extern uint32 call_macos3(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3); extern uint32 call_macos4(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4); extern uint32 call_macos5(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5); extern uint32 call_macos6(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6); extern uint32 call_macos7(uint32 tvect, uint32 arg1, uint32 arg2, uint32 arg3, uint32 arg4, uint32 arg5, uint32 arg6, uint32 arg7); #ifdef __cplusplus } #endif // Construct four-character-code from string #define FOURCC(a,b,c,d) (((uint32)(a) << 24) | ((uint32)(b) << 16) | ((uint32)(c) << 8) | (uint32)(d)) extern uint32 FindLibSymbol(char *lib, char *sym); // Find symbol in shared library extern uint32 Mac_sysalloc(uint32 size); // Allocate block in MacOS system heap zone extern void Mac_sysfree(uint32 addr); // Release block occupied by the nonrelocatable block p #endif /* MACOS_UTIL_H */ -------------------------------------------------------------------------------- /src/EthernetDriver/sysdeps.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSDEPS_H #define SYSDEPS_H #include #define SIZEOF_VOID_P 4 #define WORDS_BIGENDIAN 1 #define REAL_ADDRESSING 1 /* Define to build the Ethernet driver completly in MacOS space */ #define BUILD_ETHER_FULL_DRIVER 1 #define ntohl(x) ((uint32)(x)) #define ntohs(x) ((uint16)(x)) #define assert(expr) typedef int bool; typedef signed char int8; typedef signed short int16; typedef signed int int32; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef uint32 uintptr; #endif /* SYSDEPS_H */ -------------------------------------------------------------------------------- /src/MacOSX/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode build files 2 | build/* 3 | SheepShaver.xcodeproj/*.mode1v3 4 | SheepShaver.xcodeproj/*.pbxuser 5 | 6 | # autoconf build generated Info.plist file 7 | Info.plist 8 | -------------------------------------------------------------------------------- /src/MacOSX/AudioBackEnd.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/AudioBackEnd.cpp -------------------------------------------------------------------------------- /src/MacOSX/AudioBackEnd.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/AudioBackEnd.h -------------------------------------------------------------------------------- /src/MacOSX/AudioDevice.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/AudioDevice.cpp -------------------------------------------------------------------------------- /src/MacOSX/AudioDevice.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/AudioDevice.h -------------------------------------------------------------------------------- /src/MacOSX/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SheepShaver 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | APPL 13 | CFBundleSignature 14 | ???? 15 | CFBundleVersion 16 | @PACKAGE_VERSION@ 17 | CFBundleShortVersionString 18 | @PACKAGE_VERSION@ 19 | CFBundleIconFile 20 | SheepShaver.icns 21 | CSResourcesFileMapped 22 | 23 | CFBundleDocumentTypes 24 | 25 | 26 | CFBundleTypeExtensions 27 | 28 | sheepvm 29 | 30 | CFBundleTypeIconFile 31 | SheepVM.icns 32 | CFBundleTypeName 33 | SheepShaver VM 34 | CFBundleTypeRole 35 | Editor 36 | LSTypeIsPackage 37 | 38 | 39 | 40 | LSArchitecturePriority 41 | 42 | x86_64 43 | 44 | LSMinimumSystemVersionByArchitecture 45 | 46 | x86_64 47 | 10.7.0 48 | 49 | NSHighResolutionCapable 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/AppController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AppController.h - Cocoa SheepShaver launcher for Mac OS X 3 | * 4 | * Copyright (C) 2009 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #import 22 | 23 | @interface AppController : NSObject { 24 | } 25 | 26 | - (void) awakeFromNib; 27 | 28 | - (IBAction) openVirtualMachinesList: (id) sender; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/AppController.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * AppController.mm - Cocoa SheepShaver launcher for Mac OS X 3 | * 4 | * Copyright (C) 2009 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #import "AppController.h" 22 | #import "VMListController.h" 23 | 24 | @implementation AppController 25 | 26 | - (void) awakeFromNib 27 | { 28 | [self openVirtualMachinesList:self]; 29 | [NSApp setDelegate:self]; 30 | } 31 | 32 | - (IBAction) openVirtualMachinesList: (id) sender 33 | { 34 | [[VMListController sharedInstance] showWindow:sender]; 35 | } 36 | 37 | - (BOOL) applicationShouldHandleReopen: (NSApplication *) app hasVisibleWindows: (BOOL) hasVisible 38 | { 39 | if (!hasVisible) 40 | [self openVirtualMachinesList:self]; 41 | return YES; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/DiskType.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiskType.h 3 | // SheepShaver 4 | // 5 | // Created by maximilian on 01.02.14. 6 | // Copyright 2014 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface DiskType : NSObject { 13 | NSString* _path; 14 | BOOL _isCDROM; 15 | } 16 | 17 | -(NSString*)path; 18 | -(BOOL)isCDROM; 19 | 20 | -(void)setPath:(NSString*)thePath; 21 | -(void)setIsCDROM:(BOOL)cdrom; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/DiskType.m: -------------------------------------------------------------------------------- 1 | // 2 | // DiskType.m 3 | // SheepShaver 4 | // 5 | // Created by maximilian on 01.02.14. 6 | // Copyright 2014 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "DiskType.h" 10 | 11 | 12 | @implementation DiskType 13 | -(NSString*)path 14 | { 15 | return _path; 16 | } 17 | -(BOOL)isCDROM 18 | { 19 | return _isCDROM; 20 | } 21 | 22 | -(void)setPath:(NSString*)thePath 23 | { 24 | _path = [thePath copy]; 25 | } 26 | -(void)setIsCDROM:(BOOL)cdrom 27 | { 28 | _isCDROM=cdrom; 29 | } 30 | 31 | -(NSString*)description { 32 | return [NSString stringWithFormat:@"DiskType, path:%@ isCDROM:%hhd", _path, _isCDROM]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/Launcher/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBClasses 6 | 7 | 8 | CLASS 9 | FirstResponder 10 | LANGUAGE 11 | ObjC 12 | SUPERCLASS 13 | NSObject 14 | 15 | 16 | ACTIONS 17 | 18 | openVirtualMachinesList 19 | id 20 | 21 | CLASS 22 | AppController 23 | LANGUAGE 24 | ObjC 25 | SUPERCLASS 26 | NSObject 27 | 28 | 29 | IBVersion 30 | 1 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 677 7 | IBLastKnownRelativeProjectPath 8 | ../SheepShaverLauncher.xcodeproj 9 | IBOldestOS 10 | 4 11 | IBOpenObjects 12 | 13 | IBSystem Version 14 | 9J61 15 | targetFramework 16 | IBCocoaFramework 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/Launcher/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/VMListWindow.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/Launcher/English.lproj/VMListWindow.nib/keyedobjects.nib -------------------------------------------------------------------------------- /src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/keyedobjects.nib -------------------------------------------------------------------------------- /src/MacOSX/Launcher/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | SheepShaver.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | SheepShaver 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 2.3 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/LauncherPrefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LauncherPrefix.h 3 | * 4 | * Copyright (C) 2010 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef LAUNCHERPREFIX_H 22 | #define LAUNCHERPREFIX_H 23 | 24 | #define CONFIG_H 25 | #define STDC_HEADERS 26 | #define SIZEOF_DOUBLE 8 27 | #define SIZEOF_FLOAT 4 28 | #define SIZEOF_INT 4 29 | #define SIZEOF_LONG_LONG 8 30 | #define SIZEOF_SHORT 2 31 | 32 | #ifdef __LP64__ 33 | #define SIZEOF_VOID_P 8 34 | #define SIZEOF_LONG 8 35 | #else 36 | #define SIZEOF_VOID_P 4 37 | #define SIZEOF_LONG 4 38 | #endif 39 | 40 | #define loff_t off_t 41 | 42 | #endif /* LAUNCHERPREFIX_H */ 43 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/VMListController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * VMListController.h - SheepShaver VM manager in Cocoa on Mac OS X 3 | * 4 | * Copyright (C) 2009 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #import 22 | 23 | @interface VMListController : NSWindowController 24 | #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 25 | 26 | #endif 27 | { 28 | IBOutlet NSTableView *vmList; 29 | IBOutlet NSButton *newButton; 30 | IBOutlet NSButton *importButton; 31 | IBOutlet NSButton *settingsButton; 32 | IBOutlet NSButton *launchButton; 33 | NSMutableDictionary *tasks; 34 | NSMutableArray *vmArray; 35 | NSString *vmBeingDragged; 36 | } 37 | 38 | + (id) sharedInstance; 39 | 40 | - (id) init; 41 | - (void) awakeFromNib; 42 | 43 | - (IBAction) newVirtualMachine: (id) sender; 44 | - (IBAction) importVirtualMachine: (id) sender; 45 | - (IBAction) editVirtualMachineSettings: (id) sender; 46 | - (IBAction) launchVirtualMachine: (id) sender; 47 | - (IBAction) deleteVirtualMachine: (id) sender; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /src/MacOSX/Launcher/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * main.m - Cocoa SheepShaver launcher for Mac OS X 3 | * 4 | * Copyright (C) 2006-2009 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #import 22 | 23 | int main(int argc, char *argv[]) 24 | { 25 | return NSApplicationMain(argc, (const char **) argv); 26 | } 27 | -------------------------------------------------------------------------------- /src/MacOSX/MacOSX_sound_if.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/MacOSX_sound_if.cpp -------------------------------------------------------------------------------- /src/MacOSX/MacOSX_sound_if.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/MacOSX_sound_if.h -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/PrefsEditor/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 4 | { 5 | ACTIONS = { 6 | addDisk = id; 7 | browseForROMFileClicked = id; 8 | createDisk = id; 9 | removeDisk = id; 10 | useRawKeyCodesClicked = id; 11 | }; 12 | CLASS = PrefsEditor; 13 | LANGUAGE = ObjC; 14 | OUTLETS = { 15 | bootFrom = NSComboBox; 16 | disableCdrom = NSButton; 17 | disableSound = NSButton; 18 | diskSaveSize = NSView; 19 | diskSaveSizeField = NSTextField; 20 | disks = NSTableView; 21 | dontUseCPUWhenIdle = NSButton; 22 | enable68kDREmulator = NSButton; 23 | enableJIT = NSButton; 24 | ethernetInterface = NSTextField; 25 | height = NSComboBox; 26 | ignoreIllegalMemoryAccesses = NSButton; 27 | mixDevice = NSTextField; 28 | modemPort = NSTextField; 29 | mouseWheel = NSPopUpButton; 30 | outDevice = NSTextField; 31 | printerPort = NSTextField; 32 | qdAccel = NSButton; 33 | ramSize = NSTextField; 34 | ramSizeStepper = NSStepper; 35 | rawKeyCodes = NSTextField; 36 | refreshRate = NSPopUpButton; 37 | romFile = NSTextField; 38 | scrollLines = NSTextField; 39 | scrollLinesStepper = NSStepper; 40 | unixRoot = NSTextField; 41 | useRawKeyCodes = NSButton; 42 | videoType = NSPopUpButton; 43 | width = NSComboBox; 44 | window = NSWindow; 45 | }; 46 | SUPERCLASS = NSObject; 47 | } 48 | ); 49 | IBVersion = 1; 50 | } -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 135 142 356 240 0 0 1680 1028 7 | IBEditorPositions 8 | 9 | 29 10 | 132 352 305 44 0 0 1680 1028 11 | 342 12 | 715 652 249 104 0 0 1680 1028 13 | 14 | IBFramework Version 15 | 446.1 16 | IBOpenObjects 17 | 18 | 29 19 | 20 | IBSystem Version 21 | 8R2218 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/PrefsEditor/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0.1 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * main.m - Preferences editing in Cocoa on Mac OS X 3 | * 4 | * Copyright (C) 2006-2007 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #import 22 | 23 | int main(int argc, char *argv[]) 24 | { 25 | return NSApplicationMain(argc, (const char **) argv); 26 | } 27 | -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/standalone_nib/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/PrefsEditor/standalone_nib/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/standalone_nib/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 629 7 | IBOldestOS 8 | 5 9 | IBOpenObjects 10 | 11 | IBSystem Version 12 | 9D34 13 | targetFramework 14 | IBCocoaFramework 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/MacOSX/PrefsEditor/standalone_nib/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/PrefsEditor/standalone_nib/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /src/MacOSX/SheepShaver.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/MacOSX/SheepShaver.icns -------------------------------------------------------------------------------- /src/MacOSX/XcodeBuildHowTo.txt: -------------------------------------------------------------------------------- 1 | The Xcode SheepShaver project makes it easier to build SheepShaver as a 2 | Universal Binary (with 3 architectures: i386, x86_64 and ppc). 3 | 4 | This is an optional build system that does not affect the existing 5 | autogen/configure based build system, which is still fully supported. 6 | The Xcode project will build SheepShaver with configuration 7 | "--enable-sdl-audio --enable-sdl-video --disable-vosf". 8 | 9 | The Xcode project lives in has been tested to work on Snow Leopard 10 | 64-bit with Xcode 3.2.6 and the 10.4 SDK installed. It may not work 11 | under newer versions of Xcode or Mac OS X. 12 | 13 | To use it, you need the following: 14 | 15 | 1. A complete 'macemu' git checkout of SheepShaver and BasiliskII. 16 | 2. SDL 1.2 installed as a framework in /Library/Frameworks/SDL.framework. 17 | 3. You do not need to run autogen.sh / configure to use the Xcode 18 | project. If you've done so already, you should remove or temporarily 19 | move/rename src/Unix/config.h, as the presence of that file currently 20 | conflicts with the Xcode build and will cause errors in Xcode. 21 | 22 | With the above all set, you should be able to launch the Xcode project 23 | and build SheepShaver, resulting in a UB build containing SDL as a 24 | private framework in the bundle. The result will be located in either 25 | SheepShaver/src/MacOSX/build/Debug or SheepShaver/src/MacOSX/build/Release 26 | directories, depending if you do a Debug or Release build. 27 | 28 | 29 | There is also an Xcode 8 project file for use with Xcode 8 and newer 30 | (e.g. 8.2 on 10.11 or 10.12). The main differences are: 31 | 32 | 1. This builds a i386 version of SheepShaver instead of Universal Binary. 33 | This is because since PPC is not supported by Xcode 8 and newer versions of 34 | OS X disallow having memory mapped at page zero for 64-bit applications, 35 | which SheepShaver requires. 36 | 37 | 2. Since the SheepShaver JIT-generation compilation does not support Clang, 38 | this build uses prebuilt and checked-in dyngen source files, rather than 39 | building dyngen and generating them with it, as is done normally during the 40 | SheepShaver build process. 41 | -------------------------------------------------------------------------------- /src/MacOSX/audio_macosx.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/audio_macosx.cpp -------------------------------------------------------------------------------- /src/MacOSX/autorelease.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/autorelease.h -------------------------------------------------------------------------------- /src/MacOSX/clip_macosx.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/clip_macosx.cpp -------------------------------------------------------------------------------- /src/MacOSX/clip_macosx64.mm: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/clip_macosx64.mm -------------------------------------------------------------------------------- /src/MacOSX/config/config.h: -------------------------------------------------------------------------------- 1 | #if defined(__x86_64__) 2 | #include "config-macosx-x86_64.h" 3 | #elif defined(__i386__) 4 | #include "config-macosx-x86_32.h" 5 | #elif defined(__ppc__) 6 | #include "config-macosx-ppc_32.h" 7 | #else 8 | #error Unknown platform 9 | #endif -------------------------------------------------------------------------------- /src/MacOSX/extfs_macosx.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/extfs_macosx.cpp -------------------------------------------------------------------------------- /src/MacOSX/macos_util_macosx.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/macos_util_macosx.h -------------------------------------------------------------------------------- /src/MacOSX/sys_darwin.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/sys_darwin.cpp -------------------------------------------------------------------------------- /src/MacOSX/utils_macosx.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/utils_macosx.h -------------------------------------------------------------------------------- /src/MacOSX/utils_macosx.mm: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/MacOSX/utils_macosx.mm -------------------------------------------------------------------------------- /src/SDL/SDLMain.h: -------------------------------------------------------------------------------- 1 | /* SDLMain.m - main entry point for our Cocoa-ized SDL app 2 | Initial Version: Darrell Walisser 3 | Non-NIB-Code & other changes: Max Horn 4 | 5 | Feel free to customize this file to suit your needs 6 | */ 7 | 8 | #ifndef _SDLMain_h_ 9 | #define _SDLMain_h_ 10 | 11 | #import 12 | 13 | @interface SDLMain : NSObject 14 | @end 15 | 16 | #endif /* _SDLMain_h_ */ 17 | -------------------------------------------------------------------------------- /src/SDL/xpram_sdl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram_sdl.cpp - XPRAM handling, SDL implementation 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "sysdeps.h" 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "xpram.h" 28 | 29 | 30 | // XPRAM file name and path 31 | const char XPRAM_FILE_NAME[] = ".basilisk_ii_xpram"; 32 | 33 | 34 | /* 35 | * Load XPRAM from settings file 36 | */ 37 | 38 | void LoadXPRAM(const char *dir) 39 | { 40 | // Build a full-path to the file 41 | char full_path[4096]; 42 | if (!dir) { 43 | dir = SDL_getenv("HOME"); 44 | } 45 | if (!dir) { 46 | dir = "./"; 47 | } 48 | SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); 49 | 50 | // Open the XPRAM file 51 | FILE *f = fopen(full_path, "rb"); 52 | if (f != NULL) { 53 | fread(XPRAM, 256, 1, f); 54 | fclose(f); 55 | } 56 | } 57 | 58 | 59 | /* 60 | * Save XPRAM to settings file 61 | */ 62 | 63 | void SaveXPRAM(void) 64 | { 65 | // Build a full-path to the file 66 | char full_path[4096]; 67 | const char *dir = SDL_getenv("HOME"); 68 | if (!dir) { 69 | dir = "./"; 70 | } 71 | SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); 72 | 73 | // Save the XPRAM file 74 | FILE *f = fopen(XPRAM_FILE_NAME, "wb"); 75 | if (f != NULL) { 76 | fwrite(XPRAM, 256, 1, f); 77 | fclose(f); 78 | } 79 | } 80 | 81 | 82 | /* 83 | * Delete PRAM file 84 | */ 85 | 86 | void ZapPRAM(void) 87 | { 88 | // Build a full-path to the file 89 | char full_path[4096]; 90 | const char *dir = SDL_getenv("HOME"); 91 | if (!dir) { 92 | dir = "./"; 93 | } 94 | SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); 95 | 96 | // Delete the XPRAM file 97 | remove(full_path); 98 | } 99 | -------------------------------------------------------------------------------- /src/Unix/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | obj/* 3 | SheepShaver 4 | 5 | # Autotools generated files 6 | Makefile 7 | aclocal.m4 8 | autom4te.cache/* 9 | config.h 10 | config.h.in 11 | config.log 12 | config.status 13 | configure 14 | 15 | # Generated files for CPU emulation 16 | basic-dyngen-ops.hpp 17 | ppc-dyngen-ops.hpp 18 | ppc-execute-impl.cpp 19 | dyngen 20 | 21 | # Generated files from the Xcode build 22 | basic-dyngen-ops-x86_32.hpp 23 | basic-dyngen-ops-x86_64.hpp 24 | ppc-dyngen-ops-x86_32.hpp 25 | ppc-dyngen-ops-x86_64.hpp 26 | -------------------------------------------------------------------------------- /src/Unix/Darwin/.gitignore: -------------------------------------------------------------------------------- 1 | # Darwin built utils 2 | lowmem 3 | pagezero 4 | -------------------------------------------------------------------------------- /src/Unix/Darwin/lowmem.c: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Darwin/lowmem.c -------------------------------------------------------------------------------- /src/Unix/Darwin/mkstandalone: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Darwin/mkstandalone -------------------------------------------------------------------------------- /src/Unix/Darwin/pagezero.c: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Darwin/pagezero.c -------------------------------------------------------------------------------- /src/Unix/Darwin/testlmem.sh: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Darwin/testlmem.sh -------------------------------------------------------------------------------- /src/Unix/Irix/audio_irix.cpp: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Irix/audio_irix.cpp -------------------------------------------------------------------------------- /src/Unix/Linux/NetDriver/README.md: -------------------------------------------------------------------------------- 1 | # What 2 | ​ 3 | sheep_net is a character virtual device that bridge between BasiliskII and Physical Ethernet card(P) 4 | 5 | Here is logical diagram: 6 | 7 | Guest Mac OS in emulation (G) <==> Basilisk II (B) <==> /dev/sheep_net (S) <==> Physical Ethernet card on host (P) 8 | 9 | sheep_net module masquerade and de-masquerade MAC address on Ethernet frame so that Guest OS and host share the same MAC address with different IP. 10 | 11 | See details in [IP aliasing](https://en.wikipedia.org/wiki/IP_aliasing) 12 | 13 | # How 14 | ## How it works 15 | 16 | Sample Setting: 17 | 18 | Guest Mac OS IP: 192.168.2.2, Fake MAC address: 84:38:35:5e:c5:5b 19 | 20 | Host OS Physical Ethernet car IP: 192.168.2.3, physical MAC address: 84:38:35:5e:c5:5a 21 | 22 | From outside, we see 192.168.2.2 and 192.168.2.3 share the same physical MAC address: 84:38:35:5e:c5:5a 23 | 24 | From insides, sheep_net module masquerade and de-masquerade MAC address of Ethernet packet between Basilisk and 25 | 26 | ``` 27 | B ==> S ==> P: de-masquerade MAC, convert Fake to Physical 28 | B <== S <== P: masquerade MAC, convert Physical to Fake 29 | ``` 30 | 31 | ## How to compile 32 | ``` 33 | ​cd Linux/NetDriver 34 | make 35 | //create sheep_net device node 36 | sudo make dev 37 | sudo chown [user account] /dev/sheep_net 38 | sudo make install 39 | sudo modprobe sheep_net 40 | ``` 41 | 42 | ## How to use 43 | 1. Disable IP forwarding on host (Recommended: By disabling it, guest OS won't receive duplicate IP packet from host again.) 44 | 2. Disable firewall on host (Recommended: host may send ICMP host unreachable to gateway. Or you can disable ICMP sending from host by changing iptables.) 45 | 3. sudo modprobe sheep_net 46 | 4. sudo chown [user account] /dev/sheep_net 47 | 5. Launch BasiliskII, choose your physical Ethernet card interface in network tab 48 | -------------------------------------------------------------------------------- /src/Unix/Linux/scsi_linux.cpp: -------------------------------------------------------------------------------- 1 | ../../../../BasiliskII/src/Unix/Linux/scsi_linux.cpp -------------------------------------------------------------------------------- /src/Unix/SheepShaver.1: -------------------------------------------------------------------------------- 1 | .TH SheepShaver 1 "April, 2000" 2 | .SH NAME 3 | SheepShaver \- Macintosh emulator 4 | .SH SYNOPSIS 5 | .B SheepShaver 6 | [\-display 7 | .IR display-name ] 8 | .SH DESCRIPTION 9 | .B SheepShaver 10 | is a Macintosh emulator for PowerPC-based Linux systems. 11 | For more information, see the included documentation. 12 | .SH OPTIONS 13 | .TP 14 | .BI "\-display " display-name 15 | specifies the display to use; see 16 | .BR X (1) 17 | .SH FILES 18 | .TP 19 | .I ~/.sheepshaver_prefs 20 | User-specific configuration file. 21 | .TP 22 | .I ~/.sheeshaver_nvram 23 | Contents of Mac non-volatile RAM. 24 | .SH SEE ALSO 25 | http://www.sheepshaver.com/ (Official SheepShaver homepage) 26 | .SH AUTHORS 27 | Christian Bauer 28 | .br 29 | Marc Hellwig 30 | -------------------------------------------------------------------------------- /src/Unix/about_window_unix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * about_window_unix.cpp - "About" window, Unix implementation 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "about_window.h" 22 | 23 | 24 | /* 25 | * Open "About" window 26 | */ 27 | 28 | void OpenAboutWindow(void) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Unix/audio_oss_esd.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/audio_oss_esd.cpp -------------------------------------------------------------------------------- /src/Unix/autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | # This was lifted from the Gimp, and adapted slightly by 4 | # Christian Bauer. 5 | 6 | DIE=0 7 | 8 | PROG="SheepShaver" 9 | 10 | # Check how echo works in this /bin/sh 11 | case `echo -n` in 12 | -n) _echo_n= _echo_c='\c';; 13 | *) _echo_n=-n _echo_c=;; 14 | esac 15 | 16 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { 17 | echo 18 | echo "You must have autoconf installed to compile $PROG." 19 | echo "Download the appropriate package for your distribution," 20 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 21 | DIE=1 22 | } 23 | 24 | (aclocal --version) < /dev/null > /dev/null 2>&1 || { 25 | echo 26 | echo "**Error**: Missing aclocal. The version of automake" 27 | echo "installed doesn't appear recent enough." 28 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" 29 | echo "(or a newer version if it is available)" 30 | DIE=1 31 | } 32 | 33 | if test "$DIE" -eq 1; then 34 | exit 1 35 | fi 36 | 37 | if test -z "$ACLOCAL_FLAGS"; then 38 | ACLOCAL_FLAGS="-I `aclocal --print-ac-dir` -I m4" 39 | fi 40 | 41 | aclocalinclude="$ACLOCAL_FLAGS"; \ 42 | (echo $_echo_n " + Running aclocal: $_echo_c"; \ 43 | aclocal $aclocalinclude; \ 44 | echo "done.") && \ 45 | (echo $_echo_n " + Running autoheader: $_echo_c"; \ 46 | autoheader; \ 47 | echo "done.") && \ 48 | (echo $_echo_n " + Running autoconf: $_echo_c"; \ 49 | autoconf; \ 50 | echo "done.") 51 | 52 | rm -f config.cache 53 | 54 | if [ x"$NO_CONFIGURE" = "x" ]; then 55 | echo " + Running 'configure $@':" 56 | if [ -z "$*" ]; then 57 | echo " ** If you wish to pass arguments to ./configure, please" 58 | echo " ** specify them on the command line." 59 | fi 60 | ./configure "$@" 61 | fi 62 | -------------------------------------------------------------------------------- /src/Unix/bincue_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/bincue_unix.cpp -------------------------------------------------------------------------------- /src/Unix/bincue_unix.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/bincue_unix.h -------------------------------------------------------------------------------- /src/Unix/clip_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/clip_unix.cpp -------------------------------------------------------------------------------- /src/Unix/config.guess: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/config.guess -------------------------------------------------------------------------------- /src/Unix/config.sub: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/config.sub -------------------------------------------------------------------------------- /src/Unix/cpr.sh: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/cpr.sh -------------------------------------------------------------------------------- /src/Unix/disk_sparsebundle.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/disk_sparsebundle.cpp -------------------------------------------------------------------------------- /src/Unix/disk_unix.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/disk_unix.h -------------------------------------------------------------------------------- /src/Unix/dyngen_precompiled/basic-dyngen-ops.hpp: -------------------------------------------------------------------------------- 1 | #if defined(__x86_64__) 2 | #ifdef __APPLE__ 3 | #include "basic-dyngen-ops-x86_64_macos.hpp" 4 | #else 5 | #include "basic-dyngen-ops-x86_64.hpp" 6 | #endif 7 | #elif defined(__i386__) 8 | #include "basic-dyngen-ops-x86_32.hpp" 9 | #else 10 | #error Unknown platform 11 | #endif 12 | -------------------------------------------------------------------------------- /src/Unix/dyngen_precompiled/ppc-dyngen-ops.hpp: -------------------------------------------------------------------------------- 1 | #if defined(__x86_64__) 2 | #ifdef __APPLE__ 3 | #include "ppc-dyngen-ops-x86_64_macos.hpp" 4 | #else 5 | #include "ppc-dyngen-ops-x86_64.hpp" 6 | #endif 7 | #elif defined(__i386__) 8 | #include "ppc-dyngen-ops-x86_32.hpp" 9 | #else 10 | #error Unknown platform 11 | #endif 12 | -------------------------------------------------------------------------------- /src/Unix/ether_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/ether_unix.cpp -------------------------------------------------------------------------------- /src/Unix/extfs_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/extfs_unix.cpp -------------------------------------------------------------------------------- /src/Unix/keycodes: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/keycodes -------------------------------------------------------------------------------- /src/Unix/m4/egrep.m4: -------------------------------------------------------------------------------- 1 | # AC_PROG_EGREP 2 | # ------------- 3 | # This is predefined starting with Autoconf 2.54, so this conditional 4 | # definition can be removed once we require Autoconf 2.54 or later. 5 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 6 | [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 7 | [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 8 | then ac_cv_prog_egrep='grep -E' 9 | else ac_cv_prog_egrep='egrep' 10 | fi]) 11 | EGREP=$ac_cv_prog_egrep 12 | AC_SUBST([EGREP]) 13 | ])]) 14 | -------------------------------------------------------------------------------- /src/Unix/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id$ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /src/Unix/posix_sem.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/posix_sem.cpp -------------------------------------------------------------------------------- /src/Unix/rpc.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/rpc.h -------------------------------------------------------------------------------- /src/Unix/rpc_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/rpc_unix.cpp -------------------------------------------------------------------------------- /src/Unix/semaphore.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/semaphore.h -------------------------------------------------------------------------------- /src/Unix/serial_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/serial_unix.cpp -------------------------------------------------------------------------------- /src/Unix/sshpty.c: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/sshpty.c -------------------------------------------------------------------------------- /src/Unix/sshpty.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/sshpty.h -------------------------------------------------------------------------------- /src/Unix/strlcpy.c: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/strlcpy.c -------------------------------------------------------------------------------- /src/Unix/strlcpy.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/strlcpy.h -------------------------------------------------------------------------------- /src/Unix/sys_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/sys_unix.cpp -------------------------------------------------------------------------------- /src/Unix/timer_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/timer_unix.cpp -------------------------------------------------------------------------------- /src/Unix/tinyxml2.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/tinyxml2.cpp -------------------------------------------------------------------------------- /src/Unix/tinyxml2.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/tinyxml2.h -------------------------------------------------------------------------------- /src/Unix/tunconfig: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/tunconfig -------------------------------------------------------------------------------- /src/Unix/user_strings_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_unix.h - Unix-specific localizable strings 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef USER_STRINGS_UNIX_H 22 | #define USER_STRINGS_UNIX_H 23 | 24 | enum { 25 | STR_NO_DEV_ZERO_ERR = 10000, 26 | STR_LOW_MEM_MMAP_ERR, 27 | STR_KD_SHMGET_ERR, 28 | STR_KD_SHMAT_ERR, 29 | STR_KD2_SHMAT_ERR, 30 | STR_ROM_MMAP_ERR, 31 | STR_RAM_MMAP_ERR, 32 | STR_RAM_ROM_MMAP_ERR, 33 | STR_RAM_AREA_TOO_HIGH_ERR, 34 | STR_DR_CACHE_MMAP_ERR, 35 | STR_DR_EMULATOR_MMAP_ERR, 36 | STR_SHEEP_MEM_MMAP_ERR, 37 | STR_SIGALTSTACK_ERR, 38 | STR_SIG_INSTALL_ERR, 39 | STR_NO_XSERVER_ERR, 40 | STR_NO_XVISUAL_ERR, 41 | STR_UNSUPP_DEPTH_ERR, 42 | STR_VOSF_INIT_ERR, 43 | 44 | STR_PROC_CPUINFO_WARN, 45 | STR_BLOCKING_NET_SOCKET_WARN, 46 | STR_NO_SHEEP_NET_DRIVER_WARN, 47 | STR_SHEEP_NET_ATTACH_WARN, 48 | STR_TUN_TAP_CONFIG_WARN, 49 | STR_SLIRP_NO_DNS_FOUND_WARN, 50 | STR_NO_AUDIO_DEV_WARN, 51 | STR_NO_AUDIO_WARN, 52 | STR_NO_ESD_WARN, 53 | STR_AUDIO_FORMAT_WARN, 54 | STR_SCSI_DEVICE_OPEN_WARN, 55 | STR_SCSI_DEVICE_NOT_SCSI_WARN, 56 | STR_KEYCODE_FILE_WARN, 57 | STR_KEYCODE_VENDOR_WARN, 58 | 59 | STR_PREFS_MENU_FILE_GTK, 60 | STR_PREFS_ITEM_START_GTK, 61 | STR_PREFS_ITEM_ZAP_PRAM_GTK, 62 | STR_PREFS_ITEM_SEPL_GTK, 63 | STR_PREFS_ITEM_QUIT_GTK, 64 | STR_HELP_MENU_GTK, 65 | STR_HELP_ITEM_ABOUT_GTK, 66 | STR_SUSPEND_WINDOW_TITLE, 67 | STR_DSPDEVICE_FILE_CTRL, 68 | STR_MIXERDEVICE_FILE_CTRL, 69 | 70 | STR_BROWSE_CTRL, 71 | STR_BROWSE_TITLE, 72 | STR_INPUT_PANE_TITLE, 73 | STR_KEYCODES_CTRL, 74 | STR_KEYCODE_FILE_CTRL, 75 | STR_MOUSEWHEELMODE_CTRL, 76 | STR_MOUSEWHEELMODE_PAGE_LAB, 77 | STR_MOUSEWHEELMODE_CURSOR_LAB, 78 | STR_MOUSEWHEELLINES_CTRL, 79 | 80 | STR_OPEN_WINDOW_ERR, 81 | 82 | STR_NO_B2_EXE_FOUND 83 | }; 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /src/Unix/vhd_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/vhd_unix.cpp -------------------------------------------------------------------------------- /src/Unix/xpram_unix.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Unix/xpram_unix.cpp -------------------------------------------------------------------------------- /src/VideoDriverStub.i: -------------------------------------------------------------------------------- 1 | 0x4a, 0x6f, 0x79, 0x21, 0x70, 0x65, 0x66, 0x66, 0x70, 0x77, 0x70, 0x63, 0x00, 0x00, 0x00, 0x01, 2 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3 | 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 4 | 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x01, 0x10, 5 | 0x00, 0x04, 0x04, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 6 | 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x01, 0x40, 0x02, 0x01, 0x04, 0x00, 7 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x80, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 10 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x68, 12 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 13 | 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x54, 0x68, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 14 | 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x44, 0x72, 15 | 0x69, 0x76, 0x65, 0x72, 0x49, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 16 | 0x00, 0x14, 0xbd, 0xe0, 0x00, 0x0a, 0xd1, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 17 | 0x00, 0x01, 0x02, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 18 | 0x90, 0x61, 0x00, 0x18, 0x90, 0x81, 0x00, 0x1c, 0x90, 0xa1, 0x00, 0x20, 0x90, 0xc1, 0x00, 0x24, 19 | 0x90, 0xe1, 0x00, 0x28, 0x80, 0x40, 0x28, 0x08, 0x80, 0x00, 0x28, 0xd8, 0x7c, 0x09, 0x03, 0xa6, 20 | 0x4e, 0x80, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 21 | 0x08, 0x24, 0x6d, 0x74, 0x65, 0x6a, 0x04, 0x26, 0x05, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x1a, 0x21, 22 | 0x01, 0x01, 0x21, 0x80, 0x04, 0x3b, 0x06, 0x19, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 23 | 0x56, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x5f, 0x53, 0x68, 0x65, 0x65, 24 | 0x70, 0x00, 0x29, 0x2a, 0x01, 0x6e, 0x64, 0x72, 0x76, 0x76, 0x69, 0x64, 0x6f, 0x01, 0x03, 25 | -------------------------------------------------------------------------------- /src/Windows/SheepShaver.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/Windows/SheepShaver.ico -------------------------------------------------------------------------------- /src/Windows/SheepShaver.rc: -------------------------------------------------------------------------------- 1 | SheepShaver ICON PRELOAD "SheepShaver.ico" 2 | -------------------------------------------------------------------------------- /src/Windows/SheepShaverGUI.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/Windows/SheepShaverGUI.ico -------------------------------------------------------------------------------- /src/Windows/SheepShaverGUI.rc: -------------------------------------------------------------------------------- 1 | SheepShaverGUI ICON PRELOAD "SheepShaverGUI.ico" 2 | 3 | -------------------------------------------------------------------------------- /src/Windows/about_window_windows.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * about_window_windows.cpp - "About" window, Windows implementation 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "about_window.h" 22 | 23 | 24 | /* 25 | * Open "About" window 26 | */ 27 | 28 | void OpenAboutWindow(void) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Windows/b2ether/driver/DEBUG.H: -------------------------------------------------------------------------------- 1 | /* 2 | * b2ether driver -- derived from DDK packet driver sample 3 | * 4 | * Basilisk II (C) 1997-1999 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #if DBG 24 | 25 | #define IF_PACKETDEBUG(f) if (PacketDebugFlag & (f)) 26 | extern ULONG PacketDebugFlag; 27 | 28 | #define PACKET_DEBUG_LOUD 0x00000001 // debugging info 29 | #define PACKET_DEBUG_VERY_LOUD 0x00000002 // excessive debugging info 30 | 31 | #define PACKET_DEBUG_INIT 0x00000100 // init debugging info 32 | 33 | #define IF_LOUD(A) IF_PACKETDEBUG( PACKET_DEBUG_LOUD ) { A } 34 | #define IF_VERY_LOUD(A) IF_PACKETDEBUG( PACKET_DEBUG_VERY_LOUD ) { A } 35 | #define IF_INIT_LOUD(A) IF_PACKETDEBUG( PACKET_DEBUG_INIT ) { A } 36 | 37 | #else 38 | 39 | #define IF_LOUD(A) 40 | #define IF_VERY_LOUD(A) 41 | #define IF_INIT_LOUD(A) 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/Windows/b2ether/driver/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | -------------------------------------------------------------------------------- /src/Windows/b2ether/driver/SOURCES: -------------------------------------------------------------------------------- 1 | # MYMODE must be set 2 | 3 | TARGETNAME=b2ether 4 | TARGETPATH=$(BASEDIR)\lib 5 | TARGETTYPE=DRIVER 6 | 7 | TARGETLIBS=$(BASEDIR)\lib\*\$(DDKBUILDENV)\ndis.lib 8 | INCLUDES=$(BASEDIR)\inc;$(BASEDIR)\src\network\inc;..\inc 9 | 10 | MSC_WARNING_LEVEL=/W3 /WX /FR /FAcs /D$(MYMODE) 11 | 12 | SOURCES=b2ether.c \ 13 | b2ether_openclose.c \ 14 | b2ether_read.c \ 15 | b2ether_write.c 16 | -------------------------------------------------------------------------------- /src/Windows/b2ether/inc/ntddpack.h: -------------------------------------------------------------------------------- 1 | // #include 2 | 3 | #ifndef __NTDDPACKET 4 | #define __NTDDPACKET 1 5 | 6 | // #include 7 | 8 | #define MAX_LINK_NAME_LENGTH 124 9 | 10 | #pragma pack(1) 11 | typedef struct _PACKET_OID_DATA { 12 | ULONG Oid; 13 | ULONG Length; 14 | UCHAR Data[1]; 15 | } ATTRIBUTE_PACKED PACKET_OID_DATA, *PPACKET_OID_DATA; 16 | #pragma pack() 17 | 18 | 19 | #define FILE_DEVICE_PROTOCOL 0x8000 20 | 21 | 22 | 23 | #define IOCTL_PROTOCOL_SET_OID CTL_CODE(FILE_DEVICE_PROTOCOL, 0 , METHOD_BUFFERED, FILE_ANY_ACCESS) 24 | #define IOCTL_PROTOCOL_QUERY_OID CTL_CODE(FILE_DEVICE_PROTOCOL, 1 , METHOD_BUFFERED, FILE_ANY_ACCESS) 25 | #define IOCTL_PROTOCOL_RESET CTL_CODE(FILE_DEVICE_PROTOCOL, 2 , METHOD_BUFFERED, FILE_ANY_ACCESS) 26 | #define IOCTL_PROTOCOL_READ CTL_CODE(FILE_DEVICE_PROTOCOL, 3 , METHOD_BUFFERED, FILE_ANY_ACCESS) 27 | #define IOCTL_PROTOCOL_WRITE CTL_CODE(FILE_DEVICE_PROTOCOL, 4 , METHOD_BUFFERED, FILE_ANY_ACCESS) 28 | #define IOCTL_PROTOCOL_MACNAME CTL_CODE(FILE_DEVICE_PROTOCOL, 5 , METHOD_BUFFERED, FILE_ANY_ACCESS) 29 | #define IOCTL_PROTOCOL_SELECT_BY_NAME CTL_CODE(FILE_DEVICE_PROTOCOL, 6 , METHOD_BUFFERED, FILE_ANY_ACCESS) 30 | #define IOCTL_ENUM_ADAPTERS CTL_CODE(FILE_DEVICE_PROTOCOL, 7 , METHOD_BUFFERED, FILE_ANY_ACCESS) 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Windows/b2ether/multiopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * multiopt.h 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | enum { 24 | ETHER_MULTICAST_MAC, 25 | ETHER_MULTICAST_ALL, 26 | ETHER_MULTICAST_PROMISCUOUS 27 | }; 28 | -------------------------------------------------------------------------------- /src/Windows/b2ether/nt5/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | -------------------------------------------------------------------------------- /src/Windows/b2ether/nt5/NTDDPACK.H: -------------------------------------------------------------------------------- 1 | // #include 2 | 3 | #ifndef __NTDDPACKET 4 | #define __NTDDPACKET 1 5 | 6 | // #include 7 | 8 | #define MAX_LINK_NAME_LENGTH 124 9 | 10 | #pragma pack(1) 11 | typedef struct _PACKET_OID_DATA { 12 | ULONG Oid; 13 | ULONG Length; 14 | UCHAR Data[1]; 15 | } PACKET_OID_DATA, *PPACKET_OID_DATA; 16 | #pragma pack() 17 | 18 | 19 | #define FILE_DEVICE_PROTOCOL 0x8000 20 | 21 | 22 | 23 | #define IOCTL_PROTOCOL_SET_OID CTL_CODE(FILE_DEVICE_PROTOCOL, 0 , METHOD_BUFFERED, FILE_ANY_ACCESS) 24 | #define IOCTL_PROTOCOL_QUERY_OID CTL_CODE(FILE_DEVICE_PROTOCOL, 1 , METHOD_BUFFERED, FILE_ANY_ACCESS) 25 | #define IOCTL_PROTOCOL_RESET CTL_CODE(FILE_DEVICE_PROTOCOL, 2 , METHOD_BUFFERED, FILE_ANY_ACCESS) 26 | #define IOCTL_PROTOCOL_READ CTL_CODE(FILE_DEVICE_PROTOCOL, 3 , METHOD_BUFFERED, FILE_ANY_ACCESS) 27 | #define IOCTL_PROTOCOL_WRITE CTL_CODE(FILE_DEVICE_PROTOCOL, 4 , METHOD_BUFFERED, FILE_ANY_ACCESS) 28 | #define IOCTL_PROTOCOL_MACNAME CTL_CODE(FILE_DEVICE_PROTOCOL, 5 , METHOD_BUFFERED, FILE_ANY_ACCESS) 29 | #define IOCTL_PROTOCOL_SELECT_BY_NAME CTL_CODE(FILE_DEVICE_PROTOCOL, 6 , METHOD_BUFFERED, FILE_ANY_ACCESS) 30 | #define IOCTL_ENUM_ADAPTERS CTL_CODE(FILE_DEVICE_PROTOCOL, 7 , METHOD_BUFFERED, FILE_ANY_ACCESS) 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Windows/b2ether/nt5/SOURCES: -------------------------------------------------------------------------------- 1 | # MYMODE must be set 2 | 3 | TARGETNAME=b2ether 4 | TARGETPATH=obj 5 | TARGETTYPE=DRIVER 6 | 7 | TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib 8 | C_DEFINES=$(C_DEFINES) -DNDIS50 9 | INCLUDES=$(BASEDIR)\inc;$(BASEDIR)\src\network\inc;..\inc 10 | 11 | MSC_WARNING_LEVEL=/W3 /WX /FR /FAcs /D$(MYMODE) 12 | 13 | SOURCES=b2ether.c \ 14 | b2ether_openclose.c \ 15 | b2ether_read.c \ 16 | b2ether_write.c \ 17 | b2ether.rc 18 | -------------------------------------------------------------------------------- /src/Windows/b2ether/nt5/b2ether.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define VER_FILETYPE VFT_DRV 5 | #define VER_FILESUBTYPE VFT2_DRV_NETWORK 6 | #define VER_FILEDESCRIPTION_STR "Basilisk II Protocol Driver" 7 | #define VER_INTERNALNAME_STR "B2ETHER.SYS" 8 | #define VER_ORIGINALFILENAME_STR "B2ETHER.SYS" 9 | 10 | #include "common.ver" 11 | -------------------------------------------------------------------------------- /src/Windows/b2ether/nt5/b2ether64.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "b2ether64", "b2ether64.vcxproj", "{F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release|Win32 = Release|Win32 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Debug|Win32.Build.0 = Debug|Win32 16 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Debug|x64.ActiveCfg = Debug|x64 17 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Debug|x64.Build.0 = Debug|x64 18 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Release|Win32.ActiveCfg = Release|Win32 19 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Release|Win32.Build.0 = Release|Win32 20 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Release|x64.ActiveCfg = Release|x64 21 | {F7EA62B6-E0EC-4074-8A83-D0CBB1C990B4}.Release|x64.Build.0 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /src/Windows/cd_defs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/cd_defs.h -------------------------------------------------------------------------------- /src/Windows/cdenable/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cache.cpp - simple floppy/cd cache for Win32 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #ifndef _CACHE_H_ 28 | #define _CACHE_H_ 29 | #define NBLOCKS 1000 30 | 31 | typedef struct { 32 | int inited; 33 | int res_count; 34 | int sector_size; 35 | char *blocks; 36 | int *block; 37 | DWORD *LRU; 38 | } cachetype; 39 | 40 | void cache_init( cachetype *cptr ); 41 | void cache_clear( cachetype *cptr ); 42 | void cache_final( cachetype *cptr ); 43 | int cache_get( cachetype *cptr, int block, char *buf ); 44 | void cache_put( cachetype *cptr, int block, char *buf, int ss ); 45 | void cache_remove( cachetype *cptr, int block, int ss ); 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } // extern "C" 50 | #endif 51 | -------------------------------------------------------------------------------- /src/Windows/cdenable/cdenable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cdenable.h - cdenable.vxd definitions 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | // max read requests, if larger -> STATUS_INVALID_PARAMETER 24 | #define CDENABLE_MAX_TRANSFER_SIZE (0x10000) 25 | 26 | 27 | // A structure representing the instance information associated with 28 | // a particular device 29 | typedef struct _DEVICE_EXTENSION 30 | { 31 | // not needed. 32 | ULONG StateVariable; 33 | } DEVICE_EXTENSION, *PDEVICE_EXTENSION; 34 | 35 | 36 | // Define the various device type values. Note that values used by Microsoft 37 | // Corporation are in the range 0-32767, and 32768-65535 are reserved for use 38 | // by customers. 39 | #define FILE_DEVICE_CDENABLE 0x00008301 40 | 41 | 42 | // Target NT version, internal version 43 | #define CDENABLE_CURRENT_VERSION 0x04000100 44 | 45 | 46 | // Macro definition for defining IOCTL and FSCTL function control codes. Note 47 | // that function codes 0-2047 are reserved for Microsoft Corporation, and 48 | // 2048-4095 are reserved for customers. 49 | #define CDENABLE_IOCTL_READ 0x830 50 | #define CDENABLE_IOCTL_GET_VERSION 0x831 51 | 52 | 53 | #define IOCTL_CDENABLE_READ CTL_CODE(FILE_DEVICE_CDENABLE, \ 54 | CDENABLE_IOCTL_READ, \ 55 | METHOD_BUFFERED, \ 56 | FILE_ANY_ACCESS) 57 | #define IOCTL_CDENABLE_GET_VERSION CTL_CODE(FILE_DEVICE_CDENABLE, \ 58 | CDENABLE_IOCTL_GET_VERSION, \ 59 | METHOD_BUFFERED, \ 60 | FILE_ANY_ACCESS) 61 | -------------------------------------------------------------------------------- /src/Windows/cdenable/eject_nt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * eject_nt.cpp - cd eject routines for WinNT (derived from MS samples) 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _EJECT_NT_H_ 24 | #define _EJECT_NT_H_ 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | BOOL EjectVolume(TCHAR cDriveLetter,BOOL reload); 32 | 33 | HANDLE OpenVolume(TCHAR cDriveLetter); 34 | BOOL LockVolume(HANDLE hVolume); 35 | BOOL DismountVolume(HANDLE hVolume); 36 | BOOL PreventRemovalOfVolume(HANDLE hVolume, BOOL fPrevent); 37 | BOOL AutoEjectVolume(HANDLE hVolume,BOOL reload); 38 | BOOL CloseVolume(HANDLE hVolume); 39 | 40 | #ifdef __cplusplus 41 | } // extern "C" 42 | #endif 43 | 44 | #endif //_EJECT_NT_H_ 45 | -------------------------------------------------------------------------------- /src/Windows/clip_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/clip_windows.cpp -------------------------------------------------------------------------------- /src/Windows/ether_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/ether_windows.cpp -------------------------------------------------------------------------------- /src/Windows/ether_windows.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/ether_windows.h -------------------------------------------------------------------------------- /src/Windows/extfs_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/extfs_windows.cpp -------------------------------------------------------------------------------- /src/Windows/kernel_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/kernel_windows.cpp -------------------------------------------------------------------------------- /src/Windows/kernel_windows.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/kernel_windows.h -------------------------------------------------------------------------------- /src/Windows/posix_emu.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/posix_emu.cpp -------------------------------------------------------------------------------- /src/Windows/posix_emu.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/posix_emu.h -------------------------------------------------------------------------------- /src/Windows/prefs_editor_gtk.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/prefs_editor_gtk.cpp -------------------------------------------------------------------------------- /src/Windows/router/arp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * arp.h - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _ARP_H_ 24 | #define _ARP_H_ 25 | 26 | bool write_arp( arp_t *req, int len ); 27 | 28 | #endif // _ARP_H_ 29 | -------------------------------------------------------------------------------- /src/Windows/router/dump.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * dump.cpp - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #include "sysdeps.h" 24 | #include "main.h" 25 | #include "dump.h" 26 | 27 | #if DEBUG 28 | #pragma optimize("",off) 29 | #endif 30 | 31 | #include "debug.h" 32 | 33 | 34 | void dump_bytes( uint8 *packet, int length ) 35 | { 36 | #if DEBUG 37 | char buf[1000], sm[10]; 38 | 39 | *buf = 0; 40 | 41 | if(length > 256) length = 256; 42 | 43 | for (int i=0; i= 0 && index < (int)ip_array_sz ? ip_array[index] : 0; 69 | } 70 | -------------------------------------------------------------------------------- /src/Windows/router/mib/interfaces.h: -------------------------------------------------------------------------------- 1 | /* 2 | * intercafes.h - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _INTERFACES_H_ 24 | #define _INTERFACES_H_ 25 | 26 | // A wrapper to the MibII class. Enumerates all ip interfaces 27 | // currently in this computer. The interface list is not static. 28 | 29 | void init_interfaces(); 30 | void final_interfaces(); 31 | 32 | int get_ip_count(); 33 | uint32 get_ip_by_index( int index ); 34 | 35 | #endif // _INTERFACES_H_ 36 | -------------------------------------------------------------------------------- /src/Windows/router/router.h: -------------------------------------------------------------------------------- 1 | /* 2 | * router.h - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _ROUTER_H_ 24 | #define _ROUTER_H_ 25 | 26 | extern bool is_router_shutting_down; 27 | extern CRITICAL_SECTION router_section; 28 | 29 | // Increased by one for each ip packet sent to the emulated enet interface. 30 | extern uint16 next_ip_ident_number; 31 | 32 | // Used by incoming icmp packets and internal icmp messages. Host byte order. 33 | extern uint32 macos_ip_address; 34 | 35 | // The magic constant 36 | extern const uint8 router_mac_addr[6]; 37 | 38 | // Used by internal icmp messages. Host byte order. 39 | extern uint32 router_ip_address; 40 | 41 | // False under NT/Win2k if the user has no admin rights 42 | extern bool raw_sockets_available; 43 | 44 | 45 | 46 | // Interface exposed to ether_windows module. 47 | bool router_init(void); 48 | void router_final(void); 49 | 50 | // Both of these return true if the ethernet module should drop the packet. 51 | bool router_write_packet(uint8 *packet, int len); 52 | bool router_read_packet(uint8 *packet, int len); 53 | 54 | #endif // _ROUTER_H_ 55 | -------------------------------------------------------------------------------- /src/Windows/router/tcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tcp.h - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _TCP_H_ 24 | #define _TCP_H_ 25 | 26 | void write_tcp( tcp_t *tcp, int len ); 27 | 28 | void init_tcp(); 29 | void final_tcp(); 30 | 31 | #endif // _TCP_H_ 32 | -------------------------------------------------------------------------------- /src/Windows/router/udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udp.h - ip router 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * Windows platform specific code copyright (C) Lauri Pesonen 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | #ifndef _UDP_H_ 24 | #define _UDP_H_ 25 | 26 | void write_udp( udp_t *udp, int len ); 27 | 28 | void CALLBACK udp_read_completion( 29 | DWORD error, 30 | DWORD bytes_read, 31 | LPWSAOVERLAPPED lpOverlapped, 32 | DWORD flags 33 | ); 34 | 35 | void init_udp(); 36 | void final_udp(); 37 | 38 | #endif // _UDP_H_ 39 | -------------------------------------------------------------------------------- /src/Windows/serial_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/serial_windows.cpp -------------------------------------------------------------------------------- /src/Windows/sys_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/sys_windows.cpp -------------------------------------------------------------------------------- /src/Windows/timer_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/timer_windows.cpp -------------------------------------------------------------------------------- /src/Windows/user_strings_windows.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_windows.h - Windows-specific localizable strings 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef USER_STRINGS_WINDOWS_H 22 | #define USER_STRINGS_WINDOWS_H 23 | 24 | enum { 25 | STR_LOW_MEM_MMAP_ERR = 10000, 26 | STR_KD_SHMGET_ERR, 27 | STR_KD_SHMAT_ERR, 28 | STR_KD2_SHMAT_ERR, 29 | STR_ROM_MMAP_ERR, 30 | STR_RAM_MMAP_ERR, 31 | STR_DR_CACHE_MMAP_ERR, 32 | STR_DR_EMULATOR_MMAP_ERR, 33 | STR_SHEEP_MEM_MMAP_ERR, 34 | STR_SIGSEGV_INSTALL_ERR, 35 | STR_NO_XVISUAL_ERR, 36 | STR_VOSF_INIT_ERR, 37 | STR_SLIRP_NO_DNS_FOUND_WARN, 38 | STR_NO_AUDIO_WARN, 39 | STR_KEYCODE_FILE_WARN, 40 | STR_KEYCODE_VENDOR_WARN, 41 | STR_OPEN_WINDOW_ERR, 42 | STR_NO_WIN32_NT_4, 43 | 44 | STR_PREFS_MENU_FILE_GTK, 45 | STR_PREFS_ITEM_START_GTK, 46 | STR_PREFS_ITEM_ZAP_PRAM_GTK, 47 | STR_PREFS_ITEM_SEPL_GTK, 48 | STR_PREFS_ITEM_QUIT_GTK, 49 | STR_HELP_MENU_GTK, 50 | STR_HELP_ITEM_ABOUT_GTK, 51 | 52 | STR_FILE_CTRL, 53 | STR_BROWSE_CTRL, 54 | STR_BROWSE_TITLE, 55 | STR_SERIAL_PANE_TITLE, 56 | STR_NETWORK_PANE_TITLE, 57 | STR_INPUT_PANE_TITLE, 58 | STR_KEYCODES_CTRL, 59 | STR_KEYCODE_FILE_CTRL, 60 | STR_MOUSEWHEELMODE_CTRL, 61 | STR_MOUSEWHEELMODE_PAGE_LAB, 62 | STR_MOUSEWHEELMODE_CURSOR_LAB, 63 | STR_MOUSEWHEELLINES_CTRL, 64 | STR_POLLMEDIA_CTRL, 65 | STR_EXTFS_ENABLE_CTRL, 66 | STR_EXTFS_DRIVES_CTRL, 67 | STR_ETHER_FTP_PORT_LIST_CTRL, 68 | STR_ETHER_TCP_PORT_LIST_CTRL, 69 | }; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/Windows/util_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/util_windows.cpp -------------------------------------------------------------------------------- /src/Windows/util_windows.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/util_windows.h -------------------------------------------------------------------------------- /src/Windows/xpram_windows.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/Windows/xpram_windows.cpp -------------------------------------------------------------------------------- /src/adb.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/adb.cpp -------------------------------------------------------------------------------- /src/audio.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/audio.cpp -------------------------------------------------------------------------------- /src/cdrom.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/cdrom.cpp -------------------------------------------------------------------------------- /src/disk.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/disk.cpp -------------------------------------------------------------------------------- /src/dummy/audio_dummy.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/dummy/audio_dummy.cpp -------------------------------------------------------------------------------- /src/dummy/clip_dummy.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/dummy/clip_dummy.cpp -------------------------------------------------------------------------------- /src/dummy/ether_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ether_dummy.cpp - Ethernet device driver, dummy implementation 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "sysdeps.h" 22 | 23 | #include "cpu_emulation.h" 24 | #include "main.h" 25 | #include "ether.h" 26 | #include "ether_defs.h" 27 | 28 | #define DEBUG 0 29 | #include "debug.h" 30 | 31 | 32 | /* 33 | * Init ethernet 34 | */ 35 | 36 | void EtherInit(void) 37 | { 38 | } 39 | 40 | 41 | /* 42 | * Exit ethernet 43 | */ 44 | 45 | void EtherExit(void) 46 | { 47 | } 48 | 49 | 50 | /* 51 | * Get ethernet hardware address 52 | */ 53 | 54 | void AO_get_ethernet_address(uint32 addr) 55 | { 56 | } 57 | 58 | 59 | /* 60 | * Enable multicast address 61 | */ 62 | 63 | void AO_enable_multicast(uint32 addr) 64 | { 65 | } 66 | 67 | 68 | /* 69 | * Disable multicast address 70 | */ 71 | 72 | void AO_disable_multicast(uint32 addr) 73 | { 74 | } 75 | 76 | 77 | /* 78 | * Transmit one packet 79 | */ 80 | 81 | void AO_transmit_packet(uint32 mp) 82 | { 83 | } 84 | 85 | 86 | /* 87 | * Ethernet interrupt 88 | */ 89 | 90 | void EtherIRQ(void) 91 | { 92 | } 93 | -------------------------------------------------------------------------------- /src/dummy/prefs_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * prefs_dummy.cpp - Dummy implementation of prefs_init() and prefs_exit(). 3 | * 4 | * Copyright (C) 2007 Alexei Svitkine 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "sysdeps.h" 22 | 23 | /* 24 | * Initialization 25 | */ 26 | 27 | void prefs_init(void) 28 | { 29 | } 30 | 31 | /* 32 | * Exit Deinitialization 33 | */ 34 | 35 | void prefs_exit(void) 36 | { 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/dummy/prefs_editor_dummy.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/dummy/prefs_editor_dummy.cpp -------------------------------------------------------------------------------- /src/dummy/scsi_dummy.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/dummy/scsi_dummy.cpp -------------------------------------------------------------------------------- /src/dummy/serial_dummy.cpp: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/dummy/serial_dummy.cpp -------------------------------------------------------------------------------- /src/extfs.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/extfs.cpp -------------------------------------------------------------------------------- /src/include/about_window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * about_window.h - "About" window 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef ABOUT_WINDOW_H 22 | #define ABOUT_WINDOW_H 23 | 24 | extern void OpenAboutWindow(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/include/adb.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/adb.h -------------------------------------------------------------------------------- /src/include/audio.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/audio.h -------------------------------------------------------------------------------- /src/include/audio_defs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/audio_defs.h -------------------------------------------------------------------------------- /src/include/cdrom.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/cdrom.h -------------------------------------------------------------------------------- /src/include/clip.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/clip.h -------------------------------------------------------------------------------- /src/include/debug.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/debug.h -------------------------------------------------------------------------------- /src/include/disk.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/disk.h -------------------------------------------------------------------------------- /src/include/extfs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/extfs.h -------------------------------------------------------------------------------- /src/include/extfs_defs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/extfs_defs.h -------------------------------------------------------------------------------- /src/include/macos_util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/include/macos_util.h -------------------------------------------------------------------------------- /src/include/name_registry.h: -------------------------------------------------------------------------------- 1 | /* 2 | * name_registry.h - Name Registry handling 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef NAME_REGISTRY_H 22 | #define NAME_REGISTRY_H 23 | 24 | extern void DoPatchNameRegistry(void); 25 | extern void PatchNameRegistry(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/include/pict.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/pict.h -------------------------------------------------------------------------------- /src/include/prefs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/prefs.h -------------------------------------------------------------------------------- /src/include/prefs_editor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * prefs_editor.h - Preferences editor 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef PREFS_EDITOR_H 22 | #define PREFS_EDITOR_H 23 | 24 | #ifdef __BEOS__ 25 | extern void PrefsEditor(uint32 msg); 26 | #else 27 | extern bool PrefsEditor(void); 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/include/rom_patches.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rom_patches.h - ROM patches 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef ROM_PATCHES_H 22 | #define ROM_PATCHES_H 23 | 24 | // ROM types 25 | enum { 26 | ROMTYPE_TNT, 27 | ROMTYPE_ALCHEMY, 28 | ROMTYPE_ZANZIBAR, 29 | ROMTYPE_GAZELLE, 30 | ROMTYPE_GOSSAMER, 31 | ROMTYPE_NEWWORLD 32 | }; 33 | extern int ROMType; 34 | 35 | extern bool DecodeROM(uint8 *data, uint32 size); 36 | extern bool PatchROM(void); 37 | extern void InstallDrivers(void); 38 | 39 | extern void AddSifter(uint32 type, int16 id); 40 | extern bool FindSifter(uint32 type, int16 id); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/include/rsrc_patches.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rsrc_patches.h - Resource patches 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef RSRC_PATCHES_H 22 | #define RSRC_PATCHES_H 23 | 24 | extern void CheckLoad(uint32 type, int16 id, uint16 *p, uint32 size); 25 | extern void CheckLoad(uint32 type, const char *name, uint16 *p, uint32 size); 26 | extern void PatchNativeResourceManager(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/include/scsi.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/scsi.h -------------------------------------------------------------------------------- /src/include/serial.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/serial.h -------------------------------------------------------------------------------- /src/include/serial_defs.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/serial_defs.h -------------------------------------------------------------------------------- /src/include/sony.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/sony.h -------------------------------------------------------------------------------- /src/include/sys.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/sys.h -------------------------------------------------------------------------------- /src/include/timer.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/timer.h -------------------------------------------------------------------------------- /src/include/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * version.h - Version information 3 | * 4 | * SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef VERSION_H 22 | #define VERSION_H 23 | 24 | const int VERSION_MAJOR = 2; 25 | const int VERSION_MINOR = 5; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/include/xpram.h: -------------------------------------------------------------------------------- 1 | ../../../BasiliskII/src/include/xpram.h -------------------------------------------------------------------------------- /src/kpx_cpu/include/basic-cpu.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * basic-cpu.hpp - Basic CPU definitions 3 | * 4 | * Kheperix (C) 2003 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef BASIC_CPU_H 22 | #define BASIC_CPU_H 23 | 24 | #include "sysdeps.h" 25 | #include 26 | #include "task-plugin.hpp" 27 | 28 | /** 29 | * Generic register value 30 | **/ 31 | 32 | union any_register 33 | { 34 | uint32 i; 35 | uint64 j; 36 | float f; 37 | double d; 38 | 39 | // Explicit casts may be required to use those constructors 40 | any_register(uint32 v = 0) : i(v) { } 41 | any_register(uint64 v) : j(v) { } 42 | any_register(float v) : f(v) { } 43 | any_register(double v) : d(v) { } 44 | }; 45 | 46 | /** 47 | * Basic CPU model 48 | **/ 49 | 50 | struct basic_cpu 51 | : public task_plugin 52 | { 53 | // Basic register set 54 | struct registers 55 | { 56 | enum { 57 | PC = -1, // Program Counter 58 | SP = -2, // Stack Pointer 59 | }; 60 | }; 61 | 62 | // Constructor & destructor 63 | basic_cpu(task_struct * parent_task); 64 | virtual ~basic_cpu(); 65 | 66 | // Execute code at current address 67 | virtual void execute() = 0; 68 | 69 | // Set VALUE to register ID 70 | virtual void set_register(int id, any_register const & value) = 0; 71 | 72 | // Get register ID 73 | virtual any_register get_register(int id) = 0; 74 | 75 | // Start emulation, returns exit status 76 | int run(); 77 | 78 | // Stop emulation 79 | void exit(int status); 80 | 81 | private: 82 | jmp_buf env; 83 | int exit_status; 84 | }; 85 | 86 | // Alias basic register set 87 | typedef basic_cpu::registers basic_registers; 88 | 89 | #endif /* BASIC_CPU_H */ 90 | -------------------------------------------------------------------------------- /src/kpx_cpu/include/basic-plugin.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * basic-plugin.hpp - Basic plugin definition 3 | * 4 | * Kheperix (C) 2003 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef BASIC_PLUGIN_H 22 | #define BASIC_PLUGIN_H 23 | 24 | struct basic_plugin 25 | { 26 | virtual ~basic_plugin() { } 27 | }; 28 | 29 | #endif /* BASIC_PLUGIN_H */ 30 | -------------------------------------------------------------------------------- /src/kpx_cpu/include/task-plugin.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * task-plugin.hpp - Task plugin definition 3 | * 4 | * Kheperix (C) 2003 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef TASK_PLUGIN_H 22 | #define TASK_PLUGIN_H 23 | 24 | #include "basic-plugin.hpp" 25 | 26 | // Forward declarations 27 | class task_struct; 28 | class basic_kernel; 29 | class basic_cpu; 30 | class program_info; 31 | 32 | // Base class for all task components 33 | class task_plugin 34 | : public basic_plugin 35 | { 36 | // Parent task 37 | task_struct * task; 38 | 39 | public: 40 | 41 | // Constructor 42 | task_plugin(task_struct * parent_task) : task(parent_task) { } 43 | 44 | // Public accessors to resolve various components of a task 45 | basic_kernel * kernel() const; 46 | basic_cpu * cpu() const; 47 | program_info * program() const; 48 | }; 49 | 50 | // Get out of specified task 51 | extern void task_exit(task_plugin *task, int status); 52 | 53 | #endif /* TASK_PLUGIN_H */ 54 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/amd64/dyngen-target-exec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dyngen defines for micro operation code 3 | * 4 | * Copyright (c) 2003-2004-2004 Fabrice Bellard 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef DYNGEN_TARGET_EXEC_H 22 | #define DYNGEN_TARGET_EXEC_H 23 | 24 | enum { 25 | /* callee save registers */ 26 | #define AREG0 "rbp" 27 | AREG0_ID = 5, 28 | 29 | /* 30 | * Use of rbx register with gcc 4.2 on Mac OS 10.6 31 | * does not produce usable code. Just use r12 to r15. 32 | */ 33 | #if (defined(__APPLE__) && defined(__MACH__)) 34 | 35 | #define AREG1 "r12" 36 | AREG1_ID = 12, 37 | 38 | #define AREG2 "r13" 39 | AREG2_ID = 13, 40 | 41 | #define AREG3 "r14" 42 | AREG3_ID = 14, 43 | 44 | #define AREG4 "r15" 45 | AREG4_ID = 15, 46 | 47 | #else 48 | 49 | #define AREG1 "rbx" 50 | AREG1_ID = 3, 51 | 52 | #define AREG2 "r12" 53 | AREG2_ID = 12, 54 | 55 | #define AREG3 "r13" 56 | AREG3_ID = 13, 57 | 58 | #define AREG4 "r14" 59 | AREG4_ID = 14, 60 | 61 | #define AREG5 "r15" 62 | AREG5_ID = 15, 63 | 64 | #endif 65 | 66 | 67 | // NOTE: the following XMM registers definitions require to build 68 | // *-dyngen-ops.cpp with -ffixed-xmmN 69 | 70 | /* floating-point registers */ 71 | #define FREG0 "xmm4" 72 | FREG0_ID = 4, 73 | 74 | #define FREG1 "xmm5" 75 | FREG1_ID = 5, 76 | 77 | #define FREG2 "xmm6" 78 | FREG2_ID = 6, 79 | 80 | #define FREG3 "xmm7" 81 | FREG3_ID = 7, 82 | 83 | /* vector registers -- aliased to FP registers, not intermixed */ 84 | #define VREG0 FREG0 85 | #define VREG0_ID FREG0_ID 86 | #define VREG1 FREG1 87 | #define VREG1_ID FREG1_ID 88 | #define VREG2 FREG2 89 | #define VREG2_ID FREG2_ID 90 | #define VREG3 FREG3 91 | #define VREG3_ID FREG3_ID 92 | }; 93 | 94 | #endif /* DYNGEN_TARGET_EXEC_H */ 95 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/amd64/jit-target-cache.hpp: -------------------------------------------------------------------------------- 1 | #include "cpu/jit/dummy/jit-target-cache.hpp" 2 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/cxxdemangle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cxxdemangle.h - C++ demangler 3 | * 4 | * Kheperix (C) 2003-2005-2004 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef CXX_DEMANGLE_H 22 | #define CXX_DEMANGLE_H 23 | 24 | /** 25 | * cxx_demangle 26 | * 27 | * Following GCC 3.0 ABI: 28 | * 29 | * 30 | * - MANGLED-NAME is a pointer to a null-terminated array of 31 | * characters 32 | * 33 | * - BUF may be null. If it is non-null, then N must also be 34 | * nonnull, and BUF is a pointer to an array, of at least *N 35 | * characters, that was allocated using malloc(). 36 | * 37 | * - STATUS points to an int that is used as an error indicator. It 38 | * is permitted to be null, in which case the user just doesn't 39 | * get any detailed error information. 40 | * 41 | * Codes: 0: success 42 | * -1: memory allocation failure 43 | * -2: invalid mangled name 44 | * -3: invalid arguments (e.g. BUG nonnull and N null) 45 | **/ 46 | 47 | #ifdef __cplusplus 48 | extern "C" 49 | #endif 50 | char *cxx_demangle(const char *mangled_name, 51 | char *buf, 52 | size_t *n, 53 | int *status); 54 | 55 | #endif /* CXX_DEMANGLE_H */ 56 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/dummy/jit-target-cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * jit-target-cache.hpp - Target specific code to invalidate cache 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef JIT_TARGET_CACHE_H 22 | #define JIT_TARGET_CACHE_H 23 | 24 | static inline void flush_icache_range(unsigned long, unsigned long) 25 | { 26 | } 27 | 28 | #endif /* JIT_TARGET_CACHE_H */ 29 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/jit-codegen.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * jit-codegen.hpp - Generic code generator 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef JIT_CODEGEN_H 22 | #define JIT_CODEGEN_H 23 | 24 | #include "cpu/jit/jit-cache.hpp" 25 | 26 | #if defined(__i386__) 27 | #include "cpu/jit/x86/jit-target-codegen.hpp" 28 | typedef x86_codegen jit_codegen; 29 | #elif defined(__x86_64__) 30 | #include "cpu/jit/amd64/jit-target-codegen.hpp" 31 | typedef amd64_codegen jit_codegen; 32 | #else 33 | struct jit_codegen 34 | : public basic_jit_cache 35 | { 36 | }; 37 | #endif 38 | 39 | #endif /* JIT_CODEGEN_H */ 40 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/jit-config.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * jit-config.hpp - JIT config utils 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef JIT_CONFIG_H 22 | #define JIT_CONFIG_H 23 | 24 | /** 25 | * ENABLE_DYNGEN 26 | * 27 | * Define to enable the portable "JIT1" engine based on code 28 | * inlining technique as implemented in QEMU. 29 | **/ 30 | 31 | #ifndef ENABLE_DYNGEN 32 | #define ENABLE_DYNGEN 0 33 | #endif 34 | 35 | /** 36 | * DYNGEN_ASM_OPTS 37 | * 38 | * Define to permit host inline asm optimizations. This is 39 | * particularly useful to compute emulated condition code 40 | * registers. 41 | **/ 42 | 43 | #if ENABLE_DYNGEN 44 | #ifndef DYNGEN_ASM_OPTS 45 | #define DYNGEN_ASM_OPTS 0 46 | #endif 47 | #endif 48 | 49 | /** 50 | * DYNGEN_DIRECT_BLOCK_CHAINING 51 | * 52 | * Define to enable direct block chaining on platforms supporting 53 | * that feature. e.g. PowerPC. 54 | **/ 55 | 56 | #if ENABLE_DYNGEN 57 | #ifndef DYNGEN_DIRECT_BLOCK_CHAINING 58 | #define DYNGEN_DIRECT_BLOCK_CHAINING 1 59 | #endif 60 | #endif 61 | 62 | #endif /* JIT_CONFIG_H */ 63 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/jit-target-dispatch.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * jit-target-dispatch.h - JIT headers dispatcher 4 | * 5 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | /* Undefine some built-ins */ 23 | #ifdef i386 24 | #undef i386 25 | #define _jit_defined_i386 26 | #endif 27 | #ifdef amd64 28 | #undef amd64 29 | #define _jit_defined_amd64 30 | #endif 31 | #ifdef mips 32 | #undef mips 33 | #define _jit_defined_mips 34 | #endif 35 | 36 | /* Dispatch arch dependent header */ 37 | #define _JIT_CONCAT4(a,b,c,d) a##b##c##d 38 | #if defined(__GNUC__) 39 | #define _JIT_MAKE_HEADER(arch,header) 40 | #else 41 | #define _JIT_MAKE_HEADER(arch,header) _JIT_CONCAT4() 42 | #endif 43 | #if defined(__x86_64__) 44 | #include _JIT_MAKE_HEADER(amd64,_JIT_HEADER) 45 | #elif defined(__i386__) 46 | #include _JIT_MAKE_HEADER(x86,_JIT_HEADER) 47 | #elif defined(__powerpc__) || defined(__ppc__) 48 | #include _JIT_MAKE_HEADER(ppc,_JIT_HEADER) 49 | #elif defined(__mips__) || (defined __sgi && defined __mips) 50 | #include _JIT_MAKE_HEADER(mips,_JIT_HEADER) 51 | #else 52 | #error "Unknown architecture, please submit bug report" 53 | #endif 54 | #undef _JIT_CONCAT4 55 | #undef _JIT_MAKE_HEADER 56 | #undef _JIT_HEADER 57 | 58 | /* Redefine built-ins */ 59 | #ifdef _jit_defined_i386 60 | #undef _jit_defined_i386 61 | #define i386 1 62 | #endif 63 | #ifdef _jit_defined_amd64 64 | #undef _jit_defined_amd64 65 | #define amd64 1 66 | #endif 67 | #ifdef _jit_defined_mips 68 | #undef _jit_defined_mips 69 | #define mips 1 70 | #endif 71 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/mips/dyngen-target-exec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dyngen defines for micro operation code 3 | * 4 | * Copyright (c) 2003-2004-2004 Fabrice Bellard 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef DYNGEN_TARGET_EXEC_H 22 | #define DYNGEN_TARGET_EXEC_H 23 | 24 | enum { 25 | /* callee save registers */ 26 | #define AREG0 "s0" 27 | AREG0_ID = 16, 28 | 29 | #define AREG1 "s1" 30 | AREG1_ID = 17, 31 | 32 | #define AREG2 "s2" 33 | AREG2_ID = 18, 34 | 35 | #define AREG3 "s3" 36 | AREG3_ID = 19, 37 | 38 | #define AREG4 "s4" 39 | AREG4_ID = 20, 40 | 41 | #define AREG5 "s5" 42 | AREG5_ID = 21, 43 | }; 44 | 45 | #endif /* DYNGEN_TARGET_EXEC_H */ 46 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/mips/jit-target-cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * jit-target-cache.hpp - Target specific code to invalidate cache 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef JIT_TARGET_CACHE_H 22 | #define JIT_TARGET_CACHE_H 23 | 24 | #if defined __sgi 25 | #include 26 | static inline void flush_icache_range(unsigned long start, unsigned long stop) 27 | { 28 | cacheflush((void *)start, stop - start, BCACHE); 29 | } 30 | #elif defined __GNUC__ 31 | #error "FIXME: implement assembly code for code cache invalidation" 32 | #endif 33 | 34 | #endif /* JIT_TARGET_CACHE_H */ 35 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/ppc/dyngen-target-exec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dyngen defines for micro operation code 3 | * 4 | * Copyright (c) 2003-2004-2004 Fabrice Bellard 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef DYNGEN_TARGET_EXEC_H 22 | #define DYNGEN_TARGET_EXEC_H 23 | 24 | enum { 25 | #define AREG0 "r27" 26 | AREG0_ID = 27, 27 | 28 | #define AREG1 "r24" 29 | AREG1_ID = 24, 30 | 31 | #define AREG2 "r25" 32 | AREG2_ID = 25, 33 | 34 | #define AREG3 "r26" 35 | AREG3_ID = 26, 36 | 37 | #define AREG4 "r16" 38 | AREG4_ID = 16, 39 | 40 | #define AREG5 "r17" 41 | AREG5_ID = 17, 42 | 43 | #define AREG6 "r18" 44 | AREG6_ID = 18, 45 | 46 | #define AREG7 "r19" 47 | AREG7_ID = 19, 48 | 49 | #define AREG8 "r20" 50 | AREG8_ID = 20, 51 | 52 | #define AREG9 "r21" 53 | AREG9_ID = 21, 54 | 55 | #define AREG10 "r22" 56 | AREG10_ID = 22, 57 | 58 | #define AREG11 "r23" 59 | AREG11_ID = 23, 60 | 61 | #define FREG0 "f1" 62 | FREG0_ID = 1, 63 | 64 | #define FREG1 "f2" 65 | FREG1_ID = 2, 66 | 67 | #define FREG2 "f3" 68 | FREG2_ID = 3, 69 | }; 70 | 71 | #endif /* DYNGEN_TARGET_EXEC_H */ 72 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/ppc/jit-target-cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * jit-target-cache.hpp - Target specific code to invalidate cache 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef JIT_TARGET_CACHE_H 22 | #define JIT_TARGET_CACHE_H 23 | 24 | static inline void flush_icache_range(unsigned long start, unsigned long stop) 25 | { 26 | const int MIN_CACHE_LINE_SIZE = 8; /* conservative value */ 27 | 28 | unsigned long p; 29 | 30 | p = start & ~(MIN_CACHE_LINE_SIZE - 1); 31 | stop = (stop + MIN_CACHE_LINE_SIZE - 1) & ~(MIN_CACHE_LINE_SIZE - 1); 32 | 33 | for (p = start; p < stop; p += MIN_CACHE_LINE_SIZE) { 34 | asm volatile ("dcbst 0,%0" : : "r"(p) : "memory"); 35 | } 36 | asm volatile ("sync" : : : "memory"); 37 | for (p = start; p < stop; p += MIN_CACHE_LINE_SIZE) { 38 | asm volatile ("icbi 0,%0" : : "r"(p) : "memory"); 39 | } 40 | asm volatile ("sync" : : : "memory"); 41 | asm volatile ("isync" : : : "memory"); 42 | } 43 | 44 | #endif /* JIT_TARGET_CACHE_H */ 45 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/x86/codegen_x86.h: -------------------------------------------------------------------------------- 1 | ../../../../../../../BasiliskII/src/uae_cpu/compiler/codegen_x86.h -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/x86/dyngen-target-exec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dyngen defines for micro operation code 3 | * 4 | * Copyright (c) 2003-2004-2004 Fabrice Bellard 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef DYNGEN_TARGET_EXEC_H 22 | #define DYNGEN_TARGET_EXEC_H 23 | 24 | enum { 25 | /* callee save registers */ 26 | #define AREG0 "ebp" 27 | AREG0_ID = 5, 28 | 29 | #define AREG1 "ebx" 30 | AREG1_ID = 3, 31 | 32 | #define AREG2 "esi" 33 | AREG2_ID = 6, 34 | 35 | #define AREG3 "edi" 36 | AREG3_ID = 7, 37 | 38 | // NOTE: the following XMM registers definitions require to build 39 | // *-dyngen-ops.cpp with -ffixed-xmmN 40 | 41 | /* vector registers */ 42 | #define VREG0 "xmm4" 43 | VREG0_ID = 4, 44 | 45 | #define VREG1 "xmm5" 46 | VREG1_ID = 5, 47 | 48 | #define VREG2 "xmm6" 49 | VREG2_ID = 6, 50 | 51 | #define VREG3 "xmm7" 52 | VREG3_ID = 7, 53 | }; 54 | 55 | #endif /* DYNGEN_TARGET_EXEC_H */ 56 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/jit/x86/jit-target-cache.hpp: -------------------------------------------------------------------------------- 1 | #include "cpu/jit/dummy/jit-target-cache.hpp" 2 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/ppc/genexec.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | 4 | my (@handlers, @extra_handlers, %templates); 5 | 6 | sub split_arglist($) { 7 | (map { $_ =~ s/\s//g; $_ } split ",", $_[0]); 8 | } 9 | 10 | my @lines = map { split ";", $_ } (); 11 | 12 | my $is_template = 0; 13 | my $e; 14 | foreach (@lines) { 15 | $_ =~ s/;/&\n/g; 16 | if (/^DEFINE_TEMPLATE\((\w+),.+,.+\((.+)\)\)/) { 17 | $is_template = 1; 18 | $e = { name => $1 }; 19 | push @{$e->{args}}, split_arglist $2; 20 | } 21 | elsif ($is_template && /^\}/) { 22 | $is_template = 0; 23 | $templates{$e->{name}} = $e; 24 | } 25 | elsif (/(powerpc_cpu::execute_\w+)<(.+)>/) { 26 | my $h = { name => $1, args => $2 }; 27 | if ($is_template) { 28 | push @{$e->{handlers}}, $h; 29 | } 30 | else { 31 | push @handlers, $h; 32 | } 33 | } 34 | elsif (/template.+decode_(\w+)<(.+)>/) { 35 | my $template = $templates{$1}; 36 | my @template_args = @{$template->{args}}; 37 | my @args = split_arglist $2; 38 | my %vars; 39 | $vars{$template_args[$_]} = $args[$_] foreach (0 .. $#template_args); 40 | foreach my $h (@{$template->{handlers}}) { 41 | my @new_args = map { $vars{$_} || $_ } split_arglist $h->{args}; 42 | push @extra_handlers, { name => $h->{name}, args => join(", ", @new_args) }; 43 | } 44 | } 45 | } 46 | 47 | my %output_handlers; 48 | foreach (@handlers, @extra_handlers) { 49 | my $line = "template void $_->{name}<".join(", ", $_->{args}).">(uint32);"; 50 | print "$line\n" if (!$output_handlers{$line}); 51 | $output_handlers{$line} = 1; 52 | } 53 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/cpu/spcflags.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * spcflags.hpp - CPU special flags 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef SPCFLAGS_H 22 | #define SPCFLAGS_H 23 | 24 | /** 25 | * Basic special flags 26 | **/ 27 | 28 | enum { 29 | SPCFLAG_CPU_EXEC_RETURN = 1 << 0, // Return from emulation loop 30 | SPCFLAG_CPU_TRIGGER_INTERRUPT = 1 << 1, // Trigger user interrupt 31 | SPCFLAG_CPU_HANDLE_INTERRUPT = 1 << 2, // Call user interrupt handler 32 | SPCFLAG_CPU_ENTER_MON = 1 << 3, // Enter cxmon 33 | SPCFLAG_JIT_EXEC_RETURN = 1 << 4, // Return from compiled code 34 | }; 35 | 36 | class basic_spcflags 37 | { 38 | uint32 mask; 39 | spinlock_t lock; 40 | 41 | public: 42 | 43 | basic_spcflags() 44 | : mask(0), lock(SPIN_LOCK_UNLOCKED) 45 | { } 46 | 47 | bool empty() const 48 | { return (mask == 0); } 49 | 50 | bool test(uint32 v) const 51 | { return (mask & v); } 52 | 53 | void init(uint32 v) 54 | { spin_lock(&lock); mask = v; spin_unlock(&lock); } 55 | 56 | uint32 get() const 57 | { return mask; } 58 | 59 | void set(uint32 v) 60 | { spin_lock(&lock); mask |= v; spin_unlock(&lock); } 61 | 62 | void clear(uint32 v) 63 | { spin_lock(&lock); mask &= ~v; spin_unlock(&lock); } 64 | }; 65 | 66 | #endif /* SPCFLAGS_H */ 67 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/ieeefp-i386.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ieeefp-i386.hpp - IEEE754 Floating-Point Math library, x86 specific code 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * Code derived from the GNU C Library 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef IEEEFP_I386_H 23 | #define IEEEFP_I386_H 24 | 25 | // 7.6 Floating-point environment 26 | #ifndef HAVE_FENV_H 27 | 28 | // Exceptions 29 | enum { 30 | FE_INVALID = 0x01, 31 | #define FE_INVALID FE_INVALID 32 | FE_DIVBYZERO = 0x04, 33 | #define FE_DIVBYZERO FE_DIVBYZERO 34 | FE_OVERFLOW = 0x08, 35 | #define FE_OVERFLOW FE_OVERFLOW 36 | FE_UNDERFLOW = 0x10, 37 | #define FE_UNDERFLOW FE_UNDERFLOW 38 | FE_INEXACT = 0x20 39 | #define FE_INEXACT FE_INEXACT 40 | }; 41 | 42 | #define FE_ALL_EXCEPT (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) 43 | 44 | // Rounding modes 45 | enum { 46 | FE_TONEAREST = 0, 47 | #define FE_TONEAREST FE_TONEAREST 48 | FE_DOWNWARD = 0x400, 49 | #define FE_DOWNWARD FE_DOWNWARD 50 | FE_UPWARD = 0x800, 51 | #define FE_UPWARD FE_UPWARD 52 | FE_TOWARDZERO = 0xc00 53 | #define FE_TOWARDZERO FE_TOWARDZERO 54 | }; 55 | 56 | #endif 57 | 58 | #endif /* IEEEFP_I386_H */ 59 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/ieeefp-mips.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ieee-mips.hpp - IEE754 Floating-Point Math library, mips specific code 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * Code derived from the GNU C Library 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef IEEEFP_MIPS_H 23 | #define IEEEFP_MIPS_H 24 | 25 | // 7.6 Floating-point environment 26 | #ifndef USE_FENV_H 27 | 28 | // Exceptions 29 | enum { 30 | FE_INEXACT = 0x04, 31 | #define FE_INEXACT FE_INEXACT 32 | FE_UNDERFLOW = 0x08, 33 | #define FE_UNDERFLOW FE_UNDERFLOW 34 | FE_OVERFLOW = 0x10, 35 | #define FE_OVERFLOW FE_OVERFLOW 36 | FE_DIVBYZERO = 0x20, 37 | #define FE_DIVBYZERO FE_DIVBYZERO 38 | FE_INVALID = 0x40, 39 | #define FE_INVALID FE_INVALID 40 | }; 41 | 42 | #define FE_ALL_EXCEPT (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) 43 | 44 | // Rounding modes 45 | enum { 46 | FE_TONEAREST = 0x0, 47 | #define FE_TONEAREST FE_TONEAREST 48 | FE_TOWARDZERO = 0x1, 49 | #define FE_TOWARDZERO FE_TOWARDZERO 50 | FE_UPWARD = 0x2, 51 | #define FE_UPWARD FE_UPWARD 52 | FE_DOWNWARD = 0x3 53 | #define FE_DOWNWARD FE_DOWNWARD 54 | }; 55 | 56 | #endif 57 | 58 | #endif /* IEEEFP_MIPS_H */ 59 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/ieeefp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ieeefp.cpp - Access to FPU environment 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #include "sysdeps.h" 22 | 23 | #ifndef HAVE_FENV_H 24 | #include "mathlib/ieeefp.hpp" 25 | #if defined(__i386__) 26 | #include "mathlib/ieeefp-i386.cpp" 27 | #endif 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/mathlib-i386.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mathlib-i386.cpp - Math library wrapper, x86 specific code 3 | * Code largely derived from GNU libc 4 | * 5 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | // 7.12.9.8 The trunc functions 23 | #ifndef HAVE_TRUNC 24 | #define HAVE_TRUNC 25 | double trunc(double x) 26 | { 27 | volatile unsigned short int cw; 28 | volatile unsigned short int cwtmp; 29 | double value; 30 | 31 | __asm__ __volatile__("fnstcw %0" : "=m" (cw)); 32 | cwtmp = (cw & 0xf3ff) | 0x0c00; /* toward zero */ 33 | __asm__ __volatile__("fldcw %0" : : "m" (cwtmp)); 34 | __asm__ __volatile__("frndint" : "=t" (value) : "0" (x)); 35 | __asm__ __volatile__("fldcw %0" : : "m" (cw)); 36 | return value; 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/mathlib-i386.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mathlib-i386.hpp - Math library wrapper, x86 specific code 3 | * Code largely derived from GNU libc 4 | * 5 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef MATHLIB_I386_H 23 | #define MATHLIB_I386_H 24 | 25 | // 7.12.9.5 The lrint and llrint functions 26 | #if defined(__GNUC__) 27 | #define mathlib_lrint(x) \ 28 | ({ long int __result; \ 29 | __asm__ __volatile__ ("fistpl %0" : "=m" (__result) : "t" (x) : "st"); \ 30 | __result; }) 31 | #endif 32 | 33 | // 7.12.14 Comparison macros 34 | #if defined(__GNUC__) 35 | #ifndef isless 36 | #define isless(x, y) \ 37 | ({ register char __result; \ 38 | __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al" \ 39 | : "=a" (__result) : "u" (x), "t" (y) : "cc", "st", "st(1)"); \ 40 | __result; }) 41 | #endif 42 | 43 | #ifndef isgreater 44 | #define isgreater(x, y) \ 45 | ({ register char __result; \ 46 | __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al" \ 47 | : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \ 48 | __result; }) 49 | #endif 50 | #endif 51 | 52 | #endif /* MATHLIB_I386_H */ 53 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/mathlib-ppc.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mathlib-ppc.hpp - Math library wrapper, ppc specific code 3 | * Code largely derived from GNU libc 4 | * 5 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef MATHLIB_PPC_H 23 | #define MATHLIB_PPC_H 24 | 25 | // Floating-Point Multiply Add 26 | #if defined __GNUC__ 27 | static inline double mathlib_fmadd(double x, double y, double z) 28 | { 29 | double r; 30 | __asm__ __volatile__ ("fmadd %0,%1,%2,%3" : "=f" (r) : "f" (x), "f" (y) , "f" (z)); 31 | return r; 32 | } 33 | 34 | static inline float mathlib_fmadd(float x, float y, float z) 35 | { 36 | float r; 37 | __asm__ __volatile__ ("fmadds %0,%1,%2,%3" : "=f" (r) : "f" (x), "f" (y) , "f" (z)); 38 | return r; 39 | } 40 | 41 | #define mathlib_fmadd(x, y, z) (mathlib_fmadd)(x, y, z) 42 | #endif 43 | 44 | // Floating-Point Multiply Subtract 45 | #if defined __GNUC__ 46 | static inline double mathlib_fmsub(double x, double y, double z) 47 | { 48 | double r; 49 | __asm__ __volatile__ ("fmsub %0,%1,%2,%3" : "=f" (r) : "f" (x), "f" (y) , "f" (z)); 50 | return r; 51 | } 52 | 53 | static inline float mathlib_fmsub(float x, float y, float z) 54 | { 55 | float r; 56 | __asm__ __volatile__ ("fmsubs %0,%1,%2,%3" : "=f" (r) : "f" (x), "f" (y) , "f" (z)); 57 | return r; 58 | } 59 | 60 | #define mathlib_fmsub(x, y, z) (mathlib_fmsub)(x, y, z) 61 | #endif 62 | 63 | #endif /* MATHLIB_PPC_H */ 64 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/mathlib/mathlib-x86_64.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mathlib-x86_64.hpp - Math library wrapper, x86-64 specific code 3 | * Code largely derived from GNU libc 4 | * 5 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef MATHLIB_X86_64_H 23 | #define MATHLIB_X86_64_H 24 | 25 | // 7.12.9.5 The lrint and llrint functions 26 | #if defined(__GNUC__) 27 | #define mathlib_lrint(x) \ 28 | ({ long int __result; \ 29 | __asm__ __volatile__ ("cvtsd2si %1, %0" : "=r" (__result) : "x" (x)); \ 30 | __result; }) 31 | #endif 32 | 33 | #endif /* MATHLIB_X86_64_H */ 34 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/utils/utils-cpuinfo.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * utils-cpuinfo.hpp - Processor capability information 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef UTILS_CPUINFO_H 22 | #define UTILS_CPUINFO_H 23 | 24 | // Check for x86 feature CMOV 25 | extern bool cpuinfo_check_cmov(void); 26 | 27 | // Check for x86 feature MMX 28 | extern bool cpuinfo_check_mmx(void); 29 | 30 | // Check for x86 feature SSE 31 | extern bool cpuinfo_check_sse(void); 32 | 33 | // Check for x86 feature SSE2 34 | extern bool cpuinfo_check_sse2(void); 35 | 36 | // Check for x86 feature SSE3 37 | extern bool cpuinfo_check_sse3(void); 38 | 39 | // Check for x86 feature SSSE3 40 | extern bool cpuinfo_check_ssse3(void); 41 | 42 | // Check for x86 feature SSE4.1 43 | extern bool cpuinfo_check_sse4_1(void); 44 | 45 | // Check for x86 feature SSE4_2 46 | extern bool cpuinfo_check_sse4_2(void); 47 | 48 | // Check for ppc feature VMX (Altivec) 49 | extern bool cpuinfo_check_altivec(void); 50 | 51 | #endif /* UTILS_CPUINFO_H */ 52 | -------------------------------------------------------------------------------- /src/kpx_cpu/src/utils/utils-sentinel.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * utils-sentinel.hpp - Helper functions for program initialization and termination 3 | * 4 | * Kheperix (C) 2003-2005 Gwenole Beauchesne 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef UTILS_SENTINEL_H 22 | #define UTILS_SENTINEL_H 23 | 24 | class program_sentinel { 25 | void (*fini)(void); 26 | public: 27 | program_sentinel(void (*init_func)(void) = 0, void (*exit_func)(void) = 0) 28 | : fini(exit_func) 29 | { if (init_func) init_func(); } 30 | ~program_sentinel() 31 | { if (fini) fini(); } 32 | }; 33 | 34 | #define DEFINE_INIT_SENTINEL(FUNCTION) \ 35 | static void FUNCTION(void); \ 36 | static program_sentinel g_program_init_sentinel__##FUNCTION(FUNCTION) 37 | 38 | #define DEFINE_EXIT_SENTINEL(FUNCTION) \ 39 | static void FUNCTION(void); \ 40 | static program_sentinel g_program_exit_sentinel__##FUNCTION(0, FUNCTION) 41 | 42 | #define DEFINE_PROG_SENTINEL(FUNCTION) \ 43 | static void init_##FUNCTION(void); \ 44 | static void exit_##FUNCTION(void); \ 45 | static program_sentinel g_program_sentinel_##FUNCTION(init_##FUNCTION, exit_##FUNCTION) 46 | 47 | #endif /* UTILS_SENTINEL_H */ 48 | -------------------------------------------------------------------------------- /src/pict.c: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/pict.c -------------------------------------------------------------------------------- /src/prefs.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/prefs.cpp -------------------------------------------------------------------------------- /src/scsi.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/scsi.cpp -------------------------------------------------------------------------------- /src/slirp/VERSION: -------------------------------------------------------------------------------- 1 | qemu 0.9.0 (2007/02/05) 2 | Plus 64 Bits Patchs -------------------------------------------------------------------------------- /src/slirp/ctl.h: -------------------------------------------------------------------------------- 1 | #define CTL_CMD 0 2 | #define CTL_EXEC 1 3 | #define CTL_ALIAS 2 4 | #define CTL_DNS 3 5 | 6 | #define CTL_SPECIAL "10.0.2.0" 7 | #define CTL_LOCAL "10.0.2.15" 8 | -------------------------------------------------------------------------------- /src/slirp/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #define PRN_STDERR 1 9 | #define PRN_SPRINTF 2 10 | 11 | extern FILE *dfd; 12 | extern FILE *lfd; 13 | extern int dostats; 14 | extern int slirp_debug; 15 | 16 | #define DBG_CALL 0x1 17 | #define DBG_MISC 0x2 18 | #define DBG_ERROR 0x4 19 | #define DEBUG_DEFAULT DBG_CALL|DBG_MISC|DBG_ERROR 20 | 21 | #ifdef DEBUG 22 | #define DEBUG_CALL(x) if (slirp_debug & DBG_CALL) { fprintf(dfd, "%s...\n", x); fflush(dfd); } 23 | #define DEBUG_ARG(x, y) if (slirp_debug & DBG_CALL) { fputc(' ', dfd); fprintf(dfd, x, y); fputc('\n', dfd); fflush(dfd); } 24 | #define DEBUG_ARGS(x) if (slirp_debug & DBG_CALL) { fprintf x ; fflush(dfd); } 25 | #define DEBUG_MISC(x) if (slirp_debug & DBG_MISC) { fprintf x ; fflush(dfd); } 26 | #define DEBUG_ERROR(x) if (slirp_debug & DBG_ERROR) {fprintf x ; fflush(dfd); } 27 | 28 | 29 | #else 30 | 31 | #define DEBUG_CALL(x) 32 | #define DEBUG_ARG(x, y) 33 | #define DEBUG_ARGS(x) 34 | #define DEBUG_MISC(x) 35 | #define DEBUG_ERROR(x) 36 | 37 | #endif 38 | 39 | void debug_init _P((char *, int)); 40 | //void ttystats _P((struct ttys *)); 41 | void allttystats _P((void)); 42 | void ipstats _P((void)); 43 | void vjstats _P((void)); 44 | void tcpstats _P((void)); 45 | void udpstats _P((void)); 46 | void icmpstats _P((void)); 47 | void mbufstats _P((void)); 48 | void sockstats _P((void)); 49 | void slirp_exit _P((int)); 50 | 51 | -------------------------------------------------------------------------------- /src/slirp/if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifndef _IF_H_ 9 | #define _IF_H_ 10 | 11 | #define IF_COMPRESS 0x01 /* We want compression */ 12 | #define IF_NOCOMPRESS 0x02 /* Do not do compression */ 13 | #define IF_AUTOCOMP 0x04 /* Autodetect (default) */ 14 | #define IF_NOCIDCOMP 0x08 /* CID compression */ 15 | 16 | /* Needed for FreeBSD */ 17 | #undef if_mtu 18 | extern int if_mtu; 19 | extern int if_mru; /* MTU and MRU */ 20 | extern int if_comp; /* Flags for compression */ 21 | extern int if_maxlinkhdr; 22 | extern int if_queued; /* Number of packets queued so far */ 23 | extern int if_thresh; /* Number of packets queued before we start sending 24 | * (to prevent allocing too many mbufs) */ 25 | 26 | extern struct mbuf if_fastq; /* fast queue (for interactive data) */ 27 | extern struct mbuf if_batchq; /* queue for non-interactive data */ 28 | extern struct mbuf *next_m; 29 | 30 | #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) 31 | 32 | /* Interface statistics */ 33 | struct slirp_ifstats { 34 | u_int out_pkts; /* Output packets */ 35 | u_int out_bytes; /* Output bytes */ 36 | u_int out_errpkts; /* Output Error Packets */ 37 | u_int out_errbytes; /* Output Error Bytes */ 38 | u_int in_pkts; /* Input packets */ 39 | u_int in_bytes; /* Input bytes */ 40 | u_int in_errpkts; /* Input Error Packets */ 41 | u_int in_errbytes; /* Input Error Bytes */ 42 | 43 | u_int bytes_saved; /* Number of bytes that compression "saved" */ 44 | /* ie: number of bytes that didn't need to be sent over the link 45 | * because of compression */ 46 | 47 | u_int in_mbad; /* Bad incoming packets */ 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/slirp/libslirp.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBSLIRP_H 2 | #define _LIBSLIRP_H 3 | 4 | #ifdef _WIN32 5 | #ifdef __MINGW32__ 6 | #if _WIN32_WINNT < 0x501 7 | #undef _WIN32_WINNT 8 | #define _WIN32_WINNT 0x501 9 | #endif 10 | #endif 11 | #include 12 | #ifdef __MINGW32__ 13 | #include 14 | #endif 15 | int inet_aton(const char *cp, struct in_addr *ia); 16 | #else 17 | #include 18 | #include 19 | #endif 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | int slirp_init(void); 26 | 27 | int slirp_select_fill(int *pnfds, 28 | fd_set *readfds, fd_set *writefds, fd_set *xfds); 29 | 30 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); 31 | 32 | void slirp_input(const uint8 *pkt, int pkt_len); 33 | 34 | /* you must provide the following functions: */ 35 | int slirp_can_output(void); 36 | void slirp_output(const uint8 *pkt, int pkt_len); 37 | 38 | int slirp_redir(int is_udp, int host_port, 39 | struct in_addr guest_addr, int guest_port); 40 | int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, 41 | int guest_port); 42 | 43 | extern const char *tftp_prefix; 44 | extern char slirp_hostname[33]; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/slirp/main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifdef HAVE_SYS_SELECT_H 9 | #include 10 | #endif 11 | 12 | #define TOWRITEMAX 512 13 | 14 | extern struct timeval tt; 15 | extern int link_up; 16 | extern int slirp_socket; 17 | extern int slirp_socket_unit; 18 | extern int slirp_socket_port; 19 | extern u_int32_t slirp_socket_addr; 20 | extern char *slirp_socket_passwd; 21 | extern int ctty_closed; 22 | 23 | /* 24 | * Get the difference in 2 times from updtim() 25 | * Allow for wraparound times, "just in case" 26 | * x is the greater of the 2 (current time) and y is 27 | * what it's being compared against. 28 | */ 29 | #define TIME_DIFF(x,y) (x)-(y) < 0 ? ~0-(y)+(x) : (x)-(y) 30 | 31 | extern char *slirp_tty; 32 | extern char *exec_shell; 33 | extern u_int curtime; 34 | extern fd_set *global_readfds, *global_writefds, *global_xfds; 35 | extern struct in_addr ctl_addr; 36 | extern struct in_addr special_addr; 37 | extern struct in_addr alias_addr; 38 | extern struct in_addr our_addr; 39 | extern struct in_addr loopback_addr; 40 | extern struct in_addr dns_addr; 41 | extern char *username; 42 | extern char *socket_path; 43 | extern int towrite_max; 44 | extern int ppp_exit; 45 | extern int so_options; 46 | extern int tcp_keepintvl; 47 | extern uint8_t client_ethaddr[6]; 48 | 49 | #define PROTO_SLIP 0x1 50 | #ifdef USE_PPP 51 | #define PROTO_PPP 0x2 52 | #endif 53 | 54 | void if_encap(const uint8_t *ip_data, int ip_data_len); 55 | -------------------------------------------------------------------------------- /src/slirp/misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifndef _MISC_H_ 9 | #define _MISC_H_ 10 | 11 | struct ex_list { 12 | int ex_pty; /* Do we want a pty? */ 13 | int ex_addr; /* The last byte of the address */ 14 | int ex_fport; /* Port to telnet to */ 15 | char *ex_exec; /* Command line of what to exec */ 16 | struct ex_list *ex_next; 17 | }; 18 | 19 | extern struct ex_list *exec_list; 20 | extern u_int curtime, time_fasttimo, last_slowtimo, detach_time, detach_wait; 21 | 22 | extern int (*lprint_print) _P((void *, const char *, va_list)); 23 | extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; 24 | extern struct sbuf *lprint_sb; 25 | 26 | #ifndef HAVE_STRDUP 27 | char *strdup _P((const char *)); 28 | #endif 29 | 30 | void do_wait _P((int)); 31 | 32 | #define EMU_NONE 0x0 33 | 34 | /* TCP emulations */ 35 | #define EMU_CTL 0x1 36 | #define EMU_FTP 0x2 37 | #define EMU_KSH 0x3 38 | #define EMU_IRC 0x4 39 | #define EMU_REALAUDIO 0x5 40 | #define EMU_RLOGIN 0x6 41 | #define EMU_IDENT 0x7 42 | #define EMU_RSH 0x8 43 | 44 | #define EMU_NOCONNECT 0x10 /* Don't connect */ 45 | 46 | /* UDP emulations */ 47 | #define EMU_TALK 0x1 48 | #define EMU_NTALK 0x2 49 | #define EMU_CUSEEME 0x3 50 | 51 | struct tos_t { 52 | u_int16_t lport; 53 | u_int16_t fport; 54 | u_int8_t tos; 55 | u_int8_t emu; 56 | }; 57 | 58 | struct emu_t { 59 | u_int16_t lport; 60 | u_int16_t fport; 61 | u_int8_t tos; 62 | u_int8_t emu; 63 | struct emu_t *next; 64 | }; 65 | 66 | extern struct emu_t *tcpemu; 67 | 68 | extern int x_port, x_server, x_display; 69 | 70 | int show_x _P((char *, struct socket *)); 71 | void redir_x _P((u_int32_t, int, int, int)); 72 | void getouraddr _P((void)); 73 | void slirp_insque _P((void *, void *)); 74 | void slirp_remque _P((void *)); 75 | int add_exec _P((struct ex_list **, int, char *, int, int)); 76 | int slirp_openpty _P((int *, int *)); 77 | int fork_exec _P((struct socket *, char *, int)); 78 | void snooze_hup _P((int)); 79 | void snooze _P((void)); 80 | void relay _P((int)); 81 | void add_emu _P((char *)); 82 | void u_sleep _P((int)); 83 | void fd_nonblock _P((int)); 84 | void fd_block _P((int)); 85 | int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /src/slirp/sbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1995 Danny Gasparovski. 3 | * 4 | * Please read the file COPYRIGHT for the 5 | * terms and conditions of the copyright. 6 | */ 7 | 8 | #ifndef _SBUF_H_ 9 | #define _SBUF_H_ 10 | 11 | #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 12 | #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 13 | 14 | struct sbuf { 15 | u_int sb_cc; /* actual chars in buffer */ 16 | u_int sb_datalen; /* Length of data */ 17 | char *sb_wptr; /* write pointer. points to where the next 18 | * bytes should be written in the sbuf */ 19 | char *sb_rptr; /* read pointer. points to where the next 20 | * byte should be read from the sbuf */ 21 | char *sb_data; /* Actual data */ 22 | }; 23 | 24 | void sbfree _P((struct sbuf *)); 25 | void sbdrop _P((struct sbuf *, int)); 26 | void sbreserve _P((struct sbuf *, int)); 27 | void sbappend _P((struct socket *, struct mbuf *)); 28 | void sbappendsb _P((struct sbuf *, struct mbuf *)); 29 | void sbcopy _P((struct sbuf *, int, int, char *)); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/slirp/tcp_subr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emaculation/SheepShaver/07cac572f942884801ce2cb78c054caf3d6ead67/src/slirp/tcp_subr.c -------------------------------------------------------------------------------- /src/slirp/tftp.h: -------------------------------------------------------------------------------- 1 | /* tftp defines */ 2 | 3 | #define TFTP_SESSIONS_MAX 3 4 | 5 | #define TFTP_SERVER 69 6 | 7 | #define TFTP_RRQ 1 8 | #define TFTP_WRQ 2 9 | #define TFTP_DATA 3 10 | #define TFTP_ACK 4 11 | #define TFTP_ERROR 5 12 | 13 | #define TFTP_FILENAME_MAX 512 14 | 15 | #ifdef PRAGMA_PACK_SUPPORTED 16 | #pragma pack(1) 17 | #endif 18 | 19 | struct tftp_t { 20 | struct ip ip; 21 | struct udphdr udp; 22 | u_int16_t tp_op; 23 | union { 24 | struct { 25 | u_int16_t tp_block_nr; 26 | u_int8_t tp_buf[512]; 27 | } tp_data; 28 | struct { 29 | u_int16_t tp_error_code; 30 | u_int8_t tp_msg[512]; 31 | } tp_error; 32 | u_int8_t tp_buf[512 + 2]; 33 | } x; 34 | } PACKED__; 35 | 36 | #ifdef PRAGMA_PACK_SUPPORTED 37 | #pragma pack(0) 38 | #endif 39 | 40 | void tftp_input(struct mbuf *m); 41 | -------------------------------------------------------------------------------- /src/sony.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/sony.cpp -------------------------------------------------------------------------------- /src/xpram.cpp: -------------------------------------------------------------------------------- 1 | ../../BasiliskII/src/xpram.cpp --------------------------------------------------------------------------------