Quote:
Originally Posted by phx
You may also look into input.asm from the Solid Gold source (should be the same in Trap Runner). It implements a Level 2 keyboard interupt handler and a FIFO queue for fast typing. Nevertheless it's quite compact.
|
Just Looked at input.asm: good and compact routine, very similar to mine (i've to look at SG source more often!).
You have opted for 'interior' CIA wait, I've an 'exterior' wait (I start a timer and differ the handshake so I dont waste cycles on fast machine).
Moreover my L2 IRQ manager is more general because i've a dispacher for the variuos sources (also other timers and TOD),
but I change it according to the needs, it can also become with only the handshake and without buffer since I use it for the various games/demos patches.
And the request for a Disable() when you've to read a key is a bit to much, I prefer a semaphore
But I like also Photon approach for the qualifier keys.
The best would be for a "bit level" approach like used by system in InputEvent.ie_Qualifier (well, actually if I need a qualifier I opt for the input.device method
)
One day i'll rewrite a routine that sum-up all this goodies..
Cheers!