public static boolean checkInterrupts() {
		if (NMIEnable && intVBlank) {
			if (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {
				Log.debug("Running vblank handler: " + Integer.toHexString(Core.mem.get(Size.SHORT, 0, 0xFFEA)));
			} else {
				Log.instruction("*** NMI");
			}
			
			stackPush(Size.BYTE,  pbr.getValue());
			stackPush(Size.SHORT, pc.getValue());
			stackPush(Size.BYTE,  status.getValue());
			
			status.setDecimalMode(false); // See pg 194 in the cpu documentation
			
			pbr.setValue(0);
			if (!CPU.emulationMode)
				pc.setValue(Core.mem.read(Size.SHORT, 0, 0xFFEA));
			else
				pc.setValue(Core.mem.read(Size.SHORT, 0, 0xFFFA));
			intVBlank = false;
			
			return true;
		} else if (intIRQ) {
			intIRQ = false;
			if (!status.isIrqDisable()) {
				if (!Settings.isTrue(Settings.CPU_ALT_DEBUG)) {
					Log.debug("Running irq handler: " + Integer.toHexString(Core.mem.get(Size.SHORT, 0, 0xFFEE)));
				} else {
					Log.instruction("*** IRQ");
				}
				
				irqFlag = true;
				
				stackPush(Size.BYTE,  pbr.getValue());
				stackPush(Size.SHORT, pc.getValue());
				stackPush(Size.BYTE,  status.getValue());
				status.setDecimalMode(false); // See pg 194 in the cpu documentation
				pbr.setValue(0);
				
				if (!CPU.emulationMode)
					pc.setValue(Core.mem.read(Size.SHORT, 0, 0xFFEE));
				else
					pc.setValue(Core.mem.read(Size.SHORT, 0, 0xFFFE));
				
				return true;
			}
		}
		
		return false;
	}