z80 icon indicating copy to clipboard operation
z80 copied to clipboard

Support 'bulk' interfaces

Open kosarev opened this issue 2 years ago • 0 comments

We currently only support handlers like on_step() and on_read()/on_write() that mandate the emulators to execute a single instruction or provide a mean to access a single memory cell. This prevents us from attempting to do some kinds of optimisations, e.g.:

  • memmove()-like implementations for LDIR/LDDR (means better performance, mentioned in https://github.com/kosarev/z80/issues/16#issue-936241969).
  • Fast HALT/HLT emulation.
  • https://github.com/kosarev/z80/issues/35 requires knowing it in advance how much code we can execute without being interrupted.
  • Just-in-time compilation for hot basic blocks. Better performance again.
  • Support port handlers that deal with blocks of input/output data rather than with individual bytes. It would particularly be useful for the Python API to void calling handlers on every IN/OUT instruction (then https://github.com/kosarev/zx can be updated to use that).

kosarev avatar Sep 19 '21 09:09 kosarev