32
32
#include <stdlib.h>
33
33
#include <string.h>
34
34
35
- #include <dispatch/dispatch.h>
36
-
37
35
#include "perfect6502.h"
38
36
39
37
typedef unsigned char uint8_t ;
@@ -389,13 +387,6 @@ recalcNode(nodenum_t node)
389
387
*/
390
388
addAllNodesToGroup (node );
391
389
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
-
399
390
/* get the state of the group */
400
391
BOOL newv = getGroupValue ();
401
392
@@ -429,9 +420,6 @@ recalcNodeList(const nodenum_t *source, count_t count)
429
420
lists_switch ();
430
421
431
422
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
435
423
if (!listin_count ())
436
424
break ;
437
425
@@ -446,20 +434,8 @@ recalcNodeList(const nodenum_t *source, count_t count)
446
434
*/
447
435
for (count_t i = 0 ; i < listin_count (); i ++ ) {
448
436
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 ++ )
457
438
recalcNode (nodes_dependant [n ][g ]);
458
- }
459
- #if 1
460
- #else
461
- );
462
- #endif
463
439
}
464
440
/*
465
441
* make the secondary list our primary list, use
@@ -672,20 +648,6 @@ step()
672
648
handleMemory ();
673
649
674
650
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
689
651
}
690
652
691
653
/************************************************************
@@ -766,16 +728,6 @@ setupNodesAndTransistors()
766
728
add_nodes_dependant (i , transistors_c2 [t ]);
767
729
}
768
730
}
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
779
731
}
780
732
781
733
void
0 commit comments