more keyboard fixes... interrupt logic needs fixing... grrrrr...

Wed, 09 Feb 2011 17:11:48 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Wed, 09 Feb 2011 17:11:48 +0000
changeset 85
9883eb142f70
parent 84
0d903718da81
child 90
934ae2efdd01

more keyboard fixes... interrupt logic needs fixing... grrrrr...

src/keyboard.c file | annotate | diff | revisions
src/main.c file | annotate | diff | revisions
     1.1 --- a/src/keyboard.c	Wed Feb 09 16:35:49 2011 +0000
     1.2 +++ b/src/keyboard.c	Wed Feb 09 17:11:48 2011 +0000
     1.3 @@ -235,7 +235,7 @@
     1.4  //			0 +								// SR5: Receiver Overrun
     1.5  //			0 +								// SR6: Parity Error
     1.6  		if (keyboard_get_irq(ks)) sr |= 0x80;	// SR7: IRQ status
     1.7 -		printf("\tKBD DBG: sr=%02X\n", sr);
     1.8 +		printf("\tKBC DBG: sr=%02X\n", sr);
     1.9  		return sr;
    1.10  	} else {
    1.11  		// return data, pop off the fifo
     2.1 --- a/src/main.c	Wed Feb 09 16:35:49 2011 +0000
     2.2 +++ b/src/main.c	Wed Feb 09 17:11:48 2011 +0000
     2.3 @@ -336,10 +336,13 @@
     2.4  			} else {
     2.5  				lastirq_fdc = false;
     2.6  			}
     2.7 +*/		if (keyboard_get_irq(&state.kbd)) {
     2.8 +			// TODO: this is a LEVEL, not an EDGE!
     2.9 +			m68k_set_irq(3);
    2.10  		} else {
    2.11  			m68k_set_irq(0);
    2.12  		}
    2.13 -*/
    2.14 +
    2.15  		// Is it time to run the 60Hz periodic interrupt yet?
    2.16  		if (clock_cycles > CLOCKS_PER_60HZ) {
    2.17  			// Refresh the screen