Esempio n. 1
0
void CPU::RequestInterrupt(InterruptTypes type)
{
    if (!IsInterruptEnabled(type))
        return;

    // Write the interrupt to the Interrupt Request Flags, they will be processed on the next tick
    uint16_t interruptRequests = GetMemory()->ReadUInt16(InterruptRequestFlags);
    interruptRequests |= (1 << uint8_t(type));
    GetMemory()->WriteUInt16(InterruptRequestFlags, interruptRequests);
}
Esempio n. 2
0
File: VGA.c Progetto: skeezix/zikzak
static inline void WaitForLastLineIfVGAEnabled()
{
    if(!IsInterruptEnabled(TIM2_IRQn)) return;
    while(VGALine!=0xffffffff);
}