// ----------------------------------------------------------------------- // たいまを進める // ----------------------------------------------------------------------- void FASTCALL MIDI_Timer(DWORD clk) { if ( !Config.MIDI_SW ) return; // MIDI OFF時は帰る MIDI_BufTimer -= clk; if (MIDI_BufTimer<0) { MIDI_BufTimer += MIDIBUFTIMER; if (MIDI_Buffered) { MIDI_Buffered--; if ( (MIDI_Buffered<MIDIFIFOSIZE)&&(MIDI_IntEnable&0x40) ) // Tx FIFO Empty Interrupt(エトプリ) { MIDI_IntFlag |= 0x40; MIDI_IntVect = 0x0c; IRQH_Int(4, &MIDI_Int); } } } if (MIDI_MTimerMax) { MIDI_MTimerVal -= clk; if (MIDI_MTimerVal<0) // みぢたいまー割り込み(魔法大作戦) { while (MIDI_MTimerVal<0) MIDI_MTimerVal += MIDI_MTimerMax*80; if ( (!(MIDI_R05&0x80))&&(MIDI_IntEnable&0x02) ) { MIDI_IntFlag |= 0x02; MIDI_IntVect = 0x02; IRQH_Int(4, &MIDI_Int); } } } if (MIDI_GTimerMax) { MIDI_GTimerVal -= clk; if (MIDI_GTimerVal<0) // じぇねらるたいまー割り込み(RCD.X) { while (MIDI_GTimerVal<0) MIDI_GTimerVal += MIDI_GTimerMax*80; if ( MIDI_IntEnable&0x80 ) { MIDI_IntFlag |= 0x80; MIDI_IntVect = 0x0e; IRQH_Int(4, &MIDI_Int); } } } }
// ----------------------------------------------------------------------- // FD入れ替えが起こっていたら割り込み発生 // ----------------------------------------------------------------------- void FDD_SetFDInt(void) { int i; for (i=0; i<4; i++) { if ( fdd.SetDelay[i] ) { fdd.SetDelay[i]--; if ( fdd.SetDelay[i]<=0 ) { if ( IOC_IntStat&2 ) IRQH_Int(1, &FDD_Int); fdd.SetDelay[i] = 0; } } } }
// ----------------------------------------------------------------------- // いじぇくと // ----------------------------------------------------------------------- void FDD_EjectFD(int drive) { int type; if ( (drive<0)||(drive>3) ) return; type = fdd.Types[drive]; if ( Eject[type] ) { Eject[type](drive); if ( IOC_IntStat&2 ) IRQH_Int(1, &FDD_Int); } fdd.Types[drive] = FD_Non; fdd.ROnly[drive] = 0; fdd.EMask[drive] = 0; fdd.Blink[drive] = 0; StatBar_SetFDD(drive, ""); StatBar_ParamFDD(drive, (fdd.Types[drive]!=FD_Non)?((fdd.Access==drive)?2:1):0, ((fdd.Types[drive]!=FD_Non)&&(!fdd.EMask[drive]))?1:0, (fdd.Blink[drive])?1:0); }
void FASTCALL Mcry_Int(void) { IRQH_Int(MCRY_IRQ, &Mcry_IntCB); }