Other than reading registers (e.g PPU/Cartridge registers) with no side-effects, all of this should be relatively easy to implement.rainwarrior wrote:I actually don't think FCEUX's lua API is very good. It's very useful, but only because it is barely good enough. It's really very hodge podge, various people have added some minimal things they needed over the years, and at this point it's a fairly useful base set.
Here's features I think are useful. FCEUX has many of these, but not all.
callback in response to read or write (ranged), should contain the address and value to be read/written as parameters.
callback in response to Power, Reset, NMI, and IRQ.
peek at all memory (CPU, PPU, OAM) without triggering any read side effect.
peek at PPU/APU state (latch, flags, pixel, scanline, frequency, etc.), peek_state(enum) would allow you to add to the interface just by adding more enum values, rather than a new function for every piece of state?
write to all memory with side effects (e.g. bank switch register writes).
write to all memory without side effects.
printf style text overlay (option for either an X,Y position, or a maintained cursor position)
line and box drawing overlay
overlay should have a parameter to last 1 frame, a specified number of frames, or until "cls"
Does anyone have other ideas that they'd like to be included in the API?