Skip to content

Commit f424b46

Browse files
committed
cleanup
1 parent 48e5756 commit f424b46

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

perfect6502.c

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#include <stdlib.h>
3333
#include <string.h>
3434

35-
#include <dispatch/dispatch.h>
36-
3735
#include "perfect6502.h"
3836

3937
typedef unsigned char uint8_t;
@@ -389,13 +387,6 @@ recalcNode(nodenum_t node)
389387
*/
390388
addAllNodesToGroup(node);
391389

392-
#ifdef DEBUG
393-
printf(" %s node %d -> ", __func__, node);
394-
for (count_t j = 0; j < group_count(); j++)
395-
printf("%d ", group_get(j));
396-
printf("\n");
397-
#endif
398-
399390
/* get the state of the group */
400391
BOOL newv = getGroupValue();
401392

@@ -429,9 +420,6 @@ recalcNodeList(const nodenum_t *source, count_t count)
429420
lists_switch();
430421

431422
for (int j = 0; j < 100; j++) { /* loop limiter */
432-
#ifdef DEBUG
433-
printf("%s iteration=%d, count=%d\n", __func__, j, listin_count());
434-
#endif
435423
if (!listin_count())
436424
break;
437425

@@ -446,20 +434,8 @@ recalcNodeList(const nodenum_t *source, count_t count)
446434
*/
447435
for (count_t i = 0; i < listin_count(); i++) {
448436
nodenum_t n = listin_get(i);
449-
#ifdef DEBUG
450-
printf("libdispatch %d times\n", nodes_dependants[n]);
451-
#endif
452-
#if 1
453-
for (count_t g = 0; g < nodes_dependants[n]; g++) {
454-
#else
455-
dispatch_apply(nodes_dependants[n], dispatch_get_global_queue(0, 0), ^(size_t g) {
456-
#endif
437+
for (count_t g = 0; g < nodes_dependants[n]; g++)
457438
recalcNode(nodes_dependant[n][g]);
458-
}
459-
#if 1
460-
#else
461-
);
462-
#endif
463439
}
464440
/*
465441
* make the secondary list our primary list, use
@@ -672,20 +648,6 @@ step()
672648
handleMemory();
673649

674650
cycle++;
675-
676-
#if 0
677-
int total = 0;
678-
for (count_t i = 0; i < NODES; i++) {
679-
addAllNodesToGroup(i);
680-
printf("%d: ", i);
681-
total += group_count();
682-
for (count_t j = 0; j < group_count(); j++) {
683-
printf("%d ", group_get(j));
684-
}
685-
printf("\n");
686-
}
687-
printf("TOTAL %f\n", ((float)total)/NODES);
688-
#endif
689651
}
690652

691653
/************************************************************
@@ -766,16 +728,6 @@ setupNodesAndTransistors()
766728
add_nodes_dependant(i, transistors_c2[t]);
767729
}
768730
}
769-
770-
#ifdef DEBUG
771-
for (i = 0; i < NODES; i++) {
772-
printf("%d: ", i);
773-
for (count_t g = 0; g < nodes_dependants[i]; g++) {
774-
printf("%d ", nodes_dependant[i][g]);
775-
}
776-
printf("(%d)\n", nodes_dependants[i]);
777-
}
778-
#endif
779731
}
780732

781733
void

0 commit comments

Comments
 (0)