memory.registerread isn't implemented
Specifically, the code here comments out the function with a "todo" marker: https://github.com/TASVideos/fceux/blob/master/src/lua-engine.cpp#L5941
Ideally, it would be nice to have memory.registerread() able to return a value that would be the result of that read, to be able to hook certain addresses. memory.registerwrite() recently got that functionality.
The use case would be hooking writes to areas of memory that can't be read or written to normally, such as PPU registers or the APU, or even arbitrary addresses. This would allow a Lua script to emulate / simulate external devices or addons.
(Previous versions of the documentation said that the value written was not passed to memory.registerwrite because "you could just read what was written with memory.readbyte", but in the case of hardware registers that wasn't possible)
I'm kinda curious what happens if we just uncomment it? memory_registerread does seem to have an implementation, at least at first glance.
Doesn't seem to ever get called, judging by https://github.com/TASVideos/fceux/commit/3ab41b359cd21d51fdd810a2de77b39ed42baeb7