├── BasiliskII ├── README ├── docs │ ├── BasiliskII.spec │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── README │ ├── TECH │ └── TODO └── src │ ├── CrossPlatform │ ├── sigsegv.cpp │ ├── sigsegv.h │ ├── video_blit.cpp │ ├── video_blit.h │ ├── video_vosf.h │ ├── vm_alloc.cpp │ └── vm_alloc.h │ ├── 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 │ ├── user_strings_dummy.cpp │ └── xpram_dummy.cpp │ ├── emul_op.cpp │ ├── ether.cpp │ ├── extfs.cpp │ ├── hwdependent │ ├── AmigaOS │ │ ├── BasiliskII.info │ │ ├── Makefile │ │ ├── asm_support.asm │ │ ├── audio_amiga.cpp │ │ ├── clip_amiga.cpp │ │ ├── ether_amiga.cpp │ │ ├── extfs_amiga.cpp │ │ ├── main_amiga.cpp │ │ ├── prefs_amiga.cpp │ │ ├── prefs_editor_amiga.cpp │ │ ├── scsi_amiga.cpp │ │ ├── serial_amiga.cpp │ │ ├── sys_amiga.cpp │ │ ├── sysdeps.h │ │ ├── timer_amiga.cpp │ │ ├── user_strings_amiga.cpp │ │ ├── user_strings_amiga.h │ │ ├── video_amiga.cpp │ │ └── xpram_amiga.cpp │ ├── BeOS │ │ ├── Makefile │ │ ├── SheepDriver │ │ │ ├── Makefile │ │ │ ├── sheep_driver.c │ │ │ └── sheep_driver.h │ │ ├── SheepNet │ │ │ ├── Makefile │ │ │ ├── sheep_net.cpp │ │ │ └── sheep_net.h │ │ ├── about_window.cpp │ │ ├── about_window.h │ │ ├── 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 │ │ └── xpram_beos.cpp │ ├── MacOSX │ │ ├── AudioBackEnd.cpp │ │ ├── AudioBackEnd.h │ │ ├── AudioDevice.cpp │ │ ├── AudioDevice.h │ │ ├── BasiliskII.icns │ │ ├── Controller.h │ │ ├── Controller.mm │ │ ├── Credits.html │ │ ├── Emulator.h │ │ ├── Emulator.mm │ │ ├── EmulatorView.h │ │ ├── EmulatorView.mm │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── MainMenu.nib │ │ │ │ ├── Collapsed.tiff │ │ │ │ ├── Expanded.tiff │ │ │ │ ├── classes.nib │ │ │ │ ├── info.nib │ │ │ │ ├── objects.nib │ │ │ │ ├── resetH.tiff │ │ │ │ ├── resetN.tiff │ │ │ │ ├── shutdownH.tiff │ │ │ │ └── shutdownN.tiff │ │ ├── HowTo.html │ │ ├── Info.plist │ │ ├── MacOSX_sound_if.cpp │ │ ├── MacOSX_sound_if.h │ │ ├── Multiple-Windows │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ ├── MainMenu.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ └── Win512x342.nib │ │ │ │ │ ├── Collapsed.tiff │ │ │ │ │ ├── Expanded.tiff │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ ├── objects.nib │ │ │ │ │ ├── resetH.tiff │ │ │ │ │ ├── resetN.tiff │ │ │ │ │ ├── shutdownH.tiff │ │ │ │ │ └── shutdownN.tiff │ │ │ └── README │ │ ├── NNThread.h │ │ ├── NNThread.m │ │ ├── PrefsEditor.h │ │ ├── PrefsEditor.mm │ │ ├── ToDo.html │ │ ├── Versions.html │ │ ├── audio_defs_macosx.h │ │ ├── audio_macosx.cpp │ │ ├── autorelease.h │ │ ├── clip_macosx.cpp │ │ ├── clip_macosx64.mm │ │ ├── extfs_macosx.cpp │ │ ├── macos_util_macosx.h │ │ ├── main_macosx.h │ │ ├── main_macosx.mm │ │ ├── misc_macosx.h │ │ ├── misc_macosx.mm │ │ ├── prefs_macosx.cpp │ │ ├── sys_darwin.cpp │ │ ├── utils_macosx.h │ │ ├── utils_macosx.mm │ │ ├── video_macosx.h │ │ └── video_macosx.mm │ ├── SDL │ │ ├── SDLMain.h │ │ ├── SDLMain.m │ │ ├── audio_sdl.cpp │ │ ├── keycodes │ │ └── video_sdl.cpp │ ├── Unix │ │ ├── .gitignore │ │ ├── BasiliskII.1 │ │ ├── Darwin │ │ │ ├── gtk-osx.patch │ │ │ ├── lowmem │ │ │ ├── lowmem.c │ │ │ ├── mkstandalone │ │ │ ├── pagezero │ │ │ ├── pagezero.c │ │ │ └── testlmem.sh │ │ ├── FreeBSD │ │ │ ├── scsi_freebsd.cpp │ │ │ └── scsidump.cpp │ │ ├── Irix │ │ │ ├── README.networking │ │ │ ├── audio_irix.cpp │ │ │ └── unaligned.c │ │ ├── Linux │ │ │ ├── NetDriver │ │ │ │ ├── README.md │ │ │ │ └── sheep_net.c │ │ │ └── scsi_linux.cpp │ │ ├── Makefile.in │ │ ├── Solaris │ │ │ ├── audio_solaris.cpp │ │ │ └── which_sparc │ │ ├── acinclude.m4 │ │ ├── asm_support.s │ │ ├── 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 │ │ ├── ether_unix.cpp │ │ ├── extfs_unix.cpp │ │ ├── fbdevices │ │ ├── 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 │ │ ├── posix_sem.cpp │ │ ├── prefs_editor_gtk.cpp │ │ ├── prefs_unix.cpp │ │ ├── rpc.h │ │ ├── rpc_unix.cpp │ │ ├── semaphore.h │ │ ├── serial_unix.cpp │ │ ├── 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 │ ├── Windows │ │ ├── BasiliskII.DebugJIT.props │ │ ├── BasiliskII.ReleaseJIT.props │ │ ├── BasiliskII.ico │ │ ├── BasiliskII.props │ │ ├── BasiliskII.rc │ │ ├── BasiliskII.sln │ │ ├── BasiliskII.vcxproj │ │ ├── BasiliskII.vcxproj.filters │ │ ├── BasiliskIIGUI.ico │ │ ├── BasiliskIIGUI.rc │ │ ├── Makefile.in │ │ ├── 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 │ │ ├── build68k.vcxproj │ │ ├── build68k.vcxproj.filters │ │ ├── cd_defs.h │ │ ├── cdenable │ │ │ ├── cache.cpp │ │ │ ├── cache.h │ │ │ ├── cdenable.h │ │ │ ├── eject_nt.cpp │ │ │ ├── eject_nt.h │ │ │ ├── ntcd.cpp │ │ │ └── ntcd.h │ │ ├── clip_windows.cpp │ │ ├── config.h │ │ ├── configure.ac │ │ ├── ether_windows.cpp │ │ ├── ether_windows.h │ │ ├── extfs_windows.cpp │ │ ├── gencomp.vcxproj │ │ ├── gencomp.vcxproj.filters │ │ ├── gencpu.vcxproj │ │ ├── gencpu.vcxproj.filters │ │ ├── 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 │ ├── native_cpu │ │ └── cpu_emulation.h │ ├── powerrom_cpu │ │ ├── cpu_emulation.h │ │ └── powerrom_cpu.cpp │ ├── x86dynarec │ │ └── compiler │ │ │ ├── codegen_x86.cpp │ │ │ ├── codegen_x86.h │ │ │ ├── compemu.h │ │ │ ├── compemu_fpp.cpp │ │ │ ├── compemu_support.cpp │ │ │ ├── flags_x86.h │ │ │ ├── gencomp.c │ │ │ └── test_codegen_x86.cpp │ └── x86fpu │ │ ├── fpu_x86.cpp │ │ ├── fpu_x86.h │ │ └── fpu_x86_asm.h │ ├── include │ ├── adb.h │ ├── audio.h │ ├── audio_defs.h │ ├── cdrom.h │ ├── clip.h │ ├── debug.h │ ├── disk.h │ ├── emul_op.h │ ├── ether.h │ ├── ether_defs.h │ ├── extfs.h │ ├── extfs_defs.h │ ├── macos_util.h │ ├── main.h │ ├── pict.h │ ├── prefs.h │ ├── prefs_editor.h │ ├── rom_patches.h │ ├── rsrc_patches.h │ ├── scsi.h │ ├── serial.h │ ├── serial_defs.h │ ├── slot_rom.h │ ├── sony.h │ ├── sys.h │ ├── timer.h │ ├── user_strings.h │ ├── version.h │ ├── video.h │ ├── video_defs.h │ └── xpram.h │ ├── libretro │ ├── Makefile │ ├── Makefile.common │ ├── Makefile.libretro │ ├── audio_libr.cpp │ ├── config.h │ ├── control │ ├── disk_sparsebundle.cpp │ ├── disk_unix.h │ ├── docs │ │ ├── changes.txt │ │ ├── control-inputs.txt │ │ ├── controls.txt │ │ ├── gpl-2.0.txt │ │ ├── lgpl-2.1.txt │ │ ├── main_unix.cpp │ │ ├── porting.html │ │ ├── snapshots.txt │ │ └── snes9x-license.txt │ ├── extfs_unix.cpp │ ├── jni │ │ ├── Android.mk │ │ └── Application.mk │ ├── libretro-common │ │ ├── compat │ │ │ └── compat_strl.c │ │ ├── features │ │ │ └── features_cpu.c │ │ ├── file │ │ │ └── retro_stat.c │ │ ├── include │ │ │ ├── boolean.h │ │ │ ├── compat │ │ │ │ ├── msvc.h │ │ │ │ ├── posix_string.h │ │ │ │ └── strl.h │ │ │ ├── features │ │ │ │ └── features_cpu.h │ │ │ ├── memalign.h │ │ │ ├── memmap.h │ │ │ ├── retro_assert.h │ │ │ ├── retro_common_api.h │ │ │ ├── retro_inline.h │ │ │ ├── retro_miscellaneous.h │ │ │ ├── retro_stat.h │ │ │ └── streams │ │ │ │ └── file_stream.h │ │ ├── memmap │ │ │ ├── memalign.c │ │ │ └── memmap.c │ │ └── streams │ │ │ └── file_stream.c │ ├── libretro.cpp │ ├── libretro.h │ ├── libretroexports.h │ ├── link.T │ ├── main_libr.cpp │ ├── msvc │ │ ├── msvc-2003-xbox1.bat │ │ ├── msvc-2003-xbox1.sln │ │ ├── msvc-2003-xbox1 │ │ │ ├── msvc-2003-xbox1.vcproj │ │ │ └── stdint.h │ │ ├── msvc-2010-360.bat │ │ ├── msvc-2010-360.sln │ │ ├── msvc-2010-360 │ │ │ ├── msvc-2010-360.vcxproj │ │ │ └── msvc-2010-360.vcxproj.filters │ │ ├── msvc-2010.bat │ │ ├── msvc-2010.sln │ │ └── msvc-2010 │ │ │ ├── libretro.def │ │ │ ├── msvc-2010.vcxproj │ │ │ └── msvc-2010.vcxproj.filters │ ├── prefs_editor_gtk.cpp │ ├── prefs_unix.cpp │ ├── qnx │ │ └── playbook │ │ │ ├── .cproject │ │ │ └── .project │ ├── sys_libr.cpp │ ├── sys_libr.cpp.OLD │ ├── sysdeps.h │ ├── timer_libr.cpp │ ├── tinyxml2.cpp │ ├── tinyxml2.h │ ├── user_strings_libr.cpp │ ├── user_strings_libr.h │ ├── video_libr.cpp │ ├── vm_alloc.cpp │ └── vm_alloc.h │ ├── macos_util.cpp │ ├── main.cpp │ ├── pict.c │ ├── prefs.cpp │ ├── prefs_items.cpp │ ├── rom_patches.cpp │ ├── rsrc_patches.cpp │ ├── scsi.cpp │ ├── serial.cpp │ ├── slirp │ ├── COPYRIGHT │ ├── VERSION │ ├── bootp.h │ ├── ctl.h │ ├── debug.h │ ├── icmp_var.h │ ├── if.h │ ├── ip.h │ ├── ip_icmp.h │ ├── libslirp.h │ ├── main.h │ ├── mbuf.h │ ├── misc.h │ ├── sbuf.h │ ├── slirp.h │ ├── slirp_config.h │ ├── socket.h │ ├── tcp.h │ ├── tcp_timer.h │ ├── tcp_var.h │ ├── tcpip.h │ ├── tftp.h │ └── udp.h │ ├── slot_rom.cpp │ ├── sony.cpp │ ├── timer.cpp │ ├── uae_cpu │ ├── 68ktools │ │ ├── build68k │ │ ├── build68k.c │ │ ├── cpuopti.c │ │ ├── gencpu │ │ ├── gencpu.c │ │ ├── sow.c │ │ └── table68k │ ├── basilisk_glue.cpp │ ├── compiler │ │ └── compemu.h │ ├── cpu_emulation.h │ ├── cpuemu.cpp │ ├── cpuemu_nf.cpp │ ├── cpustbl.cpp │ ├── cpustbl_nf.cpp │ ├── cputbl.h │ ├── fpu │ │ ├── core.h │ │ ├── exceptions.cpp │ │ ├── exceptions.h │ │ ├── flags.cpp │ │ ├── flags.h │ │ ├── fpu.h │ │ ├── fpu_ieee.cpp │ │ ├── fpu_ieee.h │ │ ├── fpu_uae.cpp │ │ ├── fpu_uae.h │ │ ├── impl.h │ │ ├── mathlib.cpp │ │ ├── mathlib.h │ │ ├── rounding.cpp │ │ ├── rounding.h │ │ └── types.h │ ├── m68k.h │ ├── memory.cpp │ ├── memory.h │ ├── newcpu.cpp │ ├── newcpu.h │ ├── noflags.h │ ├── opcodes.cpp │ ├── readcpu.cpp │ ├── readcpu.h │ └── spcflags.h │ ├── user_strings.cpp │ ├── video.cpp │ └── xpram.cpp └── README /BasiliskII/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/README -------------------------------------------------------------------------------- /BasiliskII/docs/BasiliskII.spec: -------------------------------------------------------------------------------- 1 | %define name BasiliskII 2 | %define version 1.0rc1 3 | %define release 1 4 | 5 | Summary: 68k Macintosh emulator 6 | Name: %{name} 7 | Version: %{version} 8 | Release: %{release} 9 | License: GPL 10 | Group: Applications/Emulators 11 | Source0: %{name}_src_30062005.tar.gz 12 | URL: http://www.uni-mainz.de/~bauec002/B2Main.html 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 14 | 15 | # While the data file path (/usr/share/BasiliskII) is compiled into the 16 | # executable, the data files are not required for operation and their location 17 | # can be overridden with prefs items, so I consider this package to be 18 | # relocatable. 19 | Prefix: %{_prefix} 20 | 21 | %description 22 | Basilisk II is an Open Source 68k Macintosh emulator. That is, it enables 23 | you to run 68k MacOS software on you computer, even if you are using a 24 | different operating system. However, you still need a copy of MacOS and 25 | a Macintosh ROM image to use Basilisk II. 26 | 27 | Some features of Basilisk II: 28 | - Emulates either a Mac Classic (which runs MacOS 0.x thru 7.5) 29 | or a Mac II series machine (which runs MacOS 7.x, 8.0 and 8.1), 30 | depending on the ROM being used 31 | - Color video display 32 | - CD quality sound output 33 | - Floppy disk driver (only 1.44MB disks supported) 34 | - Driver for HFS partitions and hardfiles 35 | - CD-ROM driver with basic audio functions 36 | - Easy file exchange with the host OS via a "Host Directory Tree" icon 37 | on the Mac desktop 38 | - Ethernet driver 39 | - Serial drivers 40 | - SCSI Manager (old-style) emulation 41 | - Emulates extended ADB keyboard and 3-button mouse 42 | - Uses UAE 68k emulation or (under AmigaOS and NetBSD/m68k) real 68k 43 | processor 44 | 45 | %prep 46 | %setup -q 47 | 48 | %build 49 | cd src/Unix 50 | %configure 51 | make 52 | 53 | %install 54 | rm -rf ${RPM_BUILD_ROOT} 55 | cd src/Unix 56 | %makeinstall 57 | 58 | %clean 59 | rm -rf ${RPM_BUILD_ROOT} 60 | 61 | %files 62 | %defattr(-,root,root) 63 | %doc ChangeLog COPYING INSTALL README TECH TODO 64 | %{_bindir}/BasiliskII 65 | %{_mandir}/man1/BasiliskII.1* 66 | %config %{_datadir}/BasiliskII/keycodes 67 | %config %{_datadir}/BasiliskII/fbdevices 68 | -------------------------------------------------------------------------------- /BasiliskII/docs/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/docs/ChangeLog -------------------------------------------------------------------------------- /BasiliskII/docs/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/docs/README -------------------------------------------------------------------------------- /BasiliskII/docs/TODO: -------------------------------------------------------------------------------- 1 | Bugs: 2 | - System 7.1 with Quadra900 ModelID (1MB ROM): 0x108 gets strange value 3 | - Apple Personal Diagnostics doesn't work with more than 1023 MB 4 | 5 | General: 6 | - Add support for 2MB ROMs (Quadra 840AV) 7 | - Add support for System 6.0.x 8 | - Sony: rdVerify, Tag Buffer 9 | - Disk: rdVerify 10 | - CD-ROM: track lists, positioning type 3, TOC type 4/5, ReadHeader/ReadMCN/ 11 | ReadISRC/ReadAudio/ReadAllSubcodes 12 | - Sound in 13 | - Video: multiple monitor support 14 | - More accurate Time Manager 15 | - Serial driver: XOn/XOff handshaking 16 | - Classic ROM: mouse button/movement is broken with ROM mouse handler 17 | - Classic ROM: sound output 18 | - Write a nice User's Manual with linuxdoc or something similar 19 | - Fix video mode switch to cope with different mac_frame_base 20 | (CrsrBase is overriden with the previous base after the mode switch) 21 | 22 | AmigaOS: 23 | - "Create Hardfile..." button 24 | - Support for ShapeShifter External Video Drivers 25 | - clip_amiga.cpp: clip AmigaOS->Basilisk 26 | - sys_amiga.cpp: MaxTransfer/BufMemType/TransferMask, SysAddCDROMPrefs(), 27 | SysFormat() 28 | - Patch 512K ROM for 68040/060 caches 29 | - Input handler instead of IDCMP? 30 | - Last sound buffer is not played 31 | - Sound output rate/bits/channels switching 32 | 33 | BeOS: 34 | - clip_beos.cpp: clip BeOS->Basilisk 35 | - Last sound buffer is not played 36 | - Sound output rate/bits/channels switching 37 | - Video depth/resolution switching 38 | 39 | Unix: 40 | - sys_unix.cpp: SysFormat(), SysIsFixedDisk(), SysIsDiskInserted(), 41 | prevent/allow for non-floppy/CDROM devices 42 | - ESD is also available on Solaris 43 | - display progress bar during disk file creation in prefs editor 44 | 45 | Mac OS X: 46 | - Sound 47 | - Cut and paste 48 | - Lots of other stuff. See src/MacOSX/ToDo.html 49 | 50 | Windows 51 | - main_windows.cpp: undo the SDL/DIB driver trick 52 | - video_windows.cpp: implement with DirectX 53 | - audio_windows.cpp, scsi_windows.cpp: merge from original Windows version 54 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/clip_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * clip_dummy.cpp - Clipboard handling, 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 "clip.h" 24 | #include "macos_util.h" 25 | 26 | #define DEBUG 0 27 | #include "debug.h" 28 | 29 | 30 | /* 31 | * Initialization 32 | */ 33 | 34 | void ClipInit(void) 35 | { 36 | } 37 | 38 | 39 | /* 40 | * Deinitialization 41 | */ 42 | 43 | void ClipExit(void) 44 | { 45 | } 46 | 47 | 48 | /* 49 | * Mac application reads clipboard 50 | */ 51 | 52 | void GetScrap(void **handle, uint32 type, int32 offset) 53 | { 54 | D(bug("GetScrap handle %p, type %08x, offset %d\n", handle, type, offset)); 55 | } 56 | 57 | /* 58 | * ZeroScrap() is called before a Mac application writes to the clipboard; clears out the previous contents 59 | */ 60 | 61 | void ZeroScrap() 62 | { 63 | D(bug("ZeroScrap\n")); 64 | } 65 | 66 | /* 67 | * Mac application wrote to clipboard 68 | */ 69 | 70 | void PutScrap(uint32 type, void *scrap, int32 length) 71 | { 72 | D(bug("PutScrap type %08lx, data %08lx, length %ld\n", type, scrap, length)); 73 | if (length <= 0) 74 | return; 75 | 76 | switch (type) { 77 | case FOURCC('T','E','X','T'): 78 | D(bug(" clipping TEXT\n")); 79 | break; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/prefs_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * prefs_dummy.cpp - Preferences handling, 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 24 | #include 25 | 26 | #include "prefs.h" 27 | 28 | 29 | // Platform-specific preferences items 30 | prefs_desc platform_prefs_items[] = { 31 | {NULL, TYPE_END, false} // End of list 32 | }; 33 | 34 | 35 | // Prefs file name and path 36 | const char PREFS_FILE_NAME[] = "BasiliskII_Prefs"; 37 | 38 | 39 | /* 40 | * Load preferences from settings file 41 | */ 42 | 43 | void LoadPrefs(void) 44 | { 45 | // Read preferences from settings file 46 | FILE *f = fopen(PREFS_FILE_NAME, "r"); 47 | if (f != NULL) { 48 | 49 | // Prefs file found, load settings 50 | LoadPrefsFromStream(f); 51 | fclose(f); 52 | 53 | } else { 54 | 55 | // No prefs file, save defaults 56 | SavePrefs(); 57 | } 58 | } 59 | 60 | 61 | /* 62 | * Save preferences to settings file 63 | */ 64 | 65 | void SavePrefs(void) 66 | { 67 | FILE *f; 68 | if ((f = fopen(PREFS_FILE_NAME, "w")) != NULL) { 69 | SavePrefsToStream(f); 70 | fclose(f); 71 | } 72 | } 73 | 74 | 75 | /* 76 | * Add defaults of platform-specific prefs items 77 | * You may also override the defaults set in PrefsInit() 78 | */ 79 | 80 | void AddPlatformPrefsDefaults(void) 81 | { 82 | } 83 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/prefs_editor_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * prefs_editor_dummy.cpp - Preferences editor, 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 | #include "prefs.h" 23 | #include "prefs_editor.h" 24 | #include "user_strings.h" 25 | 26 | 27 | /* 28 | * Show preferences editor 29 | * Returns true when user clicked on "Start", false otherwise 30 | */ 31 | 32 | bool PrefsEditor(void) 33 | { 34 | return true; 35 | } 36 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/scsi_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * scsi_dummy.cpp - SCSI Manager, 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 | #include "main.h" 23 | #include "scsi.h" 24 | 25 | #define DEBUG 0 26 | #include "debug.h" 27 | 28 | 29 | /* 30 | * Initialization 31 | */ 32 | 33 | void SCSIInit(void) 34 | { 35 | // Reset SCSI bus 36 | SCSIReset(); 37 | } 38 | 39 | 40 | /* 41 | * Deinitialization 42 | */ 43 | 44 | void SCSIExit(void) 45 | { 46 | } 47 | 48 | 49 | /* 50 | * Set SCSI command to be sent by scsi_send_cmd() 51 | */ 52 | 53 | void scsi_set_cmd(int cmd_length, uint8 *cmd) 54 | { 55 | } 56 | 57 | 58 | /* 59 | * Check for presence of SCSI target 60 | */ 61 | 62 | bool scsi_is_target_present(int id) 63 | { 64 | return false; 65 | } 66 | 67 | 68 | /* 69 | * Set SCSI target (returns false on error) 70 | */ 71 | 72 | bool scsi_set_target(int id, int lun) 73 | { 74 | return false; 75 | } 76 | 77 | 78 | /* 79 | * Send SCSI command to active target (scsi_set_command() must have been called), 80 | * read/write data according to S/G table (returns false on error) 81 | */ 82 | 83 | bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout) 84 | { 85 | return false; 86 | } 87 | 88 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/user_strings_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_dummy.cpp - Localizable strings, 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 | #include "user_strings.h" 23 | 24 | 25 | // Platform-specific string definitions 26 | const user_string_def platform_strings[] = { 27 | {-1, NULL} // End marker 28 | }; 29 | 30 | 31 | /* 32 | * Fetch pointer to string, given the string number 33 | */ 34 | 35 | char *GetString(int num) 36 | { 37 | // First search for platform-specific string 38 | int i = 0; 39 | while (platform_strings[i].num >= 0) { 40 | if (platform_strings[i].num == num) 41 | return platform_strings[i].str; 42 | i++; 43 | } 44 | 45 | // Not found, search for common string 46 | i = 0; 47 | while (common_strings[i].num >= 0) { 48 | if (common_strings[i].num == num) 49 | return common_strings[i].str; 50 | i++; 51 | } 52 | return NULL; 53 | } 54 | -------------------------------------------------------------------------------- /BasiliskII/src/dummy/xpram_dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram_dummy.cpp - XPRAM handling, 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 24 | #include 25 | 26 | #include "xpram.h" 27 | 28 | 29 | // XPRAM file name and path 30 | const char XPRAM_FILE_NAME[] = "BasiliskII_XPRAM"; 31 | 32 | 33 | /* 34 | * Load XPRAM from settings file 35 | */ 36 | 37 | void LoadXPRAM(const char *vmdir) 38 | { 39 | FILE *f = fopen(XPRAM_FILE_NAME, "rb"); 40 | if (f != NULL) { 41 | fread(XPRAM, 256, 1, f); 42 | fclose(f); 43 | } 44 | } 45 | 46 | 47 | /* 48 | * Save XPRAM to settings file 49 | */ 50 | 51 | void SaveXPRAM(void) 52 | { 53 | FILE *f = fopen(XPRAM_FILE_NAME, "wb"); 54 | if (f != NULL) { 55 | fwrite(XPRAM, 256, 1, f); 56 | fclose(f); 57 | } 58 | } 59 | 60 | 61 | /* 62 | * Delete PRAM file 63 | */ 64 | 65 | void ZapPRAM(void) 66 | { 67 | remove(XPRAM_FILE_NAME); 68 | } 69 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/BasiliskII.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/AmigaOS/BasiliskII.info -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/Makefile: -------------------------------------------------------------------------------- 1 | # AmigaOS makefile for Basilisk II (GeekGadgets tool chain) 2 | 3 | ## System specific configuration 4 | CC = gcc 5 | CXX = c++ 6 | CXXFLAGS = -g -O1 -noixemul -m68020 -msmall-code -Wno-multichar 7 | CPPFLAGS = -I../include -I../native_cpu -I. 8 | DEFS = 9 | LDFLAGS = -noixemul 10 | LIBS = /gg/lib/libnix/swapstack.o 11 | AS = PhxAss 12 | ASFLAGS = OPT ! INCPATH GG:os-include FPU=1 13 | 14 | ## Files 15 | SRCS = ../main.cpp main_amiga.cpp ../prefs.cpp ../prefs_items.cpp \ 16 | prefs_amiga.cpp prefs_editor_amiga.cpp sys_amiga.cpp ../rom_patches.cpp \ 17 | ../slot_rom.cpp ../rsrc_patches.cpp ../emul_op.cpp \ 18 | ../macos_util.cpp ../xpram.cpp xpram_amiga.cpp ../timer.cpp \ 19 | timer_amiga.cpp clip_amiga.cpp ../adb.cpp ../serial.cpp \ 20 | serial_amiga.cpp ../ether.cpp ether_amiga.cpp ../sony.cpp ../disk.cpp \ 21 | ../cdrom.cpp ../scsi.cpp scsi_amiga.cpp ../video.cpp video_amiga.cpp \ 22 | ../audio.cpp audio_amiga.cpp ../extfs.cpp extfs_amiga.cpp \ 23 | ../user_strings.cpp user_strings_amiga.cpp asm_support.asm 24 | APP = BasiliskII 25 | 26 | ## Rules 27 | .PHONY: clean distclean 28 | .SUFFIXES: 29 | .SUFFIXES: .c .cpp .asm .o .h 30 | 31 | all: $(APP) 32 | 33 | OBJ_DIR = obj 34 | $(OBJ_DIR):: 35 | @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 36 | 37 | define SRCS_LIST_TO_OBJS 38 | $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \ 39 | $(basename $(notdir $(file)))))) 40 | endef 41 | OBJS = $(SRCS_LIST_TO_OBJS) 42 | 43 | SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) 44 | VPATH := 45 | VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) 46 | 47 | $(APP): $(OBJ_DIR) $(OBJS) 48 | $(CXX) -o $(APP) $(LDFLAGS) $(LIBS) $(OBJS) 49 | 50 | clean: 51 | rm -f $(APP) $(OBJ_DIR)/* *~ *.bak obj.0000.* 52 | 53 | distclean: clean 54 | rm -rf $(OBJ_DIR) 55 | 56 | $(OBJ_DIR)/%.o : %.cpp 57 | $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ 58 | $(OBJ_DIR)/%.o : %.asm 59 | $(AS) $(ASFLAGS) $< TO $(OBJ_DIR)/$*.obj 60 | hunk2aout $(OBJ_DIR)/$*.obj >/dev/null 61 | mv obj.0000.* $@ 62 | 63 | #------------------------------------------------------------------------- 64 | # DO NOT DELETE THIS LINE -- make depend depends on it. 65 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/main_amiga.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/AmigaOS/main_amiga.cpp -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/sysdeps.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sysdeps.h - System dependent definitions for AmigaOS 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 | #ifndef SYSDEPS_H 22 | #define SYSDEPS_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #include "user_strings_amiga.h" 33 | 34 | // Mac and host address space are the same 35 | #define REAL_ADDRESSING 1 36 | 37 | // Using 68k natively 38 | #define EMULATED_68K 0 39 | 40 | // Mac ROM is not write protected 41 | #define ROM_IS_WRITE_PROTECTED 0 42 | #define USE_SCRATCHMEM_SUBTERFUGE 1 43 | 44 | // ExtFS is supported 45 | #define SUPPORTS_EXTFS 1 46 | 47 | // mon is not supported 48 | #undef ENABLE_MON 49 | 50 | // Data types 51 | typedef unsigned char uint8; 52 | typedef signed char int8; 53 | typedef unsigned short uint16; 54 | typedef signed short int16; 55 | typedef unsigned long uint32; 56 | typedef signed long int32; 57 | typedef unsigned long long uint64; 58 | typedef signed long long int64; 59 | 60 | typedef unsigned long long loff_t; 61 | 62 | // Time data type for Time Manager emulation 63 | typedef struct timeval tm_time_t; 64 | 65 | // Endianess conversion (not needed) 66 | #define ntohs(x) (x) 67 | #define ntohl(x) (x) 68 | #define htons(x) (x) 69 | #define htonl(x) (x) 70 | 71 | // Some systems don't define this (ExecBase->AttnFlags) 72 | #ifndef AFF_68060 73 | #define AFF_68060 (1L<<7) 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/user_strings_amiga.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_amiga.h - AmigaOS-specific localizable strings 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 | #ifndef USER_STRINGS_AMIGA_H 22 | #define USER_STRINGS_AMIGA_H 23 | 24 | enum { 25 | STR_NO_PREPARE_EMUL_ERR = 10000, 26 | STR_NO_GADTOOLS_LIB_ERR, 27 | STR_NO_IFFPARSE_LIB_ERR, 28 | STR_NO_ASL_LIB_ERR, 29 | STR_NO_TIMER_DEV_ERR, 30 | STR_NO_P96_MODE_ERR, 31 | STR_NO_VIDEO_MODE_ERR, 32 | STR_WRONG_SCREEN_DEPTH_ERR, 33 | STR_WRONG_SCREEN_FORMAT_ERR, 34 | STR_ENFORCER_RUNNING_ERR, 35 | 36 | STR_NOT_ETHERNET_WARN, 37 | STR_NO_MULTICAST_WARN, 38 | STR_NO_GTLAYOUT_LIB_WARN, 39 | STR_NO_AHI_WARN, 40 | STR_NO_AHI_CTRL_WARN, 41 | STR_NOT_ENOUGH_MEM_WARN, 42 | 43 | STR_AHI_MODE_CTRL, 44 | STR_SCSI_MEMTYPE_CTRL, 45 | STR_MEMTYPE_CHIP_LAB, 46 | STR_MEMTYPE_24BITDMA_LAB, 47 | STR_MEMTYPE_ANY_LAB, 48 | STR_SCSI_DEVICES_CTRL 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/AmigaOS/xpram_amiga.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram_amiga.cpp - XPRAM handling, AmigaOS specific stuff 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 22 | #define __USE_SYSBASE 23 | #include 24 | #include 25 | 26 | #include "sysdeps.h" 27 | #include "xpram.h" 28 | 29 | 30 | // XPRAM file name 31 | #if POWERPC_ROM 32 | static char XPRAM_FILE_NAME[] = "ENV:SheepShaver_NVRAM"; 33 | static char XPRAM_FILE_NAME_ARC[] = "ENVARC:SheepShaver_NVRAM"; 34 | #else 35 | static char XPRAM_FILE_NAME[] = "ENV:BasiliskII_XPRAM"; 36 | static char XPRAM_FILE_NAME_ARC[] = "ENVARC:BasiliskII_XPRAM"; 37 | #endif 38 | 39 | 40 | /* 41 | * Load XPRAM from settings file 42 | */ 43 | 44 | void LoadXPRAM(void) 45 | { 46 | BPTR fh; 47 | if ((fh = Open(XPRAM_FILE_NAME, MODE_OLDFILE)) != NULL) { 48 | Read(fh, XPRAM, XPRAM_SIZE); 49 | Close(fh); 50 | } 51 | } 52 | 53 | 54 | /* 55 | * Save XPRAM to settings file 56 | */ 57 | 58 | void SaveXPRAM(void) 59 | { 60 | BPTR fh; 61 | if ((fh = Open(XPRAM_FILE_NAME, MODE_NEWFILE)) != NULL) { 62 | Write(fh, XPRAM, XPRAM_SIZE); 63 | Close(fh); 64 | } 65 | if ((fh = Open(XPRAM_FILE_NAME_ARC, MODE_NEWFILE)) != NULL) { 66 | Write(fh, XPRAM, XPRAM_SIZE); 67 | Close(fh); 68 | } 69 | } 70 | 71 | 72 | /* 73 | * Delete PRAM file 74 | */ 75 | 76 | void ZapPRAM(void) 77 | { 78 | DeleteFile(XPRAM_FILE_NAME); 79 | DeleteFile(XPRAM_FILE_NAME_ARC); 80 | } 81 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/BeOS/about_window.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * about_window.cpp - "About" window 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 22 | #include 23 | 24 | #include "sysdeps.h" 25 | #include "version.h" 26 | #include "user_strings.h" 27 | 28 | /* 29 | * Display "About" window 30 | */ 31 | 32 | void ShowAboutWindow(void) 33 | { 34 | char str[512]; 35 | sprintf(str, 36 | "Basilisk II\nVersion %d.%d\n\n" 37 | "Copyright " B_UTF8_COPYRIGHT " 1997-2008 Christian Bauer et al.\n" 38 | "E-mail: Christian.Bauer@uni-mainz.de\n" 39 | "http://www.uni-mainz.de/~bauec002/B2Main.html\n\n" 40 | "Basilisk II comes with ABSOLUTELY NO\n" 41 | "WARRANTY. This is free software, and\n" 42 | "you are welcome to redistribute it\n" 43 | "under the terms of the GNU General\n" 44 | "Public License.\n", 45 | VERSION_MAJOR, VERSION_MINOR 46 | ); 47 | BAlert *about = new BAlert("", str, GetString(STR_OK_BUTTON), NULL, NULL, B_WIDTH_FROM_LABEL); 48 | BTextView *theText = about->TextView(); 49 | if (theText) { 50 | theText->SetStylable(true); 51 | theText->Select(0, 11); 52 | BFont ourFont; 53 | theText->SetFontAndColor(be_bold_font); 54 | theText->GetFontAndColor(2, &ourFont, NULL); 55 | ourFont.SetSize(24); 56 | theText->SetFontAndColor(&ourFont); 57 | } 58 | about->Go(); 59 | } 60 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/BeOS/about_window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * about_window.h - "About" window 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 | #ifndef ABOUT_WINDOW_H 22 | #define ABOUT_WINDOW_H 23 | 24 | // Display "About" window 25 | extern void ShowAboutWindow(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/BeOS/user_strings_beos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_beos.h - BeOS-specific localizable strings 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 | #ifndef USER_STRINGS_BEOS_H 22 | #define USER_STRINGS_BEOS_H 23 | 24 | enum { 25 | STR_NO_SHEEP_DRIVER_ERR = 10000, 26 | STR_SHEEP_UP_ERR, 27 | STR_NO_KERNEL_DATA_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_VIDEO_FAILED 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/BeOS/xpram_beos.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram_beos.cpp - XPRAM handling, BeOS specific stuff 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 22 | #include 23 | 24 | #include "sysdeps.h" 25 | #include "xpram.h" 26 | 27 | 28 | // XPRAM file name and path 29 | #if POWERPC_ROM 30 | const char XPRAM_FILE_NAME[] = "SheepShaver_NVRAM"; 31 | #else 32 | const char XPRAM_FILE_NAME[] = "BasiliskII_XPRAM"; 33 | #endif 34 | static BPath xpram_path; 35 | 36 | 37 | /* 38 | * Load XPRAM from settings file 39 | */ 40 | 41 | void LoadXPRAM(const char *vmdir) 42 | { 43 | // Construct XPRAM path 44 | find_directory(B_USER_SETTINGS_DIRECTORY, &xpram_path, true); 45 | xpram_path.Append(XPRAM_FILE_NAME); 46 | 47 | // Load XPRAM from settings file 48 | int fd; 49 | if ((fd = open(xpram_path.Path(), O_RDONLY)) >= 0) { 50 | read(fd, XPRAM, XPRAM_SIZE); 51 | close(fd); 52 | } 53 | } 54 | 55 | 56 | /* 57 | * Save XPRAM to settings file 58 | */ 59 | 60 | void SaveXPRAM(void) 61 | { 62 | if (xpram_path.InitCheck() != B_NO_ERROR) 63 | return; 64 | int fd; 65 | if ((fd = open(xpram_path.Path(), O_WRONLY | O_CREAT, 0666)) >= 0) { 66 | write(fd, XPRAM, XPRAM_SIZE); 67 | close(fd); 68 | } 69 | } 70 | 71 | 72 | /* 73 | * Delete PRAM file 74 | */ 75 | 76 | void ZapPRAM(void) 77 | { 78 | // Construct PRAM path 79 | find_directory(B_USER_SETTINGS_DIRECTORY, &xpram_path, true); 80 | xpram_path.Append(XPRAM_FILE_NAME); 81 | 82 | // Delete file 83 | unlink(xpram_path.Path()); 84 | } 85 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/AudioBackEnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/AudioBackEnd.cpp -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/AudioBackEnd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/AudioBackEnd.h -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/AudioDevice.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/AudioDevice.cpp -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/AudioDevice.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/AudioDevice.h -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/BasiliskII.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/BasiliskII.icns -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Controller.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Controller.h - Simple application window management. 3 | * 4 | * $Id$ 5 | * 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 | #import 24 | #import "PrefsEditor.h" 25 | 26 | // If the application supports multiple windows, 27 | // ENABLE_MULTIPLE can be defined in config.h 28 | 29 | @interface Controller : NSApplication 30 | { 31 | #ifdef ENABLE_MULTIPLE 32 | NSMutableArray *emulators; // Array of created Emulators 33 | #endif 34 | IBOutlet Emulator *theEmulator; 35 | IBOutlet PrefsEditor *thePrefsEditor; 36 | } 37 | 38 | - (void) dispatchKeyEvent: (NSEvent *)event 39 | type: (NSEventType)type; 40 | - (void) dispatchEvent: (NSEvent *)event 41 | type: (NSEventType)type; 42 | 43 | 44 | - (IBAction) HelpHowTo: (id)sender; 45 | - (IBAction) HelpToDo: (id)sender; 46 | - (IBAction) HelpVersions: (id)sender; 47 | 48 | #ifdef ENABLE_MULTIPLE 49 | - (IBAction) NewEmulator: (id)sender; 50 | - (IBAction) PauseAll: (id)sender; 51 | - (IBAction) RunAll: (id)sender; 52 | - (IBAction) TerminateAll: (id)sender; 53 | #endif 54 | 55 | - (BOOL) isAnyEmulatorDisplayingSheets; 56 | - (BOOL) isAnyEmulatorRunning; 57 | - (short) emulatorCreatedCount; // If any emulator environments have been setup, count how many 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Credits.html: -------------------------------------------------------------------------------- 1 | Basilisk II is an open source, 68k Mac. emulator. 2 |
3 | It enables you to run 68k MacOS software on your computer, even if you are using a different operating system (however, you do need a copy of the MacOS and a Macintosh ROM image to use it). 4 |
5 | The Official Basilisk II Home Page 6 |
7 | 8 | MacOS X (native windowing) port 9 |
10 | by Nigel Pearson <nigel@ind.tansu.com.au> 11 |
12 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "Copyright © 1997-2006 Christian Bauer et al. Freely distributable under the terms of the GNU GPL."; 4 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/Collapsed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/Collapsed.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/Expanded.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/Expanded.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 3 11 521 240 0 4 1152 742 7 | IBEditorPositions 8 | 9 | 29 10 | 3 256 365 44 0 0 1152 746 11 | 12 | IBFramework Version 13 | 349.0 14 | IBLockedObjects 15 | 16 | 288 17 | 18 | IBOpenObjects 19 | 20 | 29 21 | 813 22 | 23 | IBSystem Version 24 | 7D24 25 | IBUserGuides 26 | 27 | VolumeSize 28 | 29 | guideLocations 30 | 31 | guidesLocked 32 | NO 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/objects.nib -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/resetH.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/resetH.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/resetN.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/resetN.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/shutdownH.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/shutdownH.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/shutdownN.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/English.lproj/MainMenu.nib/shutdownN.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | BasiliskII 9 | CFBundleGetInfoString 10 | Basilisk II version 1.0, Copyright © 1997-2006 Christian Bauer et al. Mac OS X port 19 11 | CFBundleIconFile 12 | BasiliskII.icns 13 | CFBundleIdentifier 14 | 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | BasiliskII 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | Basilisk II 1.0, Mac OS X port 19 23 | CFBundleSignature 24 | ???? 25 | NSHelpFile 26 | README.txt 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | Controller 31 | 32 | 33 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/MacOSX_sound_if.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * MacOSX_sound_if.h 3 | * BasiliskII 4 | * 5 | * Copyright 2006 Daniel Sumorok. All rights reserved. 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 | #include "AudioBackEnd.h" 22 | #include "MacOSX_sound_if.h" 23 | 24 | OSXsoundOutput::OSXsoundOutput() : 25 | player(NULL), 26 | callback(NULL) { 27 | } 28 | 29 | void OSXsoundOutput::getMoreSamples(void *arg) { 30 | OSXsoundOutput *me; 31 | 32 | me = (OSXsoundOutput *)arg; 33 | 34 | if(me == NULL) { 35 | return; 36 | } 37 | 38 | if(me->callback == NULL) { 39 | return; 40 | } 41 | 42 | me->callback(); 43 | } 44 | 45 | int OSXsoundOutput::start(int bitsPerSample, int numChannels, int sampleRate) { 46 | stop(); 47 | player = new AudioBackEnd(bitsPerSample, numChannels, sampleRate); 48 | if(player != NULL) { 49 | player->setCallback(getMoreSamples, (void *)this); 50 | player->Start(); 51 | } 52 | return 0; 53 | } 54 | 55 | int OSXsoundOutput::stop() { 56 | if(player != NULL) { 57 | player->Stop(); 58 | delete player; 59 | player = NULL; 60 | } 61 | return 0; 62 | } 63 | 64 | OSXsoundOutput::~OSXsoundOutput() { 65 | stop(); 66 | } 67 | 68 | void OSXsoundOutput::setCallback(audioCallback fn) { 69 | callback = fn; 70 | } 71 | 72 | unsigned int OSXsoundOutput::bufferSizeFrames() { 73 | if(player != NULL) { 74 | return player->BufferSizeFrames(); 75 | } 76 | 77 | return 0; 78 | } 79 | 80 | int OSXsoundOutput::sendAudioBuffer(void *buffer, int numFrames) { 81 | if(player != NULL) { 82 | return player->sendAudioBuffer(buffer, numFrames); 83 | } 84 | 85 | return 0; 86 | } 87 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/MacOSX_sound_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MacOSX_sound_if.h 3 | * BasiliskII 4 | * 5 | * Copyright 2006 Daniel Sumorok. All rights reserved. 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 | typedef int (*audioCallback)(void); 23 | 24 | class AudioBackEnd; 25 | 26 | class OSXsoundOutput { 27 | private: 28 | static void getMoreSamples(void *arg); 29 | 30 | AudioBackEnd *player; 31 | audioCallback callback; 32 | public: 33 | OSXsoundOutput(); 34 | ~OSXsoundOutput(); 35 | int start(int bitsPerSample, int numChannels, int sampleRate); 36 | int stop(); 37 | int putBuffer(void *buffer, int numSamples); 38 | void setCallback(audioCallback fn); 39 | unsigned int bufferSizeFrames(); 40 | int sendAudioBuffer(void *buffer, int numFrames); 41 | }; 42 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | CFBundleName = "BasiliskII"; 4 | NSHumanReadableCopyright = "Copyright 1997-2001 Christian Bauer et al., Freely distributable under the terms of the GNU GPL"; 5 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 5 42 473 240 0 41 1024 705 7 | IBMainMenuLocation 8 | 0 702 365 44 0 42 1152 704 9 | IBUserGuides 10 | 11 | About 12 | 13 | guideLocations 14 | 15 | guidesLocked 16 | NO 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/MainMenu.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/MainMenu.nib/objects.nib -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/Collapsed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/Collapsed.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/Expanded.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/Expanded.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {NewEmulator = id; ShowAbout = id; pauseAll = id; terminateAll = id; }; 5 | CLASS = Controller; 6 | LANGUAGE = ObjC; 7 | OUTLETS = {myEmulator = id; }; 8 | SUPERCLASS = NSObject; 9 | }, 10 | { 11 | ACTIONS = { 12 | Interrupt = id; 13 | PowerKey = id; 14 | Restart = id; 15 | Resume = id; 16 | Snapshot = id; 17 | SpeedChange = id; 18 | Suspend = id; 19 | Terminate = id; 20 | ToggleState = id; 21 | ZapPRAM = id; 22 | }; 23 | CLASS = Emulator; 24 | LANGUAGE = ObjC; 25 | OUTLETS = {barberPole = id; runOrPause = id; screen = id; speed = id; win = id; }; 26 | SUPERCLASS = NSObject; 27 | }, 28 | {CLASS = EmulatorView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, 29 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } 30 | ); 31 | IBVersion = 1; 32 | } -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 18 42 473 240 0 41 1024 705 7 | IBMainMenuLocation 8 | 0 702 365 44 0 41 1024 705 9 | IBUserGuides 10 | 11 | Window 12 | 13 | guideLocations 14 | 15 | guidesLocked 16 | NO 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/objects.nib -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/resetH.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/resetH.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/resetN.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/resetN.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/shutdownH.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/shutdownH.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/shutdownN.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/English.lproj/Win512x342.nib/shutdownN.tiff -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/Multiple-Windows/README: -------------------------------------------------------------------------------- 1 | This is a version of the interface that would allow multiple emulations to 2 | run side-by-side, in different windows. Currently, the uae_cpu engine is not 3 | re-entrant, and some of the Basilisk glue would not allow this, so this will 4 | probably never be used. I will save it here for educational purposes, and just 5 | in case this feature is ever needed. 6 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/NNThread.h: -------------------------------------------------------------------------------- 1 | // 2 | // NNThread.h -Not Nextstep Thread? 3 | // Nigel's Nice Thread? 4 | // 5 | // Revision 1.2, Tuesday May 25 2004 6 | // 7 | // Created by Nigel Pearson on Tue Nov 28 2000. 8 | // Public Domain. No rights reserved. 9 | // 10 | 11 | // Define what flavour of threading to use: 12 | #define USE_NSTHREAD 13 | //#define USE_PTHREAD 14 | 15 | #import 16 | 17 | #import 18 | #import 19 | 20 | #ifdef USE_PTHREAD 21 | #include 22 | 23 | struct pthreadArgs // This duplicates most of the stuff in the NNThread object 24 | { 25 | id *object; 26 | SEL *sel; 27 | 28 | NSAutoreleasePool *pool; 29 | BOOL allocPool, 30 | *completed; 31 | }; 32 | #endif 33 | 34 | @interface NNThread : NSObject 35 | { 36 | id object; 37 | SEL sel; 38 | thread_t machThread; 39 | #ifdef USE_PTHREAD 40 | pthread_t pThread; 41 | struct pthreadArgs pthreadArgs; 42 | #endif 43 | NSAutoreleasePool *pool; 44 | BOOL allocPool, 45 | completed, 46 | suspended; 47 | } 48 | 49 | - (NNThread *) initWithAutoReleasePool; 50 | - (NNThread *) initSuspended: (BOOL) startSuspended 51 | withAutoreleasePool: (BOOL) allocatePool; 52 | 53 | - (void) perform: (SEL)action of: (id)receiver; 54 | - (void) resume; 55 | - (BOOL) start; 56 | - (void) suspend; 57 | - (void) terminate; 58 | 59 | @end 60 | 61 | typedef enum _NNTimeUnits 62 | { 63 | NNnanoSeconds = 1, 64 | NNmicroSeconds = 2, 65 | NNmilliSeconds = 3, 66 | NNseconds = 4 67 | } 68 | NNTimeUnits; 69 | 70 | #import 71 | 72 | @interface NNTimer : NNThread 73 | { 74 | struct timespec delay; 75 | BOOL repeating; 76 | id timerObject; 77 | SEL timerSel; 78 | } 79 | 80 | - (NNTimer *) initWithAutoRelPool; 81 | 82 | - (void) changeIntervalTo: (int)number units: (NNTimeUnits)units; 83 | - (void) invalidate; 84 | 85 | - (void) perform: (SEL)action of: (id)receiver 86 | after: (int)number units: (NNTimeUnits)units; 87 | 88 | - (void) repeat: (SEL)action of: (id)receiver 89 | every: (int)number units: (NNTimeUnits)units; 90 | 91 | @end -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/autorelease.h: -------------------------------------------------------------------------------- 1 | /* 2 | * autorelease.h - a macro wrapping autorelease pools for use with Objective-C++ source files. 3 | * 4 | * Expands to @autoreleasepool on clang, uses a little hack to emulate @autoreleasepool on gcc. 5 | * 6 | * (C) 2012 Charles Srstka 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 | #import 24 | 25 | #ifndef __Autorelease_H__ 26 | #define __Autorelease_H__ 27 | 28 | // just a little forward compatibility in case we ever support LLVM/clang 29 | #if __clang__ 30 | #define AUTORELEASE_POOL @autoreleasepool 31 | #else 32 | class Autorelease_Pool_Wrapper { 33 | public: 34 | Autorelease_Pool_Wrapper() { m_pool = [[NSAutoreleasePool alloc] init]; } 35 | ~Autorelease_Pool_Wrapper() { [m_pool drain]; } 36 | operator bool() const { return true; } 37 | private: 38 | NSAutoreleasePool *m_pool; 39 | }; 40 | 41 | #define POOL_NAME(x, y) x##_##y 42 | #define POOL_NAME2(x, y) POOL_NAME(x, y) 43 | #define AUTORELEASE_POOL if(Autorelease_Pool_Wrapper POOL_NAME2(pool, __LINE__) = Autorelease_Pool_Wrapper()) 44 | #endif // !__clang__ 45 | 46 | #endif // __Autorelease_H__ 47 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/main_macosx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * main_macosx.h - Prototypes for Mac OS X general definitions 3 | * 4 | * $Id$ 5 | * 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 | bool InitEmulator (); 24 | void QuitEmuNoExit(); 25 | 26 | 27 | extern void ErrorAlert (const char *text); 28 | extern void WarningAlert(const char *text); 29 | extern bool ChoiceAlert (const char *text, const char *pos, const char *neg); 30 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/misc_macosx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id$ 3 | * 4 | * misc_macosx.h - Some prototypes of functions defined in misc_macosx.mm 5 | * 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 | #if defined(__APPLE__) && defined(__MACH__) 24 | // This means we are on Mac OS X of some sort 25 | #endif 26 | 27 | extern void ErrorSheet (NSString *msg, NSWindow *win), 28 | ErrorSheet (NSString *msg1, NSString *msg2, 29 | NSString *button, NSWindow *win), 30 | WarningSheet (NSString *message,NSWindow *win), 31 | WarningSheet (NSString *msg1, NSString *msg2, 32 | NSString *button, NSWindow *win), 33 | InfoSheet (NSString *msg, NSWindow *win), 34 | InfoSheet (NSString *msg1, NSString *msg2, 35 | NSString *button, NSWindow *win), 36 | EndSheet (NSWindow * window); 37 | 38 | extern int frequencyToTickDelay (float frequency); 39 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/utils_macosx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * utils_macosx.h - Mac OS X utility functions. 3 | * 4 | * Copyright (C) 2011 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 UTILS_MACOSX_H 22 | #define UTILS_MACOSX_H 23 | 24 | // Invokes the specified function with an NSAutoReleasePool in place. 25 | void NSAutoReleasePool_wrap(void (*fn)(void)); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/utils_macosx.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * utils_macosx.mm - Mac OS X utility functions. 3 | * 4 | * Copyright (C) 2011 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 22 | #include "utils_macosx.h" 23 | 24 | // This is used from video_sdl.cpp. 25 | void NSAutoReleasePool_wrap(void (*fn)(void)) 26 | { 27 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 28 | fn(); 29 | [pool release]; 30 | } 31 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/MacOSX/video_macosx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * video_macosx.h - Some video constants and globals 3 | * 4 | * $Id$ 5 | * 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 | #import 24 | 25 | /* Set the strategy for drawing the bitmap in the Mac OS X window */ 26 | //#define CGDRAWBITMAP 27 | #if defined __i386__ 28 | #define CGIMAGEREF 29 | //#define NSBITMAP 30 | #else 31 | #define CGIMAGEREF 32 | //#define NSBITMAP 33 | #endif 34 | 35 | // Using Core Graphics is fastest when rendering 32bit data. 36 | // Using CGImageRefs allows us to use all the bitmaps that BasiliskII supports. 37 | // When both Basilisk II and OS X are set to 'Thousands', updating a 312x342 38 | // window happens at over 500fps under 10.2, and over 600fps on 10.3! 39 | 40 | /* When the BasiliskII video driver respects the alpha bits, set this to let us use */ 41 | /* kCGImageAlphaPremultipliedFirst, and to have nice rounded corners on the screen. */ 42 | //#define CG_USE_ALPHA 43 | /* At the moment, it writes in the full 32bits :-( */ 44 | 45 | 46 | #define MIN_WIDTH 512 47 | #define MIN_HEIGHT 384 48 | #define MIN_HEIGHTC 342 // For classic emulation 49 | 50 | #define MAX_WIDTH 1240 51 | #define MAX_HEIGHT 1024 52 | 53 | // Display types 54 | enum 55 | { 56 | DISPLAY_OPENGL, 57 | DISPLAY_SCREEN, 58 | DISPLAY_WINDOW 59 | }; 60 | 61 | 62 | extern uint8 display_type, 63 | frame_skip; 64 | extern uint16 init_width, 65 | init_height, 66 | init_depth; 67 | 68 | extern bool parse_screen_prefs (const char *); 69 | extern void resizeWinTo (const uint16, const uint16); 70 | 71 | #import 72 | #import "EmulatorView.h" 73 | 74 | extern NSWindow *the_win; 75 | extern EmulatorView *output; 76 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | obj/* 3 | BasiliskII 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 | cpudefs.cpp 17 | cpuemu.cpp 18 | cpustbl.cpp 19 | cputbl.h 20 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/Darwin/lowmem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/Unix/Darwin/lowmem -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/Darwin/pagezero: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/Unix/Darwin/pagezero -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/Darwin/pagezero.c: -------------------------------------------------------------------------------- 1 | /* 2 | * pagezero.c - test to see if low memory globals can be accessed 3 | * 4 | * Copyright (c) 2003 Michael Z. Sliczniak 5 | * 6 | * Basilisk II (C) 1997-2003 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 | int 24 | main(int argc, const char *argv[]) 25 | { 26 | volatile char *pagezero = (void *)0; 27 | 28 | pagezero[0x1234] = pagezero[0x123]; 29 | 30 | return (0); 31 | } 32 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/Darwin/testlmem.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # testlmem.sh - test whether the Mach-O hack works 4 | # 5 | # Basilisk II (C) 1997-2005 Christian Bauer 6 | # 7 | # testlmem.sh Copyright (C) 2003 Michael Z. Sliczniak 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, write to the Free Software 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | 23 | PAGEZERO_SIZE=0x2000 24 | [[ -n "$1" ]] && PAGEZERO_SIZE=$1 25 | # You want all the output to go to stderr so that configure is quiet but 26 | # config.log is verbose. 27 | { echo 'building lowmem utility' && \ 28 | make -f /dev/null Darwin/lowmem && \ 29 | echo 'building pagezero test' && \ 30 | make -f /dev/null LDFLAGS="-pagezero_size $PAGEZERO_SIZE" Darwin/pagezero && \ 31 | echo 'enabling low memory globals in pagezero' && \ 32 | Darwin/lowmem Darwin/pagezero && \ 33 | echo 'running pagezero test' && \ 34 | Darwin/pagezero; } 1>&2 35 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/Irix/unaligned.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Irix/unaligned.c - Optimized unaligned access for Irix 3 | * 4 | * Basilisk II (C) 1997-2005 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 | #ifdef sgi 22 | #include "sysdeps.h" 23 | 24 | /* Tell the compiler to pack data on 1-byte boundaries 25 | * (i.e. arbitrary alignment). Requires SGI MIPSPro compilers. */ 26 | #pragma pack(1) 27 | 28 | typedef struct _ual32 { 29 | uae_u32 v; 30 | } ual32_t; 31 | 32 | typedef struct _ual16 { 33 | uae_u16 v; 34 | } ual16_t; 35 | 36 | #pragma pack(0) 37 | 38 | /* The compiler is smart enough to inline these when you build with "-ipa" */ 39 | uae_u32 do_get_mem_long(uae_u32 *a) {return ((ual32_t *)a)->v;} 40 | uae_u32 do_get_mem_word(uae_u16 *a) {return ((ual16_t *)a)->v;} 41 | void do_put_mem_long(uae_u32 *a, uae_u32 v) {((ual32_t *)a)->v = v;} 42 | void do_put_mem_word(uae_u16 *a, uae_u32 v) {((ual16_t *)a)->v = v;} 43 | 44 | #endif /* sgi */ 45 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/acinclude.m4: -------------------------------------------------------------------------------- 1 | dnl Additional macros for Basilisk II 2 | 3 | 4 | dnl Check for libgnomeui 5 | dnl B2_PATH_GNOMEUI([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 6 | dnl Test to see if libgnomeui is installed, and define GNOMEUI_CFLAGS, LIBS 7 | AC_DEFUN([B2_PATH_GNOMEUI], 8 | [dnl 9 | dnl Get the cflags and libraries from the gnome-config script 10 | dnl 11 | AC_ARG_WITH(gnome-config, 12 | [ --with-gnome-config=GNOME_CONFIG Location of gnome-config], 13 | GNOME_CONFIG="$withval") 14 | 15 | AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) 16 | AC_MSG_CHECKING(for libgnomeui) 17 | if test "$GNOME_CONFIG" = "no"; then 18 | AC_MSG_RESULT(no) 19 | ifelse([$2], , :, [$2]) 20 | else 21 | AC_MSG_RESULT(yes) 22 | GNOMEUI_CFLAGS=`$GNOME_CONFIG --cflags gnomeui` 23 | GNOMEUI_LIBS=`$GNOME_CONFIG --libs gnomeui` 24 | ifelse([$1], , :, [$1]) 25 | fi 26 | AC_SUBST(GNOMEUI_CFLAGS) 27 | AC_SUBST(GNOMEUI_LIBS) 28 | ]) 29 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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="Basilisk II" 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 `dirname $0`/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/bincue_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bincue_unix.h -- support for cdrom image files in bin/cue format 3 | * 4 | * (C) 2010 Geoffrey Brown 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 BINCUE_H 22 | #define BINCUE_H 23 | 24 | extern void *open_bincue(const char *name); 25 | extern bool readtoc_bincue(void *, uint8 *); 26 | extern size_t read_bincue(void *, void *, loff_t, size_t); 27 | extern loff_t size_bincue(void *); 28 | extern void close_bincue(void *); 29 | 30 | extern bool GetPosition_bincue(void *, uint8 *); 31 | 32 | extern bool CDPlay_bincue(void *, uint8, uint8, 33 | uint8, uint8, uint8, uint8); 34 | extern bool CDPause_bincue(void *); 35 | extern bool CDResume_bincue(void *); 36 | extern bool CDStop_bincue(void *); 37 | 38 | #ifdef USE_SDL_AUDIO 39 | extern void OpenAudio_bincue(int, int, int, uint8); 40 | extern void MixAudio_bincue(uint8 *, int); 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/cpr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A script to copy recursively ignoring detritus. 3 | # I based this off of a script I had that copied over ssh. 4 | # source can be a file or directory. 5 | # Mike Sliczniak 2009 6 | 7 | # Don't copy resource forks or extended attributes on Mac OS X 10.4. 8 | COPY_EXTENDED_ATTRIBUTES_DISABLE=true; export COPY_EXTENDED_ATTRIBUTES_DISABLE 9 | 10 | # Don't copy resource forks or extended attributes on Mac OS X 10.5. 11 | COPYFILE_DISABLE=true; export COPYFILE_DISABLE 12 | 13 | case $# in 14 | 2) 15 | ;; 16 | *) 17 | echo "Usage: cpr source destdir" >&2 18 | exit 2 19 | ;; 20 | esac 21 | 22 | # dir and base names of the source 23 | d=`dirname "$1"` || exit 24 | b=`basename "$1"` || exit 25 | 26 | # handle relative and absolute destination dirs 27 | case "$2" in 28 | /*) 29 | p=$2 30 | ;; 31 | *) 32 | p="$PWD"/"$2" 33 | ;; 34 | esac 35 | 36 | # cd into the source dir 37 | cd "$d" || exit 38 | 39 | # This is only for Mac OS X, but some systems do not have gtar, find 40 | # sometimes lacks -f, and other systems use test -a. 41 | 42 | # List all interesting files for tar to copy: 43 | # The first clause skips directories used for revision control. 44 | # The second clause ignores detritus files from revision control and OSs. 45 | # The third clause ignores ._ style files created by Mac OS X on file systems 46 | # that do not have native resource forks or extended attributes. It checks to 47 | # see that the file it is associated with exists. 48 | find -f "$b" \( \! \( -type d \( \ 49 | -name CVS -o -name RCS -o -name SCCS -o -name .git -o -name .svn \ 50 | \) -prune \) \) \ 51 | \ 52 | \( \! \( -type f \( \ 53 | -name .DS_Store -o -name Thumbs.db -o -name .cvsignore -o -name .gitignore \ 54 | \) \) \) \ 55 | \ 56 | \( \! \( \ 57 | -type f -name '._*' -execdir /bin/sh -c \ 58 | 'f=`echo "$1" | sed "s:^\._:./:"`; [ -e "$f" ]' /bin/sh '{}' \; \ 59 | \) \) -print0 | tar -c -f - --null -T - --no-recursion | tar -x -C "$p" -f - 60 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/disk_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * disk_unix.h - Generic disk interface 3 | * 4 | * Basilisk II (C) Dave Vasilevsky 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 DISK_UNIX_H 22 | #define DISK_UNIX_H 23 | 24 | #include "sysdeps.h" 25 | 26 | struct disk_generic { 27 | enum status { 28 | DISK_UNKNOWN, 29 | DISK_INVALID, 30 | DISK_VALID, 31 | }; 32 | 33 | disk_generic() { } 34 | virtual ~disk_generic() { }; 35 | 36 | virtual bool is_read_only() = 0; 37 | virtual size_t read(void *buf, loff_t offset, size_t length) = 0; 38 | virtual size_t write(void *buf, loff_t offset, size_t length) = 0; 39 | virtual loff_t size() = 0; 40 | }; 41 | 42 | typedef disk_generic::status (disk_factory)(const char *path, bool read_only, 43 | disk_generic **disk); 44 | 45 | extern disk_factory disk_sparsebundle_factory; 46 | extern disk_factory disk_vhd_factory; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/fbdevices: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # device depth offset for mmap(2) 3 | # ------------------------------------------------------------------------------ 4 | 5 | # Frame buffers known to work 6 | cgsix 8 0x70016000 7 | tcx 8 0x00000000 8 | 9 | # Untested frame buffers 10 | cgthree 8 0x04000000 11 | cgtwo 8 0x00000000 12 | cgfour 8 0x00000000 13 | cgeight 24 0x00000000 14 | tcx 24 0x01000000 15 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | errstatus=0 8 | dirmode="" 9 | 10 | usage="\ 11 | Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." 12 | 13 | # process command line arguments 14 | while test $# -gt 0 ; do 15 | case "${1}" in 16 | -h | --help | --h* ) # -h for help 17 | echo "${usage}" 1>&2; exit 0 ;; 18 | -m ) # -m PERM arg 19 | shift 20 | test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } 21 | dirmode="${1}" 22 | shift ;; 23 | -- ) shift; break ;; # stop option processing 24 | -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option 25 | * ) break ;; # first non-opt arg 26 | esac 27 | done 28 | 29 | for file 30 | do 31 | if test -d "$file"; then 32 | shift 33 | else 34 | break 35 | fi 36 | done 37 | 38 | case $# in 39 | 0) exit 0 ;; 40 | esac 41 | 42 | case $dirmode in 43 | '') 44 | if mkdir -p -- . 2>/dev/null; then 45 | echo "mkdir -p -- $*" 46 | exec mkdir -p -- "$@" 47 | fi ;; 48 | *) 49 | if mkdir -m "$dirmode" -p -- . 2>/dev/null; then 50 | echo "mkdir -m $dirmode -p -- $*" 51 | exec mkdir -m "$dirmode" -p -- "$@" 52 | fi ;; 53 | esac 54 | 55 | for file 56 | do 57 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 58 | shift 59 | 60 | pathcomp= 61 | for d 62 | do 63 | pathcomp="$pathcomp$d" 64 | case "$pathcomp" in 65 | -* ) pathcomp=./$pathcomp ;; 66 | esac 67 | 68 | if test ! -d "$pathcomp"; then 69 | echo "mkdir $pathcomp" 70 | 71 | mkdir "$pathcomp" || lasterr=$? 72 | 73 | if test ! -d "$pathcomp"; then 74 | errstatus=$lasterr 75 | else 76 | if test ! -z "$dirmode"; then 77 | echo "chmod $dirmode $pathcomp" 78 | 79 | lasterr="" 80 | chmod "$dirmode" "$pathcomp" || lasterr=$? 81 | 82 | if test ! -z "$lasterr"; then 83 | errstatus=$lasterr 84 | fi 85 | fi 86 | fi 87 | fi 88 | 89 | pathcomp="$pathcomp/" 90 | done 91 | done 92 | 93 | exit $errstatus 94 | 95 | # Local Variables: 96 | # mode: shell-script 97 | # sh-indentation: 3 98 | # End: 99 | # mkinstalldirs ends here 100 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/prefs_editor_gtk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/Unix/prefs_editor_gtk.cpp -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/semaphore.h: -------------------------------------------------------------------------------- 1 | #ifndef __SEMAPHORE_H 2 | #define __SEMAPHORE_H 3 | 4 | #define SEM_VALUE_MAX 64 5 | 6 | #if defined(c_plusplus) || defined(__cplusplus) 7 | extern "C" { 8 | #endif /* c_plusplus || __cplusplus */ 9 | 10 | /* MacOS X doesn't implement unnamed POSIX semaphores, event though 11 | the libc defines them! */ 12 | #if (defined(__MACH__) && defined(__APPLE__)) 13 | #include 14 | #include 15 | #include 16 | 17 | #define sem_t semaphore_t 18 | #define sem_init(SEM,UNUSED,VALUE) semaphore_create(current_task(), (SEM), SYNC_POLICY_FIFO, (VALUE)) 19 | #define sem_destroy(SEM) semaphore_destroy(current_task(), *(SEM)) 20 | #define sem_wait(SEM) semaphore_wait(*(SEM)) 21 | #define sem_post(SEM) semaphore_signal(*(SEM)) 22 | #else 23 | typedef struct psem { 24 | pthread_mutex_t sem_lock; 25 | int sem_value; 26 | int sem_waiting; 27 | } sem_t; 28 | 29 | int sem_init(sem_t* sem, int pshared, unsigned int value); 30 | int sem_destroy(sem_t* sem); 31 | sem_t sem_open(const char* name, int oflag, ...); 32 | int sem_close(sem_t* sem); 33 | int sem_unlink(const char* name); 34 | int sem_wait(sem_t* sem); 35 | int sem_trywait(sem_t* sem); 36 | int sem_post(sem_t* sem); 37 | int sem_getvalue(sem_t* sem, int* sval); 38 | #endif 39 | 40 | #if defined(c_plusplus) || defined(__cplusplus) 41 | }; 42 | #endif /* c_plusplus || __cplusplus */ 43 | 44 | #endif /* __SEMAPHORE_H */ 45 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/sshpty.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: sshpty.h,v 1.4 2002/03/04 17:27:39 stevesk Exp $ */ 2 | 3 | /* 4 | * Author: Tatu Ylonen 5 | * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland 6 | * All rights reserved 7 | * Functions for allocating a pseudo-terminal and making it the controlling 8 | * tty. 9 | * 10 | * As far as I am concerned, the code I have written for this software 11 | * can be used freely for any purpose. Any derived versions of this 12 | * software must be clearly marked as such, and if the derived work is 13 | * incompatible with the protocol description in the RFC file, it must be 14 | * called by a name other than "ssh" or "Secure Shell". 15 | */ 16 | 17 | #ifndef SSHPTY_H 18 | #define SSHPTY_H 19 | 20 | int pty_allocate(int *, int *, char *, int); 21 | void pty_release(const char *); 22 | void pty_make_controlling_tty(int *, const char *); 23 | void pty_change_window_size(int, int, int, int, int); 24 | void pty_setowner(struct passwd *, const char *); 25 | 26 | #endif /* SSHPTY_H */ 27 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Unix/strlcpy.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | #ifndef _BSD_STRLCPY_H 4 | #define _BSD_STRLCPY_H 5 | 6 | #include "config.h" 7 | #ifndef HAVE_STRLCPY 8 | #include 9 | size_t strlcpy(char *dst, const char *src, size_t siz); 10 | #endif /* !HAVE_STRLCPY */ 11 | 12 | #endif /* _BSD_STRLCPY_H */ 13 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskII.DebugJIT.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)Debug\ 6 | 7 | 8 | 9 | 10 | 11 | $(ToolsDir) 12 | 13 | 14 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskII.ReleaseJIT.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(ProjectDir)Release\ 6 | 7 | 8 | 9 | 10 | 11 | $(ToolsDir) 12 | 13 | 14 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskII.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/Windows/BasiliskII.ico -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskII.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(OutDir) 6 | 7 | 8 | 9 | 10 | 11 | $(ToolsDir) 12 | 13 | 14 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskII.rc: -------------------------------------------------------------------------------- 1 | BasiliskII ICON PRELOAD "BasiliskII.ico" 2 | 3 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskIIGUI.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/Windows/BasiliskIIGUI.ico -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/BasiliskIIGUI.rc: -------------------------------------------------------------------------------- 1 | BasiliskIIGUI ICON PRELOAD "BasiliskIIGUI.ico" 2 | 3 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/build68k.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/ether_windows.h: -------------------------------------------------------------------------------- 1 | #ifndef _ETHER_WINDOWS_H_ 2 | #define _ETHER_WINDOWS_H_ 3 | 4 | void enqueue_packet( const uint8 *buf, int sz ); 5 | 6 | #ifdef SHEEPSHAVER 7 | extern uint8 ether_addr[6]; 8 | #endif 9 | 10 | #endif // _ETHER_WINDOWS_H_ 11 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/gencomp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/gencpu.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/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 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/Windows/user_strings_windows.h: -------------------------------------------------------------------------------- 1 | /* 2 | * user_strings_windows.h - Windows-specific localizable strings 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 | #ifndef USER_STRINGS_WINDOWS_H 22 | #define USER_STRINGS_WINDOWS_H 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus >= 201103L || _MSC_VER >= 1600 26 | #include 27 | 28 | // Convert text to wide string, given the string number 29 | extern std::unique_ptr GetStringW(int num); 30 | #endif 31 | #endif 32 | 33 | enum { 34 | STR_NO_XVISUAL_ERR = 10000, 35 | STR_VOSF_INIT_ERR, 36 | STR_SIG_INSTALL_ERR, 37 | STR_TICK_THREAD_ERR, 38 | STR_SLIRP_NO_DNS_FOUND_WARN, 39 | STR_NO_AUDIO_WARN, 40 | STR_KEYCODE_FILE_WARN, 41 | STR_KEYCODE_VENDOR_WARN, 42 | STR_WINDOW_TITLE_GRABBED, 43 | STR_NO_WIN32_NT_4, 44 | 45 | STR_PREFS_MENU_FILE_GTK, 46 | STR_PREFS_ITEM_START_GTK, 47 | STR_PREFS_ITEM_ZAP_PRAM_GTK, 48 | STR_PREFS_ITEM_SEPL_GTK, 49 | STR_PREFS_ITEM_QUIT_GTK, 50 | STR_HELP_MENU_GTK, 51 | STR_HELP_ITEM_ABOUT_GTK, 52 | 53 | STR_ABOUT_BUTTON, 54 | STR_FILE_CTRL, 55 | STR_BROWSE_CTRL, 56 | STR_BROWSE_TITLE, 57 | STR_SERIAL_PANE_TITLE, 58 | STR_NETWORK_PANE_TITLE, 59 | STR_INPUT_PANE_TITLE, 60 | STR_KEYCODES_CTRL, 61 | STR_KEYCODE_FILE_CTRL, 62 | STR_MOUSEWHEELMODE_CTRL, 63 | STR_MOUSEWHEELMODE_PAGE_LAB, 64 | STR_MOUSEWHEELMODE_CURSOR_LAB, 65 | STR_MOUSEWHEELLINES_CTRL, 66 | STR_POLLMEDIA_CTRL, 67 | STR_EXTFS_ENABLE_CTRL, 68 | STR_EXTFS_DRIVES_CTRL, 69 | STR_ETHER_FTP_PORT_LIST_CTRL, 70 | STR_ETHER_TCP_PORT_LIST_CTRL, 71 | 72 | STR_IGNORESEGV_CTRL, 73 | }; 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/x86dynarec/compiler/flags_x86.h: -------------------------------------------------------------------------------- 1 | /* 2 | * compiler/flags_x86.h - Native flags definitions for IA-32 3 | * 4 | * Original 68040 JIT compiler for UAE, copyright 2000-2002 Bernd Meyer 5 | * 6 | * Adaptation for Basilisk II and improvements, copyright 2000-2005 7 | * Gwenole Beauchesne 8 | * 9 | * Basilisk II (C) 1997-2008 Christian Bauer 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef NATIVE_FLAGS_X86_H 27 | #define NATIVE_FLAGS_X86_H 28 | 29 | /* Native integer code conditions */ 30 | enum { 31 | NATIVE_CC_HI = 7, 32 | NATIVE_CC_LS = 6, 33 | NATIVE_CC_CC = 3, 34 | NATIVE_CC_CS = 2, 35 | NATIVE_CC_NE = 5, 36 | NATIVE_CC_EQ = 4, 37 | NATIVE_CC_VC = 11, 38 | NATIVE_CC_VS = 10, 39 | NATIVE_CC_PL = 9, 40 | NATIVE_CC_MI = 8, 41 | NATIVE_CC_GE = 13, 42 | NATIVE_CC_LT = 12, 43 | NATIVE_CC_GT = 15, 44 | NATIVE_CC_LE = 14 45 | }; 46 | 47 | #endif /* NATIVE_FLAGS_X86_H */ 48 | -------------------------------------------------------------------------------- /BasiliskII/src/hwdependent/x86fpu/fpu_x86.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/hwdependent/x86fpu/fpu_x86.cpp -------------------------------------------------------------------------------- /BasiliskII/src/include/adb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * adb.h - ADB emulation (mouse/keyboard) 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 | #ifndef ADB_H 22 | #define ADB_H 23 | 24 | extern void ADBInit(void); 25 | extern void ADBExit(void); 26 | 27 | extern void ADBOp(uint8 op, uint8 *data); 28 | 29 | extern void ADBMouseMoved(int x, int y); 30 | extern void ADBMouseDown(int button); 31 | extern void ADBMouseUp(int button); 32 | 33 | extern void ADBKeyDown(int code); 34 | extern void ADBKeyUp(int code); 35 | 36 | extern void ADBInterrupt(void); 37 | 38 | extern void ADBSetRelMouseMode(bool relative); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /BasiliskII/src/include/cdrom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cdrom.h - CD-ROM driver 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 | #ifndef CDROM_H 22 | #define CDROM_H 23 | 24 | const int CDROMRefNum = -62; // RefNum of driver 25 | const uint16 CDROMDriverFlags = 0x6d04; // Driver flags 26 | 27 | extern const uint8 CDROMIcon[258]; // Icon data (copied to ROM by PatchROM()) 28 | 29 | extern uint32 CDROMIconAddr; // Icon address (Mac address space, set by PatchROM()) 30 | 31 | extern void CDROMInit(void); 32 | extern void CDROMExit(void); 33 | 34 | extern void CDROMInterrupt(void); 35 | 36 | extern bool CDROMMountVolume(void *fh); 37 | 38 | extern int16 CDROMOpen(uint32 pb, uint32 dce); 39 | extern int16 CDROMPrime(uint32 pb, uint32 dce); 40 | extern int16 CDROMControl(uint32 pb, uint32 dce); 41 | extern int16 CDROMStatus(uint32 pb, uint32 dce); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /BasiliskII/src/include/clip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * clip.h - Clipboard handling 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 | #ifndef CLIP_H 22 | #define CLIP_H 23 | 24 | extern void ClipInit(void); 25 | extern void ClipExit(void); 26 | 27 | extern void ZeroScrap(); 28 | extern void PutScrap(uint32 type, void *scrap, int32 length); 29 | extern void GetScrap(void **handle, uint32 type, int32 offset); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /BasiliskII/src/include/disk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * disk.h - Generic disk driver 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 | #ifndef DISK_H 22 | #define DISK_H 23 | 24 | const int DiskRefNum = -63; // RefNum of driver 25 | const uint16 DiskDriverFlags = 0x6f04; // Driver flags 26 | 27 | extern const uint8 DiskIcon[258]; // Icon data (copied to ROM by PatchROM()) 28 | 29 | extern uint32 DiskIconAddr; // Icon address (Mac address space, set by PatchROM()) 30 | 31 | extern void DiskInit(void); 32 | extern void DiskExit(void); 33 | 34 | extern void DiskInterrupt(void); 35 | 36 | extern bool DiskMountVolume(void *fh); 37 | 38 | extern int16 DiskOpen(uint32 pb, uint32 dce); 39 | extern int16 DiskPrime(uint32 pb, uint32 dce); 40 | extern int16 DiskControl(uint32 pb, uint32 dce); 41 | extern int16 DiskStatus(uint32 pb, uint32 dce); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /BasiliskII/src/include/ether_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ether_defs.h - Definitions for MacOS Ethernet drivers 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 | #ifndef ETHER_DEFS_H 22 | #define ETHER_DEFS_H 23 | 24 | // Error codes 25 | enum { 26 | eMultiErr = -91, 27 | eLenErr = -92, 28 | lapProtErr = -94, 29 | excessCollsns = -95 30 | }; 31 | 32 | // Control codes 33 | enum { 34 | kENetSetGeneral = 253, 35 | kENetGetInfo = 252, 36 | kENetRdCancel = 251, 37 | kENetRead = 250, 38 | kENetWrite = 249, 39 | kENetDetachPH = 248, 40 | kENetAttachPH = 247, 41 | kENetAddMulti = 246, 42 | kENetDelMulti = 245 43 | }; 44 | 45 | enum { // EParamBlock struct 46 | eProtType = 28, 47 | ePointer = 30, 48 | eBuffSize = 34, 49 | eDataSize = 36, 50 | eMultiAddr = 28 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /BasiliskII/src/include/extfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * extfs.h - MacOS file system for access native file system access 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 | #ifndef EXTFS_H 22 | #define EXTFS_H 23 | 24 | extern void ExtFSInit(void); 25 | extern void ExtFSExit(void); 26 | 27 | extern void InstallExtFS(void); 28 | 29 | extern int16 ExtFSComm(uint16 message, uint32 paramBlock, uint32 globalsPtr); 30 | extern int16 ExtFSHFS(uint32 vcb, uint16 selectCode, uint32 paramBlock, uint32 globalsPtr, int16 fsid); 31 | 32 | // System specific and internal functions/data 33 | extern void extfs_init(void); 34 | extern void extfs_exit(void); 35 | extern void add_path_component(char *path, const char *component); 36 | extern void get_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir); 37 | extern void set_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir); 38 | extern uint32 get_rfork_size(const char *path); 39 | extern int open_rfork(const char *path, int flag); 40 | extern void close_rfork(const char *path, int fd); 41 | extern ssize_t extfs_read(int fd, void *buffer, size_t length); 42 | extern ssize_t extfs_write(int fd, void *buffer, size_t length); 43 | extern bool extfs_remove(const char *path); 44 | extern bool extfs_rename(const char *old_path, const char *new_path); 45 | extern const char *host_encoding_to_macroman(const char *filename); // What if the guest OS is using MacJapanese or MacArabic? Oh well... 46 | extern const char *macroman_to_host_encoding(const char *filename); // What if the guest OS is using MacJapanese or MacArabic? Oh well... 47 | 48 | // Maximum length of full path name 49 | const int MAX_PATH_LENGTH = 1024; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /BasiliskII/src/include/pict.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pict.h - convert an image to PICT. 3 | * 4 | * Currently creates a bitmap PICT resource; vector graphics are not preserved. 5 | * 6 | * By Charles Srstka. 7 | * 8 | * Public Domain. Do with it as you wish. 9 | * 10 | */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /* 17 | * ConvertRGBAToPICT 18 | * 19 | * Converts image data, in 32-bit RGBA format, to PICT. 20 | * Calling it first with NULL for the buffer will cause it to return a suggested buffer size. 21 | * Returns the number of bytes actually written, or negative if something went wrong. 22 | * However, this usually just means the buffer wasn't large enough. 23 | */ 24 | 25 | ssize_t ConvertRGBAToPICT(uint8_t *buf, unsigned long bufSize, uint8_t *rgbaPixels, uint16_t width, uint16_t height); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /BasiliskII/src/include/prefs_editor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * prefs_editor.h - Preferences editor 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 | #ifndef PREFS_EDITOR_H 22 | #define PREFS_EDITOR_H 23 | 24 | extern bool PrefsEditor(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /BasiliskII/src/include/rom_patches.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rom_patches.h - ROM patches 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 | #ifndef ROM_PATCHES_H 22 | #define ROM_PATCHES_H 23 | 24 | // ROM version number, set by CheckROM() 25 | enum { 26 | ROM_VERSION_64K = 0x0000, // Original Macintosh (64KB) 27 | ROM_VERSION_PLUS = 0x0075, // Mac Plus ROMs (128KB) 28 | ROM_VERSION_CLASSIC = 0x0276, // SE/Classic ROMs (256/512KB) 29 | ROM_VERSION_II = 0x0178, // Not 32-bit clean Mac II ROMs (256KB) 30 | ROM_VERSION_32 = 0x067c // 32-bit clean Mac II ROMs (512KB/1MB) 31 | }; 32 | 33 | extern uint16 ROMVersion; 34 | 35 | // ROM offset of breakpoint, used by PatchROM() 36 | extern uint32 ROMBreakpoint; 37 | 38 | // ROM offset of UniversalInfo, set by PatchROM() 39 | extern uint32 UniversalInfo; 40 | 41 | // Mac address of PutScrap() patch 42 | extern uint32 PutScrapPatch; 43 | 44 | // Mac address of GetScrap() patch 45 | extern uint32 GetScrapPatch; 46 | 47 | // Flag: print ROM information in PatchROM() 48 | extern bool PrintROMInfo; 49 | 50 | extern bool CheckROM(void); 51 | extern bool PatchROM(void); 52 | extern void InstallDrivers(uint32 pb); 53 | extern void InstallSERD(void); 54 | extern void PatchAfterStartup(void); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /BasiliskII/src/include/rsrc_patches.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rsrc_patches.h - Resource patches 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 | #ifndef RSRC_PATCHES_H 22 | #define RSRC_PATCHES_H 23 | 24 | extern void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /BasiliskII/src/include/scsi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scsi.h - SCSI Manager 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 | #ifndef SCSI_H 22 | #define SCSI_H 23 | 24 | extern int16 SCSIReset(void); 25 | extern int16 SCSIGet(void); 26 | extern int16 SCSISelect(int id); 27 | extern int16 SCSICmd(int cmd_length, uint8 *cmd); 28 | extern int16 SCSIRead(uint32 tib); 29 | extern int16 SCSIWrite(uint32 tib); 30 | extern int16 SCSIComplete(uint32 timeout, uint32 message, uint32 stat); 31 | extern uint16 SCSIStat(void); 32 | extern int16 SCSIMgrBusy(void); 33 | 34 | // System specific and internal functions/data 35 | extern void SCSIInit(void); 36 | extern void SCSIExit(void); 37 | 38 | extern void scsi_set_cmd(int cmd_length, uint8 *cmd); 39 | extern bool scsi_is_target_present(int id); 40 | extern bool scsi_set_target(int id, int lun); 41 | extern bool scsi_send_cmd(size_t data_length, bool reading, int sg_index, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /BasiliskII/src/include/slot_rom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * slot_rom.h - Slot declaration ROM 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 | #ifndef SLOT_ROM_H 22 | #define SLOT_ROM_H 23 | 24 | extern bool InstallSlotROM(void); 25 | extern void ChecksumSlotROM(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /BasiliskII/src/include/sony.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sony.h - Replacement .Sony driver (floppy drives) 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 | #ifndef SONY_H 22 | #define SONY_H 23 | 24 | const int SonyRefNum = -5; // RefNum of driver 25 | const uint16 SonyDriverFlags = 0x6f00; // Driver flags 26 | 27 | extern const uint8 SonyDiskIcon[258]; // Icon data (copied to ROM by PatchROM()) 28 | extern const uint8 SonyDriveIcon[258]; 29 | 30 | extern uint32 SonyDiskIconAddr; // Icon addresses (Mac address space, set by PatchROM()) 31 | extern uint32 SonyDriveIconAddr; 32 | 33 | extern void SonyInit(void); 34 | extern void SonyExit(void); 35 | 36 | extern void SonyInterrupt(void); 37 | 38 | extern bool SonyMountVolume(void *fh); 39 | 40 | extern int16 SonyOpen(uint32 pb, uint32 dce); 41 | extern int16 SonyPrime(uint32 pb, uint32 dce); 42 | extern int16 SonyControl(uint32 pb, uint32 dce); 43 | extern int16 SonyStatus(uint32 pb, uint32 dce); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /BasiliskII/src/include/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * timer.h - Time Manager emulation 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 | #ifndef TIMER_H 22 | #define TIMER_H 23 | 24 | extern void TimerInit(void); 25 | extern void TimerExit(void); 26 | extern void TimerReset(void); 27 | 28 | extern void TimerInterrupt(void); 29 | 30 | extern int16 InsTime(uint32 tm, uint16 trap); 31 | extern int16 RmvTime(uint32 tm); 32 | extern int16 PrimeTime(uint32 tm, int32 time); 33 | extern void Microseconds(uint32 &hi, uint32 &lo); 34 | 35 | extern uint32 TimerDateTime(void); 36 | 37 | // System specific and internal functions/data 38 | extern void timer_current_time(tm_time_t &t); 39 | extern void timer_add_time(tm_time_t &res, tm_time_t a, tm_time_t b); 40 | extern void timer_sub_time(tm_time_t &res, tm_time_t a, tm_time_t b); 41 | extern int timer_cmp_time(tm_time_t a, tm_time_t b); 42 | extern void timer_mac2host_time(tm_time_t &res, int32 mactime); 43 | extern int32 timer_host2mac_time(tm_time_t hosttime); 44 | 45 | // Suspend execution of emulator thread and resume it on events 46 | extern void idle_wait(void); 47 | extern void idle_resume(void); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /BasiliskII/src/include/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * version.h - Version information 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 | #ifndef VERSION_H 22 | #define VERSION_H 23 | 24 | const int VERSION_MAJOR = 1; 25 | const int VERSION_MINOR = 0; 26 | 27 | #define VERSION_STRING "Basilisk II V1.0" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /BasiliskII/src/include/xpram.h: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram.h - XPRAM handling 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 | #ifndef XPRAM_H 22 | #define XPRAM_H 23 | 24 | #if POWERPC_ROM 25 | const int XPRAM_SIZE = 8192; 26 | #else 27 | const int XPRAM_SIZE = 256; 28 | #endif 29 | 30 | extern uint8 XPRAM[XPRAM_SIZE]; 31 | 32 | extern void XPRAMInit(const char *vmdir); 33 | extern void XPRAMExit(void); 34 | 35 | // System specific and internal functions/data 36 | extern void LoadXPRAM(const char *vmdir); 37 | extern void SaveXPRAM(void); 38 | extern void ZapPRAM(void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/Makefile: -------------------------------------------------------------------------------- 1 | include Makefile.libretro 2 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/Makefile.common: -------------------------------------------------------------------------------- 1 | #excluded files 2 | #sys_libr.cpp $(SLIRP_SRCS) sshpty.c strlcpy.c ../CrossPlatform/sigsegv.cpp cpudefs.cpp 3 | 4 | LIBRETRO_COMM_DIR := $(CORE_DIR)/libretro-common 5 | 6 | SOURCES_C := $(LIBRETRO_COMM_DIR)/memmap/memmap.c \ 7 | $(LIBRETRO_COMM_DIR)/memmap/memalign.c \ 8 | $(LIBRETRO_COMM_DIR)/features/features_cpu.c \ 9 | $(LIBRETRO_COMM_DIR)/compat/compat_strl.c \ 10 | $(LIBRETRO_COMM_DIR)/streams/file_stream.c \ 11 | $(LIBRETRO_COMM_DIR)/file/retro_stat.c 12 | 13 | LIBRETRO_SRCS = libretro.cpp main_libr.cpp video_libr.cpp audio_libr.cpp user_strings_libr.cpp timer_libr.cpp vm_alloc.cpp sys_libr.cpp 14 | 15 | UNUSEDINTERFACE = ../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/serial_dummy.cpp ../dummy/xpram_dummy.cpp ../dummy/prefs_editor_dummy.cpp ../dummy/clip_dummy.cpp 16 | 17 | SLIRP_SRCS = \ 18 | ../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \ 19 | ../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \ 20 | ../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \ 21 | ../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \ 22 | ../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \ 23 | ../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c 24 | 25 | XPLAT_SRCS = ../CrossPlatform/video_blit.cpp 26 | 27 | SYSSRCS = extfs_unix.cpp prefs_unix.cpp 28 | 29 | CPUSRCS = ../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp ../uae_cpu/opcodes.cpp ../uae_cpu/fpu/fpu_ieee.cpp ../uae_cpu/cpustbl.cpp ../uae_cpu/cpuemu.cpp 30 | 31 | COMMONFLAGS += -DHAVE_CONFIG_H -DFPU_IEEE 32 | 33 | #CPPFLAGS = -I./../include -I./. -I. -I./../CrossPlatform -I./../uae_cpu -I./../slirp 34 | 35 | SOURCES_CXX := ../main.cpp ../prefs.cpp ../prefs_items.cpp \ 36 | ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ 37 | ../emul_op.cpp ../macos_util.cpp ../xpram.cpp ../timer.cpp \ 38 | ../adb.cpp ../serial.cpp ../ether.cpp ../extfs.cpp \ 39 | ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp \ 40 | ../audio.cpp disk_sparsebundle.cpp \ 41 | tinyxml2.cpp \ 42 | ../user_strings.cpp \ 43 | $(XPLAT_SRCS) $(SYSSRCS) $(CPUSRCS) $(UNUSEDINTERFACE) $(LIBRETRO_COMMON) $(LIBRETRO_SRCS) 44 | 45 | INCFLAGS += -I./../include -I./. -I. -I./../CrossPlatform -I./../uae_cpu -I./../slirp 46 | INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include 47 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/control: -------------------------------------------------------------------------------- 1 | Package: com.libretro.basilisk2 2 | Name: basilisk2 3 | Depends: 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: Libretro iOS core of BasiliskII 7 | Maintainer: libretro 8 | Author: libretro 9 | Section: System 10 | Tag: role::developer 11 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/disk_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * disk_unix.h - Generic disk interface 3 | * 4 | * Basilisk II (C) Dave Vasilevsky 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 DISK_UNIX_H 22 | #define DISK_UNIX_H 23 | 24 | #include "sysdeps.h" 25 | 26 | struct disk_generic { 27 | enum status { 28 | DISK_UNKNOWN, 29 | DISK_INVALID, 30 | DISK_VALID, 31 | }; 32 | 33 | disk_generic() { } 34 | virtual ~disk_generic() { }; 35 | 36 | virtual bool is_read_only() = 0; 37 | virtual size_t read(void *buf, loff_t offset, size_t length) = 0; 38 | virtual size_t write(void *buf, loff_t offset, size_t length) = 0; 39 | virtual loff_t size() = 0; 40 | }; 41 | 42 | typedef disk_generic::status (disk_factory)(const char *path, bool read_only, 43 | disk_generic **disk); 44 | 45 | extern disk_factory disk_sparsebundle_factory; 46 | extern disk_factory disk_vhd_factory; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | GIT_VERSION := "Git ($(shell git describe --abbrev=4 --dirty --always --tags))" 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := retro 7 | 8 | #is not reset by clear_vars and will overflow to the next arch if not reset 9 | WITH_DYNAREC := 10 | 11 | #needed for windows mprotect fix 12 | platform = unix 13 | 14 | ifeq ($(TARGET_ARCH_ABI), armeabi) 15 | LOCAL_CFLAGS += -DANDROID_ARM 16 | LOCAL_ARM_MODE := arm 17 | WITH_DYNAREC := oldarm 18 | endif 19 | 20 | ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) 21 | LOCAL_CFLAGS += -DANDROID_ARM 22 | LOCAL_ARM_MODE := arm 23 | WITH_DYNAREC := arm 24 | endif 25 | 26 | ifeq ($(TARGET_ARCH_ABI), arm64-v8a) 27 | LOCAL_CFLAGS += -DANDROID_ARM 28 | LOCAL_ARM_MODE := arm 29 | #the armv7 dynarec wont run on armv8 unless running in armv7 emulation mode 30 | endif 31 | 32 | ifeq ($(TARGET_ARCH_ABI), x86) 33 | LOCAL_CFLAGS += -DANDROID_X86 34 | WITH_DYNAREC := x86 35 | endif 36 | 37 | ifeq ($(TARGET_ARCH_ABI), x86_64) 38 | LOCAL_CFLAGS += -DANDROID_X86 39 | WITH_DYNAREC := x86_64 40 | endif 41 | 42 | ifeq ($(TARGET_ARCH_ABI), mips) 43 | LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__ 44 | WITH_DYNAREC := mips 45 | endif 46 | 47 | ifeq ($(TARGET_ARCH_ABI), mips64) 48 | LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__ 49 | endif 50 | 51 | CORE_DIR := .. 52 | 53 | SOURCES_C := 54 | SOURCES_ASM := 55 | INCFLAGS := 56 | COMMONFLAGS := 57 | 58 | ifeq ($(DEBUG), 1) 59 | APP_OPTIM := -O0 -g 60 | else 61 | APP_OPTIM := -O3 -DNDEBUG 62 | endif 63 | 64 | include $(CORE_DIR)/Makefile.common 65 | 66 | LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_CXX) $(SOURCES_ASM) 67 | LOCAL_CFLAGS += $(APP_OPTIM) $(COMMONFLAGS) -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS) -DGIT_VERSION=\"$(GIT_VERSION)\" -DC_HAVE_MPROTECT="1" 68 | LOCAL_CPP_FEATURES += rtti exceptions 69 | 70 | include $(BUILD_SHARED_LIBRARY) 71 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := gnustl_static 2 | APP_ABI := all 3 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/compat/compat_strl.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (compat_strl.c). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | /* Implementation of strlcpy()/strlcat() based on OpenBSD. */ 31 | 32 | #ifndef __MACH__ 33 | 34 | size_t strlcpy(char *dest, const char *source, size_t size) 35 | { 36 | size_t src_size = 0; 37 | size_t n = size; 38 | 39 | if (n) 40 | while (--n && (*dest++ = *source++)) src_size++; 41 | 42 | if (!n) 43 | { 44 | if (size) *dest = '\0'; 45 | while (*source++) src_size++; 46 | } 47 | 48 | return src_size; 49 | } 50 | 51 | size_t strlcat(char *dest, const char *source, size_t size) 52 | { 53 | size_t len = strlen(dest); 54 | 55 | dest += len; 56 | 57 | if (len > size) 58 | size = 0; 59 | else 60 | size -= len; 61 | 62 | return len + strlcpy(dest, source, size); 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/boolean.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (boolean.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_BOOLEAN_H 24 | #define __LIBRETRO_SDK_BOOLEAN_H 25 | 26 | #ifndef __cplusplus 27 | 28 | #if defined(_MSC_VER) && !defined(SN_TARGET_PS3) 29 | /* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */ 30 | #define bool unsigned char 31 | #define true 1 32 | #define false 0 33 | #else 34 | #include 35 | #endif 36 | 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/compat/posix_string.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (posix_string.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_COMPAT_POSIX_STRING_H 24 | #define __LIBRETRO_SDK_COMPAT_POSIX_STRING_H 25 | 26 | #include 27 | 28 | #ifdef _MSC_VER 29 | #include 30 | #endif 31 | 32 | RETRO_BEGIN_DECLS 33 | 34 | #ifdef _WIN32 35 | #undef strtok_r 36 | #define strtok_r(str, delim, saveptr) retro_strtok_r__(str, delim, saveptr) 37 | 38 | char *strtok_r(char *str, const char *delim, char **saveptr); 39 | #endif 40 | 41 | #ifdef _MSC_VER 42 | #undef strcasecmp 43 | #undef strdup 44 | #define strcasecmp(a, b) retro_strcasecmp__(a, b) 45 | #define strdup(orig) retro_strdup__(orig) 46 | int strcasecmp(const char *a, const char *b); 47 | char *strdup(const char *orig); 48 | 49 | /* isblank is available since MSVC 2013 */ 50 | #if _MSC_VER < 1800 51 | #undef isblank 52 | #define isblank(c) retro_isblank__(c) 53 | int isblank(int c); 54 | #endif 55 | 56 | #endif 57 | 58 | 59 | RETRO_END_DECLS 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/compat/strl.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (strl.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_COMPAT_STRL_H 24 | #define __LIBRETRO_SDK_COMPAT_STRL_H 25 | 26 | #include 27 | #include 28 | 29 | #ifdef HAVE_CONFIG_H 30 | #include "../../../config.h" 31 | #endif 32 | 33 | #include 34 | 35 | RETRO_BEGIN_DECLS 36 | 37 | #ifdef __MACH__ 38 | #ifndef HAVE_STRL 39 | #define HAVE_STRL 40 | #endif 41 | #endif 42 | 43 | #ifndef HAVE_STRL 44 | /* Avoid possible naming collisions during link since 45 | * we prefer to use the actual name. */ 46 | #define strlcpy(dst, src, size) strlcpy_retro__(dst, src, size) 47 | 48 | #define strlcat(dst, src, size) strlcat_retro__(dst, src, size) 49 | 50 | size_t strlcpy(char *dest, const char *source, size_t size); 51 | size_t strlcat(char *dest, const char *source, size_t size); 52 | 53 | #endif 54 | 55 | RETRO_END_DECLS 56 | 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/memalign.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2016 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (memalign.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef _LIBRETRO_MEMALIGN_H 24 | #define _LIBRETRO_MEMALIGN_H 25 | 26 | #include 27 | 28 | #include 29 | 30 | RETRO_BEGIN_DECLS 31 | 32 | void *memalign_alloc(size_t boundary, size_t size); 33 | 34 | void *memalign_alloc_aligned(size_t size); 35 | 36 | void memalign_free(void *ptr); 37 | 38 | RETRO_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/memmap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2016 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (memmap.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef _LIBRETRO_MEMMAP_H 24 | #define _LIBRETRO_MEMMAP_H 25 | 26 | #if defined(__CELLOS_LV2__) || defined(PSP) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) 27 | /* No mman available */ 28 | #elif defined(_WIN32) && !defined(_XBOX) 29 | #include 30 | #include 31 | #include 32 | #else 33 | #define HAVE_MMAN 34 | #include 35 | #endif 36 | 37 | #if !defined(HAVE_MMAN) || defined(_WIN32) 38 | void* mmap(void *addr, size_t len, int mmap_prot, int mmap_flags, int fildes, size_t off); 39 | 40 | int munmap(void *addr, size_t len); 41 | 42 | int mprotect(void *addr, size_t len, int prot); 43 | #endif 44 | 45 | int memsync(void *start, void *end); 46 | 47 | int memprotect(void *addr, size_t len); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/retro_assert.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (retro_assert.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __RETRO_ASSERT_H 24 | #define __RETRO_ASSERT_H 25 | 26 | #include 27 | 28 | #ifdef RARCH_INTERNAL 29 | #define retro_assert(cond) do { \ 30 | if (!(cond)) { printf("Assertion failed at %s:%d.\n", __FILE__, __LINE__); abort(); } \ 31 | } while(0) 32 | #else 33 | #define retro_assert(cond) assert(cond) 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/retro_inline.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2016 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (retro_inline.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_INLINE_H 24 | #define __LIBRETRO_SDK_INLINE_H 25 | 26 | #ifndef INLINE 27 | 28 | #if defined(_WIN32) || defined(__INTEL_COMPILER) 29 | #define INLINE __inline 30 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L 31 | #define INLINE inline 32 | #elif defined(__GNUC__) 33 | #define INLINE __inline__ 34 | #else 35 | #define INLINE 36 | #endif 37 | 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretro-common/include/retro_stat.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (retro_stat.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __RETRO_STAT_H 24 | #define __RETRO_STAT_H 25 | 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | #include 32 | 33 | RETRO_BEGIN_DECLS 34 | 35 | /** 36 | * path_is_directory: 37 | * @path : path 38 | * 39 | * Checks if path is a directory. 40 | * 41 | * Returns: true (1) if path is a directory, otherwise false (0). 42 | */ 43 | bool path_is_directory(const char *path); 44 | 45 | bool path_is_character_special(const char *path); 46 | 47 | bool path_is_valid(const char *path); 48 | 49 | int32_t path_get_size(const char *path); 50 | 51 | /** 52 | * path_mkdir_norecurse: 53 | * @dir : directory 54 | * 55 | * Create directory on filesystem. 56 | * 57 | * Returns: true (1) if directory could be created, otherwise false (0). 58 | **/ 59 | bool mkdir_norecurse(const char *dir); 60 | 61 | RETRO_END_DECLS 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/libretroexports.h: -------------------------------------------------------------------------------- 1 | bool initlibretrovideo(); 2 | 3 | void closelibretrovideo(); 4 | 5 | void libretrovideointerrupt(); 6 | 7 | void refreshlibretrovideo(void* buffer, unsigned width, unsigned height); 8 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/main_libr.cpp: -------------------------------------------------------------------------------- 1 | #include "sysdeps.h" 2 | 3 | #include "user_strings.h" 4 | 5 | struct B2_mutex { 6 | int wastespace; 7 | }; 8 | 9 | B2_mutex* B2_create_mutex(void) {return NULL;} 10 | void B2_lock_mutex(B2_mutex *mutex) {} 11 | void B2_unlock_mutex(B2_mutex *mutex) {} 12 | void B2_delete_mutex(B2_mutex *mutex) {} 13 | 14 | 15 | /* 16 | * Interrupt flags (must be handled atomically!) 17 | */ 18 | 19 | uint32 InterruptFlags = 0; 20 | 21 | void SetInterruptFlag(uint32 flag) 22 | { 23 | InterruptFlags |= flag; 24 | } 25 | 26 | void ClearInterruptFlag(uint32 flag) 27 | { 28 | InterruptFlags &= ~flag; 29 | } 30 | 31 | 32 | /* 33 | * Code was patched, flush caches if neccessary (i.e. when using a real 680x0 34 | * or a dynamically recompiling emulator) 35 | */ 36 | 37 | void FlushCodeCache(void *start, uint32 size) 38 | { 39 | 40 | } 41 | 42 | 43 | /* 44 | * Display error alert 45 | */ 46 | 47 | void ErrorAlert(const char *text) 48 | { 49 | printf(GetString(STR_SHELL_ERROR_PREFIX), text); 50 | } 51 | 52 | 53 | /* 54 | * Display warning alert 55 | */ 56 | 57 | void WarningAlert(const char *text) 58 | { 59 | printf(GetString(STR_SHELL_WARNING_PREFIX), text); 60 | } 61 | 62 | 63 | /* 64 | * Display choice alert 65 | */ 66 | 67 | bool ChoiceAlert(const char *text, const char *pos, const char *neg) 68 | { 69 | printf(GetString(STR_SHELL_WARNING_PREFIX), text); 70 | return false; //!! 71 | } 72 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2003-xbox1.bat: -------------------------------------------------------------------------------- 1 | @SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE 2 | @SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003 3 | @SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework 4 | @SET FrameworkVersion=v1.1.4322 5 | @SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1 6 | @rem Root of Visual Studio common files. 7 | 8 | @if "%VSINSTALLDIR%"=="" goto Usage 9 | @if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR% 10 | 11 | @rem 12 | @rem Root of Visual Studio ide installed files. 13 | @rem 14 | @set DevEnvDir=%VSINSTALLDIR% 15 | 16 | @rem 17 | @rem Root of Visual C++ installed files. 18 | @rem 19 | @set MSVCDir=%VCINSTALLDIR%\VC7 20 | 21 | @rem 22 | @echo Setting environment for using Microsoft Visual Studio .NET 2003 tools. 23 | @echo (If you have another version of Visual Studio or Visual C++ installed and wish 24 | @echo to use its tools from the command line, run vcvars32.bat for that version.) 25 | @rem 26 | 27 | @REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup. 28 | 29 | @set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%; 30 | @set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%FrameworkSDKDir%\include;%INCLUDE%;%XDK%\xbox\include 31 | @set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib;%XDK%\lib;%XDK%\xbox\lib;%LIB% 32 | 33 | @goto end 34 | 35 | :Usage 36 | 37 | @echo. VSINSTALLDIR variable is not set. 38 | @echo. 39 | @echo SYNTAX: %0 40 | 41 | @goto end 42 | 43 | :end 44 | 45 | devenv /clean Release_LTCG msvc-2003-xbox1.sln 46 | devenv /build Release_LTCG msvc-2003-xbox1.sln 47 | exit 48 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2003-xbox1.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2003-xbox1", "msvc-2003-xbox1/msvc-2003-xbox1.vcproj", "{FFF290B2-4380-4A61-874B-D65E100A4008}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Profile = Profile 10 | Profile_FastCap = Profile_FastCap 11 | Release = Release 12 | Release_LTCG = Release_LTCG 13 | EndGlobalSection 14 | GlobalSection(ProjectConfiguration) = postSolution 15 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Debug.ActiveCfg = Debug|Xbox 16 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Debug.Build.0 = Debug|Xbox 17 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Profile.ActiveCfg = Profile|Xbox 18 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Profile.Build.0 = Profile|Xbox 19 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox 20 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox 21 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Release.ActiveCfg = Release|Xbox 22 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Release.Build.0 = Release|Xbox 23 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox 24 | {FFF290B2-4380-4A61-874B-D65E100A4008}.Release_LTCG.Build.0 = Release_LTCG|Xbox 25 | EndGlobalSection 26 | GlobalSection(ExtensibilityGlobals) = postSolution 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityAddIns) = postSolution 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2010-360.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010-360", "msvc-2010-360/msvc-2010-360.vcxproj", "{7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | CodeAnalysis|Xbox 360 = CodeAnalysis|Xbox 360 9 | Debug|Xbox 360 = Debug|Xbox 360 10 | Profile_FastCap|Xbox 360 = Profile_FastCap|Xbox 360 11 | Profile|Xbox 360 = Profile|Xbox 360 12 | Release_LTCG|Xbox 360 = Release_LTCG|Xbox 360 13 | Release|Xbox 360 = Release|Xbox 360 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360 17 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360 18 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 19 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 20 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360 21 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360 22 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360 23 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Profile|Xbox 360.Build.0 = Profile|Xbox 360 24 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360 25 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360 26 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 27 | {7FDFF0FF-AAE3-445D-A250-5FB8C8C0443E}.Release|Xbox 360.Build.0 = Release|Xbox 360 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2010-360/msvc-2010-360.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {52997b0a-13fa-4705-b052-e35ef298b8e9} 14 | 15 | 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2010.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010", "msvc-2010\msvc-2010.vcxproj", "{A7E1411B-9741-47D3-AE2A-47176517D89D}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {A7E1411B-9741-47D3-AE2A-47176517D89D}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {A7E1411B-9741-47D3-AE2A-47176517D89D}.Debug|Win32.Build.0 = Debug|Win32 14 | {A7E1411B-9741-47D3-AE2A-47176517D89D}.Release|Win32.ActiveCfg = Release|Win32 15 | {A7E1411B-9741-47D3-AE2A-47176517D89D}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2010/libretro.def: -------------------------------------------------------------------------------- 1 | LIBRARY "msvc-2010" 2 | EXPORTS 3 | retro_set_environment 4 | retro_set_video_refresh 5 | retro_set_audio_sample 6 | retro_set_audio_sample_batch 7 | retro_set_input_poll 8 | retro_set_input_state 9 | retro_init 10 | retro_deinit 11 | retro_api_version 12 | retro_get_system_info 13 | retro_get_system_av_info 14 | retro_set_controller_port_device 15 | retro_reset 16 | retro_run 17 | retro_serialize_size 18 | retro_serialize 19 | retro_unserialize 20 | retro_cheat_reset 21 | retro_cheat_set 22 | retro_load_game 23 | retro_load_game_special 24 | retro_unload_game 25 | retro_get_region 26 | retro_get_memory_data 27 | retro_get_memory_size 28 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/msvc/msvc-2010/msvc-2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {00285f6a-c8e3-4b26-8a76-32f0f44b16a0} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/prefs_editor_gtk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/libretro/prefs_editor_gtk.cpp -------------------------------------------------------------------------------- /BasiliskII/src/libretro/user_strings_libr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Basilisk II (C) 1997-2008 Christian Bauer 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #ifndef USER_STRINGS_LIBR_H 21 | #define USER_STRINGS_LIBR_H 22 | 23 | enum { 24 | STR_NO_XSERVER_ERR = 10000, 25 | STR_NO_XVISUAL_ERR, 26 | STR_UNSUPP_DEPTH_ERR, 27 | STR_NO_FBDEVICE_FILE_ERR, 28 | STR_FBDEV_NAME_ERR, 29 | STR_FBDEV_MMAP_ERR, 30 | STR_VOSF_INIT_ERR, 31 | STR_NO_DEV_ZERO_ERR, 32 | STR_LOW_MEM_MMAP_ERR, 33 | STR_SIGALTSTACK_ERR, 34 | STR_SIG_INSTALL_ERR, 35 | STR_TIMER_CREATE_ERR, 36 | STR_TIMER_SETTIME_ERR, 37 | STR_TICK_THREAD_ERR, 38 | 39 | STR_BLOCKING_NET_SOCKET_WARN, 40 | STR_NO_SHEEP_NET_DRIVER_WARN, 41 | STR_SHEEP_NET_ATTACH_WARN, 42 | STR_TUN_TAP_CONFIG_WARN, 43 | STR_SLIRP_NO_DNS_FOUND_WARN, 44 | STR_SCSI_DEVICE_OPEN_WARN, 45 | STR_SCSI_DEVICE_NOT_SCSI_WARN, 46 | STR_NO_AUDIO_DEV_WARN, 47 | STR_NO_AUDIO_WARN, 48 | STR_AUDIO_FORMAT_WARN, 49 | STR_KEYCODE_FILE_WARN, 50 | STR_KEYCODE_VENDOR_WARN, 51 | 52 | STR_PREFS_MENU_FILE_GTK, 53 | STR_PREFS_ITEM_START_GTK, 54 | STR_PREFS_ITEM_ZAP_PRAM_GTK, 55 | STR_PREFS_ITEM_SEPL_GTK, 56 | STR_PREFS_ITEM_QUIT_GTK, 57 | STR_HELP_MENU_GTK, 58 | STR_HELP_ITEM_ABOUT_GTK, 59 | 60 | STR_FBDEV_NAME_CTRL, 61 | STR_FBDEVICE_FILE_CTRL, 62 | STR_DSPDEVICE_FILE_CTRL, 63 | STR_MIXERDEVICE_FILE_CTRL, 64 | 65 | STR_BROWSE_CTRL, 66 | STR_BROWSE_TITLE, 67 | STR_INPUT_PANE_TITLE, 68 | STR_KEYCODES_CTRL, 69 | STR_KEYCODE_FILE_CTRL, 70 | STR_MOUSEWHEELMODE_CTRL, 71 | STR_MOUSEWHEELMODE_PAGE_LAB, 72 | STR_MOUSEWHEELMODE_CURSOR_LAB, 73 | STR_MOUSEWHEELLINES_CTRL, 74 | 75 | STR_IGNORESEGV_CTRL, 76 | 77 | STR_WINDOW_TITLE_GRABBED, 78 | 79 | STR_NO_B2_EXE_FOUND 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /BasiliskII/src/libretro/vm_alloc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "memmap.h" 4 | #include "memalign.h" 5 | #include "vm_alloc.h" 6 | 7 | int vm_init(){return 0;} 8 | void vm_exit(){} 9 | 10 | void* vm_acquire(size_t size, int options){ 11 | void* region = memalign_alloc(64,size); 12 | memset(region,0x00,size); 13 | return region; 14 | } 15 | 16 | int vm_release(void* addr, size_t size){ 17 | memalign_free(addr); 18 | return 0; 19 | } 20 | 21 | int vm_get_page_size(void){return 65536;} 22 | 23 | //should always fail 24 | int vm_acquire_fixed(void* addr, size_t size, int options){return -1;} 25 | int vm_protect(void* addr, size_t size, int prot){return -1;} 26 | int vm_get_write_watch(void* addr, size_t size,void** pages, unsigned int* n_pages,int options){return -1;} 27 | int vm_reset_write_watch(void* addr, size_t size){return -1;} 28 | -------------------------------------------------------------------------------- /BasiliskII/src/slirp/VERSION: -------------------------------------------------------------------------------- 1 | qemu 0.9.0 (2007/02/05) 2 | -------------------------------------------------------------------------------- /BasiliskII/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 | -------------------------------------------------------------------------------- /BasiliskII/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(char *, int); 40 | //void ttystats(struct ttys *); 41 | void allttystats(void); 42 | void ipstats(void); 43 | void vjstats(void); 44 | void tcpstats(void); 45 | void udpstats(void); 46 | void icmpstats(void); 47 | void mbufstats(void); 48 | void sockstats(void); 49 | void slirp_exit(int); 50 | 51 | -------------------------------------------------------------------------------- /BasiliskII/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 size_t if_mtu; 19 | extern size_t 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 | -------------------------------------------------------------------------------- /BasiliskII/src/slirp/libslirp.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBSLIRP_H 2 | #define _LIBSLIRP_H 3 | 4 | #ifdef _WIN32 5 | #include 6 | int inet_aton(const char *cp, struct in_addr *ia); 7 | #else 8 | #include 9 | #include 10 | #endif 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | int slirp_init(void); 17 | 18 | int slirp_select_fill(int *pnfds, 19 | fd_set *readfds, fd_set *writefds, fd_set *xfds); 20 | 21 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); 22 | 23 | void slirp_input(const uint8 *pkt, int pkt_len); 24 | 25 | /* you must provide the following functions: */ 26 | int slirp_can_output(void); 27 | void slirp_output(const uint8 *pkt, int pkt_len); 28 | 29 | int slirp_redir(int is_udp, int host_port, 30 | struct in_addr guest_addr, int guest_port); 31 | int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, 32 | int guest_port); 33 | 34 | extern const char *tftp_prefix; 35 | extern char slirp_hostname[33]; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /BasiliskII/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 | -------------------------------------------------------------------------------- /BasiliskII/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)(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(const char *); 28 | #endif 29 | 30 | void do_wait(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(char *, struct socket *); 71 | void redir_x(u_int32_t, int, int, int); 72 | void getouraddr(void); 73 | void slirp_insque(void *, void *); 74 | void slirp_remque(void *); 75 | int add_exec(struct ex_list **, int, char *, int, int); 76 | int slirp_openpty(int *, int *); 77 | int fork_exec(struct socket *, char *, int); 78 | void snooze_hup(int); 79 | void snooze(void); 80 | void relay(int); 81 | void add_emu(char *); 82 | void u_sleep(int); 83 | void fd_nonblock(int); 84 | void fd_block(int); 85 | int rsh_exec(struct socket *, struct socket *, char *, char *, char *); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /BasiliskII/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 | #include 12 | 13 | #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 14 | #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 15 | 16 | struct sbuf { 17 | u_int sb_cc; /* actual chars in buffer */ 18 | u_int sb_datalen; /* Length of data */ 19 | char *sb_wptr; /* write pointer. points to where the next 20 | * bytes should be written in the sbuf */ 21 | char *sb_rptr; /* read pointer. points to where the next 22 | * byte should be read from the sbuf */ 23 | char *sb_data; /* Actual data */ 24 | }; 25 | 26 | void sbfree(struct sbuf *); 27 | void sbdrop(struct sbuf *, u_int); 28 | void sbreserve(struct sbuf *, size_t); 29 | void sbappend(struct socket *, struct mbuf *); 30 | void sbappendsb(struct sbuf *, struct mbuf *); 31 | void sbcopy(struct sbuf *, u_int, u_int, char *); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /BasiliskII/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(PACK_RESET) 38 | #endif 39 | 40 | void tftp_input(struct mbuf *m); 41 | -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/68ktools/build68k: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/uae_cpu/68ktools/build68k -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/68ktools/gencpu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/BasiliskII/src/uae_cpu/68ktools/gencpu -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/compiler/compemu.h: -------------------------------------------------------------------------------- 1 | //fixes compiler errors for files that include this file 2 | #ifndef COMPEMU_H 3 | #define COMPEMU_H 4 | 5 | #include "newcpu.h" 6 | 7 | static __inline__ void flush_icache(int) { } 8 | static __inline__ void build_comp() { } 9 | 10 | #endif /* COMPEMU_H */ 11 | -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/cpuemu_nf.cpp: -------------------------------------------------------------------------------- 1 | #define NOFLAGS 2 | #include "cpuemu.cpp" 3 | -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/cpustbl_nf.cpp: -------------------------------------------------------------------------------- 1 | #define NOFLAGS 2 | #include "cpustbl.cpp" 3 | -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/fpu/fpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fpu/fpu.h - public header 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * MC68881/68040 fpu emulation 7 | * 8 | * Original UAE FPU, copyright 1996 Herman ten Brugge 9 | * Rewrite for x86, copyright 1999-2000 Lauri Pesonen 10 | * New framework, copyright 2000 Gwenole Beauchesne 11 | * Adapted for JIT compilation (c) Bernd Meyer, 2000 12 | * 13 | * This program is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2 of the License, or 16 | * (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26 | */ 27 | 28 | #ifndef FPU_PUBLIC_HEADER_H 29 | #define FPU_PUBLIC_HEADER_H 30 | 31 | #ifndef FPU_DEBUG 32 | #define FPU_DEBUG 0 33 | #endif 34 | 35 | #if FPU_DEBUG 36 | #define fpu_debug(args) printf args; 37 | #define FPU_DUMP_REGISTERS 0 38 | #define FPU_DUMP_FIRST_BYTES 0 39 | #else 40 | #define fpu_debug(args) ; 41 | #undef FPU_DUMP_REGISTERS 42 | #undef FPU_DUMP_FIRST_BYTES 43 | #endif 44 | 45 | #include "sysdeps.h" 46 | #include "fpu/types.h" 47 | #include "fpu/core.h" 48 | 49 | #endif /* FPU_PUBLIC_HEADER_H */ 50 | -------------------------------------------------------------------------------- /BasiliskII/src/uae_cpu/fpu/rounding.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * fpu/rounding.cpp - system-dependant FPU rounding mode and precision 3 | * 4 | * Basilisk II (C) 1997-2008 Christian Bauer 5 | * 6 | * MC68881/68040 fpu emulation 7 | * 8 | * Original UAE FPU, copyright 1996 Herman ten Brugge 9 | * Rewrite for x86, copyright 1999-2000 Lauri Pesonen 10 | * New framework, copyright 2000 Gwenole Beauchesne 11 | * Adapted for JIT compilation (c) Bernd Meyer, 2000 12 | * 13 | * This program is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2 of the License, or 16 | * (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26 | */ 27 | 28 | #undef PRIVATE 29 | #define PRIVATE /**/ 30 | 31 | #undef PUBLIC 32 | #define PUBLIC /**/ 33 | 34 | #undef FFPU 35 | #define FFPU /**/ 36 | 37 | #undef FPU 38 | #define FPU fpu. 39 | 40 | /* -------------------------------------------------------------------------- */ 41 | /* --- Native X86 Rounding Mode --- */ 42 | /* -------------------------------------------------------------------------- */ 43 | 44 | #ifdef FPU_USE_X86_ROUNDING_MODE 45 | const uae_u32 FFPU x86_control_word_rm_mac2host[] = { 46 | CW_RC_NEAR, 47 | CW_RC_ZERO, 48 | CW_RC_DOWN, 49 | CW_RC_UP 50 | }; 51 | #endif 52 | 53 | /* -------------------------------------------------------------------------- */ 54 | /* --- Native X86 Rounding Precision --- */ 55 | /* -------------------------------------------------------------------------- */ 56 | 57 | #ifdef FPU_USE_X86_ROUNDING_PRECISION 58 | const uae_u32 FFPU x86_control_word_rp_mac2host[] = { 59 | CW_PC_EXTENDED, 60 | CW_PC_SINGLE, 61 | CW_PC_DOUBLE, 62 | CW_PC_RESERVED 63 | }; 64 | #endif 65 | -------------------------------------------------------------------------------- /BasiliskII/src/xpram.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * xpram.cpp - XPRAM handling 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 | /* 22 | * SEE ALSO 23 | * Inside Macintosh: Operating System Utilities, chapter 7 "Parameter RAM Utilities" 24 | */ 25 | 26 | #include 27 | 28 | #include "sysdeps.h" 29 | #include "xpram.h" 30 | 31 | 32 | // Extended parameter RAM 33 | uint8 XPRAM[XPRAM_SIZE]; 34 | 35 | 36 | /* 37 | * Initialize XPRAM 38 | */ 39 | 40 | void XPRAMInit(const char *vmdir) 41 | { 42 | // Clear XPRAM 43 | memset(XPRAM, 0, XPRAM_SIZE); 44 | 45 | // Load XPRAM from settings file 46 | LoadXPRAM(vmdir); 47 | } 48 | 49 | 50 | /* 51 | * Deinitialize XPRAM 52 | */ 53 | 54 | void XPRAMExit(void) 55 | { 56 | // Save XPRAM to settings file 57 | SaveXPRAM(); 58 | } 59 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/Basilisk2/70336161a677daeecbe18bf44910d5c9f8f2ec44/README --------------------------------------------------------------------------------