src/memory.c

changeset 72
c66c98c7a768
parent 70
5bbe76e71698
child 77
e7898cbae0c6
child 78
c149c13aff1c
     1.1 --- a/src/memory.c	Tue Dec 28 19:55:13 2010 +0000
     1.2 +++ b/src/memory.c	Tue Dec 28 21:47:43 2010 +0000
     1.3 @@ -286,12 +286,14 @@
     1.4  				// TODO: handle the ctrl bits properly
     1.5  				// TODO: &0x8000 --> dismiss 60hz intr
     1.6  				state.dma_reading = (data & 0x4000);
     1.7 -				state.leds = (~data & 0xF00) >> 8;
     1.8 -				printf("LEDs: %s %s %s %s\n",
     1.9 -						(state.leds & 8) ? "R" : "-",
    1.10 -						(state.leds & 4) ? "G" : "-",
    1.11 -						(state.leds & 2) ? "Y" : "-",
    1.12 -						(state.leds & 1) ? "R" : "-");
    1.13 +				if (state.leds != ((~data & 0xF00) >> 8)) {
    1.14 +					state.leds = (~data & 0xF00) >> 8;
    1.15 +					printf("LEDs: %s %s %s %s\n",
    1.16 +							(state.leds & 8) ? "R" : "-",
    1.17 +							(state.leds & 4) ? "G" : "-",
    1.18 +							(state.leds & 2) ? "Y" : "-",
    1.19 +							(state.leds & 1) ? "R" : "-");
    1.20 +				}
    1.21  				handled = true;
    1.22  				break;
    1.23  			case 0x0B0000:				// TM/DIALWR