Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes2wii.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2014-01-29 07:26:24 +0400
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2014-01-29 07:26:24 +0400
commit5623041d7a5359d09b22c8ddd4573d9fdd745ee9 (patch)
treefa1fd08896416b72a229c1a72bf83e3becfe831c
parentcb9ce4288c2ceaf340b44aeef64ec1f39f310338 (diff)
SMD time saving & init fixes
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index 69edaad..2512e40 100644
--- a/main.c
+++ b/main.c
@@ -118,11 +118,13 @@ int main()
#ifdef SNES_ENABLED
SNES_PORT_DDR |= 1<<SNES_LATCH_PIN; // Latch, output
SNES_PORT_DDR |= 1<<SNES_CLOCK_PIN; // Clock, output
+ SNES_PORT_DDR &= ~(1<<SNES_DATA_PIN); // Data, input
SNES_PORT_PORT |= 1<<SNES_DATA_PIN; // Data, pull-up
#endif
#ifdef NES_ENABLED
NES_PORT_DDR |= 1<<NES_LATCH_PIN; // Latch, output
NES_PORT_DDR |= 1<<NES_CLOCK_PIN; // Clock, output
+ NES_PORT_DDR &= ~(1<<NES_DATA_PIN); // Data, input
NES_PORT_PORT |= 1<<NES_DATA_PIN; // Data, pull-up
#endif
#ifdef SMD_ENABLED
@@ -406,6 +408,7 @@ int main()
}
}
}
+ if (!smd_present) break; // Saving time
} else { // 6-button mode
for (b = 4; b <= 11; b++)
{