Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
560B

  1. : _prevstat [ PAD_MEM LITN ] ;
  2. : _sel [ PAD_MEM 1+ LITN ] ;
  3. : _next [ PAD_MEM 2+ LITN ] ;
  4. ( Put status for port A in register A. Bits, from MSB to LSB:
  5. Start - A - C - B - Right - Left - Down - Up
  6. Each bit is high when button is unpressed and low if button is
  7. pressed. When no button is pressed, 0xff is returned.
  8. This logic below is for the Genesis controller, which is modal.
  9. TH is an output pin that swiches the meaning of TL and TR. When
  10. TH is high (unselected), TL = Button B and TR = Button C. When
  11. TH is low (selected), TL = Button A and TR = Start. )