Oliver Schmidt
wrote:
> I would have expected, that the $C036 always returns the current
> setting - or I'm I missing some point here?
I'm arriving in this discussion a bit late, but my experience might
help...
If you enter the CDA menu and change the speed while the computer is
waiting for input in Applesoft or the Monitor (i.e. RDKEY is active),
the change in speed is delayed until you press Control-Reset.
The reason appears to be that something is buffering the contents of
location $C036 and it gets restored to its previous state on exit from
the Control Panel. I haven't investigated in full, but I suspect it is
something in the key scanning loop in RDKEY, which may be temporarily
forcing slow mode to do some kind of timing operation such as flashing
the cursor. The most likely explanation is that there is a call to the
WAIT routine, which forces slow mode and restores the previous setting
on return; this will override the control panel's change to location
$C036 if the CDA menu was entered during the WAIT call.
Control-Reset causes the RAM copy of the speed setting (location not
documented: it will be somewhere in reserved system RAM in bank $E0 or
$E1, along with the rest of the Control Panel settings) to be placed in
the hardware register ($C036), and it subsequently behaves correctly.
Some parts of the system software may refer to the RAM copy of the speed
setting, so you will see a mixture of the old and new speed depending on
what code is executing. Other parts of the system software force the
system to operate in slow mode during time critical operations, but the
previous setting will be restored afterwards.
If you enter the CDA menu and change speed in most other circumstances,
the speed change is effective immediately.
--
David Empson
dempson@actrix.gen.nz