Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Broken micro-switches work with Led-Wiz Clone 2  (Read 237 times)

0 Members and 1 Guest are viewing this topic.

Ron_Michallick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:May 04, 2019, 12:36:02 pm
  • MK64 has newer software, if you are interested.
    • MK64
Broken micro-switches work with Led-Wiz Clone 2
« on: January 13, 2019, 07:21:36 pm »
I have found that micro-switches that fail (using 'normally open' contact) usually have a working 'normally closed' contact.
With a small software change one can invert a joystick button input on the ledwiz clone panel.c file to match the normally closed connection.

Code: [Select]
uint8_t joy_b = 192;   //was 0 ; Joy button 7,8 being inverted.
...
case J1_Button1:
case J1_Button2:
case J1_Button3:
case J1_Button4:
case J1_Button5:
case J1_Button6:
joy_b |= JoyButtonBit(key);
break;

case J1_Button7:
case J1_Button8:
joy_b &= 255-JoyButtonBit(key);
break; //set inverted bit