1
0
mirror of https://github.com/MickGyver/DaemonBite-Retro-Controllers-USB synced 2024-11-30 21:22:18 -05:00

Restore 24th NTT Button + Remove PD7 clock

Adjusted the mask for the NTT buttons to allow the "disconnect" button to work, and also fixed an extraenous high/low being generated on PD7.
This commit is contained in:
Timothy Friez 2021-12-03 22:00:02 -05:00 committed by GitHub
parent 362c9d136d
commit a33bcb9e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ void loop() { while(1)
buttons[gp] &= 0xC3F; buttons[gp] &= 0xC3F;
} }
else if(controllerType[gp] == NTT) // SNES NTT Data Keypad else if(controllerType[gp] == NTT) // SNES NTT Data Keypad
buttons[gp] &= 0x3FFFFFF; buttons[gp] &= 0xFFFFFFF;
else // SNES Gamepad else // SNES Gamepad
buttons[gp] &= 0xFFF; buttons[gp] &= 0xFFF;
} }
@ -236,8 +236,8 @@ void sendLatch()
void sendClock() void sendClock()
{ {
// Send a clock pulse to (S)NES controller(s) // Send a clock pulse to (S)NES controller(s)
PORTD |= B10000001; // Set HIGH PORTD |= B00000001; // Set HIGH
DELAY_CYCLES(CYCLES_CLOCK); DELAY_CYCLES(CYCLES_CLOCK);
PORTD &= ~B10000001; // Set LOW PORTD &= ~B00000001; // Set LOW
DELAY_CYCLES(CYCLES_PAUSE); DELAY_CYCLES(CYCLES_PAUSE);
} }