[Coco] CoCo2, a speed demon?

KnudsenMJ at aol.com KnudsenMJ at aol.com
Tue Apr 12 23:20:29 EDT 2005


 
In a message dated 4/12/05 11:07:47 PM Eastern Daylight Time,  
robert.gault at worldnet.att.net writes:

>Yes,  there used to be a routine (Basic 1.2) which poled the keyboard and  
>skipped the Keyin routine if no key was pressed. This was removed in  the 
>Basic 2.0 code.
>I'm not aware of the reason for the  change.



ISTR the keyboard code was changed to fix a bug whereby joystick buttons  
would mess up the keyboard, or keys would repeat too much, or something like  
that.  It did indeed make it scan slower.
 
The BASIC ROM fix broke the Micro-Works ROM Pak assembler that I was using  
back then.
 
There was a way to load the keyboard scanning output PIA (all 0s) so you  
could easily detect in an assembly program whether any key was hit (test for  
input PIA not all 1s).  This cost you very little while in a tight loop,  while 
playing sound or animating game graphics.  Then call BASIC's routine  to get 
the key value.  Then reload the PIA again, etc.
--Mike K.
 



More information about the Coco mailing list