Commit Graph

331 Commits

Author SHA1 Message Date
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
James Groom 3099a11a04
Merge branch 'master' into lua-via-apihawk 2019-12-14 16:17:14 +00:00
YoshiRulz 3f9b51f565
Partially revert #1754, add event.onmemoryexecuteany 2019-12-14 16:47:29 +10: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 5e73c7c536 lua - update memory documentation to mention it defaults to system bus, fixes #1675 2019-12-02 20:48:38 -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
YoshiRulz 7d99071ac5 Migrate MemoryLuaLibrary to ApiHawk delegation
`memory.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
`memory.readbyterange` which incorrectly claim the returned table uses the
memory addresses as keys i.e. addr..(addr+length) - it was and remains
0..length. `memory.write_u8` will now check the specified domain's length and
not erroneously check the selected domain's length.
2019-11-30 23:32:09 +10:00
YoshiRulz b2676bce68 Copy LuaMemoryBase and merge copy into MemoryLuaLibrary 2019-11-30 23:32:09 +10:00
YoshiRulz 1042f746f4 Migrate JoypadLuaLibrary to ApiHawk delegation
`joypad.getimmediate()` now returns float controls as well as bools
2019-11-30 23:32:09 +10:00
YoshiRulz f4a229888f Migrate UserDataLibrary to ApiHawk delegation 2019-11-30 23:32:09 +10:00
YoshiRulz 4a84e1a8a9
Migrate MovieLuaLibrary to ApiHawk delegation 2019-11-30 23:32:00 +10:00
YoshiRulz bd7dfbd487 Migrate MemorySavestateEmuLuaLibrary to ApiHawk delegation 2019-11-30 23:31:23 +10:00
YoshiRulz 8da543b1a5
Migrate EmulatorLuaLibrary to ApiHawk delegation
`emu.setrenderplanes(bool...)` now works when using BSNES or Genplus-gx
2019-11-30 23:31:18 +10:00
YoshiRulz e39e083c13
Migrate GameInfoLuaLibrary to ApiHawk delegation 2019-11-30 23:29:09 +10:00
YoshiRulz 0bea6032ab
Migrate SQLLuaLibrary to ApiHawk delegation 2019-11-30 23:27:14 +10:00
YoshiRulz 8ce403dab2
Mirror cleanup from 7aa170283 onto the C# APIs
also fixed VS' stupid comma placement and added a "using" in SqlLuaLibrary
2019-11-30 23:18:26 +10:00
adelikat 7aa170283e cleanup some lua files 2019-11-29 16:35:21 -06:00
adelikat 50cad2067f Lua - when removing registered functions, remove functions reigstered to a script of the same path (or the same thread) 2019-11-29 15:11:40 -06:00
adelikat f36d69e6b0 cleanup LuaFileList 2019-11-29 15:10:58 -06:00
adelikat d757b8e64f Refactor a lot of lua code to use a LuaFile object instead of a Lua object, and unify some luafile manipulation logic into methods 2019-11-29 15:02:40 -06:00
adelikat 84d9419637 LuaLibraryBase - a bit of cleanup 2019-11-29 12:40:14 -06:00
adelikat c9d34ca828 minor cleanup 2019-11-29 10:16:48 -06:00
adelikat ce2a7b1612 EmuLuaLibrary.Events - cleanup 2019-11-29 10:14:07 -06:00
adelikat a0ba2189af lua events library - remove N64 dynarec checks since we don't have the dynarec core anymore 2019-11-29 10:03:35 -06:00
YoshiRulz a7ffdd948e
Add DelegatingLuaLibrary and set up ApiHawk instantiation 2019-11-16 17:19:04 +10:00
YoshiRulz 27b2d1b6ad
Mirror cleanup from cf4dd6770 onto the Lua APIs 2019-11-16 16:52:32 +10:00
YoshiRulz 8c059aa43c
Replace helper methods with readonly bool IsUnixHost and cleanup 2019-11-04 14:30:05 +10:00
J.D. Purcell fec63fb66a Spaces -> tabs, fix mixed newlines. 2019-11-03 20:58:36 -05:00
adelikat 942d9fc75e Simplify OS checks with some helpful methods 2019-11-03 16:04:42 -06:00
adelikat d6972d1252 Lua Console - use InputRolle, fix all kinds of bugs with using Separators 2019-10-19 09:50:21 -05:00
James Groom 90b0574bc3
Remove unnecessary calls to ToList (e.g. in foreach)
squashed PR #1591
2019-10-13 15:50:57 +00:00
adelikat 41d9d2da4d fix a warning, and fix the name of a variable nearby 2019-06-28 14:34:18 -05:00
Brian Armstrong 2c6ecb68bd Merge branch 'master' into brian/mem_callback_addr_value 2019-06-06 02:11:04 -07:00
Brian Armstrong d41bd867b8 flags 2019-06-06 02:04:47 -07:00
YoshiRulz 35056ae2d9
Remove #if WINDOWS, using runtime check where applicable 2019-05-18 20:17:02 +10:00
James Groom 779975f689
Use nameof 2019-03-28 14:17:14 +11:00
YoshiRulz 9d0ee22885
Use string interpolation 2019-03-20 15:01:12 +10:00
Brian Armstrong a8f293eec8 Call mem callbacks with addr, value 2019-01-24 03:23:21 -08:00
feos ce3e3d2ed3 lua docs: couple hints 2019-01-23 15:42:02 +03:00
upthorn efc6f73169 Merge branch 'PluginDev' 2018-12-22 10:43:12 -08:00
Asnivor eee1cb481c
Fix Lua documentation - #1389 2018-12-08 08:47:17 +00:00