chysn wrote:Oh, Mike... What do you mean by "together with a check of $BA (last used device)" here? I'm already setting device number in the SETLFS, which sets $BA, so what form does that check take? Would it make sense to call SETLFS before checking the cassette motor?
You only would need to suppress those tape operation prompts, if the intended storage device actually is tape. For disk drives employing that check wouldn't make sense. When I wrote this I wasn't aware that you foremostly intended to use tape with the game. Then of course a check for $BA isn't needed as you
force tape operation. And SETLFS doesn't do anything other than setting $B8/$BA/$B9 from the A/X/Y registers.
The reason I'm asking is because, despite the looping check of $F8AB, I get messages on some occasions, in both VICE and hardware. Sometimes it's "Found {filename}" during LOAD, and sometimes "PRESS RECORD & PLAY ON TAPE" during SAVE.
"FOUND ..." should only ever appear in direct mode. Are you sure $9D is always $00 while your program runs? (One idea: I see you use STOP/RESTORE to restart the game. Does this possibly reset $9D to $80?)
The sporadic "PRESS RECORD & PLAY ON TAPE" prompts actually might occur when the tape buttons
bounce, which would be somewhat unfortunate. Is VICE now so accurate it even emulates that?
In MINIGRAFIK, a few hundred µs elapse between the button check and the actual save operation, where the tool prepares extra data to be saved along with the raw bitmap (BASIC stub, VIC register values and a compressed copy of the colour RAM). This is probably enough time to settle things so I never got aware of this issue. With the load operation, there's no substantial delay between check and JSR $FFD5, but in the end it works out: any 'stray' screen prompts will be overwritten by the freshly loaded file ($10F1 onward) and the (re-)activation of the graphics mode by a tail call to @ON (which regenerates $1000..$10EF. $10F0 is unused).