Commit Graph

170 Commits

Author SHA1 Message Date
CasualPokePlayer 1fc08e3d95 Use NLua's MethodCache if possible for MethodBase based lua functions (see 0ed3085ec3) 2022-12-07 19:36:13 -08:00
CasualPokePlayer b04260bee7 fix unwrapped lua exceptions not being correctly thrown 2022-12-06 14:21:39 -08:00
CasualPokePlayer bc79664461 fix implicit lua number to .net conversion
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
2022-12-06 02:52:57 -08:00
CasualPokePlayer eb00019c86 fix passing numbers for string args in .net lua functions (old engine had this behavior, granted "bad user" if they relied on this), add appropriate test
fix passing sbyte/char as args, add appropriate tests
cleanup the lua auto unlock hack, using a nice ref struct + dispose to handle it
2022-12-05 23:21:23 -08:00
CasualPokePlayer 51f01efdc4 Properly handle errors when running a lua script, using Resume/Yield methods added to the LuaThread class (see f904fa0d53) 2022-12-02 14:44:05 -08:00
CasualPokePlayer 45fbdb4844
Move to NLua/KeraLua/Lua5.4 (#3361) 2022-12-01 00:51:02 -08:00
YoshiRulz 7efafc18da
Extract helper code for Analyzers and Source Generators 2022-10-01 04:13:55 +10:00
YoshiRulz 466d052c2d
Clean up project files of external .NET projects 2022-09-30 08:51:57 +10:00
YoshiRulz 65f5aecfa6
Fix warnings in external .NET projects 2022-09-30 08:51:53 +10:00
YoshiRulz 158c897702
Use `Google.FlatBuffers` NuGet package and check in new Nyma codegen 2022-09-30 05:33:18 +10:00
CasualPokePlayer 98a8cdf693 remove gongshell, add "simple" code for opening win32 context menu (gongshell's only actual use), re: #2261 2022-08-19 00:24:50 -07:00
YoshiRulz d58a4a07f5
Update `PcxFileTypePlugin.HawkQuantizer` project file to match others 2022-08-19 17:02:27 +10:00
YoshiRulz a5652ee3bc
Backport `IEnumerable.Order`/`OrderDescending` shorthand
at time of writing, in .NET 7 preview
https://github.com/dotnet/runtime/pull/70525
2022-08-13 02:18:26 +10:00
YoshiRulz 140e340a8d
Add Analyzer rule to warn of `FirstOrDefault` on list of structs 2022-07-28 03:06:01 +10:00
YoshiRulz a2fef59fe1
Add Analyzer rule to prohibit `typeof(T).ToString()` 2022-07-22 03:51:43 +10:00
YoshiRulz f3f90a4cd5
Add Analyzer rules to prohibit `this.GetType()`
seriously Meziantou is a godsend
2022-07-22 03:51:42 +10:00
YoshiRulz dcc8957be3
Fast-fail Analyzer properly, fix typo
thanks to https://www.meziantou.net/working-with-types-in-a-roslyn-analyzer.htm
2022-07-22 03:51:36 +10:00
YoshiRulz 3fddcdb2c5
Add Analyzer rule to enforce throwing in `[FeatureNotImplemented]` 2022-07-15 22:22:28 +10:00
YoshiRulz 26e02033f2
Do the analysis for BHI1005 properly 2022-07-15 22:22:28 +10:00
YoshiRulz 4f98733c29
Add Analyzer to enforce exception type for default switch branches 2022-07-14 23:46:34 +10:00
YoshiRulz 395aa0755b
Add `BizHawk.Analyzer` project 2022-07-14 04:26:27 +10:00
CasualPokePlayer 13456e51bf AppleII - make clock registers deterministic if needed
also don't state monochrome (non-sync setting? todo: verify)
2022-06-27 18:33:31 -07:00
YoshiRulz 0d18a54609
Retarget Virtu to .NET Standard 2.0
fixes 4df256cd6
2022-06-24 21:30:30 +10:00
CasualPokePlayer 4df256cd6b AppleII - State keyboard, fix up csproj 2022-06-23 22:01:07 -07:00
YoshiRulz 0a4bbce3f2
Some additions to ReflectionCache source generator 2021-12-03 16:36:03 +10:00
YoshiRulz 182699b967
Clean up ReflectionCache source generator 2021-11-28 03:33:34 +10:00
YoshiRulz 4f7a641453
Add missing $ before string in generated ReflectionCache source 2021-07-27 21:10:11 +10:00
YoshiRulz 652b38d04c
Check-in ReflectionCache assembly instead of including in build 2021-04-14 10:44:46 +10:00
YoshiRulz 65d5e3f7d5
Move NymaTypes to separate project, fiddling w/ project structure 2021-04-09 17:49:07 +10:00
YoshiRulz e24c4c3971
Move CDFS (iso-parser) to new external project, update upstream info 2021-01-02 17:34:13 +10:00
YoshiRulz b9b1e2d237
Move Quantize to new external project, update upstream info 2020-12-23 16:37:47 +10:00
YoshiRulz d23386e75d
Remove unused assemblies from repo 2020-11-06 23:15:12 +10:00
YoshiRulz 10e7cb0f34
Use pre-built assembly for FlatBuffers.Core
fixes 4be701e2a
2020-05-30 15:54:06 +10:00
nattthebear 21cdf5120b
Revamp waterbox build environment and runtime. (#2027)
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.
2020-05-20 15:34:24 -04:00
adelikat c77c5e1f8f update virtu.dll 2020-02-22 14:54:24 -06:00
adelikat 33ad336b6a
Apple II - refactor states to use Serializer (#1859)
* 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
2020-02-22 09:53:56 -06:00
adelikat b3a80965af
Virtu cleanup (#1846)
* 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
2020-02-14 09:54:35 -06:00
YoshiRulz 2c74b1a693
Properly fix assembly loading issue, retarget BizHawk.Common again
temp fix was 9ffef2531
2020-01-29 00:23:10 +10:00
YoshiRulz 88ae783ef0
Partially revert 185337d1c, resolves #1766 2019-12-26 15:52:32 +10:00
YoshiRulz 185337d1c5 Replace assembly references with NuGet packages where possible 2019-12-12 03:56:46 +00:00
James Groom fcc0bc19a4
Change build config to support the Core build system (for #1415)
squashed PR #1702
2019-12-03 16:58:33 +00:00
J.D. Purcell e1075d1006 Virtu: Make savestates smaller. 2019-11-03 14:12:48 -05:00
J.D. Purcell d71b2d26b5 Update Newtonsoft.Json 2019-11-02 16:24:08 -04:00
feos 84facd4c03 Merge branch 'master' into release
# Conflicts resolved:
#	BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs
#	References/OpenTK.dll.config
2019-06-18 19:41:31 +03:00
James Groom 59ad94f9b9
Merge branch 'master' into appleii_fixattempt 2019-03-28 20:25:11 +11:00
feos 3b4d82defb fix #1424 2019-01-06 21:20:54 +03:00
James Groom 42764f0019 Add preliminary Unix compatibility (using Mono; resolves #1384) (#1380)
* 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 ...;`
2019-01-04 01:50:55 +03:00
Asnivor 6f7a26e803 Virtu: enable apple white and black keys 2018-12-07 15:03:19 +00:00
James Groom ca021d96cc Allow bizhawk to be built and run w/ MSBuild and Wine+Mono on GNU+Linux (#1237)
- 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
2018-11-04 20:05:20 +03:00
zeromus 02c72a663a fix crashes when dsound devices go disabled 2018-03-04 02:43:50 -06:00
alyosha-tas 8c0c115e69 Delete EMU7800.dll 2017-08-29 09:47:34 -04:00
zeromus c078375987 update PeNet to throw PeNetException instead of Exception 2017-07-27 22:51:48 -05:00
zeromus 60ebaeaaf5 make nlua/luainterface selectable. see program.cs for details on the sensitive DLL layout and references 2017-07-14 00:57:01 -05:00
zeromus 256f4d43e7 Revert "remove LuaInterface. shouldn't need it, if things go well."
This reverts commit 4de4492f7a.

re-adding because we're going to make the lua core selectable
2017-07-13 23:44:11 -05:00
zeromus 8b905eb68c maybe a crazy idea, lets try optimizing the release build configurations 2017-07-11 17:18:07 -05:00
zeromus 91741ca65b dunno whats up, here's fresh dll builds 2017-07-10 20:33:02 -05:00
zeromus 0f686a0de1 * revert strict string checking behaviour from nlua Revision 10f4d0ce78a2a3cb9b727ac55c8705385f0ded7e (we dont want it, probably)
* do a better job porting old commits from bizhawk (should fix memory leaks, optional arguments)
2017-07-10 12:59:06 -05:00
zeromus 4de4492f7a remove LuaInterface. shouldn't need it, if things go well.
At this point we lack the luaperks (luasockets etc.) which we previously had; but maybe other people's libraries will work better.
2017-07-09 23:52:42 -05:00
zeromus 3417453b43 use NLua+KopiLua instead of LuaInterface 2017-07-09 23:51:02 -05:00
zeromus 872bc39583 Merge pull request #890 from wert23239/SQL
Added SQLite Calls to Lua
2017-06-26 22:00:53 -05:00
wert23239 6f2f09dbda Fixed SQL dll from x86 to x64 2017-06-26 20:06:39 -04:00
wert23239 d85ef21899 "Added SQLite Calls to Lua 2017-06-26 19:48:42 -04:00
zeromus c53fde6044 delete x86 references 2017-06-26 17:47:51 -05:00
nattthebear fa24f5fc9d GPGX64 works with the new waterbox, or would if I pushed the binaries. Savestates are hosed; TBD 2017-05-20 18:50:01 -04:00
nattthebear a325969963 Work more on waterbox and convert GPGX64 to use the new PERunner. Doesn't work yet. 2017-05-20 17:18:31 -04:00
nattthebear 3f8a89d171 waterbox: progress on a PERunner to load everyone's third favourite executable format 2017-05-19 21:21:50 -04:00
nattthebear 8986ddb54b some waterbox cleanup+reorg 2017-05-18 18:44:34 -04:00
J.D. Purcell bb95ccf82d Update SharpZipLib (from 9ad7f58 on 2016-12-04 with target framework changed to 4.0). Should fix #834. 2017-04-25 23:17:04 -04:00
alyosha-tas 1679c1b565 Fix #815 2017-04-17 14:43:42 -04:00
zeromus 701fcf4853 try installing luasockets, since it seems the prebuilt exception handling interferes with ours (fix confirmed by revo-tpp users) 2017-02-18 14:19:46 -06:00
adelikat 2868d921e0 compile emu7800 in release mode, fixes #795 2017-02-07 20:00:28 -06:00
adelikat 75654b9f33 Atari 7800 - make difficulty switches behave like toggles instead of buttons, also add mnemonic info for them, fixes #726 2016-11-11 08:44:28 -06:00
zeromus 96416e13d9 fix regressions in lua's support for UTF-8 strings, likely created around the time of the sandboxing. 2016-05-23 14:33:36 -05:00
nattthebear bef6ddef67 Add x64 target to luainterface. Build and add to references 2016-02-28 20:12:39 -05:00
zeromus f83d00d87d supposedly a x64 slimdx. is it really? 2016-02-28 19:02:45 -06:00
nattthebear a87096fb85 Move around LuaInterface.dll as well in preparation for 64 bit build 2016-02-28 16:10:18 -05:00
nattthebear 2a0e859a85 Add 64 bit build (doesn't work yet), move SlimDX.dll 2016-02-28 15:06:03 -05:00
adelikat f5e679fa0d Refactor ITraceable to work on TraceInfo objects that separate Disassembly and Register information. Make Tracelogger two columns. 2016-02-21 17:34:42 -05:00
zeromus dfc139376a fix lua dlls on windows xp after changing to vs2015 building 2015-12-20 05:04:23 -06:00
zeromus 4f9061c45e update lua vcxproj to vs2015. rebuild dlls. should hide the floating point precision on n64 problem, but i still suspect theres badness 2015-12-16 16:34:33 -06:00
zeromus 27f2ad0f24 Revert "activate luaperks version of lua". Never mind, we no longer have evidence that we need this. We'll keep it stashed until we do.
This reverts commit 75d5abbf71.
2015-11-02 01:08:55 -06:00
zeromus 75d5abbf71 activate luaperks version of lua 2015-11-02 00:28:38 -06:00
zeromus e7bfc73b92 add a slimdx overload I needed 2015-08-22 02:55:23 -05:00
scrimpeh bcbc588e05 Apple II - Fix Memory and Input Callbacks interacting with savestates 2015-07-06 22:09:18 +02:00
scrimpeh 23d93cc1fe Apple II - Add Input Callbacks, Change definition of a lag frame 2015-07-06 21:15:48 +02:00
scrimpeh f472b4802d Apple II Breakpoints - Fix Write Breakpoints 2015-07-05 17:12:46 +02:00
scrimpeh 43dd015b51 AppleII - Add MemoryCallbacks, Breakpoint Support, Set Registers in Debugger to proper bit size. 2015-07-05 17:09:07 +02:00
scrimpeh 486bf49094 Apple II trace logger - remove vestigial stuff 2015-06-24 16:04:39 +02:00
scrimpeh 4b9ed33954 Apple II trace logger - fix crashes on loadstate, sanity check on printing opcodes 2015-06-24 16:00:19 +02:00
nattthebear 77d3369d26 Some stuff for loading elves. Not yet all finished. 2015-06-23 21:35:34 -04:00
goyuken ae4881356e appletwo: fix mono setting being borked on loadstate 2015-06-21 14:40:58 +00:00
scrimpey 02b71ab377 Apple II - Add Trace Logging functionality 2015-06-21 14:31:18 +00:00
scrimpey 4b1547384b Implemented AppleII.SetCpuRegister 2015-06-15 21:29:28 +00:00
adelikat a99c0787a8 Apple II - implement IDisassembler, and IDebuggable.GetCpuFlagsAndRegisters() 2015-06-12 23:51:03 +00:00
goyuken 44b47f96a1 apple 2 keyboard: fix oopsie that made nearly every key combination with ctrl or shift or caps active invalid 2015-05-30 14:50:53 +00:00
adelikat f5daee2623 Virtu core - remove SupressMessage attributes, also change tabs to spaces in files I touched 2015-05-20 01:28:50 +00:00
adelikat edbb7508b5 Apple II - Virtu Core - remove String.cs shenanigans 2015-05-20 01:22:26 +00:00
goyuken facee4e113 Fix oopsie 2015-05-20 00:12:19 +00:00
goyuken ef20ef1991 [JsonIgnore] an unneeded part of Apple II video core 2015-05-19 23:49:19 +00:00
goyuken 46c374f8a3 ye olde drive lighte 2015-05-19 23:33:50 +00:00