src/memory.c

changeset 76
2ef98ea1e944
parent 53
e1693c4b8a0c
child 77
e7898cbae0c6
child 78
c149c13aff1c
     1.1 --- a/src/memory.c	Mon Dec 06 08:27:05 2010 +0000
     1.2 +++ b/src/memory.c	Mon Dec 06 08:27:21 2010 +0000
     1.3 @@ -244,7 +244,7 @@
     1.4  				break;
     1.5  			case 0x070000:				// Line Printer Status Register
     1.6  				data = 0x00120012;	// no parity error, no line printer error, no irqs from FDD or HDD
     1.7 -				data |= (state.fdc_ctx.irql) ? 0x00080008 : 0;	// FIXME! HACKHACKHACK! shouldn't peek inside FDC structs like this
     1.8 +				data |= wd2797_get_irq(&state.fdc_ctx) ? 0x00080008 : 0;
     1.9  				break;
    1.10  			case 0x080000:				// Real Time Clock
    1.11  				break;
    1.12 @@ -414,7 +414,7 @@
    1.13  				break;
    1.14  			case 0x070000:				// Line Printer Status Register
    1.15  				data = 0x0012;	// no parity error, no line printer error, no irqs from FDD or HDD
    1.16 -				data |= (state.fdc_ctx.irql) ? 0x0008 : 0;	// FIXME! HACKHACKHACK! shouldn't peek inside FDC structs like this
    1.17 +				data |= wd2797_get_irq(&state.fdc_ctx) ? 0x0008 : 0;
    1.18  				break;
    1.19  			case 0x080000:				// Real Time Clock
    1.20  				break;
    1.21 @@ -590,13 +590,13 @@
    1.22  				// TODO: how to handle this in 8bit mode?
    1.23  				break;
    1.24  			case 0x070000:				// Line Printer Status Register
    1.25 -				printf("\tLPSR RD8 fdc irql=%d, irqe=%d\n", state.fdc_ctx.irql, state.fdc_ctx.irqe);
    1.26  				if (address & 1) {
    1.27  					data = 0x12;	// no parity error, no line printer error, no irqs from FDD or HDD
    1.28 -					data |= (state.fdc_ctx.irql) ? 0x08 : 0;	// FIXME! HACKHACKHACK! shouldn't peek inside FDC structs like this
    1.29 +					data |= wd2797_get_irq(&state.fdc_ctx) ? 0x08 : 0;
    1.30  				} else {
    1.31  					data = 0;
    1.32  				}
    1.33 +				handled = true;
    1.34  				break;
    1.35  			case 0x080000:				// Real Time Clock
    1.36  				break;