; Asks the machine what its controllers are doing. ; ; A pad reports a LEVEL and not an event: one read gives every button at once, holding is the ; natural thing to say, and reading does not consume anything - so asking twice in a frame ; gives the same answer twice, which this checks by doing exactly that. ; ; The recording behind it is one byte a frame. It presses up, holds it a second frame, adds ; right, lets go of up, lets go of everything, then presses A and B together - which is the ; case a console's key-at-a-time stream cannot express at all. ; ; Written by Anachronaut #Program start: INA 0x64 OUTA 0x00 ; Which pads are there: one bit each, so pad nought alone is 1. RSTA SETD.0 Count STA.0 everyFrame: INA 0x30 INIB 0x01 AND BRQ everyFrame ; The frame the recording steps on. INA 0x60 OUTA 0x00 ; And again, without a frame in between. A level does not go away when it is looked at. INA 0x60 OUTA 0x00 SETD.0 Count LDA.0 INCA STA.0 INIB 0d6 CCF SUB BNQ everyFrame ; A pad that is not there reads as nothing held, which is honest rather than an error. INA 0x63 OUTA 0x00 HALT #Data Count: 0x00