Z80 { public int getIM() { return this.im; } Z80(final Z80CPUBus bus);  Z80(final Z80 cpu); static int parseAndPackRegAlignValue(final String regs); Z80 fillByState(final Z80 src); int getIM(); void setIM(final int im); boolean isIFF1(); boolean isIFF2(); int getPrefixInProcessing(); int getPrevINSignals(); int getPC(); void setIFF(final boolean iff1, final boolean iff2); void setRegisterPair(final int regPair, final int value); void setRegisterPair(final int regPair, final int value, final boolean alt); int getRegisterPair(final int regPair); int getRegisterPair(final int regPair, final boolean alt); void setRegister(final int reg, final int value); void setRegister(final int reg, final int value, final boolean alt); int getRegister(final int reg); int getRegister(final int reg, final boolean alt); int getState(); Z80CPUBus getBus(); int getStepTstates(); boolean isInsideBlockLoop(); int getSP(); Z80 alignRegisterValuesWith(final Z80 src, int packedRegisterFlags); int getLastM1InstructionByte(); int getLastInstructionByte(); int nextInstruction(final int ctx, final boolean signalRESET, final boolean signalNMI,
                             final boolean signalNT); int nextInstruction_SkipBlockInstructions(final int ctx, final boolean signalRESET,
                                                   final boolean signalNMI,
                                                   final boolean signalNT); boolean step(final int ctx, final int incomingSignals); String getStateAsString(); void doReset(); boolean compareState(final Z80 other, final boolean compareExe); static final int REG_A; static final int REG_F; static final int REG_B; static final int REG_C; static final int REG_D; static final int REG_E; static final int REG_H; static final int REG_L; static final int REG_IX; static final int REG_IY; static final int REG_SP; static final int REG_PC; static final int REG_I; static final int REG_R; static final int REGPAIR_AF; static final int REGPAIR_BC; static final int REGPAIR_DE; static final int REGPAIR_HL; static final int SIGNAL_IN_nINT; static final int SIGNAL_IN_nNMI; static final int SIGNAL_IN_nRESET; static final int SIGNAL_IN_nWAIT; static final int SIGNAL_IN_ALL_INACTIVE; static final int SIGNAL_OUT_nM1; static final int SIGNAL_OUT_nHALT; static final int SIGNAL_OUT_ALL_INACTIVE; static final int FLAG_S; static final int FLAG_Z; static final int FLAG_Y; static final int FLAG_H; static final int FLAG_X; static final int FLAG_PV; static final int FLAG_N; static final int FLAG_C; }
@Test public void testCommand_IM0() { final Z80State state = new Z80State(); final Pair<Z80, Integer> cpu = executeCommand(state, 0xED, 0x46); assertEquals(0, cpu.getLeft().getIM()); assertEquals(8, cpu.getRight().intValue()); assertFlagsNotChanged(state, cpu.getLeft()); }
@Test public void testCommand_IM1() { final Z80State state = new Z80State(); final Pair<Z80, Integer> cpu = executeCommand(state, 0xED, 0x56); assertEquals(1, cpu.getLeft().getIM()); assertEquals(8, cpu.getRight().intValue()); assertFlagsNotChanged(state, cpu.getLeft()); }
@Test public void testCommand_IM2() { final Z80State state = new Z80State(); final Pair<Z80, Integer> cpu = executeCommand(state, 0xED, 0x5E); assertEquals(2, cpu.getLeft().getIM()); assertEquals(8, cpu.getRight().intValue()); assertFlagsNotChanged(state, cpu.getLeft()); }