Commit Graph

1726 Commits

Author SHA1 Message Date
YoshiRulz 23a8387dc1
Replace IBlitterFont w/ the type wrapped by its sole inheritor 2020-12-29 15:36:37 +10:00
YoshiRulz 47670714b5
Remove WinForms dep from GuiApi (impl.) 2020-12-29 15:08:01 +10:00
YoshiRulz 8e67d82bd5
Rename file to match type name 2020-12-29 15:00:55 +10:00
YoshiRulz f431faf65c
Move some DiscoHawk logic to Emulation.DiscSystem 2020-12-29 15:00:25 +10:00
YoshiRulz 1a21765be6
Fix assembly resolution in DiscoHawk on Mono
without this the program wouldn't open at all, I assume all of its actual
functions will just workTM now
2020-12-29 01:33:57 +10:00
YoshiRulz a0c7e9c7fb
Fix non-string resource in DiscoHawk 2020-12-29 01:26:56 +10:00
YoshiRulz c0cf40b68e
Check for MAME's lib before instantiating the MAME core (fixes #2538) 2020-12-29 01:04:36 +10:00
nattthebear f4e98fd9bd
Refactor ZWinderBuffer to allow use of arbitrary backing Streams (#2536) 2020-12-27 18:36:42 -05:00
YoshiRulz bcf5347823
Use C# 9 improvements to switch / "pattern matching" 2020-12-28 00:07:06 +10:00
YoshiRulz 96f9e8f6e4
Encapsulate MessageBox.Show using IDialogController and some helpers
a lot of the calls to `DialogController.ShowMessageBox` from `ToolFormBase`
inheritors could be replaced with `this.ModalMessageBox` (i.e. add self as
parent window)
2020-12-28 00:03:00 +10:00
YoshiRulz 9cafddb1e0
Minor cleanup to improve readability 2020-12-28 00:00:39 +10:00
SuuperW a928d1887f fix: Attempted to evict state 0, and attempted to modify collection while enumerating 2020-12-25 09:59:32 -06:00
YoshiRulz 62f90f11f2
Make anything inheriting FormBase slightly less ugly on Linux 2020-12-26 00:44:21 +10:00
alyosha-tas 515f5cf9b0 GBHawk: update RAM state for GBA mode 2020-12-24 19:45:44 -05:00
YoshiRulz 42fc895e12
Update EmuHawk project file
these files were removed in b9b1e2d23
2020-12-23 16:46:03 +10:00
YoshiRulz b9b1e2d237
Move Quantize to new external project, update upstream info 2020-12-23 16:37:47 +10:00
YoshiRulz faba9035b7
Update attribution of ported code 2020-12-23 15:55:50 +10:00
alyosha-tas 28c35a6274 GBHawk:set initial HRAM to 0, this provides consistent sync when clearing RAM on console, where as 0xFF does not 2020-12-22 20:20:00 -05:00
YoshiRulz 60d2bfa85c
Bump C# language level for ReSharper/Rider 2020-12-22 20:07:35 +10:00
YoshiRulz b9c9144358
Fix new dep not being copied to output, causing crashes
fixes 1e37350e9
I already fixed this before pushing but forgot to stage it
2020-12-22 19:57:55 +10:00
YoshiRulz 1e37350e99
Use NuGet package instead of copy-pasted code in BizwareGL/Borrowed
Our copy was equivalent to version 1.0.0 + a patch which allowed Stream instead
of requiring a filename, so I've used 1.0.2 as it has the author's
implementation of the same feature.
There are more recent versions available (note, 1.0.2 isn't for .NET Core).
NuGet: https://www.nuget.org/packages/Cyotek.Drawing.BitmapFont
Project repo: https://github.com/cyotek/Cyotek.Drawing.BitmapFont
2020-12-22 19:48:50 +10:00
YoshiRulz a5fd5f5d78
Return the tool from IToolApi.GetTool instead of its type
also affects Lua client.gettool; this has been broken for quite a while
2020-12-22 18:47:32 +10:00
YoshiRulz 5a098055d7
Fix Lua client.createinstance calling the wrong ApiHawk method
fixes e6cb74d31
2020-12-22 18:46:42 +10:00
YoshiRulz 03b4ae18e0
Move Virtual Pads schemata to Cores 2020-12-22 18:37:27 +10:00
YoshiRulz 790a09067e
Cleanup LINQ in VirtualpadTool.CreatePads 2020-12-22 18:34:27 +10:00
YoshiRulz 9124b0f3b5
Pass MessageBox.Show to Virtual Pads schemata as callback 2020-12-22 18:18:40 +10:00
YoshiRulz 0ff60220f7
Use enum to represent button images in Virtual Pads schemata 2020-12-22 15:35:26 +10:00
YoshiRulz 50b17096e1
Remove WinForms dep from Virtual Pads schemata 2020-12-22 14:07:28 +10:00
YoshiRulz 9168b59382
Add base interface for *CheckBoxEx and *RadioButtonEx controls 2020-12-21 16:58:49 +10:00
nattthebear 56b158e72a minor comment clarification 2020-12-20 21:06:22 -05:00
SuuperW b5b1e17851 Fix eviction logic for _gapFiller. (we were attempting to remove the wrong value from StateCache, and also weren't checking for reserved) 2020-12-20 18:06:50 -06:00
SuuperW 01bcf22802 Deal with this TODO. Removing from the StateCache here was removing extra frames. (frames between the old last gap frame and new last gap frame which were in another buffer) 2020-12-20 18:04:02 -06:00
nattthebear 55c08dc77f Revert "misc cleanups in neshawk boards, mostly removing redundant else's"
This reverts commit 2b5d0b6219.

A lot of these make things harder to read:

- Extra empty lines in large switch stacks mean they're more likely to go off one screen
- `if` and its condition on the same line is super hard to read, please never do that.  (Are the extra empty lines an attempt to mitigate the above)
- Removing terenaries obscures intent, and now there's more copy paste than before
- """Redundant""" else clauses on if...return kept things nice and lined up.

That was a huge churning diff with no value; let's stop it from spreading.
2020-12-20 15:26:08 -05:00
SuuperW 3d84812341
add a Lua method to get inputs from the movie (#2526) 2020-12-20 13:16:28 -06:00
adelikat 2b5d0b6219 misc cleanups in neshawk boards, mostly removing redundant else's 2020-12-20 13:12:51 -06:00
nattthebear 374f646f75 CoreInventory tweaks
When constructing a core using ConstructorInfo.Invoke, any exceptions thrown by the core are packaged inside TargetInvocationExceptions.  This has no value to us -- the fact that reflection is used is an implementation detail, and it breaks checking specific exceptions for specific information.  Accordingly, consumers have to deal with e.InnerException checks.  Fix this up so that we only expose the actual exception thrown.

In addition, undo a bad change in 6225e7854b that made the entirety of CoreInventory nonfunctional.
2020-12-20 09:15:22 -05:00
adelikat 7bb5506ba8 remove 2 deprecated nes library methods (add/remove game genie), they were marked deprecated for enough releases that I think we can go ahead and remove them 2020-12-19 20:17:26 -06:00
adelikat 6225e7854b a few cleanups in CoreInventory.cs 2020-12-19 20:07:09 -06:00
adelikat 68f9ac9730 remove unused usings in Emulation.Cores 2020-12-19 20:03:37 -06:00
adelikat aaa1c8e7a8 AutofireController - remove autofire flag that was always true 2020-12-19 18:55:22 -06:00
adelikat c730a78994 remove redundant null check before assigning null 2020-12-19 13:43:04 -06:00
SuuperW ec5e88c808 fix: loading a tasproj wouldn't set autofire (despite the gui showing it did) 2020-12-19 13:42:10 -06:00
alyosha-tas 3cc9684ebd GBHawk: better initial RAM state 2020-12-17 21:02:41 -05:00
adelikat fe5655d1e3 misc cleanups in BizHawk.Common 2020-12-15 17:54:44 -06:00
adelikat cb6ef03982 use explicit private/internal modifiers 2020-12-15 16:49:23 -06:00
adelikat b83556fc6f make fields readonly where possible 2020-12-15 16:00:55 -06:00
adelikat 213729550d remove redundant array initializers 2020-12-15 16:00:55 -06:00
nattthebear eeca40e072 libsnes: Cache region from core once at start
The region value in the comm struct is set once and then gets wiped out later.  I don't know what wipes it, but so many things have their hands on that, it's not surprising.  Someone knew about this and handled _mapper appropriately, but not _region.

Fixes #2503
2020-12-15 08:51:08 -05:00
alyosha-tas a8e2a420f0 GBHawk: cleanup 2020-12-14 19:32:22 -05:00
alyosha-tas 08f1b69197 GBHawk: prep for future audio work 2020-12-14 19:30:22 -05:00
alyosha-tas 3df6dfb350 GBHawk: update clearing screen for subgbhawk and linked modes 2020-12-14 11:41:19 -05:00
alyosha-tas b85e7cac2c O2; set released to true 2020-12-14 11:40:23 -05:00
nattthebear 1c27943707 Make SNES rom memory domain writeable
Use at your own risk
2020-12-13 20:11:58 -05:00
nattthebear fbee96c76b GPGX: Allow writing to rom memory domains
Don't let the diff fool you, a massive amount of work went into making this possible.
2020-12-13 19:49:04 -05:00
nattthebear 72ea5ce866
Waterbox: Allow SEH unwinding through guest calls. (#2519)
The goal of the separate stacks was to allow this, but I never quite finished the job.  Now, when a SEH exception (generally a Rust panic in a guest syscall handler, or a C# Exception in a callback) tries to unwind through guest code, it works.  Note that we don't actually unwind the guest stack, as there's nothing useful to be gained from that;  When an emulator core throws an exception like this, it should be considered completely hosed.  Throw it out and get a new one.

There were two bugs stopping this from working.

First of all, we had custom thunks that lacked sufficient unwind information for RtlUnwind to get through.  For the sysv <-> msabi adapter, this was fixed by making it regular Rust code instead of hand assembled junkus.  So the compiler generates valid unwind information for all of that.  Then we just JIT a small stub on top in the MsHostSysVGuest code, which needs no unwind information because it won't throw an exception itself and transparently passes execution to something with valid unwind information without invalidating that information.  (NB:  Clr JIT stubs use the same strategy.)  For the host <-> guest stack transition code, a small hand generated unwind stub was added to interop.s that is registered with `RtlAddFunctionTable`.  I've seen the unwind work successfully without this second set of unwind information, but better safe than sorry.

Secondly, our misuse of SubSystemTib caught up with us.  It's an old field, allegedly from OS/2, that we repurposed to hold TLS information needed for the waterbox stack transitions.  Most people think nothing uses it any more, but in fact if it's set to a non-NULL value, but doesn't contain valid information, `KERNELBASE!GetModuleFileNameW` will crash when it tries to get a module name from there.  The fix here was to simply tighten up our usage of SubSystemTib:  We were already nulling it out when returning from guest code, but not when calling back to host code in guest code.

Fixes #2487.  Unwinding of this sort has never worked well in waterbox; the reason why that issue is more recent is that the particular reproducing case of firmware didn't cause an exception in a callback in older code; the exception happened in pure managed code.
2020-12-13 19:12:16 -05:00
YoshiRulz fa6fd88d62
Import and use OSTailoredCode in DiscoHawk program class 2020-12-14 06:40:06 +10:00
YoshiRulz 24f90c922f
Fix incorrect import
I blame Rider
2020-12-14 06:33:46 +10:00
adelikat 28f161ce18 remove unnecessary string interpolation in a few places 2020-12-13 12:12:42 -06:00
adelikat 10d4f66248 Hex Editor - some small cleanups 2020-12-13 11:44:10 -06:00
nattthebear 2f2f104e3d Update nyma cores to Mednafen 1.26.1
See Mednafen release notes for full changes.  Mostly just Sega Saturn stuff.

Closes #2464
Closes #2162
2020-12-12 10:50:18 -05:00
alyosha-tas 4447d5ddc7 GBHawk: bug fix, initial ram change, and double speed mode input dumping 2020-12-09 22:54:12 -05:00
Andrew Cook 58cbec6dd6
[PSX] Make Octoshock more debuggable (#2508)
* [PSX] Bodge in a system bus memory domain

Fixes: debugger window crashes when adding a breakpoint

* [PSX] Use Octoshock's built-in disassembler

* [PSX] Add support for execute memcbs to the core

* [PSX] Have memcbs include actual values

* [PSX] Use SafeHandles instead of raw pointers

* [PSX] Use core's internal peek and poke functions for System Bus

* [PSX] Move memory maps into IDebuggable impl to be next to memory map hooks

* [PSX] Revert using SafeHandles

* [PSX] Fire execution callback after trace callback instead of at end of fetch
2020-12-08 11:34:24 -06:00
alyosha-tas e81fa92f80 GBHawk: forgot a commit 2020-12-08 11:04:03 -05:00
alyosha-tas 401d635afc GBHawk: properly fade to white in GBC mode 2020-12-08 10:41:37 -05:00
zeromus 28af57de18 fix mistake in libsnes CARTROM-D CDL block 2020-12-07 15:55:15 -05:00
alyosha-tas 699fb1171c GBHawk: more mode 1 work 2020-12-06 19:39:25 -05:00
alyosha-tas a46ffefc77 GBHawk: mode 1 overhaul, fixes several bugs 2020-12-06 15:50:21 -05:00
zeromus 96aa3e85c0 libsnes - remove pointless registers 2020-12-05 23:37:16 -05:00
zeromus f580773342 add CARTROM-DB and CARTROM-D blocks to libsnes CDL 2020-12-05 23:37:16 -05:00
alyosha-tas b7c821f8d6 GBHawk: mode1 bug fix 2020-12-05 19:32:34 -05:00
YoshiRulz 877c11d5f9
Merge UpdateChecker.ParseVersion into VersionInfo.VersionStrToInt 2020-12-06 07:35:12 +10:00
YoshiRulz 66e0d4b214
Misc. cleanups in VersionInfo 2020-12-06 07:28:31 +10:00
YoshiRulz 508dc4a9d9
Use readonly instead of const in VersionInfo 2020-12-06 07:28:23 +10:00
YoshiRulz 9dcc8f56f4
Move VersionStrToInt helper to VersionInfo 2020-12-06 07:27:54 +10:00
YoshiRulz 98e2d494a2
Bump supported Windows versions 2020-12-06 07:12:27 +10:00
YoshiRulz eeae3f023f
Merge Sound.Instance into MainForm.Sound and pass back to Program
now I don't have to feel bad about sweeping a global under the rug
2020-12-06 05:59:36 +10:00
YoshiRulz cf901753ba
Update Lua libs' ApiContainer when updating services
I don't think this mattered unless the tool restart was triggered by reloading
the rom with client.reboot_core(), which in my defence has always been jank
2020-12-06 05:41:58 +10:00
YoshiRulz febd4f1340
Remove unused prop EventsLibrary 2020-12-06 05:34:46 +10:00
YoshiRulz ce7aa1ff64
Convert abstract class LuaLibraries to an interface 2020-12-05 07:51:14 +10:00
YoshiRulz e42a021215
Move props from LuaLibraries to Win32LuaLibraries 2020-12-05 07:51:11 +10:00
YoshiRulz c46719c602
Do type checks on LuaConsole.LuaImp
this is more safe than is strictly necessary but it's not really less code to
use a direct cast
2020-12-05 07:51:08 +10:00
YoshiRulz bf116f3ecf
Inline LuaLibraries.RunningScripts 2020-12-05 07:51:05 +10:00
YoshiRulz c3c02eaad3
Inline LuaLibraries.EnableUpdate/SupressUpdate
"suppress" isn't even speled corectly
2020-12-05 07:51:02 +10:00
YoshiRulz e4a0175351
Extract interface from NamedLuaFunction 2020-12-05 07:50:59 +10:00
YoshiRulz 8f10ce66a6
Merge EventsLuaLibrary.RegisteredFunctions into Win32LuaLibraries 2020-12-05 07:50:56 +10:00
YoshiRulz 6aefa75cff
Add helpers for manipulating NamedLuaFunctions 2020-12-05 07:50:53 +10:00
YoshiRulz 3024bc0d0f
Inline some methods from EventsLuaLibrary into Win32LuaLibraries 2020-12-05 07:50:50 +10:00
YoshiRulz a54aa0706d
Deprecate emu.getluacore in favour of new func client.get_lua_engine 2020-12-05 07:50:46 +10:00
YoshiRulz f57897515e
Add prop EngineName to abstract class LuaLibraries 2020-12-05 07:50:43 +10:00
YoshiRulz 89a66563f1
Cleanup FormsLuaLibrary.WindowClosed and usages 2020-12-05 07:50:40 +10:00
YoshiRulz d51f9c3e88
Use LINQ instead of dumb in FormsLuaLibrary implementations 2020-12-05 07:50:37 +10:00
YoshiRulz 30d9a8b458
Inline Designer and resource files for LuaCanvas 2020-12-05 07:50:33 +10:00
YoshiRulz b541fe5b40
Use NLuaTableHelper for more conversion to/from LuaTable
also fix indexing that I broke in c8e10120d
2020-12-05 07:50:28 +10:00
YoshiRulz 46504b4880 Add and use more extensions for IDialogParent 2020-12-05 07:47:01 +10:00
YoshiRulz b752b09d62 Implement IDialogParent in some more forms 2020-12-05 07:47:01 +10:00
YoshiRulz 8a6c7be6aa Cleanup MainForm interfaces, move ShowDialogAsChild to extension 2020-12-05 07:47:01 +10:00
YoshiRulz f0664ce018 Add and use interface IDialogParent 2020-12-05 07:47:01 +10:00
YoshiRulz f0657b358d Inline ShowHawkDialog
there were 8 unnecessary double-mutes where ShowHawkDialog was called with a
InputPrompt receiver
2020-12-05 07:47:01 +10:00
YoshiRulz 9d620116f3 Shoehorn IDialogController into ShowHawkDialog call chains 2020-12-05 07:47:01 +10:00
YoshiRulz dd44ff7f6c Ensure owner param of ShowHawkDialog overloads are never null 2020-12-05 07:47:01 +10:00
YoshiRulz aad612593b Add and use helper method DoWithTempMute (void and generic flavours) 2020-12-05 07:47:01 +10:00
YoshiRulz cc4acd9c64 Move Start/StopSound calls from InputPrompt to callers 2020-12-05 07:47:01 +10:00
YoshiRulz 2295d47192 Add superinterface IDialogController for IMainFormForConfig/Tools 2020-12-05 07:47:01 +10:00
adelikat e0c1fc4a4d misc cleanups in Client.Common 2020-12-04 15:39:52 -06:00
BrunoValads 81ef9ed88b
GB layers (#2490)
* Fixed OBJ layer toggle message

(it was using the flag from BG toggle)

* Added hotkey option for GB Window layer toggle

* Added hotkey option for GB Window layer toggle

* GB object viewer prototype [Gambatte]

GPU Viewer add-on to display sprite tiles on the real position, just like what you have for the bsnes core
Has several issues:
- Drawing is identical to the current sprite display, so it doesn't have the transparency it should have;
- Drawing doesn't take priority into account, so overlapping is usually wrong;
- The drawing flickers, probably the way of refreshing (with `.Clear()`) is bad.
2020-12-04 14:37:36 -06:00
alyosha-tas 0aea6191ae GBHawk: HDMA fixes and implement reads for GBC visualizer 2020-12-04 11:20:56 -05:00
YoshiRulz a060c4e600
Fix building on non-AppVeyor machines without breaking AppVeyor
hopefully
2020-12-04 06:12:06 +10:00
zeromus ec61aad159 as requested, try it with netcoreapp3.1 2020-12-03 14:05:00 -05:00
zeromus 0fda93acea revert targetframework on bizhawk.tests too 2020-12-03 13:17:08 -05:00
YoshiRulz c8e10120db
Encapsulate conversion to/from LuaTable, stop passing NLua to Lua libs 2020-12-03 22:54:47 +10:00
YoshiRulz e69cab3297
Cleanup Win32LuaLibraries init 2020-12-03 22:15:07 +10:00
YoshiRulz 76f03a9508
Merge DelegatingLuaLibrary into LuaLibraryBase 2020-12-03 21:37:17 +10:00
YoshiRulz d4349aefd4
Allow ext. tools to recieve an ApiContainer 2020-12-03 18:58:34 +10:00
YoshiRulz 608d7dcff8
Add ApiContainer prop to IExternalApiProvider 2020-12-03 18:46:07 +10:00
YoshiRulz 29bceb272f
Merge MouseWheelTracker from MainForm interface into InputManager 2020-12-03 18:35:24 +10:00
YoshiRulz f6d465a1ac
Move InputApi to Client.Common project 2020-12-03 18:31:45 +10:00
YoshiRulz 6be371aadd
Use callbacks to get mouse pos+buttons to InputApi via InputManager 2020-12-03 18:14:49 +10:00
YoshiRulz 4ade496de5
Move EmuClientApi to Client.Common project 2020-12-03 17:59:30 +10:00
YoshiRulz 56c681ef0c
Use IWindowCoordsTransformer in EmuClient and Input API impl. 2020-12-03 17:50:13 +10:00
YoshiRulz 999df1b041
Extract interface IWindowCoordsTransformer from DisplayManager 2020-12-03 17:48:38 +10:00
YoshiRulz 6b30fb826c
Move ClientLuaLibrary to Client.Common project 2020-12-03 17:35:54 +10:00
alyosha-tas cfbdde4cc7 GBHawk: more hdma improvements 2020-12-01 19:03:11 -05:00
YoshiRulz 239fa0b22c
Rename files of MainForm interfaces to match type name
oops
2020-12-01 02:51:28 +10:00
YoshiRulz 928ea057d8
Enable SA1137 and fix noncompliance (except in Cores)
"Elements should have the same indentation"
2020-11-30 21:36:48 +10:00
YoshiRulz be36c60e9e
Enable SA1208 and fix noncompliance (except in Cores)
"System using directives should be placed before other using directives"
2020-11-30 21:26:36 +10:00
YoshiRulz 1a020ba0f5
Make the getters of the 6 ToolFormBase props protected
and it only cost a callback and a `public new` hack
2020-11-30 20:56:06 +10:00
YoshiRulz 85faec638a
Update or remove comments mentioning GlobalWin 2020-11-30 20:45:21 +10:00
YoshiRulz bf968acd57
Move static GlobalWin.Sound to static Sound.Instance, mirroring Input 2020-11-30 20:42:23 +10:00
YoshiRulz c3a7ec047f
Remove GlobalWin.Config by cleaning up Sound 2020-11-30 20:37:11 +10:00
YoshiRulz 0a9f93c433
Fix encapsulation of Config in FFmpegWriterForm 2020-11-30 20:30:26 +10:00
YoshiRulz 756f9f50e8
Use EmulationApi's config hack in ClientLuaLibrary 2020-11-30 20:19:27 +10:00
YoshiRulz 3b120e7184
Delegate ClientLuaLibrary.GetWindowSize/SetWindowSize to ApiHawk
the impls were the same but for getting the global config
2020-11-30 20:19:23 +10:00
YoshiRulz a393c7d368
Remove weird double-updating of EmuClientApi
changes signatures in IEmuClientApi but they were never meant to be called
outside MainForm anyway
2020-11-30 20:14:28 +10:00
YoshiRulz a1ccac4d67
Delegate ClientLuaLibrary.FrameSkip to ApiHawk
the ApiHawk copy was the bad one
2020-11-30 19:57:13 +10:00
YoshiRulz 7c85aee53b
Init global Input instance from MainForm ctor
* Input.MainFormInputAllowedCallback is now readonly, set in ctor
* call to Input.Adapter.FirstInitAll is also in the Input ctor
2020-11-30 19:48:25 +10:00
YoshiRulz 709d78d8e0
Use local var instead of GlobalWin.Config in Program 2020-11-30 19:30:15 +10:00
YoshiRulz f314aa3d61
Pass global Config to BatchRun/BatchRunner 2020-11-30 19:24:17 +10:00
YoshiRulz 32f571144e
Encapsulate GlobalWin.Config access in Input 2020-11-30 19:21:13 +10:00
YoshiRulz 4e38028b49
Fix typo, global access when global is passed as param 2020-11-30 19:15:59 +10:00
YoshiRulz 453ea2b1bb
Pass globals to DisplayManager as with OSDManager
* moved initialisation of global `OSDManager` to `DisplayManager` ctor again
* `DisplayManager.UpdateGlobals` calls `DisplayManager.OSD.UpdateGlobals`
* goodbye `GlobalWin.Emulator` and `GlobalWin._mainForm` :)
2020-11-30 19:11:59 +10:00
YoshiRulz c991babdce
Use MainForm instead of GlobalWin in Lua internals 2020-11-30 19:03:50 +10:00
YoshiRulz 3ccdfa8289
Pass MainForm to UI helpers instead of using GlobalWin.Sound 2020-11-30 16:44:27 +10:00
YoshiRulz 636a9a4735
Pass a callback to some sound internals to read the global IEmulator 2020-11-30 16:16:22 +10:00
YoshiRulz 6d22cdc15f
Pass global MovieSession from MainForm ctor to Program with an out param 2020-11-30 16:02:48 +10:00
YoshiRulz 3a7ca89311
Remove GlobalWin.InputManager 2020-11-30 15:58:50 +10:00
YoshiRulz a83642fab2
Pass globals to OSDManager via ctor and new UpdateGlobals method
also instantiate OSDManager in MainForm and pass it to DisplayManager because
that's how we did it until recently and it's also just easier
2020-11-30 15:55:23 +10:00
YoshiRulz b9a5c5796d
Pass global InputManager to remaining Virtual Pads controls 2020-11-30 15:43:33 +10:00
adelikat e3f7519e15 replace unnecessary GlobalWin usage in BookmarksBranchesBox.cs 2020-11-29 22:04:00 -06:00
adelikat 792b317118 add Start/StopSound methods to IEmuHawkMainFormToTools interface and use it in tools instead of GlobalWin.Sound 2020-11-29 19:34:57 -06:00
SuuperW ac93f28939 Do not attempt to report >100% seek progress. (This could happen if the user starts a seek which results in loading a savestate past the frame previously being seeked.) 2020-11-29 12:29:38 -06:00
SuuperW e1186d9253 Remove this. It isn't necessary, and is a copy-pasted line from some converted code in commit 2535207a. 2020-11-29 12:29:38 -06:00
adelikat 8d6cb7685e TasClipboardEntry, move some logic to Tastudio, fix filename, and move to Client.Common 2020-11-29 12:25:26 -06:00
adelikat 8e70bece16 TAStudioClipboard - remove unused and dubious ToString() override 2020-11-29 12:16:51 -06:00
adelikat ceade5be5a move some logic from TAStudioLuaLibrary to TAStudio 2020-11-29 12:13:12 -06:00
adelikat 592cedba1d make fields readonly where possible in EmuHawk project 2020-11-29 11:26:41 -06:00
adelikat 488409a2ad MovieZone - remove usage of GlobalWin.Config 2020-11-29 10:57:50 -06:00
YoshiRulz 8bbd6b2d8b
Remove final reference to GlobalWin.Game by hacking an existing hack 2020-11-29 19:15:01 +10:00
YoshiRulz f7a7b722c5
Pass globals to ExternalToolManager via ctor and Restart method 2020-11-29 19:06:45 +10:00
YoshiRulz 84f0d57fd5
Add restarting to ExternalToolManager, called when replacing Config 2020-11-29 18:58:12 +10:00
YoshiRulz bed5142ddc
Make ExternalToolManager not static 2020-11-29 17:30:19 +10:00
YoshiRulz d2c514bc51
Move more ApiHawk impl. classes to Client.Common 2020-11-29 16:50:31 +10:00
YoshiRulz ebef47203d
Allow ApiHawk impl classes to have any param order in their ctors 2020-11-29 16:39:26 +10:00
YoshiRulz 1f9188da5e
Pass global Config and GameInfo to Emu and GameInfo APIs via ctors 2020-11-29 14:26:19 +10:00
YoshiRulz 85d4d5ed4d
Pass global InputManager to JoypadApi via ctor 2020-11-29 14:18:40 +10:00
YoshiRulz 8ad3ea9cc6
Move GlobalWin.GL to MainForm, passing it through from Program 2020-11-29 14:09:37 +10:00
YoshiRulz 7bf879c095
Explicitly pass first Config through SingleInstanceController 2020-11-29 14:05:23 +10:00
YoshiRulz a34dde7c4f
Pass global IGL to DisplayConfig (and then to RetroShaderChain) 2020-11-29 13:59:30 +10:00
YoshiRulz b26aa2e893 Rewrite GlobalWin.GL init with local functions 2020-11-29 13:50:49 +10:00
YoshiRulz 3150cc4493 Remove GlobalWin.IGL_GL, only init OpenTK when using that disp. method
also, if it's too old, dispose it before continuing with fallback
2020-11-29 13:50:49 +10:00
YoshiRulz 60022ab146 Move OpenTK configuration to dedicated static ctor 2020-11-29 13:50:49 +10:00
alyosha-tas f38c75f06d GBHawk: some accuracy improvements 2020-11-28 18:58:33 -05:00
adelikat e0eb572e74 misc cleanups, mostly IDE nags, in files I had open 2020-11-28 14:32:05 -06:00
adelikat bdf1838ac8 pass Config around to various AV writer and form classes, instead of using GlobalWin.Config 2020-11-28 13:57:40 -06:00
nattthebear 84002f1232 Make the menu items for FDS disk changing better named 2020-11-28 13:30:00 -05:00
adelikat 8550d2bd0d fix previous commit, fix dependencies in PathConfig and remove usage of GlobalWin in FirmwaresConfig 2020-11-28 11:03:38 -06:00
adelikat be8825fefc GBPrefs/DGBPrefs - pass in dependencies 2020-11-28 10:53:27 -06:00
adelikat 342164d05c ColorChooserForm - a bit of cleanup 2020-11-28 10:04:24 -06:00
YoshiRulz 3be90efd57
Make some GlobalWin props read from MainForm instead of the reverse
these props' setters were only called from MainForm
2020-11-28 23:28:32 +10:00
YoshiRulz 0899369d1a
Sort out the mess that is creating and updating the global Config
hopefully this kills a few subtle bugs re: `Config` > `Load Config`
2020-11-28 23:04:49 +10:00
YoshiRulz 3de87af5de
Pass MovieSession to APIs via ctor 2020-11-28 22:48:02 +10:00
YoshiRulz c203edba17
Move prop GlobalWin.UserBag to global MovieSession
and weaken to IDict<K, V>
2020-11-28 22:39:13 +10:00
YoshiRulz 56df80bb5a
Move prop GlobalWin.OSD to global DisplayManager 2020-11-28 22:27:26 +10:00
YoshiRulz b0b2b8fa63
Remove GlobalWin.DisplayManager, pass it through from MainForm instead 2020-11-28 22:10:48 +10:00
YoshiRulz 78daf4913d
Move ArgParser to Client.Common and split ParsedCLIFlags into own file 2020-11-28 21:45:52 +10:00
YoshiRulz 251f0e7af8
Move init of network helpers from ArgParser to MainForm ctor 2020-11-28 21:41:33 +10:00
YoshiRulz 1c1aa348cf
Add a new field to MainForm for _autoDumpLength
now ParsedCLIFlags can be properly readonly :)
2020-11-28 21:01:17 +10:00
YoshiRulz 35d6bca6c6
Cleanup ArgParser without changing usage
(apart from its init in the MainForm ctor)
2020-11-28 20:47:35 +10:00
adelikat 750e1d8980 Sounds.cs - pass in some dependencies instead of using GlobalWIn 2020-11-27 15:53:52 -06:00
adelikat bae75157f2 remove some unnecessary GlobalWin usages 2020-11-27 15:09:04 -06:00
adelikat 0223c11504 cleanups 2020-11-27 15:07:10 -06:00
adelikat e640b11e49 remove some unused methods in ToolFormBase 2020-11-27 15:00:28 -06:00
adelikat e9ca84f8bd remove GlobalWin.Game usage in ToolFormBase 2020-11-27 14:59:50 -06:00
adelikat cd146c0f79 remove GlobalWin usage in HeaderEditor 2020-11-27 11:17:47 -06:00
adelikat 488c3def6a misc cleanups, naming conventions, readonly modifier, pattern matching, explicit modifier, apparently visual studio nags about these things now 2020-11-27 11:06:35 -06:00
adelikat a87f08379c GB ColorChooserForm - simplify code, remove a GlobalWin usage for free 2020-11-27 10:33:42 -06:00
adelikat 2c7b2a530c Remove GlobalWin usage in BmpView, and also use appropriate suffixes in various screenshot saving methods in various graphics tools 2020-11-27 10:25:30 -06:00
YoshiRulz 707dae93a7
Use MainForm's prop to get the global ToolManager in Win32LuaLibraries 2020-11-26 22:55:08 +10:00
YoshiRulz 2c086702c9
Pass global ToolManager to IToolApi impl via ctor 2020-11-26 22:53:27 +10:00
YoshiRulz 794c4b5b84
Pass global ToolManager to Console and TAStudio Lua libs on init 2020-11-26 22:41:46 +10:00
YoshiRulz 256f4d5b06
Make ConsoleLuaLib funcs not static, save callback on init of lib 2020-11-26 22:37:30 +10:00
YoshiRulz 9e0a3c0e34
Pass Lua Console log callback to LuaCanvas and replace static calls 2020-11-26 22:35:52 +10:00
YoshiRulz 72fd3f2fca
Replace static ConsoleLL.Log calls in FormsLL with LogOutputCallback 2020-11-26 22:31:27 +10:00
YoshiRulz 663e9cfbec
Add wrapper for Lua Console log callback and cleanup 2020-11-26 22:24:39 +10:00
YoshiRulz 939cd1bcaf
Add prop IToolApi.AvailableTools and use in ClientLuaLibrary 2020-11-26 22:12:19 +10:00
YoshiRulz 2e428ccc2e
Clean up GlobalWin.Tools assignment and usage in MainForm 2020-11-26 21:46:41 +10:00
YoshiRulz 8aab0d00cd
Move GlobalWin.ExitCode to Program 2020-11-26 21:41:54 +10:00
YoshiRulz 6dfb0a8af8
Move GlobalWin.DisableSecondaryThrottling to MainForm 2020-11-26 21:41:43 +10:00
YoshiRulz f0843689ed
Clean up global GLManager instance
no code actually got run by the GLManager ctor so it should be fine to delay it
2020-11-26 15:42:07 +10:00
YoshiRulz cdf562264c
Clean up global usage in DisplayManager 2020-11-26 15:22:19 +10:00
YoshiRulz 808ec64dba
Replace GlobalWin.FirmwareManager with MainForm prop 2020-11-26 15:08:15 +10:00
YoshiRulz 21b633c705
Move static IEmuClientApi prop from GlobalWin to ClientApi 2020-11-26 14:32:18 +10:00
YoshiRulz 0e2d35d6aa
Replace ClientApi event sub with direct call in MainForm 2020-11-26 14:29:11 +10:00
YoshiRulz 781976f18e
Pass EmuClientApi instance to MainForm when restarting in ToolManager 2020-11-26 14:24:03 +10:00
YoshiRulz 87a4f1186e
Make EmuClientApi.SystemIdConverter a static instance 2020-11-26 14:21:07 +10:00
YoshiRulz 9fc853d404
Pass more things through to ApiManager 2020-11-26 14:03:07 +10:00
YoshiRulz 4c9c985eed
Use IGameInfo instead of impl. in ApiHawk 2020-11-26 13:45:00 +10:00
alyosha-tas 389979b350 Movies: Still need this line for bk2 movies 2020-11-25 19:57:48 -05:00
alyosha-tas cf297dacb5 GBHawk: bug fix 2020-11-25 19:05:33 -05:00
alyosha-tas 53efd448d2 GBHawk: clean up 2020-11-25 14:24:52 -05:00
alyosha-tas 78ca48251f GBHawk: update HDMA implementation 2020-11-25 14:05:17 -05:00
YoshiRulz 13a8a602cf
Move SaveStateLuaLibrary to Client.Common 2020-11-25 19:48:06 +10:00
YoshiRulz db63222f32
Use new _luaLibsImpl prop instead of LuaConsole.LuaImp via globals 2020-11-25 19:47:07 +10:00
YoshiRulz a6d1c6595a
Pass LuaLibraries instance to Lua libs via ctors 2020-11-25 19:35:14 +10:00
YoshiRulz f5752294ff
Simplify Lua lib ctors 2020-11-25 19:27:38 +10:00
YoshiRulz a4e2e1ad3f
Move absract class LuaLibraries to Client.Common 2020-11-25 19:12:37 +10:00
YoshiRulz 6c05361cda
Move GuiLuaLibrary to Client.Common 2020-11-25 19:11:06 +10:00
YoshiRulz 20111fb4a2
Replace class Win32LuaLibraries.ResumeResult with tuples 2020-11-25 19:01:37 +10:00
YoshiRulz fd4a534fa7
When restarting Lua, use a single ApiContainer for all Lua libs
fixes a7ffdd948, 104c17e77, 151911069
2020-11-25 18:04:02 +10:00
alyosha-tas 1afcbe3ab5 GBHawk: update bad SRAm access emulation 2020-11-23 19:41:10 -05:00
alyosha-tas af38023ba8 GBHawk: open bus behaviour on locked SRAM 2020-11-23 17:06:49 -05:00
YoshiRulz 0093c16d79
Bump .NET SDK to 5.0.100, bump C# to 9.0
BizHawk.Tests executable needs to run in CI, but the 5.0 SDK image can't run
Core 3.1 apps somehow, so I bumped that too
2020-11-23 21:48:10 +10:00
YoshiRulz be536c67de
Update OpenTK and OpenTK.GLControl to latest 3.x (resolves #2471) 2020-11-23 21:18:20 +10:00
alyosha-tas 4a76cc322e GBHawk: some display bug fixes 2020-11-22 17:03:24 -05:00
alyosha-tas 8199e67770 GBHawk: more double speed mode timing work 2020-11-22 11:40:56 -05:00
YoshiRulz bad08162e2
Restart Sound in MainForm instead of SoundConfig 2020-11-22 12:38:40 +10:00
YoshiRulz edda120b07
Clean up some dumb in *SoundOutput ctors 2020-11-22 11:48:17 +10:00
YoshiRulz 9e5ab0706e
Move calls of static methods *SoundOutput.GetDeviceNames to a delegate
now only MainForm needs to reference *SoundOutput
2020-11-22 11:31:58 +10:00
alyosha-tas bffe2078d4 GBHawk: More double speed mode work 2020-11-21 16:18:43 -05:00
alyosha-tas cd7cc7f939 GBHawk: work on double speed mode 2020-11-21 13:49:28 -05:00
YoshiRulz 7596b97218
Add prop FormBase.BlocksInputWhenFocused to simplify some logic 2020-11-21 22:42:42 +10:00
YoshiRulz e7f83cb492
Small cleanup of <NoWarn/> use in project files 2020-11-21 19:53:13 +10:00
YoshiRulz e2a496c652
Cleanup OTK_Keyboard 2020-11-21 19:16:34 +10:00
YoshiRulz e2ac1aca84
Add and use DistinctKey enum (copy of WPF's key enum) 2020-11-21 17:43:58 +10:00
YoshiRulz 641db1bcd7
Comment out unused field
was assigned to before refactor in fc92d3c63
2020-11-21 11:24:57 +10:00
alyosha-tas 0b8e4ab6b1 Movies: revert previous 2 commits, too many difficulties around movies in 'finished' mode 2020-11-20 19:20:55 -05:00
alyosha-tas 1fe1138a91 Movies: don't redo steps if movie finished 2020-11-20 18:11:38 -05:00
alyosha-tas d676036359 Movies: reorder code so that record mode is not entered if state load failed 2020-11-20 17:25:01 -05:00
alyosha-tas 320ecc9093 Movies: Fix #4285 2020-11-20 16:09:58 -05:00
alyosha-tas 349092fec8 GBHawk; fix input when switching from playing a movie to recording another one 2020-11-19 13:59:33 -05:00
alyosha-tas fc92d3c63e Debugger: Fix scrolling in disassembly view 2020-11-17 19:54:43 -05:00