The main objective in this PR is to get rid of the main .NET Framework dependencies in Bizware packages. This PR doesn't do that completely per se, still having .NET Framework used for WinForms Controls, but that can easily be swapped over for whatever UI framework we use next as long as it exposes native window handles in some way.
For this PR, it does some reorganizing of Bizware, splitting Bizware.OpenTK3 and Bizware.DirectX into 3 packages based on usage; Bizware.Audio, Bizware.Graphics, and Bizware.Input. These packages in the future probably could have more functionality moved into them, but for now they are largely just a reshuffling of the Bizware.OpenTK3 and Bizware.DirectX packages.
As both SlimDX and OpenTK3 are .NET Framework, they have been removed in this PR. Their replacements are as follows:
SharpDX: DirectSound, Direct3D9
Vortice: XAudio2, DirectInput/XInput
Silk.NET: OpenAL, OpenGL
SDL2-CS / native SDL2: OpenGL context management, new gamepad backend (replacing OpenTK's role for gamepads)
native X11: New key input backend (replacing one of OpenTK's roles for keyboards)
GLControl has been replaced by custom made control which just uses SDL2 for context management.
The OpenTK input backend has been replaced with a combination of SDL2 and an OS tailored key input backend (DirectInput on Windows, X11 on Linux, and planned to be Quartz on macOS). This is just represented on the user side as "SDL2" without mentioning the key input backend. This does mean for a while DirectX will be mandatory on Windows again, until a RAWINPUT backend is written for handling key input on Windows for the SDL2 input backend.
I'm pretty sure all the existing instances were intended to use `default(T)` if
the key isn't present, except maybe the cheatcode converters but I don't care to
rewrite those at the moment
* Use source generator for VersionInfo
* Remove leftover hacks
* Use same fallbacks as NixHawk when Git not available
---------
Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
The main ram previously seemed to just be a slice of the system bus between 0 - 0xbfff. this posed two problems: that area is banked, and that area could represent main ram or aux ram. main ram now represents all of the ram main ram can possible represent, ordered like how the core orders it (which the way it does it happens to be very natural in any case), and a new aux ram domain does the same thing but with aux ram
Also some other changes put in so Rider wouldn't error on building Virtu
combine NLua with KeraLua (KeraLua is "gone" now I guess)
make it use the BizInvoker (so now it can properly handle the liblua5.4.so and lua54.dll names differing), also delete the liblua54.so.
minor speedup when creating a new empty table
make lua default to UTF8 internally, so we don't need to manually change the state's encoding
fix .net exceptions not halting the running script
fix inconsistency with stdout and lua console printing errors, both should end in a newline now
print the inner exception of a lua exception (i.e. the .net extension) if possible
Create an all new waterbox build environment:
WSL2 + Ubuntu 20.04 LTS (Other linuxes may work)
Musl libc with waterbox customizations
LLVM's libclang-rt, libunwind, libcxxabi, libcxx
Static linking to elf files
Compared with the old system, this is easier to set up a dev env for and easier to update in the future. The executables are larger but produce smaller savestates due to static linking. The modern toolchain means advanced library features and language features that sometimes appear in some upstream cores will be reusable.
* apple II - poc to redo binary states to use the Serializer and pass it into virtu
* virtu - savestate logic for Video
* AppleII - serialize more components with AppleSerializer
* cleanup
* refactor MachineEvents to store delegates to call and have the calling code interact with an enum, prep work for serializing this class
* apple II - first attempt at serializing Machine events
* cleanup
* add isvblank to savestates
* put more things in savestates, cleanup
* cleanup
* cleanup, save more things
* cleanup, fixes
* cleanup, save more things
* virtu - savestate fixes
* cleanup
* save CurrentDisk in savestates
* virtu - tabs instead of spaces
* virtu - use nooget for Newtonsoft.Json
* virtu - target .net 4.8
* resharper - target C# 8
* virtu - remove unused usings
* virtu - remove some unused code
* virtu - cleanups
* virtu - trace logging - add flags to trace logs
* virtu - cleanups
* virtu - misc cleanups
* virtu - make some stuff internal and simplify the api some
* virtu - clock down more things and simplify api more
* virtu - lock api down more
* virtu- simplify, breaks older savestates however
* virtu - simplify more
* virtu - cleanup
* virtu- more cleanup
* virtu - reorg some files
* virtu - more cleanup
* virtu - more reorg
* virtu - more reorg
* virtu - make more things internal instead of public
* virtu - make more things internal
* virtu - update dll
* cleanup
* virtu - reorg
* virtu - remove unitialize from machine component since nothing was utilizing it
* virtu - simplify api
* virtu - cleanup
* virtu - cleanup and lock things down
* virtu - lock down and cleanup
* virtu - cleanup
* virtu - simplify - breaks savestates
* virtu - make PeripheralCard an interface with default implementation, breaks savestates
* virtu - minimize use of machine component
* virtu - cleanup
* virtu - start minimizing dependencies
* virtu - cleanup
* virtu - simplify
* apple II - simplify
* virtu - move some biz logic into bizhawk
* virtu - git rid of MachineComponent
* virtu - delete no longer needed code
* virtu - reorg
* move serialization logic out of virtu and into bizhawk, this was our shenanigans
* virtu - some small cleanups
* virtu - simplify
* virtu - dependency minimization
* virtu - minimize dependencies
* minimize dependencies
* virtu - move drivelight property into component that controls it
* virtu - minimize dependencies
* virtu - minimize depenencies
* move some machine logic to memory class
* move some initialize logic into constructor
* move initialize logic to constructor
* move logic from Initialize to constructor
* move initialize logic to constructor, simplify api to bizhawk
* dll
* virtu - movie some logic back into bizhawk
* virtu - move Lagged property from machine to memory component
* move more biz logic from virtu to biz
* virtu - slight reorg
* virtu - move some reset logic to constructor
* virtu - move some stuff around
* virtu - declare dependencies in memory class, no more dependencies on the machine class
* move slots from machine to memory class
* move some properties from machine to memory
* move more things into the memory class
* remove Machine.cs from virtu and make an equivalent container in bizhawk
* virtu - cleanup
* interface the cassette class and create a biz empty cassette "implementation"
* move some more dummy logic from virtu to biz and put an interface in virtu
* virtu - use an interface for a dependency
* virtu - interface more things
* virtu - more interfacing of things
* virtu - interface more things
* apple II/virtu - some reorg
* virtu - cleanup
* virtu - remove unused usages of disk name in disk classes
* virtu- cleanup and simplify api
* virtu - remove unused BootDrive property
* virtu - cleanup and interface more
* cleanup
* update virtu dll
* Move PlatformSpecificLinkedLibs and implementations to common and rename
* Specify file ext. at LoadPlatformSpecific call site
* Move Client.Common.Global.RunningOnUnix to PlatformLinkedLibSingleton
* Inline var Resolver
* Use PlatformLinkedLibManager internally
* Move plugin load check to LinkedLibManager, use LinkedLibManager
* Interpolate
* Return exit code from dlclose/FreeLibrary
* Skip all calls to externs in BlipBufDll when using mono
* Use PlatformLinkedLibManager in SevenZipLibraryManager
* Add expected return value to workaround (from testing on Win32)
* Remove ".dll" from DllImport attr, remove temporary workaround, see desc.
The library can be built by changing the output file name in
`.../blip_buf/Makefile` to `libblip_buf.so`, and running `make`. It will be
loaded if placed in the `.../output` folder.
* Remove unused code, add TODO (this class is req. for Waterbox.PeWrapper)
The TODO is to [rewrite with
C#](https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files)
instead of importing from `kernel32.dll`.
* Update OpenTK again but better (for #1384)
* Add Mono run script
* Add libblip_buf.so (temporary)
Temporary because it should be a separate package which BizHawk depends on.
* Add distro detection, add "already running" and "unknown distro" messages
* Gray-out Lua Console on Unix
* Extract superclass from EmuLuaLibrary, add shell implementation for Unix
* Specify libdl version, Fedora doesn't have the versionless symlink
* Remove empty `ToolStripMenuItem`, null `Text` caused crash on Unix
* Transform OpenTK keyboard input into a `List<KeyEvent>` and read that
Also fixes crash on rebind
* Remove debug `using ...;`
- Update to latest OpenTK, add input code from `mono-stable` branch
(kudos), and fix bugs arisen from version differences
- Move some functionality into Win-specific classes and add Wine+Mono
implementation where simple
- Add conditions to main loop so some things only run on Windows