indicate supervisor state in unknown reg printfs

Thu, 02 Dec 2010 01:31:05 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Thu, 02 Dec 2010 01:31:05 +0000
changeset 29
d73d07c1d492
parent 28
70665b05cb10
child 30
3190629004b2

indicate supervisor state in unknown reg printfs

src/main.c file | annotate | diff | revisions
     1.1 --- a/src/main.c	Thu Dec 02 01:03:46 2010 +0000
     1.2 +++ b/src/main.c	Thu Dec 02 01:31:05 2010 +0000
     1.3 @@ -85,7 +85,7 @@
     1.4  		data = RD32(state.map, address, 0x7FF);
     1.5  	} else {
     1.6  		// I/O register -- TODO
     1.7 -		printf("RD32 0x%08X [unknown I/O register]\n", address);
     1.8 +		printf("RD32 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
     1.9  	}
    1.10  	return data;
    1.11  }
    1.12 @@ -112,7 +112,7 @@
    1.13  		data = RD16(state.map, address, 0x7FF);
    1.14  	} else {
    1.15  		// I/O register -- TODO
    1.16 -		printf("RD16 0x%08X [unknown I/O register]\n", address);
    1.17 +		printf("RD16 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
    1.18  	}
    1.19  
    1.20  	return data;
    1.21 @@ -140,7 +140,7 @@
    1.22  		data = RD8(state.map, address, 0x7FF);
    1.23  	} else {
    1.24  		// I/O register -- TODO
    1.25 -		printf("RD08 0x%08X [unknown I/O register]\n", address);
    1.26 +		printf("RD08 0x%08X ==> ??? %s\n", address, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : "");
    1.27  	}
    1.28  
    1.29  	return data;
    1.30 @@ -168,7 +168,7 @@
    1.31  	} else {
    1.32  		switch (address) {
    1.33  			case 0xE43000:	state.romlmap = ((value & 0x8000) == 0x8000); break;	// GCR3: ROMLMAP
    1.34 -			default:		printf("WR32 0x%08X ==> 0x%08X\n", address, value); break;
    1.35 +			default:		printf("WR32 0x%08X ==> 0x%08X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : ""); break;
    1.36  		}
    1.37  	}
    1.38  }
    1.39 @@ -194,7 +194,7 @@
    1.40  	} else {
    1.41  		switch (address) {
    1.42  			case 0xE43000:	state.romlmap = ((value & 0x8000) == 0x8000); break;	// GCR3: ROMLMAP
    1.43 -			default:		printf("WR16 0x%08X ==> 0x%04X\n", address, value); break;
    1.44 +			default:		printf("WR16 0x%08X ==> 0x%04X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : ""); break;
    1.45  		}
    1.46  		if (address == 0x4A0000) {
    1.47  			printf("\tLED WRITE: %s %s %s %s\n",
    1.48 @@ -228,7 +228,7 @@
    1.49  	} else {
    1.50  		switch (address) {
    1.51  			case 0xE43000:	state.romlmap = ((value & 0x80) == 0x80); break;	// GCR3: ROMLMAP
    1.52 -			default:		printf("WR08 0x%08X ==> 0x%02X\n", address, value); break;
    1.53 +			default:		printf("WR08 0x%08X ==> 0x%02X %s\n", address, value, m68k_get_reg(NULL, M68K_REG_SR) & 0x2000 ? "[SV]" : ""); break;
    1.54  		}
    1.55  	}
    1.56  }