Commit Graph

2029 Commits

Author SHA1 Message Date
YoshiRulz 0fcb6cbaa7
ApiHawk refactoring and cleanup
MemApi.ReadByteRange now returns the requested number of bytes and not 1 extra,
MemApi.ReadByteRange now warns only once per call for addrs outside range,
MemApi.ReadByteRange now warns for negative addrs (once per call; previous
implementation passed negative addresses to PeekByte), MemApi.WriteByteRange now
warns only once per call for addrs outside range, MemApi.WriteByteRange now
warns for negative addrs (once per call; previous implementation passed negative
addresses to PokeByte)
2019-12-17 02:39:04 +10:00
YoshiRulz 08d0f462fc
Partially migrate NesLuaLibrary to ApiHawk delegation
nes.setdispbackground and nes.setscanlines now throw when the core is neither
NesHawk or QuickNES (the latter is still silently ignored by these functions)
2019-12-16 17:47:50 +10:00
YoshiRulz 29ac251f34
Migrate SnesLuaLibrary to ApiHawk delegation 2019-12-16 17:14:10 +10:00
YoshiRulz 60daae50d5
Migrate GenesisLuaLibrary to ApiHawk delegation 2019-12-16 17:14:01 +10:00
YoshiRulz 0b43b35427
Migrate GuiLuaLibrary to ApiHawk delegation
Changed param clear of IGui.DrawNew from bool? to bool (default value remains
true), made IGui and GuiLuaLibrary inherit IDisposable, added
GetDefaultTextBackground to IGui, applied fix from 6b3071d8a to
GuiApi.DrawString, replaced background box drawn by Lua API
gui.drawString/gui.drawText with what I think is a shadow (now matches
GuiApi.DrawString)
2019-12-16 16:54:06 +10:00
YoshiRulz 8f93a954e1
Move Lua hacks to Lua libs
Changed parameter of IInputMovie.SetRerecordCount to ulong to match internal
2019-12-16 15:04:35 +10:00
adelikat ad8f321ea1 Add event.availableScopes(), fix LogWithSeparator, cleanup 2019-12-15 12:25:49 -06:00
YoshiRulz 05801dc2c5
Reduce LINQ usage in Lua subsystem 2019-12-16 04:08:22 +10:00
adelikat 91ef301a23 memory callbacks - log error if a scope is passed in that is not available 2019-12-15 12:02:43 -06:00
adelikat 9676fd97df cleanup 2019-12-15 11:52:55 -06:00
adelikat 1d741f3d0e memorycallbacks - rename domain param to scope to avoid confusion, otherwise it looks like any memory domain will do 2019-12-15 11:42:26 -06:00
adelikat 29e284c6f8 cleanup 2019-12-15 11:40:22 -06:00
adelikat 250bd2087e fix lua memory callback functions on cores with no system bus such as PSX 2019-12-15 11:37:45 -06:00
YoshiRulz 2f494003c7
Add param to IList.ToLuaTable extension and refactor bizstring.split
Changed behaviour when said Lua function is called with a misformatted separator
param, and updated its docs
2019-12-16 01:58:19 +10:00
adelikat d2f21f84e3 another extension method for lua table creation 2019-12-15 09:46:39 -06:00
adelikat 7ebfd42229 Simplify some lua table creation with an extension method 2019-12-15 09:22:10 -06:00
adelikat d955c468db refactor LuaHelper into an extension method class, and some nitpick cleanups 2019-12-15 09:05:33 -06:00
YoshiRulz 8bb9cee9c2
Write version to config (for migration check to be implemented later) 2019-12-16 00:44:40 +10:00
YoshiRulz e58f2811dc
Replace config bool `UseNLua` w/ enum 2019-12-16 00:38:22 +10:00
YoshiRulz f8dc18c1bd
Migrate SavestateLuaLibrary to ApiHawk delegation
includes backwards-compatible API change
2019-12-15 04:39:16 +10:00
YoshiRulz 104c17e77c
Prepare for EmuHawk-tied libraries to delegate to ApiHawk
Made ApiContainer inherit from APISubsetContainer, added
DelegatingLuaLibraryEmu, and reworked init logic in EmuLuaLibrary
2019-12-15 03:52:48 +10:00
James Groom 3099a11a04
Merge branch 'master' into lua-via-apihawk 2019-12-14 16:17:14 +00:00
feos dfa73eceef mame syncsettings 2019-12-14 18:50:11 +03:00
YoshiRulz 3f9b51f565
Partially revert #1754, add event.onmemoryexecuteany 2019-12-14 16:47:29 +10:00
adelikat 06e1149cfe a bit of cleanup 2019-12-13 12:35:51 -06:00
adelikat b080d6d09e
Merge pull request #1754 from warmCabin/all-memory-execute
All Memory Execute
2019-12-13 07:40:41 -06:00
YoshiRulz 185337d1c5 Replace assembly references with NuGet packages where possible 2019-12-12 03:56:46 +00:00
warmCabin 201a4b85a4
remove default value for address
<adelikat> The reason we throw an error originally is my concern is that it would be easy to leave out an address in a script, and that it would have huge concequences.

<adelikat> I think address should not have a default value here and make the user explicitly add nil if they want this functionality.
2019-12-11 12:44:54 -05:00
warmCabin 715761f563
unit? 2019-12-10 23:23:40 -05:00
warmCabin e7374447f3
make onmemoryexecute address default to null 2019-12-10 22:59:35 -05:00
adelikat 515f409246 Tastudio - Make mainform hotkeys out of a bunch of built in hotkeys 2019-12-10 19:26:23 -06:00
adelikat 7cd4bf881c TasBranch - remove last reminents of UniqueIdentifier.GetHashCode() 2019-12-08 14:26:29 -06:00
adelikat 35fdb5dbdd Tastudio - Integrate branches with the statusbar slot icons 2019-12-08 13:53:36 -06:00
adelikat fff85d917a Fix typo 2019-12-08 13:41:52 -06:00
adelikat 43c9ac7ef7 SImplify some code 2019-12-08 13:40:59 -06:00
adelikat 6107bc4553 TasMovie - rip out input caching attempt that wasn't even working 2019-12-07 12:21:42 -06:00
adelikat 9bb07dca76 Bk2ControllerAdapter/Bk2Movie - don't new up everytime some things that don't change through the lifetime of the object. HUGE (3x-4x) speedup to TAStudio 2019-12-07 11:35:48 -06:00
adelikat 4a522263d9 Bk2ControllerAdapter - small cleanups 2019-12-07 11:02:17 -06:00
adelikat 4e7d19fa18
Merge pull request #1744 from Zinfidel/watch-separator-sorting
Watch sorting - new algorithm that handles separators. Fixes #1713
2019-12-06 18:44:32 -06:00
feos b5db6a7df6 mame
- put system and game names to emuhawk caption
- fix loading from recent menu
- temp fix for audio drift
2019-12-06 21:34:20 +03:00
adelikat 4711950f9c default to using luainterface over nlua, supposedly the memory leaks are resolved in luainterface 2019-12-04 16:56:27 -06:00
adelikat 1dbf932486 Config.cs - remove unused methods, simplify some things 2019-12-04 16:53:57 -06: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
adelikat 5e73c7c536 lua - update memory documentation to mention it defaults to system bus, fixes #1675 2019-12-02 20:48:38 -06:00
adelikat c050a377d8 WatchList - flag changes when doing column sort 2019-12-02 20:11:35 -06:00
Zach 0e055ecb5a Merge branch 'master' into watch-separator-sorting 2019-12-02 16:38:01 -08:00
Zach e621876453 Replaced LINQ query with for loop.
Upon reflection, the query looked nice, but was inferior to a plain for loop because it would have to create n anonymous objects to process the list, even with LINQ's filtering optimization, due to select preceding where.
2019-12-02 16:37:55 -08:00
adelikat 52db5ac848 cleanups 2019-12-01 18:05:20 -06:00
YoshiRulz 230548cf35 Partially migrate MainMemoryLuaLibrary to ApiHawk delegation
`mainmemory.readbyterange` will now return partial data if the requested range
extends beyond the domain (invalid addresses are read as 0). Did not fix docs of
`mainmemory.readbyterange` which incorrectly claim the returned table uses the
memory addresses as keys i.e. addr..(addr+length) - it was and remains
0..length. `mainmemory.write_u8` will now check the specified domain's length
and not erroneously check the selected domain's length.
2019-11-30 23:33:54 +10:00
YoshiRulz b678e19041
Merge LuaMemoryBase into MainMemoryLuaLibrary 2019-11-30 23:33:46 +10:00