Unseen wrote:I just tried it both on a real machine with a OC118 (small, quiet, convenient
) and in xvic with TDE enabled - fails on both.
With "it" I presume you just tested the original version of the display program which loads the picture as it displays it. The "fast" version which doesn't show the picture before all data has been loaded is run with the display ISR not activated:
With sd2iec I can see on the debug output that the drive saw an EOI when it expected a command byte, so your ISR is taking much too long -
... indeed, just a minuscule 256 x 64 µs, i.e. ~16 ms.
There's nothing one can do about the execution time of the interrupt service routine. It copies the colour RAM data in place on the fly, as the raster beam scans the screen. I.e. it will hog the CPU for that time, completely.
EOI detection works by waiting until either a 256 microsecond timer expires or the computer sends the signal to proceed.
Wouldn't that pose problems even as the standard interrupt routine performs a full keyboard scan? That one needs at least 10 raster lines, and thus more than 256 µs.
BTW: I noticed in the debug output that the drive receives a steady stream of TALK/UNTALK requests for three different open files. Displaying the bitmap as it is loaded looks nice, but switching between the files all the time slows everything down a lot - even more so with JiffyDos.
I quickly hacked the viewer program together to read the colour data from the 3 involved files simultaneously. Too bad the use of GET# ends up in a CHKIN/CHRIN/CLRCHN-fest for single bytes. Still, it is a perfectly legit method - CBM DOS allows either 5 SEQ files or 1 REL and 1 SEQ file on one drive be open at any time (for a 1541 ... with a 1581 or others those figures may be higher).
A production version surely will read the whole picture as single file, and copy all the data in place as the file has been completely loaded. And use bus routines, which can cope with being interrupted for a prolonged time.