Skip to content

Commit

Permalink
fixes a regression with irq length cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Sep 30, 2012
1 parent 34b5e04 commit 6b313c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Processor.cpp
Expand Up @@ -276,39 +276,39 @@ void Processor::ServeInterrupt(Interrupts interrupt)
m_bIME = false;
StackPush(&PC);
PC.SetValue(0x0040);
m_CurrentClockCycles += 24;
m_CurrentClockCycles += 20;
break;
case LCDSTAT_Interrupt:
m_InterruptDelayCycles[1] = 0;
m_pMemory->Load(0xFF0F, if_reg & 0xFD);
m_bIME = false;
StackPush(&PC);
PC.SetValue(0x0048);
m_CurrentClockCycles += 24;
m_CurrentClockCycles += 20;
break;
case Timer_Interrupt:
m_InterruptDelayCycles[2] = 0;
m_pMemory->Load(0xFF0F, if_reg & 0xFB);
m_bIME = false;
StackPush(&PC);
PC.SetValue(0x0050);
m_CurrentClockCycles += 24;
m_CurrentClockCycles += 20;
break;
case Serial_Interrupt:
m_InterruptDelayCycles[3] = 0;
m_pMemory->Load(0xFF0F, if_reg & 0xF7);
m_bIME = false;
StackPush(&PC);
PC.SetValue(0x0058);
m_CurrentClockCycles += 24;
m_CurrentClockCycles += 20;
break;
case Joypad_Interrupt:
m_InterruptDelayCycles[4] = 0;
m_pMemory->Load(0xFF0F, if_reg & 0xEF);
m_bIME = false;
StackPush(&PC);
PC.SetValue(0x0060);
m_CurrentClockCycles += 24;
m_CurrentClockCycles += 20;
break;
case None_Interrupt:
break;
Expand Down

0 comments on commit 6b313c1

Please sign in to comment.