1.1 diff -r 45ae4c97155b -r 240e195e4bed src/main.c 1.2 --- a/src/main.c Tue Mar 01 21:33:32 2011 +0000 1.3 +++ b/src/main.c Wed Mar 02 07:16:32 2011 +0000 1.4 @@ -358,14 +358,19 @@ 1.5 m68k_set_irq(3); 1.6 } else { 1.7 lastirq_fdc = wd2797_get_irq(&state.fdc_ctx); 1.8 - m68k_set_irq(0); 1.9 + if (!state.timer_asserted){ 1.10 + m68k_set_irq(0); 1.11 + } 1.12 } 1.13 1.14 // Is it time to run the 60Hz periodic interrupt yet? 1.15 if (clock_cycles > CLOCKS_PER_60HZ) { 1.16 // Refresh the screen 1.17 refreshScreen(screen); 1.18 - // TODO: trigger periodic interrupt (if enabled) 1.19 + if (state.timer_enabled){ 1.20 + m68k_set_irq(6); 1.21 + state.timer_asserted = true; 1.22 + } 1.23 // scan the keyboard 1.24 keyboard_scan(&state.kbd); 1.25 // decrement clock cycle counter, we've handled the intr.