1
0
mirror of https://github.com/mist64/perfect6502.git synced 2025-04-06 08:47:24 +00:00

got rid of copying recalclist - no speed difference :-)

This commit is contained in:
Michael Steil 2010-09-22 16:52:57 +00:00
parent f817390415
commit 3a12ae31d1
2 changed files with 8 additions and 10 deletions

View File

@ -12,6 +12,8 @@ typedef int BOOL;
#define NO 0
#define YES 1
#define SWAP(a,b) {int *tmp = a; a = b; b = tmp; }
#include "segdefs.h"
#include "transdefs.h"
#include "nodenames.h"
@ -351,7 +353,8 @@ recalcNodeList(int *list, int count)
printf("%s list=", __func__);
printarray(list, count);
#endif
int recalclist[2000];
int list1[2000];
int *recalclist = list1;
int recalccount = 0;
int i, j;
for (j = 0; j < 100; j++) { // loop limiter
@ -361,15 +364,10 @@ recalcNodeList(int *list, int count)
printf("%s iteration=%d, list=", __func__, j);
printarray(list, count);
#endif
//printf("%s:%d iteration=%d count=%d\n", __func__, __LINE__, j, count);
//printf("before: %d\n", recalccount);
for (i = 0; i < count; i++)
recalcNode(list[i], recalclist, &recalccount);
//printf("%s:%d iteration=%d recalccount=%d\n", __func__, __LINE__, j, recalccount);
//printf("after: %d\n", recalccount);
for (i = 0; i < recalccount; i++)
list[i] = recalclist[i];
//printf("%s:%d iteration=%d\n", __func__, __LINE__, j);
SWAP(list, recalclist);
count = recalccount;
recalccount = 0;
}

View File

@ -872,8 +872,8 @@ IOBASE() {
int
kernal_dispatch() {
//{ printf("kernal_dispatch $%04X; ", PC); int i; printf("stack (%02X): ", S); for (i=S+1; i<0x100; i++) { printf("%02X ", RAM[0x0100+i]); } printf("\n"); }
{ printf("kernal_dispatch $%04X; ", PC); int i; printf("stack (%02X): ", S); for (i=S+1; i<0x100; i++) { printf("%02X ", RAM[0x0100+i]); } printf("\n"); }
exit(1);
unsigned int new_pc;
switch(PC) {
case 0x0073: CHRGET(); break;