adelikat
d2f21f84e3
another extension method for lua table creation
2019-12-15 09:46:39 -06:00
James Groom
3099a11a04
Merge branch 'master' into lua-via-apihawk
2019-12-14 16:17:14 +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
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
adelikat
7aa170283e
cleanup some lua files
2019-11-29 16:35:21 -06:00
YoshiRulz
27b2d1b6ad
Mirror cleanup from cf4dd6770
onto the Lua APIs
2019-11-16 16:52:32 +10:00
zeromus
0a18040aff
remove pointless redundant function name from LuaMethodExampleAttributes
2018-03-13 21:05:30 -04:00
Azreal
6032063518
Now looks good :)
2018-03-10 03:00:44 -08:00
Azreal
c4b2aba6bd
Fixed some bad cases!
2018-03-10 02:43:58 -08:00
Xadrophonix
07c07fd72a
First pool of examples.
2018-03-04 09:48:38 -08:00
Tastyfish
fef2c131f8
Adds memory.hash_region to aid in detecting RAM changes
2017-10-25 21:12:31 -04:00
adelikat
9581ce6a93
rename LuaMethodAttributes to LuaMethodAttribute so as not to be a bad person
2017-07-10 14:02:08 -05:00
zeromus
3417453b43
use NLua+KopiLua instead of LuaInterface
2017-07-09 23:51:02 -05:00
adelikat
dfea029fe4
Misc cleanups in Client.Common, documentation fixes
2017-05-17 11:16:55 -05:00
adelikat
e0985465b6
misc Client.Common code cleanups
2017-05-09 13:19:55 -05:00
J.D. Purcell
b53502eed8
Spaces -> tabs.
2017-04-15 16:37:30 -04:00
adelikat
b6f335e4c8
misc code cleanups in BizHawk.Client.Common
2017-04-14 14:59:01 -05:00
adelikat
7bff28bdee
Lua - memory library - actually default to system bus, previous commit was unsufficient
2016-11-12 11:55:20 -06:00
adelikat
bf9956089d
Lua - default the memory library to system bus (if available)
2016-11-12 09:25:18 -06:00
feos
07d4ac846b
lua: memory.GetMemoryDomainSize()
...
fix #542
2016-02-09 17:54:11 +03:00
feos
c1e70077c8
instafix #546
2015-12-13 00:00:22 +03:00
feos
3c07f7e649
lua: optional domain for memory functions.
...
fixes #538 .
I tested heavy memory reading, and it's not adding noticeable overhead.
2015-11-29 22:56:28 +03:00
adelikat
0d54298f02
Lua - memory domain - if a domain isn't writable, error when attempting to write to it
2015-01-25 20:20:43 +00:00
adelikat
779d7c0cee
Lua - memory library - default to main memory if user did not specify a domain
2015-01-24 21:33:52 +00:00
adelikat
12c3cb0b40
oops, and that todo
2015-01-18 17:28:26 +00:00
adelikat
91ffc17aae
Refacotor MemoryDomain.Size to be long instead of int, still some small todos, but it compiles and seems to work
2015-01-18 15:25:47 +00:00
adelikat
fbdb29b64c
refactor IMemorydomains to be a domain list instead of having a domain property, refactor cores to register an IMemoryDomains instead of being one
2015-01-14 21:55:48 +00:00
adelikat
9358e24213
IMemoryDomainList - downgrade from IList to IEnumerable, refactor a spot that needed something more than that
2015-01-14 00:34:50 +00:00
adelikat
418d80b0e8
Lua - Memory library - simplify some code
2015-01-14 00:25:25 +00:00
adelikat
d62ba4e2b4
Change IMemoryDomains to have an IMemoryDomainList instead of a MemoryDomainList, this is an incremental step into eventually having IMemoryDomains take over the properties of IMemoryDomainList, still todo: reduce the amount of needed functionality in IMemoryDomainList from old and not good code
2015-01-13 22:18:07 +00:00
adelikat
01019686cf
lua - convert memory libraries to use service injection
2015-01-01 20:19:20 +00:00
adelikat
04f9081943
in IEmulator extensions add methods such as AsMemoryDomains(), AsStatable() that do the service calling magic. In the client code replace appplicable casts of IMemoryDomains with AsMemoryDomains(), more commits of this nature for the other IEmulatorServices soon to follow
2014-12-05 00:32:29 +00:00
adelikat
d003be9cda
remove some todos, I decided not to do any of them, it is too pedantic to do them
2014-09-01 19:07:05 +00:00
adelikat
5ba74c631c
Remove MemoryDomains from IEmulator into a new Interface, IMemoryDomains, Add this interface to existing cores, except null emulator (and removed memory domain related code from it). Refactored EmuHawk for ram tools to use an instance of IMemoryDomains rather than IEmulator, don't expose ram tools unless the core implements IMemoryDomains. Still a few misc todos, and probably some cleanup
2014-09-01 18:43:41 +00:00
adelikat
9644c3d29f
Lua - memory library - populate the default memory with the MainMemory defined for that core, as opposed to null, which results in silent crashes
2014-07-14 16:24:28 +00:00
adelikat
0649d1c77e
Lua - add some more documentation, add a method that generates tasvideos wiki markup of the documentation and outputs to a file (method not wired to anything, there to save me tons of time when releasing)
2014-06-03 02:19:13 +00:00
adelikat
83ada011e8
Lua - Refactor how lua libraries are registered by searching assemblies and finding implementations and building a list of these
2014-06-01 22:02:59 +00:00
adelikat
667a96a277
Lua - combine common code in memory and mainmemory libraries into a base class, apply range checking to all methods, add memory.getsize() to match mainmemory method, fix a name bug in a memory 32bit method, clean up a bunch of things too
2014-05-23 23:19:20 +00:00
adelikat
17568997bf
Lua - unify constructors and have all libraries receive a lua context and an output callback, simplify some convolved registration code
2014-05-21 00:17:35 +00:00
adelikat
6401e6d719
Refactor LuaLibraryBase to have a Lua context rather than misc libraries being in charge of that when needed. Still todo: clean up the inconsistent constructor logic, vs setting these as public properties
2014-05-20 20:34:51 +00:00
adelikat
f19d15d1ed
Lua - add a Log callback to the LuaLibraryBase class instead of having misc libraries have to build out this behavior when they need it
2014-05-20 20:25:18 +00:00
adelikat
4ee4088c4c
read/write byte range functions - range check, and log warnings if user attempts to access outside the domain range, rather than throw a vague lua exception and crash
2014-05-19 01:42:41 +00:00
adelikat
e1a5123dcf
implement memory.readbyterange() and memory.writebyterange(), these were in the mainmemory library but how did they manage to never be implemented in the memory library?
2014-05-19 01:13:26 +00:00
adelikat
059952f0a4
Change memory.getmemorydomainlist() to return a lua table instead of a string
2014-05-19 01:06:44 +00:00
adelikat
8cf1d327e3
Lua - Fix typo, memory.write_u8 instead of a duplicate memory.write_s8
2014-05-06 17:29:52 +00:00
adelikat
23f7017651
Some code cleanup tinkerings in Client.Common
2014-02-03 20:48:01 +00:00
adelikat
ce9f282d67
Lua - clean up a lot of params by making them strongly typed numbers instead of object, and simplify a lot of logic as a result
2014-01-27 01:15:56 +00:00
adelikat
70feebf229
Add documentation to as many lua function as I can sanely do in one sitting
2014-01-26 18:36:27 +00:00
adelikat
91fdad9d45
LUa - whack now unused code
2014-01-26 16:21:20 +00:00