Hey everyone!
Does anyone know if there is a way to read out the current screen line that the VDP is drawing using using TCL?
This would be very useful information for optimizing VDP utilization using line-interrupts with VDP R19. Ideally, I would like to be able to measure things such as:
- How many lines does it take to perform the interrupt handler.
- And how many lines does it take from the beginning of the interrupt handler to the completion of a VDP command that was started in that handler.
I have been searching through some of other people's TCL scripts, but so far the only thing I have found is something like this:
debug probe set_bp z80.acceptIRQ ........
For measuring the time inside the handler we could use the same trick as used in Grauw's TCL profiler script whereby we detect the 'exit' point of the interrupt handler by checking when the stack pointer is the same as at the moment of entry.
This is a good start but I am missing some other vital scripting elements such as reading the current screen line and detecting when VDP commands are completed (or started even).
I took a quick look at some of the openMSX source code, but I don't immediately see anything like this being exposed to TCL?
Any tips and/or suggestions would be very welcome :)