Calvin Allett
Tue, 07 Aug 2007 17:50:16 -0700
I see (hadn`t thought) that I`m being stupid again, gonna use BAND testing, as using value`s will still not work if two keys in the same group are held down.. I wasn`t liking Z for charge instead of N, so used N, and M, for charge and Jump, and neither worked if held down together, as neither value 23 or 27 was true (well obviously, but I still wasn`t thinking about that) :) cheers again. Great when you can get help after midnight, hehe Calvin Allett <[EMAIL PROTECTED]> wrote: I see how the keys on the left/right hand side of the keyboard have the bits reversed... I am (currrently), was gonna just go with tested values (15,23,27,29,30 or reversed) but cheers for the Basic example of how to use BAND, and what it is.... I can`t believe I had forgot about/never used it... so it`ll probably come in handy getting familiar with it, as I could mess about with other ports hopefully :D Colin Piggot <[EMAIL PROTECTED]> wrote: The manual for Simon's excellent Turbomon has the keyboard port map (http://simonowen.com/sam/turbomon/TurboMON.pdf) Quickly looking at the PDF myself the ports you need are: O - IN 57342 - (bit 1) P - IN 57342 - (bit 0) Z - IN 65278 - (bit 1) M - IN 32766 - (bit 2) SPACE - IN 32766 (bit 0) The first five bits of each port is used for keys, so BAND is an excellent way to strip off the unwanted bits to check, and the bits will be LOW if the key is pressed, so to test bit 0, do BAND 1, bit1 - do BAND 2, bit 2 - BAND 4 ... E.g. test for say, O, in BASIC.... IF NOT ((IN 57342) BAND 2) THEN ..... Colin ====== Quazar : Hardware, Software, Spares and Repairs for the Sam Coupe 1995-2007 - Celebrating 12 Years of developing for the Sam Coupe Website: http://www.samcoupe.com/ --------------------------------- Yahoo! Answers - Get better answers from someone who knows. Try it now. --------------------------------- Yahoo! Answers - Get better answers from someone who knows. Tryit now.