diff options
author | 2008-11-25 05:13:20 +0000 | |
---|---|---|
committer | 2008-11-25 05:13:20 +0000 | |
commit | dd87df6926f895bd802e7abd00360ae32adfb1b7 (patch) | |
tree | 35fa65d5217096d88cdeda95b04e30480a2b76bf | |
parent | a20dadc633d4af4e01d4b8bb62c7e4dec37151a0 (diff) |
CCPU and T-11 pointer-ification.
-rw-r--r-- | src/emu/cpu/ccpu/ccpu.c | 774 | ||||
-rw-r--r-- | src/emu/cpu/ccpu/ccpu.h | 11 | ||||
-rw-r--r-- | src/emu/cpu/t11/t11.c | 358 | ||||
-rw-r--r-- | src/emu/cpu/t11/t11.h | 8 | ||||
-rw-r--r-- | src/emu/cpu/t11/t11ops.c | 2452 | ||||
-rw-r--r-- | src/emu/cpu/t11/t11table.c | 2182 | ||||
-rw-r--r-- | src/mame/drivers/cinemat.c | 8 | ||||
-rw-r--r-- | src/mame/includes/cinemat.h | 4 | ||||
-rw-r--r-- | src/mame/video/cinemat.c | 6 |
9 files changed, 2891 insertions, 2912 deletions
diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index fdf2e33d50c..5c3876acdcd 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -16,43 +16,37 @@ STRUCTURES & TYPEDEFS ***************************************************************************/ -typedef struct +typedef struct _ccpu_state ccpu_state; +struct _ccpu_state { - UINT16 PC; - UINT16 A; - UINT16 B; - UINT8 I; - UINT16 J; - UINT8 P; - UINT16 X; - UINT16 Y; - UINT16 T; - UINT16 * acc; - - UINT16 a0flag, ncflag, cmpacc, cmpval; - UINT16 miflag, nextmiflag, nextnextmiflag; - UINT16 drflag; - - UINT8 (*external_input)(void); - void (*vector_callback)(INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); - - UINT8 waiting; - UINT8 watchdog; + UINT16 PC; + UINT16 A; + UINT16 B; + UINT8 I; + UINT16 J; + UINT8 P; + UINT16 X; + UINT16 Y; + UINT16 T; + UINT16 * acc; + + UINT16 a0flag, ncflag, cmpacc, cmpval; + UINT16 miflag, nextmiflag, nextnextmiflag; + UINT16 drflag; + + ccpu_input_func external_input; + ccpu_vector_func vector_callback; + + UINT8 waiting; + UINT8 watchdog; + + int icount; const device_config *device; const address_space *program; const address_space *data; const address_space *io; -} ccpuRegs; - - - -/*************************************************************************** - PRIVATE GLOBAL VARIABLES -***************************************************************************/ - -static ccpuRegs ccpu; -static int ccpu_icount; +}; @@ -60,38 +54,38 @@ static int ccpu_icount; MACROS ***************************************************************************/ -#define READOP(a) (memory_decrypted_read_byte(ccpu.program, a)) +#define READOP(C,a) (memory_decrypted_read_byte((C)->program, a)) -#define RDMEM(a) (memory_read_word_16be(ccpu.data, (a) * 2) & 0xfff) -#define WRMEM(a,v) (memory_write_word_16be(ccpu.data, (a) * 2, (v))) +#define RDMEM(C,a) (memory_read_word_16be((C)->data, (a) * 2) & 0xfff) +#define WRMEM(C,a,v) (memory_write_word_16be((C)->data, (a) * 2, (v))) -#define READPORT(a) (memory_read_byte_8be(ccpu.io, a)) -#define WRITEPORT(a,v) (memory_write_byte_8be(ccpu.io, (a), (v))) +#define READPORT(C,a) (memory_read_byte_8be((C)->io, a)) +#define WRITEPORT(C,a,v) (memory_write_byte_8be((C)->io, (a), (v))) -#define SET_A0() do { ccpu.a0flag = ccpu.A; } while (0) -#define SET_CMP_VAL(x) do { ccpu.cmpacc = *ccpu.acc; ccpu.cmpval = (x) & 0xfff; } while (0) -#define SET_NC(a) do { ccpu.ncflag = ~(a); } while (0) -#define SET_MI(a) do { ccpu.nextnextmiflag = (a); } while (0) +#define SET_A0(C) do { (C)->a0flag = (C)->A; } while (0) +#define SET_CMP_VAL(C,x) do { (C)->cmpacc = *(C)->acc; (C)->cmpval = (x) & 0xfff; } while (0) +#define SET_NC(C,a) do { (C)->ncflag = ~(a); } while (0) +#define SET_MI(C,a) do { (C)->nextnextmiflag = (a); } while (0) -#define TEST_A0() (ccpu.a0flag & 1) -#define TEST_NC() ((ccpu.ncflag >> 12) & 1) -#define TEST_MI() ((ccpu.miflag >> 11) & 1) -#define TEST_LT() (ccpu.cmpval < ccpu.cmpacc) -#define TEST_EQ() (ccpu.cmpval == ccpu.cmpacc) -#define TEST_DR() (ccpu.drflag != 0) +#define TEST_A0(C) ((C)->a0flag & 1) +#define TEST_NC(C) (((C)->ncflag >> 12) & 1) +#define TEST_MI(C) (((C)->miflag >> 11) & 1) +#define TEST_LT(C) ((C)->cmpval < (C)->cmpacc) +#define TEST_EQ(C) ((C)->cmpval == (C)->cmpacc) +#define TEST_DR(C) ((C)->drflag != 0) -#define NEXT_ACC_A() do { SET_MI(*ccpu.acc); ccpu.acc = &ccpu.A; } while (0) -#define NEXT_ACC_B() do { SET_MI(*ccpu.acc); if (ccpu.acc == &ccpu.A) ccpu.acc = &ccpu.B; else ccpu.acc = &ccpu.A; } while (0) +#define NEXT_ACC_A(C) do { SET_MI(C, *(C)->acc); (C)->acc = &(C)->A; } while (0) +#define NEXT_ACC_B(C) do { SET_MI(C, *(C)->acc); if ((C)->acc == &(C)->A) (C)->acc = &(C)->B; else (C)->acc = &(C)->A; } while (0) -#define CYCLES(x) do { ccpu_icount -= (x); } while (0) +#define CYCLES(C,x) do { (C)->icount -= (x); } while (0) -#define STANDARD_ACC_OP(resexp,cmpval) \ +#define STANDARD_ACC_OP(C,resexp,cmpval) \ do { \ UINT16 result = resexp; \ - SET_A0(); /* set the A0 bit based on the previous 'A' value */ \ - SET_CMP_VAL(cmpval); /* set the compare values to the previous accumulator and the cmpval */ \ - SET_NC(result); /* set the NC flag based on the unmasked result */ \ - *ccpu.acc = result & 0xfff; /* store the low 12 bits of the new value */ \ + SET_A0(C); /* set the A0 bit based on the previous 'A' value */ \ + SET_CMP_VAL(C,cmpval); /* set the compare values to the previous accumulator and the cmpval */ \ + SET_NC(C,result); /* set the NC flag based on the unmasked result */ \ + *(C)->acc = result & 0xfff; /* store the low 12 bits of the new value */ \ } while (0) @@ -102,16 +96,11 @@ do { \ static CPU_GET_CONTEXT( ccpu ) { - /* copy the context */ - *(ccpuRegs *)dst = ccpu; } static CPU_SET_CONTEXT( ccpu ) { - /* copy the context */ - if (src) - ccpu = *(ccpuRegs *)src; } @@ -120,81 +109,86 @@ static CPU_SET_CONTEXT( ccpu ) INITIALIZATION AND SHUTDOWN ***************************************************************************/ -static UINT8 read_jmi(void) +static UINT8 read_jmi(const device_config *device) { /* this routine is called when there is no external input */ /* and the JMI jumper is present */ - return TEST_MI(); + ccpu_state *cpustate = device->token; + return TEST_MI(cpustate); } -void ccpu_wdt_timer_trigger(void) +void ccpu_wdt_timer_trigger(const device_config *device) { - ccpu.waiting = FALSE; - ccpu.watchdog++; - if (ccpu.watchdog >= 3) - ccpu.PC = 0; + ccpu_state *cpustate = device->token; + cpustate->waiting = FALSE; + cpustate->watchdog++; + if (cpustate->watchdog >= 3) + cpustate->PC = 0; } static CPU_INIT( ccpu ) { const ccpu_config *configdata = device->static_config; + ccpu_state *cpustate = device->token; /* copy input params */ - ccpu.external_input = configdata->external_input ? configdata->external_input : read_jmi; - ccpu.vector_callback = configdata->vector_callback; - ccpu.device = device; - ccpu.program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); - ccpu.data = memory_find_address_space(device, ADDRESS_SPACE_DATA); - ccpu.io = memory_find_address_space(device, ADDRESS_SPACE_IO); - - state_save_register_item("ccpu", device->tag, 0, ccpu.PC); - state_save_register_item("ccpu", device->tag, 0, ccpu.A); - state_save_register_item("ccpu", device->tag, 0, ccpu.B); - state_save_register_item("ccpu", device->tag, 0, ccpu.I); - state_save_register_item("ccpu", device->tag, 0, ccpu.J); - state_save_register_item("ccpu", device->tag, 0, ccpu.P); - state_save_register_item("ccpu", device->tag, 0, ccpu.X); - state_save_register_item("ccpu", device->tag, 0, ccpu.Y); - state_save_register_item("ccpu", device->tag, 0, ccpu.T); - state_save_register_item("ccpu", device->tag, 0, ccpu.a0flag); - state_save_register_item("ccpu", device->tag, 0, ccpu.ncflag); - state_save_register_item("ccpu", device->tag, 0, ccpu.cmpacc); - state_save_register_item("ccpu", device->tag, 0, ccpu.cmpval); - state_save_register_item("ccpu", device->tag, 0, ccpu.miflag); - state_save_register_item("ccpu", device->tag, 0, ccpu.nextmiflag); - state_save_register_item("ccpu", device->tag, 0, ccpu.nextnextmiflag); - state_save_register_item("ccpu", device->tag, 0, ccpu.drflag); - state_save_register_item("ccpu", device->tag, 0, ccpu.waiting); - state_save_register_item("ccpu", device->tag, 0, ccpu.watchdog); + cpustate->external_input = configdata->external_input ? configdata->external_input : read_jmi; + cpustate->vector_callback = configdata->vector_callback; + cpustate->device = device; + cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); + cpustate->data = memory_find_address_space(device, ADDRESS_SPACE_DATA); + cpustate->io = memory_find_address_space(device, ADDRESS_SPACE_IO); + + state_save_register_item("ccpu", device->tag, 0, cpustate->PC); + state_save_register_item("ccpu", device->tag, 0, cpustate->A); + state_save_register_item("ccpu", device->tag, 0, cpustate->B); + state_save_register_item("ccpu", device->tag, 0, cpustate->I); + state_save_register_item("ccpu", device->tag, 0, cpustate->J); + state_save_register_item("ccpu", device->tag, 0, cpustate->P); + state_save_register_item("ccpu", device->tag, 0, cpustate->X); + state_save_register_item("ccpu", device->tag, 0, cpustate->Y); + state_save_register_item("ccpu", device->tag, 0, cpustate->T); + state_save_register_item("ccpu", device->tag, 0, cpustate->a0flag); + state_save_register_item("ccpu", device->tag, 0, cpustate->ncflag); + state_save_register_item("ccpu", device->tag, 0, cpustate->cmpacc); + state_save_register_item("ccpu", device->tag, 0, cpustate->cmpval); + state_save_register_item("ccpu", device->tag, 0, cpustate->miflag); + state_save_register_item("ccpu", device->tag, 0, cpustate->nextmiflag); + state_save_register_item("ccpu", device->tag, 0, cpustate->nextnextmiflag); + state_save_register_item("ccpu", device->tag, 0, cpustate->drflag); + state_save_register_item("ccpu", device->tag, 0, cpustate->waiting); + state_save_register_item("ccpu", device->tag, 0, cpustate->watchdog); } static CPU_RESET( ccpu ) { + ccpu_state *cpustate = device->token; + /* zero registers */ - ccpu.PC = 0; - ccpu.A = 0; - ccpu.B = 0; - ccpu.I = 0; - ccpu.J = 0; - ccpu.P = 0; - ccpu.X = 0; - ccpu.Y = 0; - ccpu.T = 0; - ccpu.acc = &ccpu.A; + cpustate->PC = 0; + cpustate->A = 0; + cpustate->B = 0; + cpustate->I = 0; + cpustate->J = 0; + cpustate->P = 0; + cpustate->X = 0; + cpustate->Y = 0; + cpustate->T = 0; + cpustate->acc = &cpustate->A; /* zero flags */ - ccpu.a0flag = 0; - ccpu.ncflag = 0; - ccpu.cmpacc = 0; - ccpu.cmpval = 1; - ccpu.miflag = ccpu.nextmiflag = ccpu.nextnextmiflag = 0; - ccpu.drflag = 0; - - ccpu.waiting = FALSE; - ccpu.watchdog = 0; + cpustate->a0flag = 0; + cpustate->ncflag = 0; + cpustate->cmpacc = 0; + cpustate->cmpval = 1; + cpustate->miflag = cpustate->nextmiflag = cpustate->nextnextmiflag = 0; + cpustate->drflag = 0; + + cpustate->waiting = FALSE; + cpustate->watchdog = 0; } @@ -205,23 +199,25 @@ static CPU_RESET( ccpu ) static CPU_EXECUTE( ccpu ) { - if (ccpu.waiting) + ccpu_state *cpustate = device->token; + + if (cpustate->waiting) return cycles; - ccpu_icount = cycles; + cpustate->icount = cycles; - while (ccpu_icount >= 0) + while (cpustate->icount >= 0) { UINT16 tempval; UINT8 opcode; /* update the delayed MI flag */ - ccpu.miflag = ccpu.nextmiflag; - ccpu.nextmiflag = ccpu.nextnextmiflag; + cpustate->miflag = cpustate->nextmiflag; + cpustate->nextmiflag = cpustate->nextnextmiflag; /* fetch the opcode */ - debugger_instruction_hook(device, ccpu.PC); - opcode = READOP(ccpu.PC++); + debugger_instruction_hook(device, cpustate->PC); + opcode = READOP(cpustate, cpustate->PC++); switch (opcode) { @@ -231,8 +227,8 @@ static CPU_EXECUTE( ccpu ) case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: tempval = (opcode & 0x0f) << 8; - STANDARD_ACC_OP(tempval, tempval); - NEXT_ACC_A(); CYCLES(1); + STANDARD_ACC_OP(cpustate, tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* INP */ @@ -240,19 +236,19 @@ static CPU_EXECUTE( ccpu ) case 0x14: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: - if (ccpu.acc == &ccpu.A) - tempval = READPORT(opcode & 0x0f) & 1; + if (cpustate->acc == &cpustate->A) + tempval = READPORT(cpustate, opcode & 0x0f) & 1; else - tempval = READPORT(16 + (opcode & 0x07)) & 1; - STANDARD_ACC_OP(tempval, tempval); - NEXT_ACC_A(); CYCLES(1); + tempval = READPORT(cpustate, 16 + (opcode & 0x07)) & 1; + STANDARD_ACC_OP(cpustate, tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* A8I */ case 0x20: - tempval = READOP(ccpu.PC++); - STANDARD_ACC_OP(*ccpu.acc + tempval, tempval); - NEXT_ACC_A(); CYCLES(3); + tempval = READOP(cpustate, cpustate->PC++); + STANDARD_ACC_OP(cpustate, *cpustate->acc + tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* A4I */ @@ -261,15 +257,15 @@ static CPU_EXECUTE( ccpu ) case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: tempval = opcode & 0x0f; - STANDARD_ACC_OP(*ccpu.acc + tempval, tempval); - NEXT_ACC_A(); CYCLES(1); + STANDARD_ACC_OP(cpustate, *cpustate->acc + tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* S8I */ case 0x30: - tempval = READOP(ccpu.PC++); - STANDARD_ACC_OP(*ccpu.acc + (tempval ^ 0xfff) + 1, tempval); - NEXT_ACC_A(); CYCLES(3); + tempval = READOP(cpustate, cpustate->PC++); + STANDARD_ACC_OP(cpustate, *cpustate->acc + (tempval ^ 0xfff) + 1, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* S4I */ @@ -278,8 +274,8 @@ static CPU_EXECUTE( ccpu ) case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: tempval = opcode & 0x0f; - STANDARD_ACC_OP(*ccpu.acc + (tempval ^ 0xfff) + 1, tempval); - NEXT_ACC_A(); CYCLES(1); + STANDARD_ACC_OP(cpustate, *cpustate->acc + (tempval ^ 0xfff) + 1, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* LPAI */ @@ -287,103 +283,103 @@ static CPU_EXECUTE( ccpu ) case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: - tempval = READOP(ccpu.PC++); - ccpu.J = (opcode & 0x0f) + (tempval & 0xf0) + ((tempval & 0x0f) << 8); - NEXT_ACC_A(); CYCLES(3); + tempval = READOP(cpustate, cpustate->PC++); + cpustate->J = (opcode & 0x0f) + (tempval & 0xf0) + ((tempval & 0x0f) << 8); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* T4K */ case 0x50: - ccpu.PC = (ccpu.P << 12) + ccpu.J; - NEXT_ACC_B(); CYCLES(4); + cpustate->PC = (cpustate->P << 12) + cpustate->J; + NEXT_ACC_B(cpustate); CYCLES(cpustate, 4); break; /* JMIB/JEHB */ case 0x51: - if ((*ccpu.external_input)()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if ((*cpustate->external_input)(device)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JVNB */ case 0x52: - if (TEST_DR()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if (TEST_DR(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JLTB */ case 0x53: - if (TEST_LT()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if (TEST_LT(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JEQB */ case 0x54: - if (TEST_EQ()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if (TEST_EQ(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JCZB */ case 0x55: - if (TEST_NC()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if (TEST_NC(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JOSB */ case 0x56: - if (TEST_A0()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_B(); CYCLES(2); + if (TEST_A0(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* SSA */ case 0x57: - NEXT_ACC_B(); CYCLES(2); + NEXT_ACC_B(cpustate); CYCLES(cpustate, 2); break; /* JMP */ case 0x58: - ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; - NEXT_ACC_A(); CYCLES(4); + cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; + NEXT_ACC_A(cpustate); CYCLES(cpustate, 4); break; /* JMI/JEH */ case 0x59: - if ((*ccpu.external_input)()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if ((*cpustate->external_input)(device)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* JVN */ case 0x5a: - if (TEST_DR()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if (TEST_DR(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* JLT */ case 0x5b: - if (TEST_LT()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if (TEST_LT(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* JEQ */ case 0x5c: - if (TEST_EQ()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if (TEST_EQ(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* JCZ */ case 0x5d: - if (TEST_NC()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if (TEST_NC(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* JOS */ case 0x5e: - if (TEST_A0()) { ccpu.PC = ((ccpu.PC - 1) & 0xf000) + ccpu.J; CYCLES(2); } - NEXT_ACC_A(); CYCLES(2); + if (TEST_A0(cpustate)) { cpustate->PC = ((cpustate->PC - 1) & 0xf000) + cpustate->J; CYCLES(cpustate, 2); } + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* NOP */ case 0x5f: - NEXT_ACC_A(); CYCLES(2); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* ADD */ @@ -391,10 +387,10 @@ static CPU_EXECUTE( ccpu ) case 0x64: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(*ccpu.acc + tempval, tempval); - NEXT_ACC_A(); CYCLES(3); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, *cpustate->acc + tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* SUB */ @@ -402,10 +398,10 @@ static CPU_EXECUTE( ccpu ) case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(*ccpu.acc + (tempval ^ 0xfff) + 1, tempval); - NEXT_ACC_A(); CYCLES(3); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, *cpustate->acc + (tempval ^ 0xfff) + 1, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* SETP */ @@ -413,8 +409,8 @@ static CPU_EXECUTE( ccpu ) case 0x84: case 0x85: case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: - ccpu.P = opcode & 0x0f; - NEXT_ACC_A(); CYCLES(1); + cpustate->P = opcode & 0x0f; + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* OUT */ @@ -422,9 +418,9 @@ static CPU_EXECUTE( ccpu ) case 0x94: case 0x95: case 0x96: case 0x97: case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: - if (ccpu.acc == &ccpu.A) - WRITEPORT(opcode & 0x07, ~*ccpu.acc & 1); - NEXT_ACC_A(); CYCLES(1); + if (cpustate->acc == &cpustate->A) + WRITEPORT(cpustate, opcode & 0x07, ~*cpustate->acc & 1); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* LDA */ @@ -432,10 +428,10 @@ static CPU_EXECUTE( ccpu ) case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(tempval, tempval); - NEXT_ACC_A(); CYCLES(3); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* TST */ @@ -443,16 +439,16 @@ static CPU_EXECUTE( ccpu ) case 0xb4: case 0xb5: case 0xb6: case 0xb7: case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - tempval = RDMEM(ccpu.I); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + tempval = RDMEM(cpustate, cpustate->I); { - UINT16 result = *ccpu.acc + (tempval ^ 0xfff) + 1; - SET_A0(); - SET_CMP_VAL(tempval); - SET_NC(result); - SET_MI(result); + UINT16 result = *cpustate->acc + (tempval ^ 0xfff) + 1; + SET_A0(cpustate); + SET_CMP_VAL(cpustate, tempval); + SET_NC(cpustate, result); + SET_MI(cpustate, result); } - NEXT_ACC_A(); CYCLES(3); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* WS */ @@ -460,9 +456,9 @@ static CPU_EXECUTE( ccpu ) case 0xc4: case 0xc5: case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - ccpu.I = RDMEM(ccpu.I) & 0xff; - NEXT_ACC_A(); CYCLES(3); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + cpustate->I = RDMEM(cpustate, cpustate->I) & 0xff; + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* STA */ @@ -470,231 +466,231 @@ static CPU_EXECUTE( ccpu ) case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: - ccpu.I = (ccpu.P << 4) + (opcode & 0x0f); - WRMEM(ccpu.I, *ccpu.acc); - NEXT_ACC_A(); CYCLES(3); + cpustate->I = (cpustate->P << 4) + (opcode & 0x0f); + WRMEM(cpustate, cpustate->I, *cpustate->acc); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* DV */ case 0xe0: { - INT16 stopX = (INT16)(ccpu.A << 4) >> 4; - INT16 stopY = (INT16)(ccpu.B << 4) >> 4; + INT16 stopX = (INT16)(cpustate->A << 4) >> 4; + INT16 stopY = (INT16)(cpustate->B << 4) >> 4; - stopX = ((INT16)(stopX - ccpu.X) >> ccpu.T) + ccpu.X; - stopY = ((INT16)(stopY - ccpu.Y) >> ccpu.T) + ccpu.Y; + stopX = ((INT16)(stopX - cpustate->X) >> cpustate->T) + cpustate->X; + stopY = ((INT16)(stopY - cpustate->Y) >> cpustate->T) + cpustate->Y; - (*ccpu.vector_callback)(ccpu.X, ccpu.Y, stopX, stopY, ccpu.T); + (*cpustate->vector_callback)(device, cpustate->X, cpustate->Y, stopX, stopY, cpustate->T); /* hack to make QB3 display semi-correctly during explosions */ - ccpu.A = ccpu.X & 0xfff; - ccpu.B = ccpu.Y & 0xfff; + cpustate->A = cpustate->X & 0xfff; + cpustate->B = cpustate->Y & 0xfff; } - NEXT_ACC_A(); CYCLES(1); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* LPAP */ case 0xe1: - ccpu.J = RDMEM(ccpu.I); - NEXT_ACC_A(); CYCLES(3); + cpustate->J = RDMEM(cpustate, cpustate->I); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* WSP */ case 0xf1: - ccpu.I = RDMEM(ccpu.I) & 0xff; - NEXT_ACC_A(); CYCLES(3); + cpustate->I = RDMEM(cpustate, cpustate->I) & 0xff; + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* LKP */ case 0xe2: case 0xf2: - tempval = READOP(((ccpu.PC - 1) & 0xf000) + *ccpu.acc); - STANDARD_ACC_OP(tempval, tempval); - NEXT_ACC_A(); CYCLES(7); - ccpu.PC++; + tempval = READOP(cpustate, ((cpustate->PC - 1) & 0xf000) + *cpustate->acc); + STANDARD_ACC_OP(cpustate, tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 7); + cpustate->PC++; break; /* MUL */ case 0xe3: case 0xf3: - tempval = RDMEM(ccpu.I); - SET_A0(); - ccpu.cmpval = tempval & 0xfff; - if (ccpu.acc == &ccpu.A) + tempval = RDMEM(cpustate, cpustate->I); + SET_A0(cpustate); + cpustate->cmpval = tempval & 0xfff; + if (cpustate->acc == &cpustate->A) { - if (ccpu.A & 1) + if (cpustate->A & 1) { UINT16 result; - ccpu.cmpacc = ccpu.B; - ccpu.A = (ccpu.A >> 1) | ((ccpu.B << 11) & 0x800); - ccpu.B = ((INT16)(ccpu.B << 4) >> 5) & 0xfff; - result = ccpu.B + tempval; - SET_NC(result); - SET_MI(result); - ccpu.B = result & 0xfff; + cpustate->cmpacc = cpustate->B; + cpustate->A = (cpustate->A >> 1) | ((cpustate->B << 11) & 0x800); + cpustate->B = ((INT16)(cpustate->B << 4) >> 5) & 0xfff; + result = cpustate->B + tempval; + SET_NC(cpustate, result); + SET_MI(cpustate, result); + cpustate->B = result & 0xfff; } else { UINT16 result; - ccpu.cmpacc = ccpu.A; - result = ccpu.A + tempval; - ccpu.A = (ccpu.A >> 1) | ((ccpu.B << 11) & 0x800); - ccpu.B = ((INT16)(ccpu.B << 4) >> 5) & 0xfff; - SET_NC(result); - SET_MI(result); + cpustate->cmpacc = cpustate->A; + result = cpustate->A + tempval; + cpustate->A = (cpustate->A >> 1) | ((cpustate->B << 11) & 0x800); + cpustate->B = ((INT16)(cpustate->B << 4) >> 5) & 0xfff; + SET_NC(cpustate, result); + SET_MI(cpustate, result); } } else { UINT16 result; - ccpu.cmpacc = ccpu.B; - ccpu.B = ((INT16)(ccpu.B << 4) >> 5) & 0xfff; - result = ccpu.B + tempval; - SET_NC(result); - SET_MI(result); - if (ccpu.A & 1) - ccpu.B = result & 0xfff; + cpustate->cmpacc = cpustate->B; + cpustate->B = ((INT16)(cpustate->B << 4) >> 5) & 0xfff; + result = cpustate->B + tempval; + SET_NC(cpustate, result); + SET_MI(cpustate, result); + if (cpustate->A & 1) + cpustate->B = result & 0xfff; } - NEXT_ACC_A(); CYCLES(2); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* NV */ case 0xe4: case 0xf4: - ccpu.T = 0; - while (((ccpu.A & 0xa00) == 0x000 || (ccpu.A & 0xa00) == 0xa00) && - ((ccpu.B & 0xa00) == 0x000 || (ccpu.B & 0xa00) == 0xa00) && - ccpu.T < 16) + cpustate->T = 0; + while (((cpustate->A & 0xa00) == 0x000 || (cpustate->A & 0xa00) == 0xa00) && + ((cpustate->B & 0xa00) == 0x000 || (cpustate->B & 0xa00) == 0xa00) && + cpustate->T < 16) { - ccpu.A = (ccpu.A << 1) & 0xfff; - ccpu.B = (ccpu.B << 1) & 0xfff; - ccpu.T++; - CYCLES(1); + cpustate->A = (cpustate->A << 1) & 0xfff; + cpustate->B = (cpustate->B << 1) & 0xfff; + cpustate->T++; + CYCLES(cpustate, 1); } - NEXT_ACC_A(); CYCLES(1); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* FRM */ case 0xe5: case 0xf5: - ccpu.waiting = TRUE; - NEXT_ACC_A(); - ccpu_icount = -1; + cpustate->waiting = TRUE; + NEXT_ACC_A(cpustate); + cpustate->icount = -1; /* some games repeat the FRM opcode twice; it apparently does not cause a second wait, so we make sure we skip any duplicate opcode at this point */ - if (READOP(ccpu.PC) == opcode) - ccpu.PC++; + if (READOP(cpustate, cpustate->PC) == opcode) + cpustate->PC++; break; /* STAP */ case 0xe6: case 0xf6: - WRMEM(ccpu.I, *ccpu.acc); - NEXT_ACC_A(); CYCLES(2); + WRMEM(cpustate, cpustate->I, *cpustate->acc); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* CST */ case 0xf7: - ccpu.watchdog = 0; + cpustate->watchdog = 0; /* ADDP */ case 0xe7: - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(*ccpu.acc + tempval, tempval); - NEXT_ACC_A(); CYCLES(2); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, *cpustate->acc + tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* SUBP */ case 0xe8: case 0xf8: - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(*ccpu.acc + (tempval ^ 0xfff) + 1, tempval); - NEXT_ACC_A(); CYCLES(3); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, *cpustate->acc + (tempval ^ 0xfff) + 1, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 3); break; /* ANDP */ case 0xe9: case 0xf9: - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(*ccpu.acc & tempval, tempval); - NEXT_ACC_A(); CYCLES(2); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, *cpustate->acc & tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* LDAP */ case 0xea: case 0xfa: - tempval = RDMEM(ccpu.I); - STANDARD_ACC_OP(tempval, tempval); - NEXT_ACC_A(); CYCLES(2); + tempval = RDMEM(cpustate, cpustate->I); + STANDARD_ACC_OP(cpustate, tempval, tempval); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 2); break; /* SHR */ case 0xeb: case 0xfb: - tempval = ((ccpu.acc == &ccpu.A) ? (ccpu.A >> 1) : ((INT16)(ccpu.B << 4) >> 5)) & 0xfff; - tempval |= (*ccpu.acc + (0xb0b | (opcode & 0xf0))) & 0x1000; - STANDARD_ACC_OP(tempval, 0xb0b | (opcode & 0xf0)); - NEXT_ACC_A(); CYCLES(1); + tempval = ((cpustate->acc == &cpustate->A) ? (cpustate->A >> 1) : ((INT16)(cpustate->B << 4) >> 5)) & 0xfff; + tempval |= (*cpustate->acc + (0xb0b | (opcode & 0xf0))) & 0x1000; + STANDARD_ACC_OP(cpustate, tempval, 0xb0b | (opcode & 0xf0)); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* SHL */ case 0xec: case 0xfc: - tempval = (*ccpu.acc << 1) & 0xfff; - tempval |= (*ccpu.acc + (0xc0c | (opcode & 0xf0))) & 0x1000; - STANDARD_ACC_OP(tempval, 0xc0c | (opcode & 0xf0)); - NEXT_ACC_A(); CYCLES(1); + tempval = (*cpustate->acc << 1) & 0xfff; + tempval |= (*cpustate->acc + (0xc0c | (opcode & 0xf0))) & 0x1000; + STANDARD_ACC_OP(cpustate, tempval, 0xc0c | (opcode & 0xf0)); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* ASR */ case 0xed: case 0xfd: - tempval = ((INT16)(*ccpu.acc << 4) >> 5) & 0xfff; - STANDARD_ACC_OP(tempval, 0xd0d | (opcode & 0xf0)); - NEXT_ACC_A(); CYCLES(1); + tempval = ((INT16)(*cpustate->acc << 4) >> 5) & 0xfff; + STANDARD_ACC_OP(cpustate, tempval, 0xd0d | (opcode & 0xf0)); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* SHRB */ case 0xee: case 0xfe: - if (ccpu.acc == &ccpu.A) + if (cpustate->acc == &cpustate->A) { - tempval = (ccpu.A >> 1) | ((ccpu.B << 11) & 0x800); - ccpu.B = ((INT16)(ccpu.B << 4) >> 5) & 0xfff; + tempval = (cpustate->A >> 1) | ((cpustate->B << 11) & 0x800); + cpustate->B = ((INT16)(cpustate->B << 4) >> 5) & 0xfff; } else - tempval = ((INT16)(ccpu.B << 4) >> 5) & 0xfff; - tempval |= (*ccpu.acc + (0xe0e | (opcode & 0xf0))) & 0x1000; - STANDARD_ACC_OP(tempval, 0xe0e | (opcode & 0xf0)); - NEXT_ACC_A(); CYCLES(1); + tempval = ((INT16)(cpustate->B << 4) >> 5) & 0xfff; + tempval |= (*cpustate->acc + (0xe0e | (opcode & 0xf0))) & 0x1000; + STANDARD_ACC_OP(cpustate, tempval, 0xe0e | (opcode & 0xf0)); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* SHLB */ case 0xef: case 0xff: - if (ccpu.acc == &ccpu.A) + if (cpustate->acc == &cpustate->A) { - tempval = (ccpu.A << 1) & 0xfff; - ccpu.B = (ccpu.B << 1) & 0xfff; + tempval = (cpustate->A << 1) & 0xfff; + cpustate->B = (cpustate->B << 1) & 0xfff; } else - tempval = (ccpu.B << 1) & 0xfff; - tempval |= (*ccpu.acc + (0xf0f | (opcode & 0xf0))) & 0x1000; - STANDARD_ACC_OP(tempval, 0xf0f | (opcode & 0xf0)); - NEXT_ACC_A(); CYCLES(1); + tempval = (cpustate->B << 1) & 0xfff; + tempval |= (*cpustate->acc + (0xf0f | (opcode & 0xf0))) & 0x1000; + STANDARD_ACC_OP(cpustate, tempval, 0xf0f | (opcode & 0xf0)); + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; /* IV */ case 0xf0: - ccpu.X = (INT16)(ccpu.A << 4) >> 4; - ccpu.Y = (INT16)(ccpu.B << 4) >> 4; - NEXT_ACC_A(); CYCLES(1); + cpustate->X = (INT16)(cpustate->A << 4) >> 4; + cpustate->Y = (INT16)(cpustate->B << 4) >> 4; + NEXT_ACC_A(cpustate); CYCLES(cpustate, 1); break; } } - return cycles - ccpu_icount; + return cycles - cpustate->icount; } @@ -705,28 +701,30 @@ static CPU_EXECUTE( ccpu ) static CPU_SET_INFO( ccpu ) { + ccpu_state *cpustate = device->token; + switch (state) { /* --- the following bits of info are set as 64-bit signed integers --- */ case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + CCPU_PC: ccpu.PC = info->i; break; - case CPUINFO_INT_REGISTER + Ccpu_get_flags: - ccpu.a0flag = (info->i & 0x01) ? 1 : 0; - ccpu.ncflag = (info->i & 0x02) ? 0x0000 : 0x1000; - ccpu.cmpacc = 1; - ccpu.cmpval = (info->i & 0x04) ? 0 : (info->i & 0x08) ? 1 : 2; - ccpu.miflag = (info->i & 0x10) ? 1 : 0; - ccpu.drflag = (info->i & 0x20) ? 1 : 0; - break; - case CPUINFO_INT_REGISTER + CCPU_A: ccpu.A = info->i & 0xfff; break; - case CPUINFO_INT_REGISTER + CCPU_B: ccpu.B = info->i & 0xfff; break; - case CPUINFO_INT_REGISTER + CCPU_I: ccpu.I = info->i & 0xff; break; - case CPUINFO_INT_REGISTER + CCPU_J: ccpu.J = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_PC: cpustate->PC = info->i; break; + case CPUINFO_INT_REGISTER + CCPU_FLAGS: + cpustate->a0flag = (info->i & 0x01) ? 1 : 0; + cpustate->ncflag = (info->i & 0x02) ? 0x0000 : 0x1000; + cpustate->cmpacc = 1; + cpustate->cmpval = (info->i & 0x04) ? 0 : (info->i & 0x08) ? 1 : 2; + cpustate->miflag = (info->i & 0x10) ? 1 : 0; + cpustate->drflag = (info->i & 0x20) ? 1 : 0; + break; + case CPUINFO_INT_REGISTER + CCPU_A: cpustate->A = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_B: cpustate->B = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_I: cpustate->I = info->i & 0xff; break; + case CPUINFO_INT_REGISTER + CCPU_J: cpustate->J = info->i & 0xfff; break; case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + CCPU_P: ccpu.P = info->i & 0x0f; break; - case CPUINFO_INT_REGISTER + CCPU_X: ccpu.X = info->i & 0xfff; break; - case CPUINFO_INT_REGISTER + CCPU_Y: ccpu.Y = info->i & 0xfff; break; - case CPUINFO_INT_REGISTER + CCPU_T: ccpu.T = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_P: cpustate->P = info->i & 0x0f; break; + case CPUINFO_INT_REGISTER + CCPU_X: cpustate->X = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_Y: cpustate->Y = info->i & 0xfff; break; + case CPUINFO_INT_REGISTER + CCPU_T: cpustate->T = info->i & 0xfff; break; } } @@ -738,99 +736,101 @@ static CPU_SET_INFO( ccpu ) CPU_GET_INFO( ccpu ) { + ccpu_state *cpustate = (device != NULL) ? device->token : NULL; + switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(ccpuRegs); break; - case CPUINFO_INT_INPUT_LINES: info->i = 0; break; - case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; - case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; - case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; - case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; - case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; - case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; - case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; - case CPUINFO_INT_MAX_CYCLES: info->i = 1; break; - - case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 8; break; - case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 15; break; - case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 0; break; - case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 16; break; - case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 8; break; - case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = -1; break; - case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break; - case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 5; break; - case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; - - case CPUINFO_INT_PREVIOUSPC: /* not implemented */ break; + case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(ccpu_state); break; + case CPUINFO_INT_INPUT_LINES: info->i = 0; break; + case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; + case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; + case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; + case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; + case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 1; break; + case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 3; break; + case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; + case CPUINFO_INT_MAX_CYCLES: info->i = 1; break; + + case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 8; break; + case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 15; break; + case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 0; break; + case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 16; break; + case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 8; break; + case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = -1; break; + case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 8; break; + case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 5; break; + case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; + + case CPUINFO_INT_PREVIOUSPC: /* not implemented */ break; case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + CCPU_PC: info->i = ccpu.PC; break; - case CPUINFO_INT_REGISTER + Ccpu_get_flags: info->i = 0; - if (TEST_A0()) info->i |= 0x01; - if (TEST_NC()) info->i |= 0x02; - if (TEST_LT()) info->i |= 0x04; - if (TEST_EQ()) info->i |= 0x08; - if ((*ccpu.external_input)()) info->i |= 0x10; - if (TEST_DR()) info->i |= 0x20; - break; - case CPUINFO_INT_REGISTER + CCPU_A: info->i = ccpu.A; break; - case CPUINFO_INT_REGISTER + CCPU_B: info->i = ccpu.B; break; - case CPUINFO_INT_REGISTER + CCPU_I: info->i = ccpu.I; break; - case CPUINFO_INT_REGISTER + CCPU_J: info->i = ccpu.J; break; + case CPUINFO_INT_REGISTER + CCPU_PC: info->i = cpustate->PC; break; + case CPUINFO_INT_REGISTER + CCPU_FLAGS: info->i = 0; + if (TEST_A0(cpustate)) info->i |= 0x01; + if (TEST_NC(cpustate)) info->i |= 0x02; + if (TEST_LT(cpustate)) info->i |= 0x04; + if (TEST_EQ(cpustate)) info->i |= 0x08; + if ((*cpustate->external_input)(cpustate->device)) info->i |= 0x10; + if (TEST_DR(cpustate)) info->i |= 0x20; + break; + case CPUINFO_INT_REGISTER + CCPU_A: info->i = cpustate->A; break; + case CPUINFO_INT_REGISTER + CCPU_B: info->i = cpustate->B; break; + case CPUINFO_INT_REGISTER + CCPU_I: info->i = cpustate->I; break; + case CPUINFO_INT_REGISTER + CCPU_J: info->i = cpustate->J; break; case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + CCPU_P: info->i = ccpu.P; break; - case CPUINFO_INT_REGISTER + CCPU_X: info->i = ccpu.X; break; - case CPUINFO_INT_REGISTER + CCPU_Y: info->i = ccpu.Y; break; - case CPUINFO_INT_REGISTER + CCPU_T: info->i = ccpu.T; break; + case CPUINFO_INT_REGISTER + CCPU_P: info->i = cpustate->P; break; + case CPUINFO_INT_REGISTER + CCPU_X: info->i = cpustate->X; break; + case CPUINFO_INT_REGISTER + CCPU_Y: info->i = cpustate->Y; break; + case CPUINFO_INT_REGISTER + CCPU_T: info->i = cpustate->T; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(ccpu); break; + case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(ccpu); break; case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(ccpu); break; case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(ccpu); break; - case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(ccpu); break; + case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(ccpu); break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(ccpu); break; - case CPUINFO_PTR_EXIT: info->exit = NULL; break; + case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(ccpu); break; - case CPUINFO_PTR_BURN: info->burn = NULL; break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(ccpu); break; - case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ccpu_icount; break; + case CPUINFO_PTR_BURN: info->burn = NULL; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(ccpu); break; + case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case CPUINFO_STR_NAME: strcpy(info->s, "CCPU"); break; - case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Cinematronics CPU"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; - case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; + case CPUINFO_STR_NAME: strcpy(info->s, "CCPU"); break; + case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Cinematronics CPU"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break; + case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Aaron Giles & Zonn Moore"); break; case CPUINFO_STR_FLAGS: sprintf(info->s, "%c%c%c%c%c%c", - TEST_A0() ? '0' : 'o', - TEST_NC() ? 'N' : 'n', - TEST_LT() ? 'L' : 'l', - TEST_EQ() ? 'E' : 'e', - (*ccpu.external_input)() ? 'M' : 'm', - TEST_DR() ? 'D' : 'd'); + TEST_A0(cpustate) ? '0' : 'o', + TEST_NC(cpustate) ? 'N' : 'n', + TEST_LT(cpustate) ? 'L' : 'l', + TEST_EQ(cpustate) ? 'E' : 'e', + (*cpustate->external_input)(cpustate->device) ? 'M' : 'm', + TEST_DR(cpustate) ? 'D' : 'd'); break; - case CPUINFO_STR_REGISTER + Ccpu_get_flags: + case CPUINFO_STR_REGISTER + CCPU_FLAGS: sprintf(info->s, "FL:%c%c%c%c%c%c", - TEST_A0() ? '0' : 'o', - TEST_NC() ? 'N' : 'n', - TEST_LT() ? 'L' : 'l', - TEST_EQ() ? 'E' : 'e', - (*ccpu.external_input)() ? 'M' : 'm', - TEST_DR() ? 'D' : 'd'); + TEST_A0(cpustate) ? '0' : 'o', + TEST_NC(cpustate) ? 'N' : 'n', + TEST_LT(cpustate) ? 'L' : 'l', + TEST_EQ(cpustate) ? 'E' : 'e', + (*cpustate->external_input)(cpustate->device) ? 'M' : 'm', + TEST_DR(cpustate) ? 'D' : 'd'); break; - case CPUINFO_STR_REGISTER + CCPU_PC: sprintf(info->s, "PC:%04X", ccpu.PC); break; - case CPUINFO_STR_REGISTER + CCPU_A: sprintf(info->s, "A:%03X", ccpu.A); break; - case CPUINFO_STR_REGISTER + CCPU_B: sprintf(info->s, "B:%03X", ccpu.B); break; - case CPUINFO_STR_REGISTER + CCPU_I: sprintf(info->s, "I:%03X", ccpu.I); break; - case CPUINFO_STR_REGISTER + CCPU_J: sprintf(info->s, "J:%03X", ccpu.J); break; - case CPUINFO_STR_REGISTER + CCPU_P: sprintf(info->s, "P:%X", ccpu.P); break; - case CPUINFO_STR_REGISTER + CCPU_X: sprintf(info->s, "X:%03X", ccpu.X); break; - case CPUINFO_STR_REGISTER + CCPU_Y: sprintf(info->s, "Y:%03X", ccpu.Y); break; - case CPUINFO_STR_REGISTER + CCPU_T: sprintf(info->s, "T:%03X", ccpu.T); break; + case CPUINFO_STR_REGISTER + CCPU_PC: sprintf(info->s, "PC:%04X", cpustate->PC); break; + case CPUINFO_STR_REGISTER + CCPU_A: sprintf(info->s, "A:%03X", cpustate->A); break; + case CPUINFO_STR_REGISTER + CCPU_B: sprintf(info->s, "B:%03X", cpustate->B); break; + case CPUINFO_STR_REGISTER + CCPU_I: sprintf(info->s, "I:%03X", cpustate->I); break; + case CPUINFO_STR_REGISTER + CCPU_J: sprintf(info->s, "J:%03X", cpustate->J); break; + case CPUINFO_STR_REGISTER + CCPU_P: sprintf(info->s, "P:%X", cpustate->P); break; + case CPUINFO_STR_REGISTER + CCPU_X: sprintf(info->s, "X:%03X", cpustate->X); break; + case CPUINFO_STR_REGISTER + CCPU_Y: sprintf(info->s, "Y:%03X", cpustate->Y); break; + case CPUINFO_STR_REGISTER + CCPU_T: sprintf(info->s, "T:%03X", cpustate->T); break; } } diff --git a/src/emu/cpu/ccpu/ccpu.h b/src/emu/cpu/ccpu/ccpu.h index 1af68352dcf..fa277e75e87 100644 --- a/src/emu/cpu/ccpu/ccpu.h +++ b/src/emu/cpu/ccpu/ccpu.h @@ -23,7 +23,7 @@ enum { CCPU_PC=1, - Ccpu_get_flags, + CCPU_FLAGS, CCPU_A, CCPU_B, CCPU_I, @@ -40,11 +40,14 @@ enum CONFIG STRUCTURE ***************************************************************************/ +typedef UINT8 (*ccpu_input_func)(const device_config *device); +typedef void (*ccpu_vector_func)(const device_config *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); + typedef struct _ccpu_config ccpu_config; struct _ccpu_config { - UINT8 (*external_input)(void); /* if NULL, assume JMI jumper is present */ - void (*vector_callback)(INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); + ccpu_input_func external_input; /* if NULL, assume JMI jumper is present */ + ccpu_vector_func vector_callback; }; @@ -54,7 +57,7 @@ struct _ccpu_config ***************************************************************************/ CPU_GET_INFO( ccpu ); -void ccpu_wdt_timer_trigger(void); +void ccpu_wdt_timer_trigger(const device_config *device); CPU_DISASSEMBLE( ccpu ); diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index 9e906ba6de9..57a965ad838 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -21,32 +21,20 @@ * *************************************/ -typedef struct +typedef struct _t11_state t11_state; +struct _t11_state { - PAIR ppc; /* previous program counter */ - PAIR reg[8]; - PAIR psw; - UINT16 op; - UINT16 initial_pc; - UINT8 wait_state; - UINT8 irq_state; - INT32 interrupt_cycles; - cpu_irq_callback irq_callback; + PAIR ppc; /* previous program counter */ + PAIR reg[8]; + PAIR psw; + UINT16 initial_pc; + UINT8 wait_state; + UINT8 irq_state; + int icount; + cpu_irq_callback irq_callback; const device_config *device; const address_space *program; -} t11_Regs; - -static t11_Regs t11; - - - -/************************************* - * - * Global variables - * - *************************************/ - -static int t11_ICount; +}; @@ -57,16 +45,16 @@ static int t11_ICount; *************************************/ /* registers of various sizes */ -#define REGD(x) t11.reg[x].d -#define REGW(x) t11.reg[x].w.l -#define REGB(x) t11.reg[x].b.l +#define REGD(x) reg[x].d +#define REGW(x) reg[x].w.l +#define REGB(x) reg[x].b.l /* PC, SP, and PSW definitions */ -#define SP REGW(6) -#define PC REGW(7) -#define SPD REGD(6) -#define PCD REGD(7) -#define PSW t11.psw.b.l +#define SP REGW(6) +#define PC REGW(7) +#define SPD REGD(6) +#define PCD REGD(7) +#define PSW psw.b.l @@ -76,35 +64,35 @@ static int t11_ICount; * *************************************/ -INLINE int ROPCODE(void) +INLINE int ROPCODE(t11_state *cpustate) { - int val = memory_decrypted_read_word(t11.program, PC); - PC += 2; + int val = memory_decrypted_read_word(cpustate->program, cpustate->PC); + cpustate->PC += 2; return val; } -INLINE int RBYTE(int addr) +INLINE int RBYTE(t11_state *cpustate, int addr) { - return T11_RDMEM(addr); + return T11_RDMEM(cpustate, addr); } -INLINE void WBYTE(int addr, int data) +INLINE void WBYTE(t11_state *cpustate, int addr, int data) { - T11_WRMEM(addr, data); + T11_WRMEM(cpustate, addr, data); } -INLINE int RWORD(int addr) +INLINE int RWORD(t11_state *cpustate, int addr) { - return T11_RDMEM_WORD(addr & 0xfffe); + return T11_RDMEM_WORD(cpustate, addr & 0xfffe); } -INLINE void WWORD(int addr, int data) +INLINE void WWORD(t11_state *cpustate, int addr, int data) { - T11_WRMEM_WORD(addr & 0xfffe, data); + T11_WRMEM_WORD(cpustate, addr & 0xfffe, data); } @@ -115,17 +103,17 @@ INLINE void WWORD(int addr, int data) * *************************************/ -INLINE void PUSH(int val) +INLINE void PUSH(t11_state *cpustate, int val) { - SP -= 2; - WWORD(SPD, val); + cpustate->SP -= 2; + WWORD(cpustate, cpustate->SPD, val); } -INLINE int POP(void) +INLINE int POP(t11_state *cpustate) { - int result = RWORD(SPD); - SP += 2; + int result = RWORD(cpustate, cpustate->SPD); + cpustate->SP += 2; return result; } @@ -144,22 +132,22 @@ INLINE int POP(void) #define NFLAG 8 /* extracts flags */ -#define GET_C (PSW & CFLAG) -#define GET_V (PSW & VFLAG) -#define GET_Z (PSW & ZFLAG) -#define GET_N (PSW & NFLAG) +#define GET_C (cpustate->PSW & CFLAG) +#define GET_V (cpustate->PSW & VFLAG) +#define GET_Z (cpustate->PSW & ZFLAG) +#define GET_N (cpustate->PSW & NFLAG) /* clears flags */ -#define CLR_C (PSW &= ~CFLAG) -#define CLR_V (PSW &= ~VFLAG) -#define CLR_Z (PSW &= ~ZFLAG) -#define CLR_N (PSW &= ~NFLAG) +#define CLR_C (cpustate->PSW &= ~CFLAG) +#define CLR_V (cpustate->PSW &= ~VFLAG) +#define CLR_Z (cpustate->PSW &= ~ZFLAG) +#define CLR_N (cpustate->PSW &= ~NFLAG) /* sets flags */ -#define SET_C (PSW |= CFLAG) -#define SET_V (PSW |= VFLAG) -#define SET_Z (PSW |= ZFLAG) -#define SET_N (PSW |= NFLAG) +#define SET_C (cpustate->PSW |= CFLAG) +#define SET_V (cpustate->PSW |= VFLAG) +#define SET_Z (cpustate->PSW |= ZFLAG) +#define SET_N (cpustate->PSW |= NFLAG) @@ -195,10 +183,10 @@ static const struct irq_table_entry irq_table[] = { 7<<5, 0x60 } }; -static void t11_check_irqs(void) +static void t11_check_irqs(t11_state *cpustate) { - const struct irq_table_entry *irq = &irq_table[t11.irq_state & 15]; - int priority = PSW & 0xe0; + const struct irq_table_entry *irq = &irq_table[cpustate->irq_state & 15]; + int priority = cpustate->PSW & 0xe0; /* compare the priority of the interrupt to the PSW */ if (irq->priority > priority) @@ -207,28 +195,28 @@ static void t11_check_irqs(void) int new_pc, new_psw; /* call the callback; if we don't get -1 back, use the return value as our vector */ - if (t11.irq_callback != NULL) + if (cpustate->irq_callback != NULL) { - int new_vector = (*t11.irq_callback)(t11.device, t11.irq_state & 15); + int new_vector = (*cpustate->irq_callback)(cpustate->device, cpustate->irq_state & 15); if (new_vector != -1) vector = new_vector; } /* fetch the new PC and PSW from that vector */ assert((vector & 3) == 0); - new_pc = RWORD(vector); - new_psw = RWORD(vector + 2); + new_pc = RWORD(cpustate, vector); + new_psw = RWORD(cpustate, vector + 2); /* push the old state, set the new one */ - PUSH(PSW); - PUSH(PC); - PCD = new_pc; - PSW = new_psw; - t11_check_irqs(); + PUSH(cpustate, cpustate->PSW); + PUSH(cpustate, cpustate->PC); + cpustate->PCD = new_pc; + cpustate->PSW = new_psw; + t11_check_irqs(cpustate); /* count cycles and clear the WAIT flag */ - t11.interrupt_cycles += 114; - t11.wait_state = 0; + cpustate->icount -= 114; + cpustate->wait_state = 0; } } @@ -256,8 +244,6 @@ static void t11_check_irqs(void) static CPU_GET_CONTEXT( t11 ) { - if (dst) - *(t11_Regs *)dst = t11; } @@ -270,9 +256,6 @@ static CPU_GET_CONTEXT( t11 ) static CPU_SET_CONTEXT( t11 ) { - if (src) - t11 = *(t11_Regs *)src; - t11_check_irqs(); } @@ -291,33 +274,26 @@ static CPU_INIT( t11 ) 0x1000, 0x0000, 0xf600, 0xf400 }; const struct t11_setup *setup = device->static_config; - - t11.initial_pc = initial_pc[setup->mode >> 13]; - t11.irq_callback = irqcallback; - t11.device = device; - t11.program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); - - state_save_register_item("t11", device->tag, 0, t11.ppc.w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[0].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[1].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[2].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[3].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[4].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[5].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[6].w.l); - state_save_register_item("t11", device->tag, 0, t11.reg[7].w.l); - state_save_register_item("t11", device->tag, 0, t11.psw.w.l); - state_save_register_item("t11", device->tag, 0, t11.op); - state_save_register_item("t11", device->tag, 0, t11.initial_pc); - state_save_register_item("t11", device->tag, 0, t11.wait_state); - state_save_register_item("t11", device->tag, 0, t11.irq_state); - state_save_register_item("t11", device->tag, 0, t11.interrupt_cycles); -} - - -static CPU_EXIT( t11 ) -{ - /* nothing to do */ + t11_state *cpustate = device->token; + + cpustate->initial_pc = initial_pc[setup->mode >> 13]; + cpustate->irq_callback = irqcallback; + cpustate->device = device; + cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); + + state_save_register_item("t11", device->tag, 0, cpustate->ppc.w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[0].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[1].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[2].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[3].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[4].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[5].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[6].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->reg[7].w.l); + state_save_register_item("t11", device->tag, 0, cpustate->psw.w.l); + state_save_register_item("t11", device->tag, 0, cpustate->initial_pc); + state_save_register_item("t11", device->tag, 0, cpustate->wait_state); + state_save_register_item("t11", device->tag, 0, cpustate->irq_state); } @@ -330,28 +306,29 @@ static CPU_EXIT( t11 ) static CPU_RESET( t11 ) { + t11_state *cpustate = device->token; + /* initial SP is 376 octal, or 0xfe */ - SP = 0x00fe; + cpustate->SP = 0x00fe; /* initial PC comes from the setup word */ - PC = t11.initial_pc; + cpustate->PC = cpustate->initial_pc; /* PSW starts off at highest priority */ - PSW = 0xe0; + cpustate->PSW = 0xe0; /* initialize the IRQ state */ - t11.irq_state = 0; + cpustate->irq_state = 0; /* reset the remaining state */ - REGD(0) = 0; - REGD(1) = 0; - REGD(2) = 0; - REGD(3) = 0; - REGD(4) = 0; - REGD(5) = 0; - t11.ppc.d = 0; - t11.wait_state = 0; - t11.interrupt_cycles = 0; + cpustate->REGD(0) = 0; + cpustate->REGD(1) = 0; + cpustate->REGD(2) = 0; + cpustate->REGD(3) = 0; + cpustate->REGD(4) = 0; + cpustate->REGD(5) = 0; + cpustate->ppc.d = 0; + cpustate->wait_state = 0; } @@ -362,16 +339,13 @@ static CPU_RESET( t11 ) * *************************************/ -static void set_irq_line(int irqline, int state) +static void set_irq_line(t11_state *cpustate, int irqline, int state) { /* set the appropriate bit */ if (state == CLEAR_LINE) - t11.irq_state &= ~(1 << irqline); + cpustate->irq_state &= ~(1 << irqline); else - t11.irq_state |= 1 << irqline; - - /* recheck for interrupts */ - t11_check_irqs(); + cpustate->irq_state |= 1 << irqline; } @@ -384,33 +358,33 @@ static void set_irq_line(int irqline, int state) static CPU_EXECUTE( t11 ) { - t11_ICount = cycles; - t11_ICount -= t11.interrupt_cycles; - t11.interrupt_cycles = 0; + t11_state *cpustate = device->token; + + cpustate->icount = cycles; + t11_check_irqs(cpustate); - if (t11.wait_state) + if (cpustate->wait_state) { - t11_ICount = 0; + cpustate->icount = 0; goto getout; } do { - t11.ppc = t11.reg[7]; /* copy PC to previous PC */ + UINT16 op; + + cpustate->ppc = cpustate->reg[7]; /* copy PC to previous PC */ - debugger_instruction_hook(device, PCD); + debugger_instruction_hook(device, cpustate->PCD); - t11.op = ROPCODE(); - (*opcode_table[t11.op >> 3])(); + op = ROPCODE(cpustate); + (*opcode_table[op >> 3])(cpustate, op); - } while (t11_ICount > 0); + } while (cpustate->icount > 0); getout: - t11_ICount -= t11.interrupt_cycles; - t11.interrupt_cycles = 0; - - return cycles - t11_ICount; + return cycles - cpustate->icount; } @@ -421,25 +395,27 @@ getout: static CPU_SET_INFO( t11 ) { + t11_state *cpustate = device->token; + switch (state) { /* --- the following bits of info are set as 64-bit signed integers --- */ - case CPUINFO_INT_INPUT_STATE + T11_IRQ0: set_irq_line(T11_IRQ0, info->i); break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ1: set_irq_line(T11_IRQ1, info->i); break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ2: set_irq_line(T11_IRQ2, info->i); break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ3: set_irq_line(T11_IRQ3, info->i); break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ0: set_irq_line(cpustate, T11_IRQ0, info->i); break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ1: set_irq_line(cpustate, T11_IRQ1, info->i); break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ2: set_irq_line(cpustate, T11_IRQ2, info->i); break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ3: set_irq_line(cpustate, T11_IRQ3, info->i); break; case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + T11_PC: PC = info->i; break; + case CPUINFO_INT_REGISTER + T11_PC: cpustate->PC = info->i; break; case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + T11_SP: SP = info->i; break; - case CPUINFO_INT_REGISTER + T11_PSW: PSW = info->i; break; - case CPUINFO_INT_REGISTER + T11_R0: REGW(0) = info->i; break; - case CPUINFO_INT_REGISTER + T11_R1: REGW(1) = info->i; break; - case CPUINFO_INT_REGISTER + T11_R2: REGW(2) = info->i; break; - case CPUINFO_INT_REGISTER + T11_R3: REGW(3) = info->i; break; - case CPUINFO_INT_REGISTER + T11_R4: REGW(4) = info->i; break; - case CPUINFO_INT_REGISTER + T11_R5: REGW(5) = info->i; break; + case CPUINFO_INT_REGISTER + T11_SP: cpustate->SP = info->i; break; + case CPUINFO_INT_REGISTER + T11_PSW: cpustate->PSW = info->i; break; + case CPUINFO_INT_REGISTER + T11_R0: cpustate->REGW(0) = info->i; break; + case CPUINFO_INT_REGISTER + T11_R1: cpustate->REGW(1) = info->i; break; + case CPUINFO_INT_REGISTER + T11_R2: cpustate->REGW(2) = info->i; break; + case CPUINFO_INT_REGISTER + T11_R3: cpustate->REGW(3) = info->i; break; + case CPUINFO_INT_REGISTER + T11_R4: cpustate->REGW(4) = info->i; break; + case CPUINFO_INT_REGISTER + T11_R5: cpustate->REGW(5) = info->i; break; } } @@ -451,10 +427,12 @@ static CPU_SET_INFO( t11 ) CPU_GET_INFO( t11 ) { + t11_state *cpustate = (device != NULL) ? device->token : NULL; + switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(t11); break; + case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(t11_state); break; case CPUINFO_INT_INPUT_LINES: info->i = 4; break; case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = -1; break; case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; @@ -475,36 +453,34 @@ CPU_GET_INFO( t11 ) case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ0: info->i = (t11.irq_state & 1) ? ASSERT_LINE : CLEAR_LINE; break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ1: info->i = (t11.irq_state & 2) ? ASSERT_LINE : CLEAR_LINE; break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ2: info->i = (t11.irq_state & 4) ? ASSERT_LINE : CLEAR_LINE; break; - case CPUINFO_INT_INPUT_STATE + T11_IRQ3: info->i = (t11.irq_state & 8) ? ASSERT_LINE : CLEAR_LINE; break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ0: info->i = (cpustate->irq_state & 1) ? ASSERT_LINE : CLEAR_LINE; break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ1: info->i = (cpustate->irq_state & 2) ? ASSERT_LINE : CLEAR_LINE; break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ2: info->i = (cpustate->irq_state & 4) ? ASSERT_LINE : CLEAR_LINE; break; + case CPUINFO_INT_INPUT_STATE + T11_IRQ3: info->i = (cpustate->irq_state & 8) ? ASSERT_LINE : CLEAR_LINE; break; - case CPUINFO_INT_PREVIOUSPC: info->i = t11.ppc.w.l; break; + case CPUINFO_INT_PREVIOUSPC: info->i = cpustate->ppc.w.l; break; case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + T11_PC: info->i = PCD; break; + case CPUINFO_INT_REGISTER + T11_PC: info->i = cpustate->PCD; break; case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + T11_SP: info->i = SPD; break; - case CPUINFO_INT_REGISTER + T11_PSW: info->i = PSW; break; - case CPUINFO_INT_REGISTER + T11_R0: info->i = REGD(0); break; - case CPUINFO_INT_REGISTER + T11_R1: info->i = REGD(1); break; - case CPUINFO_INT_REGISTER + T11_R2: info->i = REGD(2); break; - case CPUINFO_INT_REGISTER + T11_R3: info->i = REGD(3); break; - case CPUINFO_INT_REGISTER + T11_R4: info->i = REGD(4); break; - case CPUINFO_INT_REGISTER + T11_R5: info->i = REGD(5); break; + case CPUINFO_INT_REGISTER + T11_SP: info->i = cpustate->SPD; break; + case CPUINFO_INT_REGISTER + T11_PSW: info->i = cpustate->PSW; break; + case CPUINFO_INT_REGISTER + T11_R0: info->i = cpustate->REGD(0); break; + case CPUINFO_INT_REGISTER + T11_R1: info->i = cpustate->REGD(1); break; + case CPUINFO_INT_REGISTER + T11_R2: info->i = cpustate->REGD(2); break; + case CPUINFO_INT_REGISTER + T11_R3: info->i = cpustate->REGD(3); break; + case CPUINFO_INT_REGISTER + T11_R4: info->i = cpustate->REGD(4); break; + case CPUINFO_INT_REGISTER + T11_R5: info->i = cpustate->REGD(5); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(t11); break; - case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(t11); break; - case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(t11); break; - case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(t11); break; + case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(t11); break; + case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(t11); break; + case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(t11); break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(t11); break; - case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(t11); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(t11); break; - case CPUINFO_PTR_BURN: info->burn = NULL; break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(t11); break; - case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &t11_ICount; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(t11); break; + case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "T11"); break; @@ -515,24 +491,24 @@ CPU_GET_INFO( t11 ) case CPUINFO_STR_FLAGS: sprintf(info->s, "%c%c%c%c%c%c%c%c", - t11.psw.b.l & 0x80 ? '?':'.', - t11.psw.b.l & 0x40 ? 'I':'.', - t11.psw.b.l & 0x20 ? 'I':'.', - t11.psw.b.l & 0x10 ? 'T':'.', - t11.psw.b.l & 0x08 ? 'N':'.', - t11.psw.b.l & 0x04 ? 'Z':'.', - t11.psw.b.l & 0x02 ? 'V':'.', - t11.psw.b.l & 0x01 ? 'C':'.'); + cpustate->psw.b.l & 0x80 ? '?':'.', + cpustate->psw.b.l & 0x40 ? 'I':'.', + cpustate->psw.b.l & 0x20 ? 'I':'.', + cpustate->psw.b.l & 0x10 ? 'T':'.', + cpustate->psw.b.l & 0x08 ? 'N':'.', + cpustate->psw.b.l & 0x04 ? 'Z':'.', + cpustate->psw.b.l & 0x02 ? 'V':'.', + cpustate->psw.b.l & 0x01 ? 'C':'.'); break; - case CPUINFO_STR_REGISTER + T11_PC: sprintf(info->s, "PC:%04X", t11.reg[7].w.l); break; - case CPUINFO_STR_REGISTER + T11_SP: sprintf(info->s, "SP:%04X", t11.reg[6].w.l); break; - case CPUINFO_STR_REGISTER + T11_PSW: sprintf(info->s, "PSW:%02X", t11.psw.b.l); break; - case CPUINFO_STR_REGISTER + T11_R0: sprintf(info->s, "R0:%04X", t11.reg[0].w.l); break; - case CPUINFO_STR_REGISTER + T11_R1: sprintf(info->s, "R1:%04X", t11.reg[1].w.l); break; - case CPUINFO_STR_REGISTER + T11_R2: sprintf(info->s, "R2:%04X", t11.reg[2].w.l); break; - case CPUINFO_STR_REGISTER + T11_R3: sprintf(info->s, "R3:%04X", t11.reg[3].w.l); break; - case CPUINFO_STR_REGISTER + T11_R4: sprintf(info->s, "R4:%04X", t11.reg[4].w.l); break; - case CPUINFO_STR_REGISTER + T11_R5: sprintf(info->s, "R5:%04X", t11.reg[5].w.l); break; + case CPUINFO_STR_REGISTER + T11_PC: sprintf(info->s, "PC:%04X", cpustate->reg[7].w.l); break; + case CPUINFO_STR_REGISTER + T11_SP: sprintf(info->s, "SP:%04X", cpustate->reg[6].w.l); break; + case CPUINFO_STR_REGISTER + T11_PSW: sprintf(info->s, "PSW:%02X", cpustate->psw.b.l); break; + case CPUINFO_STR_REGISTER + T11_R0: sprintf(info->s, "R0:%04X", cpustate->reg[0].w.l); break; + case CPUINFO_STR_REGISTER + T11_R1: sprintf(info->s, "R1:%04X", cpustate->reg[1].w.l); break; + case CPUINFO_STR_REGISTER + T11_R2: sprintf(info->s, "R2:%04X", cpustate->reg[2].w.l); break; + case CPUINFO_STR_REGISTER + T11_R3: sprintf(info->s, "R3:%04X", cpustate->reg[3].w.l); break; + case CPUINFO_STR_REGISTER + T11_R4: sprintf(info->s, "R4:%04X", cpustate->reg[4].w.l); break; + case CPUINFO_STR_REGISTER + T11_R5: sprintf(info->s, "R5:%04X", cpustate->reg[5].w.l); break; } } diff --git a/src/emu/cpu/t11/t11.h b/src/emu/cpu/t11/t11.h index 06204b4d08d..4e04b145d34 100644 --- a/src/emu/cpu/t11/t11.h +++ b/src/emu/cpu/t11/t11.h @@ -38,14 +38,14 @@ extern CPU_GET_INFO( t11 ); /****************************************************************************/ /* Read a byte from given memory location */ /****************************************************************************/ -#define T11_RDMEM(A) ((unsigned)memory_read_byte_16le(t11.program, A)) -#define T11_RDMEM_WORD(A) ((unsigned)memory_read_word_16le(t11.program, A)) +#define T11_RDMEM(T,A) ((unsigned)memory_read_byte_16le((T)->program, A)) +#define T11_RDMEM_WORD(T,A) ((unsigned)memory_read_word_16le((T)->program, A)) /****************************************************************************/ /* Write a byte to given memory location */ /****************************************************************************/ -#define T11_WRMEM(A,V) (memory_write_byte_16le(t11.program, A,V)) -#define T11_WRMEM_WORD(A,V) (memory_write_word_16le(t11.program, A,V)) +#define T11_WRMEM(T,A,V) (memory_write_byte_16le((T)->program, A,V)) +#define T11_WRMEM_WORD(T,A,V) (memory_write_word_16le((T)->program, A,V)) CPU_DISASSEMBLE( t11 ); diff --git a/src/emu/cpu/t11/t11ops.c b/src/emu/cpu/t11/t11ops.c index ed51fe3876e..c700d943183 100644 --- a/src/emu/cpu/t11/t11ops.c +++ b/src/emu/cpu/t11/t11ops.c @@ -10,117 +10,117 @@ /* given a register index 'r', this computes the effective address for a byte-sized operation and puts the result in 'ea' */ -#define MAKE_EAB_RGD(r) ea = REGD(r) -#define MAKE_EAB_IN(r) ea = REGD(r); REGW(r) += ((r) < 6 ? 1 : 2) -#define MAKE_EAB_INS(r) ea = REGD(r); REGW(r) += ((r) < 6 ? 1 : 2) -#define MAKE_EAB_IND(r) ea = REGD(r); REGW(r) += 2; ea = RWORD(ea) -#define MAKE_EAB_DE(r) REGW(r) -= ((r) < 6 ? 1 : 2); ea = REGD(r) -#define MAKE_EAB_DED(r) REGW(r) -= 2; ea = REGD(r); ea = RWORD(ea) -#define MAKE_EAB_IX(r) ea = ROPCODE(); ea = (ea + REGD(r)) & 0xffff -#define MAKE_EAB_IXD(r) ea = ROPCODE(); ea = (ea + REGD(r)) & 0xffff; ea = RWORD(ea) +#define MAKE_EAB_RGD(r) ea = cpustate->REGD(r) +#define MAKE_EAB_IN(r) ea = cpustate->REGD(r); cpustate->REGW(r) += ((r) < 6 ? 1 : 2) +#define MAKE_EAB_INS(r) ea = cpustate->REGD(r); cpustate->REGW(r) += ((r) < 6 ? 1 : 2) +#define MAKE_EAB_IND(r) ea = cpustate->REGD(r); cpustate->REGW(r) += 2; ea = RWORD(cpustate, ea) +#define MAKE_EAB_DE(r) cpustate->REGW(r) -= ((r) < 6 ? 1 : 2); ea = cpustate->REGD(r) +#define MAKE_EAB_DED(r) cpustate->REGW(r) -= 2; ea = cpustate->REGD(r); ea = RWORD(cpustate, ea) +#define MAKE_EAB_IX(r) ea = ROPCODE(cpustate); ea = (ea + cpustate->REGD(r)) & 0xffff +#define MAKE_EAB_IXD(r) ea = ROPCODE(cpustate); ea = (ea + cpustate->REGD(r)) & 0xffff; ea = RWORD(cpustate, ea) /* given a register index 'r', this computes the effective address for a word-sized operation and puts the result in 'ea' */ /* note that word accesses ignore the low bit!! this fixes APB! */ #define MAKE_EAW_RGD(r) MAKE_EAB_RGD(r) -#define MAKE_EAW_IN(r) ea = REGD(r); REGW(r) += 2 +#define MAKE_EAW_IN(r) ea = cpustate->REGD(r); cpustate->REGW(r) += 2 #define MAKE_EAW_IND(r) MAKE_EAB_IND(r) -#define MAKE_EAW_DE(r) REGW(r) -= 2; ea = REGD(r) +#define MAKE_EAW_DE(r) cpustate->REGW(r) -= 2; ea = cpustate->REGD(r) #define MAKE_EAW_DED(r) MAKE_EAB_DED(r) #define MAKE_EAW_IX(r) MAKE_EAB_IX(r) #define MAKE_EAW_IXD(r) MAKE_EAB_IXD(r) /* extracts the source/destination register index from the opcode into 'sreg' or 'dreg' */ -#define GET_SREG sreg = (t11.op >> 6) & 7 -#define GET_DREG dreg = t11.op & 7 +#define GET_SREG sreg = (op >> 6) & 7 +#define GET_DREG dreg = op & 7 /* for a byte-sized source operand: extracts 'sreg', computes 'ea', and loads the value into 'source' */ -#define GET_SB_RG GET_SREG; source = REGB(sreg) -#define GET_SB_RGD GET_SREG; MAKE_EAB_RGD(sreg); source = RBYTE(ea) -#define GET_SB_IN GET_SREG; if (sreg == 7) { source = ROPCODE(); } else { MAKE_EAB_IN(sreg); source = RBYTE(ea); } -#define GET_SB_IND GET_SREG; if (sreg == 7) { ea = ROPCODE(); } else { MAKE_EAB_IND(sreg); } source = RBYTE(ea) -#define GET_SB_DE GET_SREG; MAKE_EAB_DE(sreg); source = RBYTE(ea) -#define GET_SB_DED GET_SREG; MAKE_EAB_DED(sreg); source = RBYTE(ea) -#define GET_SB_IX GET_SREG; MAKE_EAB_IX(sreg); source = RBYTE(ea) -#define GET_SB_IXD GET_SREG; MAKE_EAB_IXD(sreg); source = RBYTE(ea) +#define GET_SB_RG GET_SREG; source = cpustate->REGB(sreg) +#define GET_SB_RGD GET_SREG; MAKE_EAB_RGD(sreg); source = RBYTE(cpustate, ea) +#define GET_SB_IN GET_SREG; if (sreg == 7) { source = ROPCODE(cpustate); } else { MAKE_EAB_IN(sreg); source = RBYTE(cpustate, ea); } +#define GET_SB_IND GET_SREG; if (sreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAB_IND(sreg); } source = RBYTE(cpustate, ea) +#define GET_SB_DE GET_SREG; MAKE_EAB_DE(sreg); source = RBYTE(cpustate, ea) +#define GET_SB_DED GET_SREG; MAKE_EAB_DED(sreg); source = RBYTE(cpustate, ea) +#define GET_SB_IX GET_SREG; MAKE_EAB_IX(sreg); source = RBYTE(cpustate, ea) +#define GET_SB_IXD GET_SREG; MAKE_EAB_IXD(sreg); source = RBYTE(cpustate, ea) /* for a word-sized source operand: extracts 'sreg', computes 'ea', and loads the value into 'source' */ -#define GET_SW_RG GET_SREG; source = REGD(sreg) -#define GET_SW_RGD GET_SREG; MAKE_EAW_RGD(sreg); source = RWORD(ea) -#define GET_SW_IN GET_SREG; if (sreg == 7) { source = ROPCODE(); } else { MAKE_EAW_IN(sreg); source = RWORD(ea); } -#define GET_SW_IND GET_SREG; if (sreg == 7) { ea = ROPCODE(); } else { MAKE_EAW_IND(sreg); } source = RWORD(ea) -#define GET_SW_DE GET_SREG; MAKE_EAW_DE(sreg); source = RWORD(ea) -#define GET_SW_DED GET_SREG; MAKE_EAW_DED(sreg); source = RWORD(ea) -#define GET_SW_IX GET_SREG; MAKE_EAW_IX(sreg); source = RWORD(ea) -#define GET_SW_IXD GET_SREG; MAKE_EAW_IXD(sreg); source = RWORD(ea) +#define GET_SW_RG GET_SREG; source = cpustate->REGD(sreg) +#define GET_SW_RGD GET_SREG; MAKE_EAW_RGD(sreg); source = RWORD(cpustate, ea) +#define GET_SW_IN GET_SREG; if (sreg == 7) { source = ROPCODE(cpustate); } else { MAKE_EAW_IN(sreg); source = RWORD(cpustate, ea); } +#define GET_SW_IND GET_SREG; if (sreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAW_IND(sreg); } source = RWORD(cpustate, ea) +#define GET_SW_DE GET_SREG; MAKE_EAW_DE(sreg); source = RWORD(cpustate, ea) +#define GET_SW_DED GET_SREG; MAKE_EAW_DED(sreg); source = RWORD(cpustate, ea) +#define GET_SW_IX GET_SREG; MAKE_EAW_IX(sreg); source = RWORD(cpustate, ea) +#define GET_SW_IXD GET_SREG; MAKE_EAW_IXD(sreg); source = RWORD(cpustate, ea) /* for a byte-sized destination operand: extracts 'dreg', computes 'ea', and loads the value into 'dest' */ -#define GET_DB_RG GET_DREG; dest = REGB(dreg) -#define GET_DB_RGD GET_DREG; MAKE_EAB_RGD(dreg); dest = RBYTE(ea) -#define GET_DB_IN GET_DREG; MAKE_EAB_IN(dreg); dest = RBYTE(ea) -#define GET_DB_IND GET_DREG; if (dreg == 7) { ea = ROPCODE(); } else { MAKE_EAB_IND(dreg); } dest = RBYTE(ea) -#define GET_DB_DE GET_DREG; MAKE_EAB_DE(dreg); dest = RBYTE(ea) -#define GET_DB_DED GET_DREG; MAKE_EAB_DED(dreg); dest = RBYTE(ea) -#define GET_DB_IX GET_DREG; MAKE_EAB_IX(dreg); dest = RBYTE(ea) -#define GET_DB_IXD GET_DREG; MAKE_EAB_IXD(dreg); dest = RBYTE(ea) +#define GET_DB_RG GET_DREG; dest = cpustate->REGB(dreg) +#define GET_DB_RGD GET_DREG; MAKE_EAB_RGD(dreg); dest = RBYTE(cpustate, ea) +#define GET_DB_IN GET_DREG; MAKE_EAB_IN(dreg); dest = RBYTE(cpustate, ea) +#define GET_DB_IND GET_DREG; if (dreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAB_IND(dreg); } dest = RBYTE(cpustate, ea) +#define GET_DB_DE GET_DREG; MAKE_EAB_DE(dreg); dest = RBYTE(cpustate, ea) +#define GET_DB_DED GET_DREG; MAKE_EAB_DED(dreg); dest = RBYTE(cpustate, ea) +#define GET_DB_IX GET_DREG; MAKE_EAB_IX(dreg); dest = RBYTE(cpustate, ea) +#define GET_DB_IXD GET_DREG; MAKE_EAB_IXD(dreg); dest = RBYTE(cpustate, ea) /* for a word-sized destination operand: extracts 'dreg', computes 'ea', and loads the value into 'dest' */ -#define GET_DW_RG GET_DREG; dest = REGD(dreg) -#define GET_DW_RGD GET_DREG; MAKE_EAW_RGD(dreg); dest = RWORD(ea) -#define GET_DW_IN GET_DREG; MAKE_EAW_IN(dreg); dest = RWORD(ea) -#define GET_DW_IND GET_DREG; if (dreg == 7) { ea = ROPCODE(); } else { MAKE_EAW_IND(dreg); } dest = RWORD(ea) -#define GET_DW_DE GET_DREG; MAKE_EAW_DE(dreg); dest = RWORD(ea) -#define GET_DW_DED GET_DREG; MAKE_EAW_DED(dreg); dest = RWORD(ea) -#define GET_DW_IX GET_DREG; MAKE_EAW_IX(dreg); dest = RWORD(ea) -#define GET_DW_IXD GET_DREG; MAKE_EAW_IXD(dreg); dest = RWORD(ea) +#define GET_DW_RG GET_DREG; dest = cpustate->REGD(dreg) +#define GET_DW_RGD GET_DREG; MAKE_EAW_RGD(dreg); dest = RWORD(cpustate, ea) +#define GET_DW_IN GET_DREG; MAKE_EAW_IN(dreg); dest = RWORD(cpustate, ea) +#define GET_DW_IND GET_DREG; if (dreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAW_IND(dreg); } dest = RWORD(cpustate, ea) +#define GET_DW_DE GET_DREG; MAKE_EAW_DE(dreg); dest = RWORD(cpustate, ea) +#define GET_DW_DED GET_DREG; MAKE_EAW_DED(dreg); dest = RWORD(cpustate, ea) +#define GET_DW_IX GET_DREG; MAKE_EAW_IX(dreg); dest = RWORD(cpustate, ea) +#define GET_DW_IXD GET_DREG; MAKE_EAW_IXD(dreg); dest = RWORD(cpustate, ea) /* writes a value to a previously computed 'ea' */ -#define PUT_DB_EA(v) WBYTE(ea, (v)) -#define PUT_DW_EA(v) WWORD(ea, (v)) +#define PUT_DB_EA(v) WBYTE(cpustate, ea, (v)) +#define PUT_DW_EA(v) WWORD(cpustate, ea, (v)) /* writes a value to a previously computed 'dreg' register */ -#define PUT_DB_DREG(v) REGB(dreg) = (v) -#define PUT_DW_DREG(v) REGW(dreg) = (v) +#define PUT_DB_DREG(v) cpustate->REGB(dreg) = (v) +#define PUT_DW_DREG(v) cpustate->REGW(dreg) = (v) /* for a byte-sized destination operand: extracts 'dreg', computes 'ea', and writes 'v' to it */ -#define PUT_DB_RG(v) GET_DREG; REGB(dreg) = (v) -#define PUT_DB_RGD(v) GET_DREG; MAKE_EAB_RGD(dreg); WBYTE(ea, (v)) -#define PUT_DB_IN(v) GET_DREG; MAKE_EAB_IN(dreg); WBYTE(ea, (v)) -#define PUT_DB_IND(v) GET_DREG; if (dreg == 7) { ea = ROPCODE(); } else { MAKE_EAB_IND(dreg); } WBYTE(ea, (v)) -#define PUT_DB_DE(v) GET_DREG; MAKE_EAB_DE(dreg); WBYTE(ea, (v)) -#define PUT_DB_DED(v) GET_DREG; MAKE_EAB_DED(dreg); WBYTE(ea, (v)) -#define PUT_DB_IX(v) GET_DREG; MAKE_EAB_IX(dreg); WBYTE(ea, (v)) -#define PUT_DB_IXD(v) GET_DREG; MAKE_EAB_IXD(dreg); WBYTE(ea, (v)) +#define PUT_DB_RG(v) GET_DREG; cpustate->REGB(dreg) = (v) +#define PUT_DB_RGD(v) GET_DREG; MAKE_EAB_RGD(dreg); WBYTE(cpustate, ea, (v)) +#define PUT_DB_IN(v) GET_DREG; MAKE_EAB_IN(dreg); WBYTE(cpustate, ea, (v)) +#define PUT_DB_IND(v) GET_DREG; if (dreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAB_IND(dreg); } WBYTE(cpustate, ea, (v)) +#define PUT_DB_DE(v) GET_DREG; MAKE_EAB_DE(dreg); WBYTE(cpustate, ea, (v)) +#define PUT_DB_DED(v) GET_DREG; MAKE_EAB_DED(dreg); WBYTE(cpustate, ea, (v)) +#define PUT_DB_IX(v) GET_DREG; MAKE_EAB_IX(dreg); WBYTE(cpustate, ea, (v)) +#define PUT_DB_IXD(v) GET_DREG; MAKE_EAB_IXD(dreg); WBYTE(cpustate, ea, (v)) /* for a word-sized destination operand: extracts 'dreg', computes 'ea', and writes 'v' to it */ -#define PUT_DW_RG(v) GET_DREG; REGW(dreg) = (v) -#define PUT_DW_RGD(v) GET_DREG; MAKE_EAW_RGD(dreg); WWORD(ea, (v)) -#define PUT_DW_IN(v) GET_DREG; MAKE_EAW_IN(dreg); WWORD(ea, (v)) -#define PUT_DW_IND(v) GET_DREG; if (dreg == 7) { ea = ROPCODE(); } else { MAKE_EAW_IND(dreg); } WWORD(ea, (v)) -#define PUT_DW_DE(v) GET_DREG; MAKE_EAW_DE(dreg); WWORD(ea, (v)) -#define PUT_DW_DED(v) GET_DREG; MAKE_EAW_DED(dreg); WWORD(ea, (v)) -#define PUT_DW_IX(v) GET_DREG; MAKE_EAW_IX(dreg); WWORD(ea, (v)) -#define PUT_DW_IXD(v) GET_DREG; MAKE_EAW_IXD(dreg); WWORD(ea, (v)) +#define PUT_DW_RG(v) GET_DREG; cpustate->REGW(dreg) = (v) +#define PUT_DW_RGD(v) GET_DREG; MAKE_EAW_RGD(dreg); WWORD(cpustate, ea, (v)) +#define PUT_DW_IN(v) GET_DREG; MAKE_EAW_IN(dreg); WWORD(cpustate, ea, (v)) +#define PUT_DW_IND(v) GET_DREG; if (dreg == 7) { ea = ROPCODE(cpustate); } else { MAKE_EAW_IND(dreg); } WWORD(cpustate, ea, (v)) +#define PUT_DW_DE(v) GET_DREG; MAKE_EAW_DE(dreg); WWORD(cpustate, ea, (v)) +#define PUT_DW_DED(v) GET_DREG; MAKE_EAW_DED(dreg); WWORD(cpustate, ea, (v)) +#define PUT_DW_IX(v) GET_DREG; MAKE_EAW_IX(dreg); WWORD(cpustate, ea, (v)) +#define PUT_DW_IXD(v) GET_DREG; MAKE_EAW_IXD(dreg); WWORD(cpustate, ea, (v)) /* flag clearing; must be done before setting */ -#define CLR_ZV (PSW &= ~(ZFLAG | VFLAG)) -#define CLR_NZV (PSW &= ~(NFLAG | ZFLAG | VFLAG)) -#define CLR_NZVC (PSW &= ~(NFLAG | ZFLAG | VFLAG | CFLAG)) +#define CLR_ZV (cpustate->PSW &= ~(ZFLAG | VFLAG)) +#define CLR_NZV (cpustate->PSW &= ~(NFLAG | ZFLAG | VFLAG)) +#define CLR_NZVC (cpustate->PSW &= ~(NFLAG | ZFLAG | VFLAG | CFLAG)) /* set individual flags byte-sized */ -#define SETB_N (PSW |= (result >> 4) & 0x08) -#define SETB_Z (PSW |= ((result & 0xff) == 0) << 2) -#define SETB_V (PSW |= ((source ^ dest ^ result ^ (result >> 1)) >> 6) & 0x02) -#define SETB_C (PSW |= (result >> 8) & 0x01) +#define SETB_N (cpustate->PSW |= (result >> 4) & 0x08) +#define SETB_Z (cpustate->PSW |= ((result & 0xff) == 0) << 2) +#define SETB_V (cpustate->PSW |= ((source ^ dest ^ result ^ (result >> 1)) >> 6) & 0x02) +#define SETB_C (cpustate->PSW |= (result >> 8) & 0x01) #define SETB_NZ SETB_N; SETB_Z #define SETB_NZV SETB_N; SETB_Z; SETB_V #define SETB_NZVC SETB_N; SETB_Z; SETB_V; SETB_C /* set individual flags word-sized */ -#define SETW_N (PSW |= (result >> 12) & 0x08) -#define SETW_Z (PSW |= ((result & 0xffff) == 0) << 2) -#define SETW_V (PSW |= ((source ^ dest ^ result ^ (result >> 1)) >> 14) & 0x02) -#define SETW_C (PSW |= (result >> 16) & 0x01) +#define SETW_N (cpustate->PSW |= (result >> 12) & 0x08) +#define SETW_Z (cpustate->PSW |= ((result & 0xffff) == 0) << 2) +#define SETW_V (cpustate->PSW |= ((source ^ dest ^ result ^ (result >> 1)) >> 14) & 0x02) +#define SETW_C (cpustate->PSW |= (result >> 16) & 0x01) #define SETW_NZ SETW_N; SETW_Z #define SETW_NZV SETW_N; SETW_Z; SETW_V #define SETW_NZVC SETW_N; SETW_Z; SETW_V; SETW_C @@ -136,15 +136,15 @@ #define ADD_X(s,d) int sreg, dreg, source, dest, result, ea; GET_SW_##s; GET_DW_##d; CLR_NZVC; result = dest + source; SETW_NZVC; PUT_DW_DREG(result) #define ADD_M(s,d) int sreg, dreg, source, dest, result, ea; GET_SW_##s; GET_DW_##d; CLR_NZVC; result = dest + source; SETW_NZVC; PUT_DW_EA(result) /* ASL: dst = (dst << 1); C = (dst >> 7) */ -#define ASL_R(d) int dreg, dest, result; GET_DW_##d; CLR_NZVC; result = dest << 1; SETW_NZ; PSW |= (dest >> 15) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_DREG(result) -#define ASL_M(d) int dreg, dest, result, ea; GET_DW_##d; CLR_NZVC; result = dest << 1; SETW_NZ; PSW |= (dest >> 15) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_EA(result) -#define ASLB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = dest << 1; SETB_NZ; PSW |= (dest >> 7) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_DREG(result) -#define ASLB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = dest << 1; SETB_NZ; PSW |= (dest >> 7) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_EA(result) +#define ASL_R(d) int dreg, dest, result; GET_DW_##d; CLR_NZVC; result = dest << 1; SETW_NZ; cpustate->PSW |= (dest >> 15) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_DREG(result) +#define ASL_M(d) int dreg, dest, result, ea; GET_DW_##d; CLR_NZVC; result = dest << 1; SETW_NZ; cpustate->PSW |= (dest >> 15) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_EA(result) +#define ASLB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = dest << 1; SETB_NZ; cpustate->PSW |= (dest >> 7) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_DREG(result) +#define ASLB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = dest << 1; SETB_NZ; cpustate->PSW |= (dest >> 7) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_EA(result) /* ASR: dst = (dst << 1); C = (dst >> 7) */ -#define ASR_R(d) int dreg, dest, result; GET_DW_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x8000); SETW_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_DREG(result) -#define ASR_M(d) int dreg, dest, result, ea; GET_DW_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x8000); SETW_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_EA(result) -#define ASRB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x80); SETB_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_DREG(result) -#define ASRB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x80); SETB_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_EA(result) +#define ASR_R(d) int dreg, dest, result; GET_DW_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x8000); SETW_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_DREG(result) +#define ASR_M(d) int dreg, dest, result, ea; GET_DW_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x8000); SETW_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_EA(result) +#define ASRB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x80); SETB_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_DREG(result) +#define ASRB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = (dest >> 1) | (dest & 0x80); SETB_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_EA(result) /* BIC: dst &= ~src */ #define BIC_R(s,d) int sreg, dreg, source, dest, result; GET_SW_##s; GET_DW_##d; CLR_NZV; result = dest & ~source; SETW_NZ; PUT_DW_DREG(result) #define BIC_X(s,d) int sreg, dreg, source, dest, result, ea; GET_SW_##s; GET_DW_##d; CLR_NZV; result = dest & ~source; SETW_NZ; PUT_DW_DREG(result) @@ -165,7 +165,7 @@ #define BITB_R(s,d) int sreg, dreg, source, dest, result; GET_SB_##s; GET_DB_##d; CLR_NZV; result = dest & source; SETB_NZ; #define BITB_M(s,d) int sreg, dreg, source, dest, result, ea; GET_SB_##s; GET_DB_##d; CLR_NZV; result = dest & source; SETB_NZ; /* BR: if (condition) branch */ -#define BR(c) if (c) { PC += 2 * (signed char)(t11.op & 0xff); } +#define BR(c) if (c) { cpustate->PC += 2 * (signed char)(op & 0xff); } /* CLR: dst = 0 */ #define CLR_R(d) int dreg; PUT_DW_##d(0); CLR_NZVC; SET_Z #define CLR_M(d) int dreg, ea; PUT_DW_##d(0); CLR_NZVC; SET_Z @@ -192,12 +192,12 @@ #define INCB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZV; result = dest + 1; SETB_NZ; if (dest == 0x7f) SET_V; PUT_DB_DREG(result) #define INCB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZV; result = dest + 1; SETB_NZ; if (dest == 0x7f) SET_V; PUT_DB_EA(result) /* JMP: PC = ea */ -#define JMP(d) int dreg, ea; GET_DREG; MAKE_EAW_##d(dreg); PC = ea +#define JMP(d) int dreg, ea; GET_DREG; MAKE_EAW_##d(dreg); cpustate->PC = ea /* JSR: PUSH src, src = PC, PC = ea */ -#define JSR(d) int sreg, dreg, ea; GET_SREG; GET_DREG; MAKE_EAW_##d(dreg); PUSH(REGW(sreg)); REGW(sreg) = PC; PC = ea +#define JSR(d) int sreg, dreg, ea; GET_SREG; GET_DREG; MAKE_EAW_##d(dreg); PUSH(cpustate, cpustate->REGW(sreg)); cpustate->REGW(sreg) = cpustate->PC; cpustate->PC = ea /* MFPS: dst = flags */ -#define MFPS_R(d) int dreg, result; result = PSW; CLR_NZV; SETB_NZ; PUT_DW_##d((signed char)result) -#define MFPS_M(d) int dreg, result, ea; result = PSW; CLR_NZV; SETB_NZ; PUT_DB_##d(result) +#define MFPS_R(d) int dreg, result; result = cpustate->PSW; CLR_NZV; SETB_NZ; PUT_DW_##d((signed char)result) +#define MFPS_M(d) int dreg, result, ea; result = cpustate->PSW; CLR_NZV; SETB_NZ; PUT_DB_##d(result) /* MOV: dst = src */ #define MOV_R(s,d) int sreg, dreg, source, result; GET_SW_##s; CLR_NZV; result = source; SETW_NZ; PUT_DW_##d(result) #define MOV_M(s,d) int sreg, dreg, source, result, ea; GET_SW_##s; CLR_NZV; result = source; SETW_NZ; PUT_DW_##d(result) @@ -205,23 +205,23 @@ #define MOVB_X(s,d) int sreg, dreg, source, result, ea; GET_SB_##s; CLR_NZV; result = source; SETB_NZ; PUT_DW_##d((signed char)result) #define MOVB_M(s,d) int sreg, dreg, source, result, ea; GET_SB_##s; CLR_NZV; result = source; SETB_NZ; PUT_DB_##d(result) /* MTPS: flags = src */ -#define MTPS_R(d) int dreg, dest; GET_DW_##d; PSW = (PSW & ~0xef) | (dest & 0xef); t11_check_irqs() -#define MTPS_M(d) int dreg, dest, ea; GET_DW_##d; PSW = (PSW & ~0xef) | (dest & 0xef); t11_check_irqs() +#define MTPS_R(d) int dreg, dest; GET_DW_##d; cpustate->PSW = (cpustate->PSW & ~0xef) | (dest & 0xef); t11_check_irqs(cpustate) +#define MTPS_M(d) int dreg, dest, ea; GET_DW_##d; cpustate->PSW = (cpustate->PSW & ~0xef) | (dest & 0xef); t11_check_irqs(cpustate) /* NEG: dst = -dst */ #define NEG_R(d) int dreg, dest, result; GET_DW_##d; CLR_NZVC; result = -dest; SETW_NZ; if (dest == 0x8000) SET_V; if (result) SET_C; PUT_DW_DREG(result) #define NEG_M(d) int dreg, dest, result, ea; GET_DW_##d; CLR_NZVC; result = -dest; SETW_NZ; if (dest == 0x8000) SET_V; if (result) SET_C; PUT_DW_EA(result) #define NEGB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = -dest; SETB_NZ; if (dest == 0x80) SET_V; if (result) SET_C; PUT_DB_DREG(result) #define NEGB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = -dest; SETB_NZ; if (dest == 0x80) SET_V; if (result) SET_C; PUT_DB_EA(result) /* ROL: dst = (dst << 1) | C; C = (dst >> 7) */ -#define ROL_R(d) int dreg, dest, result; GET_DW_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETW_NZ; PSW |= (dest >> 15) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_DREG(result) -#define ROL_M(d) int dreg, dest, result, ea; GET_DW_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETW_NZ; PSW |= (dest >> 15) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_EA(result) -#define ROLB_R(d) int dreg, dest, result; GET_DB_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETB_NZ; PSW |= (dest >> 7) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_DREG(result) -#define ROLB_M(d) int dreg, dest, result, ea; GET_DB_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETB_NZ; PSW |= (dest >> 7) & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_EA(result) +#define ROL_R(d) int dreg, dest, result; GET_DW_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETW_NZ; cpustate->PSW |= (dest >> 15) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_DREG(result) +#define ROL_M(d) int dreg, dest, result, ea; GET_DW_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETW_NZ; cpustate->PSW |= (dest >> 15) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_EA(result) +#define ROLB_R(d) int dreg, dest, result; GET_DB_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETB_NZ; cpustate->PSW |= (dest >> 7) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_DREG(result) +#define ROLB_M(d) int dreg, dest, result, ea; GET_DB_##d; result = (dest << 1) | GET_C; CLR_NZVC; SETB_NZ; cpustate->PSW |= (dest >> 7) & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_EA(result) /* ROR: dst = (dst >> 1) | (C << 7); C = dst & 1 */ -#define ROR_R(d) int dreg, dest, result; GET_DW_##d; result = (dest >> 1) | (GET_C << 15); CLR_NZVC; SETW_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_DREG(result) -#define ROR_M(d) int dreg, dest, result, ea; GET_DW_##d; result = (dest >> 1) | (GET_C << 15); CLR_NZVC; SETW_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DW_EA(result) -#define RORB_R(d) int dreg, dest, result; GET_DB_##d; result = (dest >> 1) | (GET_C << 7); CLR_NZVC; SETB_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_DREG(result) -#define RORB_M(d) int dreg, dest, result, ea; GET_DB_##d; result = (dest >> 1) | (GET_C << 7); CLR_NZVC; SETB_NZ; PSW |= dest & 1; PSW |= ((PSW << 1) ^ (PSW >> 2)) & 2; PUT_DB_EA(result) +#define ROR_R(d) int dreg, dest, result; GET_DW_##d; result = (dest >> 1) | (GET_C << 15); CLR_NZVC; SETW_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_DREG(result) +#define ROR_M(d) int dreg, dest, result, ea; GET_DW_##d; result = (dest >> 1) | (GET_C << 15); CLR_NZVC; SETW_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DW_EA(result) +#define RORB_R(d) int dreg, dest, result; GET_DB_##d; result = (dest >> 1) | (GET_C << 7); CLR_NZVC; SETB_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_DREG(result) +#define RORB_M(d) int dreg, dest, result, ea; GET_DB_##d; result = (dest >> 1) | (GET_C << 7); CLR_NZVC; SETB_NZ; cpustate->PSW |= dest & 1; cpustate->PSW |= ((cpustate->PSW << 1) ^ (cpustate->PSW >> 2)) & 2; PUT_DB_EA(result) /* SBC: dst -= C */ #define SBC_R(d) int dreg, source, dest, result; source = GET_C; GET_DW_##d; CLR_NZVC; result = dest - source; SETW_NZVC; PUT_DW_DREG(result) #define SBC_M(d) int dreg, source, dest, result, ea; source = GET_C; GET_DW_##d; CLR_NZVC; result = dest - source; SETW_NZVC; PUT_DW_EA(result) @@ -246,1169 +246,1169 @@ #define TSTB_R(d) int dreg, dest, result; GET_DB_##d; CLR_NZVC; result = dest; SETB_NZ; #define TSTB_M(d) int dreg, dest, result, ea; GET_DB_##d; CLR_NZVC; result = dest; SETB_NZ; /* XOR: dst ^= src */ -#define XOR_R(d) int sreg, dreg, source, dest, result; GET_SREG; source = REGW(sreg); GET_DW_##d; CLR_NZV; result = dest ^ source; SETW_NZ; PUT_DW_DREG(result) -#define XOR_M(d) int sreg, dreg, source, dest, result, ea; GET_SREG; source = REGW(sreg); GET_DW_##d; CLR_NZV; result = dest ^ source; SETW_NZ; PUT_DW_EA(result) +#define XOR_R(d) int sreg, dreg, source, dest, result; GET_SREG; source = cpustate->REGW(sreg); GET_DW_##d; CLR_NZV; result = dest ^ source; SETW_NZ; PUT_DW_DREG(result) +#define XOR_M(d) int sreg, dreg, source, dest, result, ea; GET_SREG; source = cpustate->REGW(sreg); GET_DW_##d; CLR_NZV; result = dest ^ source; SETW_NZ; PUT_DW_EA(result) -static void op_0000(void) +static void op_0000(t11_state *cpustate, UINT16 op) { - switch (t11.op & 0x3f) + switch (op & 0x3f) { - case 0x00: /* HALT */ halt(); break; - case 0x01: /* WAIT */ t11_ICount = 0; t11.wait_state = 1; break; - case 0x02: /* RTI */ t11_ICount -= 24; PC = POP(); PSW = POP(); t11_check_irqs(); break; - case 0x03: /* BPT */ t11_ICount -= 48; PUSH(PSW); PUSH(PC); PC = RWORD(0x0c); PSW = RWORD(0x0e); t11_check_irqs(); break; - case 0x04: /* IOT */ t11_ICount -= 48; PUSH(PSW); PUSH(PC); PC = RWORD(0x10); PSW = RWORD(0x12); t11_check_irqs(); break; - case 0x05: /* RESET */ t11_ICount -= 110; break; - case 0x06: /* RTT */ t11_ICount -= 33; PC = POP(); PSW = POP(); t11_check_irqs(); break; - default: illegal(); break; + case 0x00: /* HALT */ halt(cpustate, op); break; + case 0x01: /* WAIT */ cpustate->icount = 0; cpustate->wait_state = 1; break; + case 0x02: /* RTI */ cpustate->icount -= 24; cpustate->PC = POP(cpustate); cpustate->PSW = POP(cpustate); t11_check_irqs(cpustate); break; + case 0x03: /* BPT */ cpustate->icount -= 48; PUSH(cpustate, cpustate->PSW); PUSH(cpustate, cpustate->PC); cpustate->PC = RWORD(cpustate, 0x0c); cpustate->PSW = RWORD(cpustate, 0x0e); t11_check_irqs(cpustate); break; + case 0x04: /* IOT */ cpustate->icount -= 48; PUSH(cpustate, cpustate->PSW); PUSH(cpustate, cpustate->PC); cpustate->PC = RWORD(cpustate, 0x10); cpustate->PSW = RWORD(cpustate, 0x12); t11_check_irqs(cpustate); break; + case 0x05: /* RESET */ cpustate->icount -= 110; break; + case 0x06: /* RTT */ cpustate->icount -= 33; cpustate->PC = POP(cpustate); cpustate->PSW = POP(cpustate); t11_check_irqs(cpustate); break; + default: illegal(cpustate, op); break; } } -static void halt(void) +static void halt(t11_state *cpustate, UINT16 op) { - t11_ICount -= 48; - PUSH(PSW); - PUSH(PC); - PC = RWORD(0x04); - PSW = RWORD(0x06); - t11_check_irqs(); + cpustate->icount -= 48; + PUSH(cpustate, cpustate->PSW); + PUSH(cpustate, cpustate->PC); + cpustate->PC = RWORD(cpustate, 0x04); + cpustate->PSW = RWORD(cpustate, 0x06); + t11_check_irqs(cpustate); } -static void illegal(void) +static void illegal(t11_state *cpustate, UINT16 op) { - t11_ICount -= 48; - PUSH(PSW); - PUSH(PC); - PC = RWORD(0x08); - PSW = RWORD(0x0a); - t11_check_irqs(); + cpustate->icount -= 48; + PUSH(cpustate, cpustate->PSW); + PUSH(cpustate, cpustate->PC); + cpustate->PC = RWORD(cpustate, 0x08); + cpustate->PSW = RWORD(cpustate, 0x0a); + t11_check_irqs(cpustate); } -static void mark(void) +static void mark(t11_state *cpustate, UINT16 op) { - t11_ICount -= 36; + cpustate->icount -= 36; - SP = SP + 2 * (t11.op & 0x3f); - PC = REGW(5); - REGW(5) = POP(); + cpustate->SP = cpustate->SP + 2 * (op & 0x3f); + cpustate->PC = cpustate->REGW(5); + cpustate->REGW(5) = POP(cpustate); } -static void jmp_rgd(void) { t11_ICount -= 15; { JMP(RGD); } } -static void jmp_in(void) { t11_ICount -= 18; { JMP(IN); } } -static void jmp_ind(void) { t11_ICount -= 18; { JMP(IND); } } -static void jmp_de(void) { t11_ICount -= 18; { JMP(DE); } } -static void jmp_ded(void) { t11_ICount -= 21; { JMP(DED); } } -static void jmp_ix(void) { t11_ICount -= 21; { JMP(IX); } } -static void jmp_ixd(void) { t11_ICount -= 27; { JMP(IXD); } } +static void jmp_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15; { JMP(RGD); } } +static void jmp_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { JMP(IN); } } +static void jmp_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { JMP(IND); } } +static void jmp_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { JMP(DE); } } +static void jmp_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { JMP(DED); } } +static void jmp_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { JMP(IX); } } +static void jmp_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { JMP(IXD); } } -static void rts(void) +static void rts(t11_state *cpustate, UINT16 op) { int dreg; - t11_ICount -= 21; + cpustate->icount -= 21; GET_DREG; - PC = REGD(dreg); - REGW(dreg) = POP(); + cpustate->PC = cpustate->REGD(dreg); + cpustate->REGW(dreg) = POP(cpustate); } -static void ccc(void) { t11_ICount -= 18; { PSW &= ~(t11.op & 15); } } -static void scc(void) { t11_ICount -= 18; { PSW |= (t11.op & 15); } } - -static void swab_rg(void) { t11_ICount -= 12; { SWAB_R(RG); } } -static void swab_rgd(void) { t11_ICount -= 21; { SWAB_M(RGD); } } -static void swab_in(void) { t11_ICount -= 21; { SWAB_M(IN); } } -static void swab_ind(void) { t11_ICount -= 27; { SWAB_M(IND); } } -static void swab_de(void) { t11_ICount -= 24; { SWAB_M(DE); } } -static void swab_ded(void) { t11_ICount -= 30; { SWAB_M(DED); } } -static void swab_ix(void) { t11_ICount -= 30; { SWAB_M(IX); } } -static void swab_ixd(void) { t11_ICount -= 36; { SWAB_M(IXD); } } - -static void br(void) { t11_ICount -= 12; { BR(1); } } -static void bne(void) { t11_ICount -= 12; { BR(!GET_Z); } } -static void beq(void) { t11_ICount -= 12; { BR( GET_Z); } } -static void bge(void) { t11_ICount -= 12; { BR(!((GET_N >> 2) ^ GET_V)); } } -static void blt(void) { t11_ICount -= 12; { BR(((GET_N >> 2) ^ GET_V)); } } -static void bgt(void) { t11_ICount -= 12; { BR(!GET_Z && !((GET_N >> 2) ^ GET_V)); } } -static void ble(void) { t11_ICount -= 12; { BR( GET_Z || ((GET_N >> 2) ^ GET_V)); } } - -static void jsr_rgd(void) { t11_ICount -= 27; { JSR(RGD); } } -static void jsr_in(void) { t11_ICount -= 30; { JSR(IN); } } -static void jsr_ind(void) { t11_ICount -= 30; { JSR(IND); } } -static void jsr_de(void) { t11_ICount -= 30; { JSR(DE); } } -static void jsr_ded(void) { t11_ICount -= 33; { JSR(DED); } } -static void jsr_ix(void) { t11_ICount -= 33; { JSR(IX); } } -static void jsr_ixd(void) { t11_ICount -= 39; { JSR(IXD); } } - -static void clr_rg(void) { t11_ICount -= 12; { CLR_R(RG); } } -static void clr_rgd(void) { t11_ICount -= 21; { CLR_M(RGD); } } -static void clr_in(void) { t11_ICount -= 21; { CLR_M(IN); } } -static void clr_ind(void) { t11_ICount -= 27; { CLR_M(IND); } } -static void clr_de(void) { t11_ICount -= 24; { CLR_M(DE); } } -static void clr_ded(void) { t11_ICount -= 30; { CLR_M(DED); } } -static void clr_ix(void) { t11_ICount -= 30; { CLR_M(IX); } } -static void clr_ixd(void) { t11_ICount -= 36; { CLR_M(IXD); } } - -static void com_rg(void) { t11_ICount -= 12; { COM_R(RG); } } -static void com_rgd(void) { t11_ICount -= 21; { COM_M(RGD); } } -static void com_in(void) { t11_ICount -= 21; { COM_M(IN); } } -static void com_ind(void) { t11_ICount -= 27; { COM_M(IND); } } -static void com_de(void) { t11_ICount -= 24; { COM_M(DE); } } -static void com_ded(void) { t11_ICount -= 30; { COM_M(DED); } } -static void com_ix(void) { t11_ICount -= 30; { COM_M(IX); } } -static void com_ixd(void) { t11_ICount -= 36; { COM_M(IXD); } } - -static void inc_rg(void) { t11_ICount -= 12; { INC_R(RG); } } -static void inc_rgd(void) { t11_ICount -= 21; { INC_M(RGD); } } -static void inc_in(void) { t11_ICount -= 21; { INC_M(IN); } } -static void inc_ind(void) { t11_ICount -= 27; { INC_M(IND); } } -static void inc_de(void) { t11_ICount -= 24; { INC_M(DE); } } -static void inc_ded(void) { t11_ICount -= 30; { INC_M(DED); } } -static void inc_ix(void) { t11_ICount -= 30; { INC_M(IX); } } -static void inc_ixd(void) { t11_ICount -= 36; { INC_M(IXD); } } - -static void dec_rg(void) { t11_ICount -= 12; { DEC_R(RG); } } -static void dec_rgd(void) { t11_ICount -= 21; { DEC_M(RGD); } } -static void dec_in(void) { t11_ICount -= 21; { DEC_M(IN); } } -static void dec_ind(void) { t11_ICount -= 27; { DEC_M(IND); } } -static void dec_de(void) { t11_ICount -= 24; { DEC_M(DE); } } -static void dec_ded(void) { t11_ICount -= 30; { DEC_M(DED); } } -static void dec_ix(void) { t11_ICount -= 30; { DEC_M(IX); } } -static void dec_ixd(void) { t11_ICount -= 36; { DEC_M(IXD); } } - -static void neg_rg(void) { t11_ICount -= 12; { NEG_R(RG); } } -static void neg_rgd(void) { t11_ICount -= 21; { NEG_M(RGD); } } -static void neg_in(void) { t11_ICount -= 21; { NEG_M(IN); } } -static void neg_ind(void) { t11_ICount -= 27; { NEG_M(IND); } } -static void neg_de(void) { t11_ICount -= 24; { NEG_M(DE); } } -static void neg_ded(void) { t11_ICount -= 30; { NEG_M(DED); } } -static void neg_ix(void) { t11_ICount -= 30; { NEG_M(IX); } } -static void neg_ixd(void) { t11_ICount -= 36; { NEG_M(IXD); } } - -static void adc_rg(void) { t11_ICount -= 12; { ADC_R(RG); } } -static void adc_rgd(void) { t11_ICount -= 21; { ADC_M(RGD); } } -static void adc_in(void) { t11_ICount -= 21; { ADC_M(IN); } } -static void adc_ind(void) { t11_ICount -= 27; { ADC_M(IND); } } -static void adc_de(void) { t11_ICount -= 24; { ADC_M(DE); } } -static void adc_ded(void) { t11_ICount -= 30; { ADC_M(DED); } } -static void adc_ix(void) { t11_ICount -= 30; { ADC_M(IX); } } -static void adc_ixd(void) { t11_ICount -= 36; { ADC_M(IXD); } } - -static void sbc_rg(void) { t11_ICount -= 12; { SBC_R(RG); } } -static void sbc_rgd(void) { t11_ICount -= 21; { SBC_M(RGD); } } -static void sbc_in(void) { t11_ICount -= 21; { SBC_M(IN); } } -static void sbc_ind(void) { t11_ICount -= 27; { SBC_M(IND); } } -static void sbc_de(void) { t11_ICount -= 24; { SBC_M(DE); } } -static void sbc_ded(void) { t11_ICount -= 30; { SBC_M(DED); } } -static void sbc_ix(void) { t11_ICount -= 30; { SBC_M(IX); } } -static void sbc_ixd(void) { t11_ICount -= 36; { SBC_M(IXD); } } - -static void tst_rg(void) { t11_ICount -= 12; { TST_R(RG); } } -static void tst_rgd(void) { t11_ICount -= 18; { TST_M(RGD); } } -static void tst_in(void) { t11_ICount -= 18; { TST_M(IN); } } -static void tst_ind(void) { t11_ICount -= 24; { TST_M(IND); } } -static void tst_de(void) { t11_ICount -= 21; { TST_M(DE); } } -static void tst_ded(void) { t11_ICount -= 27; { TST_M(DED); } } -static void tst_ix(void) { t11_ICount -= 27; { TST_M(IX); } } -static void tst_ixd(void) { t11_ICount -= 33; { TST_M(IXD); } } - -static void ror_rg(void) { t11_ICount -= 12; { ROR_R(RG); } } -static void ror_rgd(void) { t11_ICount -= 21; { ROR_M(RGD); } } -static void ror_in(void) { t11_ICount -= 21; { ROR_M(IN); } } -static void ror_ind(void) { t11_ICount -= 27; { ROR_M(IND); } } -static void ror_de(void) { t11_ICount -= 24; { ROR_M(DE); } } -static void ror_ded(void) { t11_ICount -= 30; { ROR_M(DED); } } -static void ror_ix(void) { t11_ICount -= 30; { ROR_M(IX); } } -static void ror_ixd(void) { t11_ICount -= 36; { ROR_M(IXD); } } - -static void rol_rg(void) { t11_ICount -= 12; { ROL_R(RG); } } -static void rol_rgd(void) { t11_ICount -= 21; { ROL_M(RGD); } } -static void rol_in(void) { t11_ICount -= 21; { ROL_M(IN); } } -static void rol_ind(void) { t11_ICount -= 27; { ROL_M(IND); } } -static void rol_de(void) { t11_ICount -= 24; { ROL_M(DE); } } -static void rol_ded(void) { t11_ICount -= 30; { ROL_M(DED); } } -static void rol_ix(void) { t11_ICount -= 30; { ROL_M(IX); } } -static void rol_ixd(void) { t11_ICount -= 36; { ROL_M(IXD); } } - -static void asr_rg(void) { t11_ICount -= 12; { ASR_R(RG); } } -static void asr_rgd(void) { t11_ICount -= 21; { ASR_M(RGD); } } -static void asr_in(void) { t11_ICount -= 21; { ASR_M(IN); } } -static void asr_ind(void) { t11_ICount -= 27; { ASR_M(IND); } } -static void asr_de(void) { t11_ICount -= 24; { ASR_M(DE); } } -static void asr_ded(void) { t11_ICount -= 30; { ASR_M(DED); } } -static void asr_ix(void) { t11_ICount -= 30; { ASR_M(IX); } } -static void asr_ixd(void) { t11_ICount -= 36; { ASR_M(IXD); } } - -static void asl_rg(void) { t11_ICount -= 12; { ASL_R(RG); } } -static void asl_rgd(void) { t11_ICount -= 21; { ASL_M(RGD); } } -static void asl_in(void) { t11_ICount -= 21; { ASL_M(IN); } } -static void asl_ind(void) { t11_ICount -= 27; { ASL_M(IND); } } -static void asl_de(void) { t11_ICount -= 24; { ASL_M(DE); } } -static void asl_ded(void) { t11_ICount -= 30; { ASL_M(DED); } } -static void asl_ix(void) { t11_ICount -= 30; { ASL_M(IX); } } -static void asl_ixd(void) { t11_ICount -= 36; { ASL_M(IXD); } } - -static void sxt_rg(void) { t11_ICount -= 12; { SXT_R(RG); } } -static void sxt_rgd(void) { t11_ICount -= 21; { SXT_M(RGD); } } -static void sxt_in(void) { t11_ICount -= 21; { SXT_M(IN); } } -static void sxt_ind(void) { t11_ICount -= 27; { SXT_M(IND); } } -static void sxt_de(void) { t11_ICount -= 24; { SXT_M(DE); } } -static void sxt_ded(void) { t11_ICount -= 30; { SXT_M(DED); } } -static void sxt_ix(void) { t11_ICount -= 30; { SXT_M(IX); } } -static void sxt_ixd(void) { t11_ICount -= 36; { SXT_M(IXD); } } - -static void mov_rg_rg(void) { t11_ICount -= 9+ 3; { MOV_R(RG,RG); } } -static void mov_rg_rgd(void) { t11_ICount -= 9+12; { MOV_M(RG,RGD); } } -static void mov_rg_in(void) { t11_ICount -= 9+12; { MOV_M(RG,IN); } } -static void mov_rg_ind(void) { t11_ICount -= 9+18; { MOV_M(RG,IND); } } -static void mov_rg_de(void) { t11_ICount -= 9+15; { MOV_M(RG,DE); } } -static void mov_rg_ded(void) { t11_ICount -= 9+21; { MOV_M(RG,DED); } } -static void mov_rg_ix(void) { t11_ICount -= 9+21; { MOV_M(RG,IX); } } -static void mov_rg_ixd(void) { t11_ICount -= 9+27; { MOV_M(RG,IXD); } } -static void mov_rgd_rg(void) { t11_ICount -= 15+ 3; { MOV_M(RGD,RG); } } -static void mov_rgd_rgd(void) { t11_ICount -= 15+12; { MOV_M(RGD,RGD); } } -static void mov_rgd_in(void) { t11_ICount -= 15+12; { MOV_M(RGD,IN); } } -static void mov_rgd_ind(void) { t11_ICount -= 15+18; { MOV_M(RGD,IND); } } -static void mov_rgd_de(void) { t11_ICount -= 15+15; { MOV_M(RGD,DE); } } -static void mov_rgd_ded(void) { t11_ICount -= 15+21; { MOV_M(RGD,DED); } } -static void mov_rgd_ix(void) { t11_ICount -= 15+21; { MOV_M(RGD,IX); } } -static void mov_rgd_ixd(void) { t11_ICount -= 15+27; { MOV_M(RGD,IXD); } } -static void mov_in_rg(void) { t11_ICount -= 15+ 3; { MOV_M(IN,RG); } } -static void mov_in_rgd(void) { t11_ICount -= 15+12; { MOV_M(IN,RGD); } } -static void mov_in_in(void) { t11_ICount -= 15+12; { MOV_M(IN,IN); } } -static void mov_in_ind(void) { t11_ICount -= 15+18; { MOV_M(IN,IND); } } -static void mov_in_de(void) { t11_ICount -= 15+15; { MOV_M(IN,DE); } } -static void mov_in_ded(void) { t11_ICount -= 15+21; { MOV_M(IN,DED); } } -static void mov_in_ix(void) { t11_ICount -= 15+21; { MOV_M(IN,IX); } } -static void mov_in_ixd(void) { t11_ICount -= 15+27; { MOV_M(IN,IXD); } } -static void mov_ind_rg(void) { t11_ICount -= 21+ 3; { MOV_M(IND,RG); } } -static void mov_ind_rgd(void) { t11_ICount -= 21+12; { MOV_M(IND,RGD); } } -static void mov_ind_in(void) { t11_ICount -= 21+12; { MOV_M(IND,IN); } } -static void mov_ind_ind(void) { t11_ICount -= 21+18; { MOV_M(IND,IND); } } -static void mov_ind_de(void) { t11_ICount -= 21+15; { MOV_M(IND,DE); } } -static void mov_ind_ded(void) { t11_ICount -= 21+21; { MOV_M(IND,DED); } } -static void mov_ind_ix(void) { t11_ICount -= 21+21; { MOV_M(IND,IX); } } -static void mov_ind_ixd(void) { t11_ICount -= 21+27; { MOV_M(IND,IXD); } } -static void mov_de_rg(void) { t11_ICount -= 18+ 3; { MOV_M(DE,RG); } } -static void mov_de_rgd(void) { t11_ICount -= 18+12; { MOV_M(DE,RGD); } } -static void mov_de_in(void) { t11_ICount -= 18+12; { MOV_M(DE,IN); } } -static void mov_de_ind(void) { t11_ICount -= 18+18; { MOV_M(DE,IND); } } -static void mov_de_de(void) { t11_ICount -= 18+15; { MOV_M(DE,DE); } } -static void mov_de_ded(void) { t11_ICount -= 18+21; { MOV_M(DE,DED); } } -static void mov_de_ix(void) { t11_ICount -= 18+21; { MOV_M(DE,IX); } } -static void mov_de_ixd(void) { t11_ICount -= 18+27; { MOV_M(DE,IXD); } } -static void mov_ded_rg(void) { t11_ICount -= 24+ 3; { MOV_M(DED,RG); } } -static void mov_ded_rgd(void) { t11_ICount -= 24+12; { MOV_M(DED,RGD); } } -static void mov_ded_in(void) { t11_ICount -= 24+12; { MOV_M(DED,IN); } } -static void mov_ded_ind(void) { t11_ICount -= 24+18; { MOV_M(DED,IND); } } -static void mov_ded_de(void) { t11_ICount -= 24+15; { MOV_M(DED,DE); } } -static void mov_ded_ded(void) { t11_ICount -= 24+21; { MOV_M(DED,DED); } } -static void mov_ded_ix(void) { t11_ICount -= 24+21; { MOV_M(DED,IX); } } -static void mov_ded_ixd(void) { t11_ICount -= 24+27; { MOV_M(DED,IXD); } } -static void mov_ix_rg(void) { t11_ICount -= 24+ 3; { MOV_M(IX,RG); } } -static void mov_ix_rgd(void) { t11_ICount -= 24+12; { MOV_M(IX,RGD); } } -static void mov_ix_in(void) { t11_ICount -= 24+12; { MOV_M(IX,IN); } } -static void mov_ix_ind(void) { t11_ICount -= 24+18; { MOV_M(IX,IND); } } -static void mov_ix_de(void) { t11_ICount -= 24+15; { MOV_M(IX,DE); } } -static void mov_ix_ded(void) { t11_ICount -= 24+21; { MOV_M(IX,DED); } } -static void mov_ix_ix(void) { t11_ICount -= 24+21; { MOV_M(IX,IX); } } -static void mov_ix_ixd(void) { t11_ICount -= 24+27; { MOV_M(IX,IXD); } } -static void mov_ixd_rg(void) { t11_ICount -= 30+ 3; { MOV_M(IXD,RG); } } -static void mov_ixd_rgd(void) { t11_ICount -= 30+12; { MOV_M(IXD,RGD); } } -static void mov_ixd_in(void) { t11_ICount -= 30+12; { MOV_M(IXD,IN); } } -static void mov_ixd_ind(void) { t11_ICount -= 30+18; { MOV_M(IXD,IND); } } -static void mov_ixd_de(void) { t11_ICount -= 30+15; { MOV_M(IXD,DE); } } -static void mov_ixd_ded(void) { t11_ICount -= 30+21; { MOV_M(IXD,DED); } } -static void mov_ixd_ix(void) { t11_ICount -= 30+21; { MOV_M(IXD,IX); } } -static void mov_ixd_ixd(void) { t11_ICount -= 30+27; { MOV_M(IXD,IXD); } } - -static void cmp_rg_rg(void) { t11_ICount -= 9+ 3; { CMP_R(RG,RG); } } -static void cmp_rg_rgd(void) { t11_ICount -= 9+ 9; { CMP_M(RG,RGD); } } -static void cmp_rg_in(void) { t11_ICount -= 9+ 9; { CMP_M(RG,IN); } } -static void cmp_rg_ind(void) { t11_ICount -= 9+15; { CMP_M(RG,IND); } } -static void cmp_rg_de(void) { t11_ICount -= 9+12; { CMP_M(RG,DE); } } -static void cmp_rg_ded(void) { t11_ICount -= 9+18; { CMP_M(RG,DED); } } -static void cmp_rg_ix(void) { t11_ICount -= 9+18; { CMP_M(RG,IX); } } -static void cmp_rg_ixd(void) { t11_ICount -= 9+24; { CMP_M(RG,IXD); } } -static void cmp_rgd_rg(void) { t11_ICount -= 15+ 3; { CMP_M(RGD,RG); } } -static void cmp_rgd_rgd(void) { t11_ICount -= 15+ 9; { CMP_M(RGD,RGD); } } -static void cmp_rgd_in(void) { t11_ICount -= 15+ 9; { CMP_M(RGD,IN); } } -static void cmp_rgd_ind(void) { t11_ICount -= 15+15; { CMP_M(RGD,IND); } } -static void cmp_rgd_de(void) { t11_ICount -= 15+12; { CMP_M(RGD,DE); } } -static void cmp_rgd_ded(void) { t11_ICount -= 15+18; { CMP_M(RGD,DED); } } -static void cmp_rgd_ix(void) { t11_ICount -= 15+18; { CMP_M(RGD,IX); } } -static void cmp_rgd_ixd(void) { t11_ICount -= 15+24; { CMP_M(RGD,IXD); } } -static void cmp_in_rg(void) { t11_ICount -= 15+ 3; { CMP_M(IN,RG); } } -static void cmp_in_rgd(void) { t11_ICount -= 15+ 9; { CMP_M(IN,RGD); } } -static void cmp_in_in(void) { t11_ICount -= 15+ 9; { CMP_M(IN,IN); } } -static void cmp_in_ind(void) { t11_ICount -= 15+15; { CMP_M(IN,IND); } } -static void cmp_in_de(void) { t11_ICount -= 15+12; { CMP_M(IN,DE); } } -static void cmp_in_ded(void) { t11_ICount -= 15+18; { CMP_M(IN,DED); } } -static void cmp_in_ix(void) { t11_ICount -= 15+18; { CMP_M(IN,IX); } } -static void cmp_in_ixd(void) { t11_ICount -= 15+24; { CMP_M(IN,IXD); } } -static void cmp_ind_rg(void) { t11_ICount -= 21+ 3; { CMP_M(IND,RG); } } -static void cmp_ind_rgd(void) { t11_ICount -= 21+ 9; { CMP_M(IND,RGD); } } -static void cmp_ind_in(void) { t11_ICount -= 21+ 9; { CMP_M(IND,IN); } } -static void cmp_ind_ind(void) { t11_ICount -= 21+15; { CMP_M(IND,IND); } } -static void cmp_ind_de(void) { t11_ICount -= 21+12; { CMP_M(IND,DE); } } -static void cmp_ind_ded(void) { t11_ICount -= 21+18; { CMP_M(IND,DED); } } -static void cmp_ind_ix(void) { t11_ICount -= 21+18; { CMP_M(IND,IX); } } -static void cmp_ind_ixd(void) { t11_ICount -= 21+24; { CMP_M(IND,IXD); } } -static void cmp_de_rg(void) { t11_ICount -= 18+ 3; { CMP_M(DE,RG); } } -static void cmp_de_rgd(void) { t11_ICount -= 18+ 9; { CMP_M(DE,RGD); } } -static void cmp_de_in(void) { t11_ICount -= 18+ 9; { CMP_M(DE,IN); } } -static void cmp_de_ind(void) { t11_ICount -= 18+15; { CMP_M(DE,IND); } } -static void cmp_de_de(void) { t11_ICount -= 18+12; { CMP_M(DE,DE); } } -static void cmp_de_ded(void) { t11_ICount -= 18+18; { CMP_M(DE,DED); } } -static void cmp_de_ix(void) { t11_ICount -= 18+18; { CMP_M(DE,IX); } } -static void cmp_de_ixd(void) { t11_ICount -= 18+24; { CMP_M(DE,IXD); } } -static void cmp_ded_rg(void) { t11_ICount -= 24+ 3; { CMP_M(DED,RG); } } -static void cmp_ded_rgd(void) { t11_ICount -= 24+ 9; { CMP_M(DED,RGD); } } -static void cmp_ded_in(void) { t11_ICount -= 24+ 9; { CMP_M(DED,IN); } } -static void cmp_ded_ind(void) { t11_ICount -= 24+15; { CMP_M(DED,IND); } } -static void cmp_ded_de(void) { t11_ICount -= 24+12; { CMP_M(DED,DE); } } -static void cmp_ded_ded(void) { t11_ICount -= 24+18; { CMP_M(DED,DED); } } -static void cmp_ded_ix(void) { t11_ICount -= 24+18; { CMP_M(DED,IX); } } -static void cmp_ded_ixd(void) { t11_ICount -= 24+24; { CMP_M(DED,IXD); } } -static void cmp_ix_rg(void) { t11_ICount -= 24+ 3; { CMP_M(IX,RG); } } -static void cmp_ix_rgd(void) { t11_ICount -= 24+ 9; { CMP_M(IX,RGD); } } -static void cmp_ix_in(void) { t11_ICount -= 24+ 9; { CMP_M(IX,IN); } } -static void cmp_ix_ind(void) { t11_ICount -= 24+15; { CMP_M(IX,IND); } } -static void cmp_ix_de(void) { t11_ICount -= 24+12; { CMP_M(IX,DE); } } -static void cmp_ix_ded(void) { t11_ICount -= 24+18; { CMP_M(IX,DED); } } -static void cmp_ix_ix(void) { t11_ICount -= 24+18; { CMP_M(IX,IX); } } -static void cmp_ix_ixd(void) { t11_ICount -= 24+24; { CMP_M(IX,IXD); } } -static void cmp_ixd_rg(void) { t11_ICount -= 30+ 3; { CMP_M(IXD,RG); } } -static void cmp_ixd_rgd(void) { t11_ICount -= 30+ 9; { CMP_M(IXD,RGD); } } -static void cmp_ixd_in(void) { t11_ICount -= 30+ 9; { CMP_M(IXD,IN); } } -static void cmp_ixd_ind(void) { t11_ICount -= 30+15; { CMP_M(IXD,IND); } } -static void cmp_ixd_de(void) { t11_ICount -= 30+12; { CMP_M(IXD,DE); } } -static void cmp_ixd_ded(void) { t11_ICount -= 30+18; { CMP_M(IXD,DED); } } -static void cmp_ixd_ix(void) { t11_ICount -= 30+18; { CMP_M(IXD,IX); } } -static void cmp_ixd_ixd(void) { t11_ICount -= 30+24; { CMP_M(IXD,IXD); } } - -static void bit_rg_rg(void) { t11_ICount -= 9+ 3; { BIT_R(RG,RG); } } -static void bit_rg_rgd(void) { t11_ICount -= 9+ 9; { BIT_M(RG,RGD); } } -static void bit_rg_in(void) { t11_ICount -= 9+ 9; { BIT_M(RG,IN); } } -static void bit_rg_ind(void) { t11_ICount -= 9+15; { BIT_M(RG,IND); } } -static void bit_rg_de(void) { t11_ICount -= 9+12; { BIT_M(RG,DE); } } -static void bit_rg_ded(void) { t11_ICount -= 9+18; { BIT_M(RG,DED); } } -static void bit_rg_ix(void) { t11_ICount -= 9+18; { BIT_M(RG,IX); } } -static void bit_rg_ixd(void) { t11_ICount -= 9+24; { BIT_M(RG,IXD); } } -static void bit_rgd_rg(void) { t11_ICount -= 15+ 3; { BIT_M(RGD,RG); } } -static void bit_rgd_rgd(void) { t11_ICount -= 15+ 9; { BIT_M(RGD,RGD); } } -static void bit_rgd_in(void) { t11_ICount -= 15+ 9; { BIT_M(RGD,IN); } } -static void bit_rgd_ind(void) { t11_ICount -= 15+15; { BIT_M(RGD,IND); } } -static void bit_rgd_de(void) { t11_ICount -= 15+12; { BIT_M(RGD,DE); } } -static void bit_rgd_ded(void) { t11_ICount -= 15+18; { BIT_M(RGD,DED); } } -static void bit_rgd_ix(void) { t11_ICount -= 15+18; { BIT_M(RGD,IX); } } -static void bit_rgd_ixd(void) { t11_ICount -= 15+24; { BIT_M(RGD,IXD); } } -static void bit_in_rg(void) { t11_ICount -= 15+ 3; { BIT_M(IN,RG); } } -static void bit_in_rgd(void) { t11_ICount -= 15+ 9; { BIT_M(IN,RGD); } } -static void bit_in_in(void) { t11_ICount -= 15+ 9; { BIT_M(IN,IN); } } -static void bit_in_ind(void) { t11_ICount -= 15+15; { BIT_M(IN,IND); } } -static void bit_in_de(void) { t11_ICount -= 15+12; { BIT_M(IN,DE); } } -static void bit_in_ded(void) { t11_ICount -= 15+18; { BIT_M(IN,DED); } } -static void bit_in_ix(void) { t11_ICount -= 15+18; { BIT_M(IN,IX); } } -static void bit_in_ixd(void) { t11_ICount -= 15+24; { BIT_M(IN,IXD); } } -static void bit_ind_rg(void) { t11_ICount -= 21+ 3; { BIT_M(IND,RG); } } -static void bit_ind_rgd(void) { t11_ICount -= 21+ 9; { BIT_M(IND,RGD); } } -static void bit_ind_in(void) { t11_ICount -= 21+ 9; { BIT_M(IND,IN); } } -static void bit_ind_ind(void) { t11_ICount -= 21+15; { BIT_M(IND,IND); } } -static void bit_ind_de(void) { t11_ICount -= 21+12; { BIT_M(IND,DE); } } -static void bit_ind_ded(void) { t11_ICount -= 21+18; { BIT_M(IND,DED); } } -static void bit_ind_ix(void) { t11_ICount -= 21+18; { BIT_M(IND,IX); } } -static void bit_ind_ixd(void) { t11_ICount -= 21+24; { BIT_M(IND,IXD); } } -static void bit_de_rg(void) { t11_ICount -= 18+ 3; { BIT_M(DE,RG); } } -static void bit_de_rgd(void) { t11_ICount -= 18+ 9; { BIT_M(DE,RGD); } } -static void bit_de_in(void) { t11_ICount -= 18+ 9; { BIT_M(DE,IN); } } -static void bit_de_ind(void) { t11_ICount -= 18+15; { BIT_M(DE,IND); } } -static void bit_de_de(void) { t11_ICount -= 18+12; { BIT_M(DE,DE); } } -static void bit_de_ded(void) { t11_ICount -= 18+18; { BIT_M(DE,DED); } } -static void bit_de_ix(void) { t11_ICount -= 18+18; { BIT_M(DE,IX); } } -static void bit_de_ixd(void) { t11_ICount -= 18+24; { BIT_M(DE,IXD); } } -static void bit_ded_rg(void) { t11_ICount -= 24+ 3; { BIT_M(DED,RG); } } -static void bit_ded_rgd(void) { t11_ICount -= 24+ 9; { BIT_M(DED,RGD); } } -static void bit_ded_in(void) { t11_ICount -= 24+ 9; { BIT_M(DED,IN); } } -static void bit_ded_ind(void) { t11_ICount -= 24+15; { BIT_M(DED,IND); } } -static void bit_ded_de(void) { t11_ICount -= 24+12; { BIT_M(DED,DE); } } -static void bit_ded_ded(void) { t11_ICount -= 24+18; { BIT_M(DED,DED); } } -static void bit_ded_ix(void) { t11_ICount -= 24+18; { BIT_M(DED,IX); } } -static void bit_ded_ixd(void) { t11_ICount -= 24+24; { BIT_M(DED,IXD); } } -static void bit_ix_rg(void) { t11_ICount -= 24+ 3; { BIT_M(IX,RG); } } -static void bit_ix_rgd(void) { t11_ICount -= 24+ 9; { BIT_M(IX,RGD); } } -static void bit_ix_in(void) { t11_ICount -= 24+ 9; { BIT_M(IX,IN); } } -static void bit_ix_ind(void) { t11_ICount -= 24+15; { BIT_M(IX,IND); } } -static void bit_ix_de(void) { t11_ICount -= 24+12; { BIT_M(IX,DE); } } -static void bit_ix_ded(void) { t11_ICount -= 24+18; { BIT_M(IX,DED); } } -static void bit_ix_ix(void) { t11_ICount -= 24+18; { BIT_M(IX,IX); } } -static void bit_ix_ixd(void) { t11_ICount -= 24+24; { BIT_M(IX,IXD); } } -static void bit_ixd_rg(void) { t11_ICount -= 30+ 3; { BIT_M(IXD,RG); } } -static void bit_ixd_rgd(void) { t11_ICount -= 30+ 9; { BIT_M(IXD,RGD); } } -static void bit_ixd_in(void) { t11_ICount -= 30+ 9; { BIT_M(IXD,IN); } } -static void bit_ixd_ind(void) { t11_ICount -= 30+15; { BIT_M(IXD,IND); } } -static void bit_ixd_de(void) { t11_ICount -= 30+12; { BIT_M(IXD,DE); } } -static void bit_ixd_ded(void) { t11_ICount -= 30+18; { BIT_M(IXD,DED); } } -static void bit_ixd_ix(void) { t11_ICount -= 30+18; { BIT_M(IXD,IX); } } -static void bit_ixd_ixd(void) { t11_ICount -= 30+24; { BIT_M(IXD,IXD); } } - -static void bic_rg_rg(void) { t11_ICount -= 9+ 3; { BIC_R(RG,RG); } } -static void bic_rg_rgd(void) { t11_ICount -= 9+12; { BIC_M(RG,RGD); } } -static void bic_rg_in(void) { t11_ICount -= 9+12; { BIC_M(RG,IN); } } -static void bic_rg_ind(void) { t11_ICount -= 9+18; { BIC_M(RG,IND); } } -static void bic_rg_de(void) { t11_ICount -= 9+15; { BIC_M(RG,DE); } } -static void bic_rg_ded(void) { t11_ICount -= 9+21; { BIC_M(RG,DED); } } -static void bic_rg_ix(void) { t11_ICount -= 9+21; { BIC_M(RG,IX); } } -static void bic_rg_ixd(void) { t11_ICount -= 9+27; { BIC_M(RG,IXD); } } -static void bic_rgd_rg(void) { t11_ICount -= 15+ 3; { BIC_X(RGD,RG); } } -static void bic_rgd_rgd(void) { t11_ICount -= 15+12; { BIC_M(RGD,RGD); } } -static void bic_rgd_in(void) { t11_ICount -= 15+12; { BIC_M(RGD,IN); } } -static void bic_rgd_ind(void) { t11_ICount -= 15+18; { BIC_M(RGD,IND); } } -static void bic_rgd_de(void) { t11_ICount -= 15+15; { BIC_M(RGD,DE); } } -static void bic_rgd_ded(void) { t11_ICount -= 15+21; { BIC_M(RGD,DED); } } -static void bic_rgd_ix(void) { t11_ICount -= 15+21; { BIC_M(RGD,IX); } } -static void bic_rgd_ixd(void) { t11_ICount -= 15+27; { BIC_M(RGD,IXD); } } -static void bic_in_rg(void) { t11_ICount -= 15+ 3; { BIC_X(IN,RG); } } -static void bic_in_rgd(void) { t11_ICount -= 15+12; { BIC_M(IN,RGD); } } -static void bic_in_in(void) { t11_ICount -= 15+12; { BIC_M(IN,IN); } } -static void bic_in_ind(void) { t11_ICount -= 15+18; { BIC_M(IN,IND); } } -static void bic_in_de(void) { t11_ICount -= 15+15; { BIC_M(IN,DE); } } -static void bic_in_ded(void) { t11_ICount -= 15+21; { BIC_M(IN,DED); } } -static void bic_in_ix(void) { t11_ICount -= 15+21; { BIC_M(IN,IX); } } -static void bic_in_ixd(void) { t11_ICount -= 15+27; { BIC_M(IN,IXD); } } -static void bic_ind_rg(void) { t11_ICount -= 21+ 3; { BIC_X(IND,RG); } } -static void bic_ind_rgd(void) { t11_ICount -= 21+12; { BIC_M(IND,RGD); } } -static void bic_ind_in(void) { t11_ICount -= 21+12; { BIC_M(IND,IN); } } -static void bic_ind_ind(void) { t11_ICount -= 21+18; { BIC_M(IND,IND); } } -static void bic_ind_de(void) { t11_ICount -= 21+15; { BIC_M(IND,DE); } } -static void bic_ind_ded(void) { t11_ICount -= 21+21; { BIC_M(IND,DED); } } -static void bic_ind_ix(void) { t11_ICount -= 21+21; { BIC_M(IND,IX); } } -static void bic_ind_ixd(void) { t11_ICount -= 21+27; { BIC_M(IND,IXD); } } -static void bic_de_rg(void) { t11_ICount -= 18+ 3; { BIC_X(DE,RG); } } -static void bic_de_rgd(void) { t11_ICount -= 18+12; { BIC_M(DE,RGD); } } -static void bic_de_in(void) { t11_ICount -= 18+12; { BIC_M(DE,IN); } } -static void bic_de_ind(void) { t11_ICount -= 18+18; { BIC_M(DE,IND); } } -static void bic_de_de(void) { t11_ICount -= 18+15; { BIC_M(DE,DE); } } -static void bic_de_ded(void) { t11_ICount -= 18+21; { BIC_M(DE,DED); } } -static void bic_de_ix(void) { t11_ICount -= 18+21; { BIC_M(DE,IX); } } -static void bic_de_ixd(void) { t11_ICount -= 18+27; { BIC_M(DE,IXD); } } -static void bic_ded_rg(void) { t11_ICount -= 24+ 3; { BIC_X(DED,RG); } } -static void bic_ded_rgd(void) { t11_ICount -= 24+12; { BIC_M(DED,RGD); } } -static void bic_ded_in(void) { t11_ICount -= 24+12; { BIC_M(DED,IN); } } -static void bic_ded_ind(void) { t11_ICount -= 24+18; { BIC_M(DED,IND); } } -static void bic_ded_de(void) { t11_ICount -= 24+15; { BIC_M(DED,DE); } } -static void bic_ded_ded(void) { t11_ICount -= 24+21; { BIC_M(DED,DED); } } -static void bic_ded_ix(void) { t11_ICount -= 24+21; { BIC_M(DED,IX); } } -static void bic_ded_ixd(void) { t11_ICount -= 24+27; { BIC_M(DED,IXD); } } -static void bic_ix_rg(void) { t11_ICount -= 24+ 3; { BIC_X(IX,RG); } } -static void bic_ix_rgd(void) { t11_ICount -= 24+12; { BIC_M(IX,RGD); } } -static void bic_ix_in(void) { t11_ICount -= 24+12; { BIC_M(IX,IN); } } -static void bic_ix_ind(void) { t11_ICount -= 24+18; { BIC_M(IX,IND); } } -static void bic_ix_de(void) { t11_ICount -= 24+15; { BIC_M(IX,DE); } } -static void bic_ix_ded(void) { t11_ICount -= 24+21; { BIC_M(IX,DED); } } -static void bic_ix_ix(void) { t11_ICount -= 24+21; { BIC_M(IX,IX); } } -static void bic_ix_ixd(void) { t11_ICount -= 24+27; { BIC_M(IX,IXD); } } -static void bic_ixd_rg(void) { t11_ICount -= 30+ 3; { BIC_X(IXD,RG); } } -static void bic_ixd_rgd(void) { t11_ICount -= 30+12; { BIC_M(IXD,RGD); } } -static void bic_ixd_in(void) { t11_ICount -= 30+12; { BIC_M(IXD,IN); } } -static void bic_ixd_ind(void) { t11_ICount -= 30+18; { BIC_M(IXD,IND); } } -static void bic_ixd_de(void) { t11_ICount -= 30+15; { BIC_M(IXD,DE); } } -static void bic_ixd_ded(void) { t11_ICount -= 30+21; { BIC_M(IXD,DED); } } -static void bic_ixd_ix(void) { t11_ICount -= 30+21; { BIC_M(IXD,IX); } } -static void bic_ixd_ixd(void) { t11_ICount -= 30+27; { BIC_M(IXD,IXD); } } - -static void bis_rg_rg(void) { t11_ICount -= 9+ 3; { BIS_R(RG,RG); } } -static void bis_rg_rgd(void) { t11_ICount -= 9+12; { BIS_M(RG,RGD); } } -static void bis_rg_in(void) { t11_ICount -= 9+12; { BIS_M(RG,IN); } } -static void bis_rg_ind(void) { t11_ICount -= 9+18; { BIS_M(RG,IND); } } -static void bis_rg_de(void) { t11_ICount -= 9+15; { BIS_M(RG,DE); } } -static void bis_rg_ded(void) { t11_ICount -= 9+21; { BIS_M(RG,DED); } } -static void bis_rg_ix(void) { t11_ICount -= 9+21; { BIS_M(RG,IX); } } -static void bis_rg_ixd(void) { t11_ICount -= 9+27; { BIS_M(RG,IXD); } } -static void bis_rgd_rg(void) { t11_ICount -= 15+ 3; { BIS_X(RGD,RG); } } -static void bis_rgd_rgd(void) { t11_ICount -= 15+12; { BIS_M(RGD,RGD); } } -static void bis_rgd_in(void) { t11_ICount -= 15+12; { BIS_M(RGD,IN); } } -static void bis_rgd_ind(void) { t11_ICount -= 15+18; { BIS_M(RGD,IND); } } -static void bis_rgd_de(void) { t11_ICount -= 15+15; { BIS_M(RGD,DE); } } -static void bis_rgd_ded(void) { t11_ICount -= 15+21; { BIS_M(RGD,DED); } } -static void bis_rgd_ix(void) { t11_ICount -= 15+21; { BIS_M(RGD,IX); } } -static void bis_rgd_ixd(void) { t11_ICount -= 15+27; { BIS_M(RGD,IXD); } } -static void bis_in_rg(void) { t11_ICount -= 15+ 3; { BIS_X(IN,RG); } } -static void bis_in_rgd(void) { t11_ICount -= 15+12; { BIS_M(IN,RGD); } } -static void bis_in_in(void) { t11_ICount -= 15+12; { BIS_M(IN,IN); } } -static void bis_in_ind(void) { t11_ICount -= 15+18; { BIS_M(IN,IND); } } -static void bis_in_de(void) { t11_ICount -= 15+15; { BIS_M(IN,DE); } } -static void bis_in_ded(void) { t11_ICount -= 15+21; { BIS_M(IN,DED); } } -static void bis_in_ix(void) { t11_ICount -= 15+21; { BIS_M(IN,IX); } } -static void bis_in_ixd(void) { t11_ICount -= 15+27; { BIS_M(IN,IXD); } } -static void bis_ind_rg(void) { t11_ICount -= 21+ 3; { BIS_X(IND,RG); } } -static void bis_ind_rgd(void) { t11_ICount -= 21+12; { BIS_M(IND,RGD); } } -static void bis_ind_in(void) { t11_ICount -= 21+12; { BIS_M(IND,IN); } } -static void bis_ind_ind(void) { t11_ICount -= 21+18; { BIS_M(IND,IND); } } -static void bis_ind_de(void) { t11_ICount -= 21+15; { BIS_M(IND,DE); } } -static void bis_ind_ded(void) { t11_ICount -= 21+21; { BIS_M(IND,DED); } } -static void bis_ind_ix(void) { t11_ICount -= 21+21; { BIS_M(IND,IX); } } -static void bis_ind_ixd(void) { t11_ICount -= 21+27; { BIS_M(IND,IXD); } } -static void bis_de_rg(void) { t11_ICount -= 18+ 3; { BIS_X(DE,RG); } } -static void bis_de_rgd(void) { t11_ICount -= 18+12; { BIS_M(DE,RGD); } } -static void bis_de_in(void) { t11_ICount -= 18+12; { BIS_M(DE,IN); } } -static void bis_de_ind(void) { t11_ICount -= 18+18; { BIS_M(DE,IND); } } -static void bis_de_de(void) { t11_ICount -= 18+15; { BIS_M(DE,DE); } } -static void bis_de_ded(void) { t11_ICount -= 18+21; { BIS_M(DE,DED); } } -static void bis_de_ix(void) { t11_ICount -= 18+21; { BIS_M(DE,IX); } } -static void bis_de_ixd(void) { t11_ICount -= 18+27; { BIS_M(DE,IXD); } } -static void bis_ded_rg(void) { t11_ICount -= 24+ 3; { BIS_X(DED,RG); } } -static void bis_ded_rgd(void) { t11_ICount -= 24+12; { BIS_M(DED,RGD); } } -static void bis_ded_in(void) { t11_ICount -= 24+12; { BIS_M(DED,IN); } } -static void bis_ded_ind(void) { t11_ICount -= 24+18; { BIS_M(DED,IND); } } -static void bis_ded_de(void) { t11_ICount -= 24+15; { BIS_M(DED,DE); } } -static void bis_ded_ded(void) { t11_ICount -= 24+21; { BIS_M(DED,DED); } } -static void bis_ded_ix(void) { t11_ICount -= 24+21; { BIS_M(DED,IX); } } -static void bis_ded_ixd(void) { t11_ICount -= 24+27; { BIS_M(DED,IXD); } } -static void bis_ix_rg(void) { t11_ICount -= 24+ 3; { BIS_X(IX,RG); } } -static void bis_ix_rgd(void) { t11_ICount -= 24+12; { BIS_M(IX,RGD); } } -static void bis_ix_in(void) { t11_ICount -= 24+12; { BIS_M(IX,IN); } } -static void bis_ix_ind(void) { t11_ICount -= 24+18; { BIS_M(IX,IND); } } -static void bis_ix_de(void) { t11_ICount -= 24+15; { BIS_M(IX,DE); } } -static void bis_ix_ded(void) { t11_ICount -= 24+21; { BIS_M(IX,DED); } } -static void bis_ix_ix(void) { t11_ICount -= 24+21; { BIS_M(IX,IX); } } -static void bis_ix_ixd(void) { t11_ICount -= 24+27; { BIS_M(IX,IXD); } } -static void bis_ixd_rg(void) { t11_ICount -= 30+ 3; { BIS_X(IXD,RG); } } -static void bis_ixd_rgd(void) { t11_ICount -= 30+12; { BIS_M(IXD,RGD); } } -static void bis_ixd_in(void) { t11_ICount -= 30+12; { BIS_M(IXD,IN); } } -static void bis_ixd_ind(void) { t11_ICount -= 30+18; { BIS_M(IXD,IND); } } -static void bis_ixd_de(void) { t11_ICount -= 30+15; { BIS_M(IXD,DE); } } -static void bis_ixd_ded(void) { t11_ICount -= 30+21; { BIS_M(IXD,DED); } } -static void bis_ixd_ix(void) { t11_ICount -= 30+21; { BIS_M(IXD,IX); } } -static void bis_ixd_ixd(void) { t11_ICount -= 30+27; { BIS_M(IXD,IXD); } } - -static void add_rg_rg(void) { t11_ICount -= 9+ 3; { ADD_R(RG,RG); } } -static void add_rg_rgd(void) { t11_ICount -= 9+12; { ADD_M(RG,RGD); } } -static void add_rg_in(void) { t11_ICount -= 9+12; { ADD_M(RG,IN); } } -static void add_rg_ind(void) { t11_ICount -= 9+18; { ADD_M(RG,IND); } } -static void add_rg_de(void) { t11_ICount -= 9+15; { ADD_M(RG,DE); } } -static void add_rg_ded(void) { t11_ICount -= 9+21; { ADD_M(RG,DED); } } -static void add_rg_ix(void) { t11_ICount -= 9+21; { ADD_M(RG,IX); } } -static void add_rg_ixd(void) { t11_ICount -= 9+27; { ADD_M(RG,IXD); } } -static void add_rgd_rg(void) { t11_ICount -= 15+ 3; { ADD_X(RGD,RG); } } -static void add_rgd_rgd(void) { t11_ICount -= 15+12; { ADD_M(RGD,RGD); } } -static void add_rgd_in(void) { t11_ICount -= 15+12; { ADD_M(RGD,IN); } } -static void add_rgd_ind(void) { t11_ICount -= 15+18; { ADD_M(RGD,IND); } } -static void add_rgd_de(void) { t11_ICount -= 15+15; { ADD_M(RGD,DE); } } -static void add_rgd_ded(void) { t11_ICount -= 15+21; { ADD_M(RGD,DED); } } -static void add_rgd_ix(void) { t11_ICount -= 15+21; { ADD_M(RGD,IX); } } -static void add_rgd_ixd(void) { t11_ICount -= 15+27; { ADD_M(RGD,IXD); } } -static void add_in_rg(void) { t11_ICount -= 15+ 3; { ADD_X(IN,RG); } } -static void add_in_rgd(void) { t11_ICount -= 15+12; { ADD_M(IN,RGD); } } -static void add_in_in(void) { t11_ICount -= 15+12; { ADD_M(IN,IN); } } -static void add_in_ind(void) { t11_ICount -= 15+18; { ADD_M(IN,IND); } } -static void add_in_de(void) { t11_ICount -= 15+15; { ADD_M(IN,DE); } } -static void add_in_ded(void) { t11_ICount -= 15+21; { ADD_M(IN,DED); } } -static void add_in_ix(void) { t11_ICount -= 15+21; { ADD_M(IN,IX); } } -static void add_in_ixd(void) { t11_ICount -= 15+27; { ADD_M(IN,IXD); } } -static void add_ind_rg(void) { t11_ICount -= 21+ 3; { ADD_X(IND,RG); } } -static void add_ind_rgd(void) { t11_ICount -= 21+12; { ADD_M(IND,RGD); } } -static void add_ind_in(void) { t11_ICount -= 21+12; { ADD_M(IND,IN); } } -static void add_ind_ind(void) { t11_ICount -= 21+18; { ADD_M(IND,IND); } } -static void add_ind_de(void) { t11_ICount -= 21+15; { ADD_M(IND,DE); } } -static void add_ind_ded(void) { t11_ICount -= 21+21; { ADD_M(IND,DED); } } -static void add_ind_ix(void) { t11_ICount -= 21+21; { ADD_M(IND,IX); } } -static void add_ind_ixd(void) { t11_ICount -= 21+27; { ADD_M(IND,IXD); } } -static void add_de_rg(void) { t11_ICount -= 18+ 3; { ADD_X(DE,RG); } } -static void add_de_rgd(void) { t11_ICount -= 18+12; { ADD_M(DE,RGD); } } -static void add_de_in(void) { t11_ICount -= 18+12; { ADD_M(DE,IN); } } -static void add_de_ind(void) { t11_ICount -= 18+18; { ADD_M(DE,IND); } } -static void add_de_de(void) { t11_ICount -= 18+15; { ADD_M(DE,DE); } } -static void add_de_ded(void) { t11_ICount -= 18+21; { ADD_M(DE,DED); } } -static void add_de_ix(void) { t11_ICount -= 18+21; { ADD_M(DE,IX); } } -static void add_de_ixd(void) { t11_ICount -= 18+27; { ADD_M(DE,IXD); } } -static void add_ded_rg(void) { t11_ICount -= 24+ 3; { ADD_X(DED,RG); } } -static void add_ded_rgd(void) { t11_ICount -= 24+12; { ADD_M(DED,RGD); } } -static void add_ded_in(void) { t11_ICount -= 24+12; { ADD_M(DED,IN); } } -static void add_ded_ind(void) { t11_ICount -= 24+18; { ADD_M(DED,IND); } } -static void add_ded_de(void) { t11_ICount -= 24+15; { ADD_M(DED,DE); } } -static void add_ded_ded(void) { t11_ICount -= 24+21; { ADD_M(DED,DED); } } -static void add_ded_ix(void) { t11_ICount -= 24+21; { ADD_M(DED,IX); } } -static void add_ded_ixd(void) { t11_ICount -= 24+27; { ADD_M(DED,IXD); } } -static void add_ix_rg(void) { t11_ICount -= 24+ 3; { ADD_X(IX,RG); } } -static void add_ix_rgd(void) { t11_ICount -= 24+12; { ADD_M(IX,RGD); } } -static void add_ix_in(void) { t11_ICount -= 24+12; { ADD_M(IX,IN); } } -static void add_ix_ind(void) { t11_ICount -= 24+18; { ADD_M(IX,IND); } } -static void add_ix_de(void) { t11_ICount -= 24+15; { ADD_M(IX,DE); } } -static void add_ix_ded(void) { t11_ICount -= 24+21; { ADD_M(IX,DED); } } -static void add_ix_ix(void) { t11_ICount -= 24+21; { ADD_M(IX,IX); } } -static void add_ix_ixd(void) { t11_ICount -= 24+27; { ADD_M(IX,IXD); } } -static void add_ixd_rg(void) { t11_ICount -= 30+ 3; { ADD_X(IXD,RG); } } -static void add_ixd_rgd(void) { t11_ICount -= 30+12; { ADD_M(IXD,RGD); } } -static void add_ixd_in(void) { t11_ICount -= 30+12; { ADD_M(IXD,IN); } } -static void add_ixd_ind(void) { t11_ICount -= 30+18; { ADD_M(IXD,IND); } } -static void add_ixd_de(void) { t11_ICount -= 30+15; { ADD_M(IXD,DE); } } -static void add_ixd_ded(void) { t11_ICount -= 30+21; { ADD_M(IXD,DED); } } -static void add_ixd_ix(void) { t11_ICount -= 30+21; { ADD_M(IXD,IX); } } -static void add_ixd_ixd(void) { t11_ICount -= 30+27; { ADD_M(IXD,IXD); } } - -static void xor_rg(void) { t11_ICount -= 12; { XOR_R(RG); } } -static void xor_rgd(void) { t11_ICount -= 21; { XOR_M(RGD); } } -static void xor_in(void) { t11_ICount -= 21; { XOR_M(IN); } } -static void xor_ind(void) { t11_ICount -= 27; { XOR_M(IND); } } -static void xor_de(void) { t11_ICount -= 24; { XOR_M(DE); } } -static void xor_ded(void) { t11_ICount -= 30; { XOR_M(DED); } } -static void xor_ix(void) { t11_ICount -= 30; { XOR_M(IX); } } -static void xor_ixd(void) { t11_ICount -= 36; { XOR_M(IXD); } } - -static void sob(void) +static void ccc(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { cpustate->PSW &= ~(op & 15); } } +static void scc(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { cpustate->PSW |= (op & 15); } } + +static void swab_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { SWAB_R(RG); } } +static void swab_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SWAB_M(RGD); } } +static void swab_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SWAB_M(IN); } } +static void swab_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { SWAB_M(IND); } } +static void swab_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { SWAB_M(DE); } } +static void swab_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SWAB_M(DED); } } +static void swab_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SWAB_M(IX); } } +static void swab_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { SWAB_M(IXD); } } + +static void br(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(1); } } +static void bne(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_Z); } } +static void beq(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_Z); } } +static void bge(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!((GET_N >> 2) ^ GET_V)); } } +static void blt(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(((GET_N >> 2) ^ GET_V)); } } +static void bgt(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_Z && !((GET_N >> 2) ^ GET_V)); } } +static void ble(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_Z || ((GET_N >> 2) ^ GET_V)); } } + +static void jsr_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { JSR(RGD); } } +static void jsr_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { JSR(IN); } } +static void jsr_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { JSR(IND); } } +static void jsr_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { JSR(DE); } } +static void jsr_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 33; { JSR(DED); } } +static void jsr_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 33; { JSR(IX); } } +static void jsr_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 39; { JSR(IXD); } } + +static void clr_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { CLR_R(RG); } } +static void clr_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { CLR_M(RGD); } } +static void clr_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { CLR_M(IN); } } +static void clr_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { CLR_M(IND); } } +static void clr_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { CLR_M(DE); } } +static void clr_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { CLR_M(DED); } } +static void clr_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { CLR_M(IX); } } +static void clr_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { CLR_M(IXD); } } + +static void com_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { COM_R(RG); } } +static void com_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { COM_M(RGD); } } +static void com_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { COM_M(IN); } } +static void com_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { COM_M(IND); } } +static void com_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { COM_M(DE); } } +static void com_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { COM_M(DED); } } +static void com_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { COM_M(IX); } } +static void com_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { COM_M(IXD); } } + +static void inc_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { INC_R(RG); } } +static void inc_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { INC_M(RGD); } } +static void inc_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { INC_M(IN); } } +static void inc_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { INC_M(IND); } } +static void inc_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { INC_M(DE); } } +static void inc_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { INC_M(DED); } } +static void inc_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { INC_M(IX); } } +static void inc_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { INC_M(IXD); } } + +static void dec_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { DEC_R(RG); } } +static void dec_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { DEC_M(RGD); } } +static void dec_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { DEC_M(IN); } } +static void dec_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { DEC_M(IND); } } +static void dec_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { DEC_M(DE); } } +static void dec_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { DEC_M(DED); } } +static void dec_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { DEC_M(IX); } } +static void dec_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { DEC_M(IXD); } } + +static void neg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { NEG_R(RG); } } +static void neg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { NEG_M(RGD); } } +static void neg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { NEG_M(IN); } } +static void neg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { NEG_M(IND); } } +static void neg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { NEG_M(DE); } } +static void neg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { NEG_M(DED); } } +static void neg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { NEG_M(IX); } } +static void neg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { NEG_M(IXD); } } + +static void adc_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ADC_R(RG); } } +static void adc_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ADC_M(RGD); } } +static void adc_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ADC_M(IN); } } +static void adc_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ADC_M(IND); } } +static void adc_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ADC_M(DE); } } +static void adc_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ADC_M(DED); } } +static void adc_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ADC_M(IX); } } +static void adc_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ADC_M(IXD); } } + +static void sbc_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { SBC_R(RG); } } +static void sbc_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SBC_M(RGD); } } +static void sbc_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SBC_M(IN); } } +static void sbc_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { SBC_M(IND); } } +static void sbc_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { SBC_M(DE); } } +static void sbc_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SBC_M(DED); } } +static void sbc_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SBC_M(IX); } } +static void sbc_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { SBC_M(IXD); } } + +static void tst_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { TST_R(RG); } } +static void tst_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { TST_M(RGD); } } +static void tst_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { TST_M(IN); } } +static void tst_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { TST_M(IND); } } +static void tst_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { TST_M(DE); } } +static void tst_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { TST_M(DED); } } +static void tst_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { TST_M(IX); } } +static void tst_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 33; { TST_M(IXD); } } + +static void ror_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ROR_R(RG); } } +static void ror_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROR_M(RGD); } } +static void ror_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROR_M(IN); } } +static void ror_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ROR_M(IND); } } +static void ror_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ROR_M(DE); } } +static void ror_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROR_M(DED); } } +static void ror_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROR_M(IX); } } +static void ror_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ROR_M(IXD); } } + +static void rol_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ROL_R(RG); } } +static void rol_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROL_M(RGD); } } +static void rol_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROL_M(IN); } } +static void rol_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ROL_M(IND); } } +static void rol_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ROL_M(DE); } } +static void rol_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROL_M(DED); } } +static void rol_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROL_M(IX); } } +static void rol_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ROL_M(IXD); } } + +static void asr_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ASR_R(RG); } } +static void asr_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASR_M(RGD); } } +static void asr_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASR_M(IN); } } +static void asr_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ASR_M(IND); } } +static void asr_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ASR_M(DE); } } +static void asr_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASR_M(DED); } } +static void asr_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASR_M(IX); } } +static void asr_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ASR_M(IXD); } } + +static void asl_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ASL_R(RG); } } +static void asl_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASL_M(RGD); } } +static void asl_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASL_M(IN); } } +static void asl_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ASL_M(IND); } } +static void asl_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ASL_M(DE); } } +static void asl_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASL_M(DED); } } +static void asl_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASL_M(IX); } } +static void asl_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ASL_M(IXD); } } + +static void sxt_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { SXT_R(RG); } } +static void sxt_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SXT_M(RGD); } } +static void sxt_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SXT_M(IN); } } +static void sxt_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { SXT_M(IND); } } +static void sxt_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { SXT_M(DE); } } +static void sxt_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SXT_M(DED); } } +static void sxt_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SXT_M(IX); } } +static void sxt_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { SXT_M(IXD); } } + +static void mov_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { MOV_R(RG,RG); } } +static void mov_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { MOV_M(RG,RGD); } } +static void mov_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { MOV_M(RG,IN); } } +static void mov_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { MOV_M(RG,IND); } } +static void mov_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { MOV_M(RG,DE); } } +static void mov_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { MOV_M(RG,DED); } } +static void mov_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { MOV_M(RG,IX); } } +static void mov_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { MOV_M(RG,IXD); } } +static void mov_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { MOV_M(RGD,RG); } } +static void mov_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOV_M(RGD,RGD); } } +static void mov_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOV_M(RGD,IN); } } +static void mov_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { MOV_M(RGD,IND); } } +static void mov_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { MOV_M(RGD,DE); } } +static void mov_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOV_M(RGD,DED); } } +static void mov_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOV_M(RGD,IX); } } +static void mov_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { MOV_M(RGD,IXD); } } +static void mov_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { MOV_M(IN,RG); } } +static void mov_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOV_M(IN,RGD); } } +static void mov_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOV_M(IN,IN); } } +static void mov_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { MOV_M(IN,IND); } } +static void mov_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { MOV_M(IN,DE); } } +static void mov_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOV_M(IN,DED); } } +static void mov_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOV_M(IN,IX); } } +static void mov_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { MOV_M(IN,IXD); } } +static void mov_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { MOV_M(IND,RG); } } +static void mov_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { MOV_M(IND,RGD); } } +static void mov_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { MOV_M(IND,IN); } } +static void mov_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { MOV_M(IND,IND); } } +static void mov_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { MOV_M(IND,DE); } } +static void mov_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { MOV_M(IND,DED); } } +static void mov_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { MOV_M(IND,IX); } } +static void mov_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { MOV_M(IND,IXD); } } +static void mov_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { MOV_M(DE,RG); } } +static void mov_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { MOV_M(DE,RGD); } } +static void mov_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { MOV_M(DE,IN); } } +static void mov_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { MOV_M(DE,IND); } } +static void mov_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { MOV_M(DE,DE); } } +static void mov_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { MOV_M(DE,DED); } } +static void mov_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { MOV_M(DE,IX); } } +static void mov_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { MOV_M(DE,IXD); } } +static void mov_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { MOV_M(DED,RG); } } +static void mov_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOV_M(DED,RGD); } } +static void mov_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOV_M(DED,IN); } } +static void mov_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { MOV_M(DED,IND); } } +static void mov_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { MOV_M(DED,DE); } } +static void mov_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOV_M(DED,DED); } } +static void mov_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOV_M(DED,IX); } } +static void mov_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { MOV_M(DED,IXD); } } +static void mov_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { MOV_M(IX,RG); } } +static void mov_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOV_M(IX,RGD); } } +static void mov_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOV_M(IX,IN); } } +static void mov_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { MOV_M(IX,IND); } } +static void mov_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { MOV_M(IX,DE); } } +static void mov_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOV_M(IX,DED); } } +static void mov_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOV_M(IX,IX); } } +static void mov_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { MOV_M(IX,IXD); } } +static void mov_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { MOV_M(IXD,RG); } } +static void mov_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { MOV_M(IXD,RGD); } } +static void mov_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { MOV_M(IXD,IN); } } +static void mov_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { MOV_M(IXD,IND); } } +static void mov_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { MOV_M(IXD,DE); } } +static void mov_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { MOV_M(IXD,DED); } } +static void mov_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { MOV_M(IXD,IX); } } +static void mov_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { MOV_M(IXD,IXD); } } + +static void cmp_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { CMP_R(RG,RG); } } +static void cmp_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { CMP_M(RG,RGD); } } +static void cmp_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { CMP_M(RG,IN); } } +static void cmp_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { CMP_M(RG,IND); } } +static void cmp_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { CMP_M(RG,DE); } } +static void cmp_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { CMP_M(RG,DED); } } +static void cmp_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { CMP_M(RG,IX); } } +static void cmp_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+24; { CMP_M(RG,IXD); } } +static void cmp_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { CMP_M(RGD,RG); } } +static void cmp_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMP_M(RGD,RGD); } } +static void cmp_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMP_M(RGD,IN); } } +static void cmp_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { CMP_M(RGD,IND); } } +static void cmp_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { CMP_M(RGD,DE); } } +static void cmp_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMP_M(RGD,DED); } } +static void cmp_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMP_M(RGD,IX); } } +static void cmp_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { CMP_M(RGD,IXD); } } +static void cmp_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { CMP_M(IN,RG); } } +static void cmp_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMP_M(IN,RGD); } } +static void cmp_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMP_M(IN,IN); } } +static void cmp_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { CMP_M(IN,IND); } } +static void cmp_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { CMP_M(IN,DE); } } +static void cmp_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMP_M(IN,DED); } } +static void cmp_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMP_M(IN,IX); } } +static void cmp_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { CMP_M(IN,IXD); } } +static void cmp_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { CMP_M(IND,RG); } } +static void cmp_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { CMP_M(IND,RGD); } } +static void cmp_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { CMP_M(IND,IN); } } +static void cmp_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { CMP_M(IND,IND); } } +static void cmp_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { CMP_M(IND,DE); } } +static void cmp_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { CMP_M(IND,DED); } } +static void cmp_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { CMP_M(IND,IX); } } +static void cmp_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+24; { CMP_M(IND,IXD); } } +static void cmp_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { CMP_M(DE,RG); } } +static void cmp_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { CMP_M(DE,RGD); } } +static void cmp_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { CMP_M(DE,IN); } } +static void cmp_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { CMP_M(DE,IND); } } +static void cmp_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { CMP_M(DE,DE); } } +static void cmp_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { CMP_M(DE,DED); } } +static void cmp_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { CMP_M(DE,IX); } } +static void cmp_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+24; { CMP_M(DE,IXD); } } +static void cmp_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { CMP_M(DED,RG); } } +static void cmp_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMP_M(DED,RGD); } } +static void cmp_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMP_M(DED,IN); } } +static void cmp_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { CMP_M(DED,IND); } } +static void cmp_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { CMP_M(DED,DE); } } +static void cmp_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMP_M(DED,DED); } } +static void cmp_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMP_M(DED,IX); } } +static void cmp_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { CMP_M(DED,IXD); } } +static void cmp_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { CMP_M(IX,RG); } } +static void cmp_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMP_M(IX,RGD); } } +static void cmp_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMP_M(IX,IN); } } +static void cmp_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { CMP_M(IX,IND); } } +static void cmp_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { CMP_M(IX,DE); } } +static void cmp_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMP_M(IX,DED); } } +static void cmp_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMP_M(IX,IX); } } +static void cmp_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { CMP_M(IX,IXD); } } +static void cmp_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { CMP_M(IXD,RG); } } +static void cmp_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { CMP_M(IXD,RGD); } } +static void cmp_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { CMP_M(IXD,IN); } } +static void cmp_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { CMP_M(IXD,IND); } } +static void cmp_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { CMP_M(IXD,DE); } } +static void cmp_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { CMP_M(IXD,DED); } } +static void cmp_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { CMP_M(IXD,IX); } } +static void cmp_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+24; { CMP_M(IXD,IXD); } } + +static void bit_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BIT_R(RG,RG); } } +static void bit_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { BIT_M(RG,RGD); } } +static void bit_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { BIT_M(RG,IN); } } +static void bit_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BIT_M(RG,IND); } } +static void bit_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BIT_M(RG,DE); } } +static void bit_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BIT_M(RG,DED); } } +static void bit_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BIT_M(RG,IX); } } +static void bit_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+24; { BIT_M(RG,IXD); } } +static void bit_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIT_M(RGD,RG); } } +static void bit_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BIT_M(RGD,RGD); } } +static void bit_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BIT_M(RGD,IN); } } +static void bit_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIT_M(RGD,IND); } } +static void bit_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIT_M(RGD,DE); } } +static void bit_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIT_M(RGD,DED); } } +static void bit_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIT_M(RGD,IX); } } +static void bit_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { BIT_M(RGD,IXD); } } +static void bit_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIT_M(IN,RG); } } +static void bit_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BIT_M(IN,RGD); } } +static void bit_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BIT_M(IN,IN); } } +static void bit_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIT_M(IN,IND); } } +static void bit_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIT_M(IN,DE); } } +static void bit_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIT_M(IN,DED); } } +static void bit_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIT_M(IN,IX); } } +static void bit_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { BIT_M(IN,IXD); } } +static void bit_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BIT_M(IND,RG); } } +static void bit_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { BIT_M(IND,RGD); } } +static void bit_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { BIT_M(IND,IN); } } +static void bit_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BIT_M(IND,IND); } } +static void bit_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BIT_M(IND,DE); } } +static void bit_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BIT_M(IND,DED); } } +static void bit_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BIT_M(IND,IX); } } +static void bit_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+24; { BIT_M(IND,IXD); } } +static void bit_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BIT_M(DE,RG); } } +static void bit_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { BIT_M(DE,RGD); } } +static void bit_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { BIT_M(DE,IN); } } +static void bit_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BIT_M(DE,IND); } } +static void bit_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BIT_M(DE,DE); } } +static void bit_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BIT_M(DE,DED); } } +static void bit_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BIT_M(DE,IX); } } +static void bit_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+24; { BIT_M(DE,IXD); } } +static void bit_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIT_M(DED,RG); } } +static void bit_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BIT_M(DED,RGD); } } +static void bit_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BIT_M(DED,IN); } } +static void bit_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIT_M(DED,IND); } } +static void bit_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIT_M(DED,DE); } } +static void bit_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIT_M(DED,DED); } } +static void bit_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIT_M(DED,IX); } } +static void bit_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { BIT_M(DED,IXD); } } +static void bit_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIT_M(IX,RG); } } +static void bit_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BIT_M(IX,RGD); } } +static void bit_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BIT_M(IX,IN); } } +static void bit_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIT_M(IX,IND); } } +static void bit_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIT_M(IX,DE); } } +static void bit_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIT_M(IX,DED); } } +static void bit_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIT_M(IX,IX); } } +static void bit_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { BIT_M(IX,IXD); } } +static void bit_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BIT_M(IXD,RG); } } +static void bit_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { BIT_M(IXD,RGD); } } +static void bit_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { BIT_M(IXD,IN); } } +static void bit_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BIT_M(IXD,IND); } } +static void bit_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BIT_M(IXD,DE); } } +static void bit_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BIT_M(IXD,DED); } } +static void bit_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BIT_M(IXD,IX); } } +static void bit_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+24; { BIT_M(IXD,IXD); } } + +static void bic_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BIC_R(RG,RG); } } +static void bic_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BIC_M(RG,RGD); } } +static void bic_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BIC_M(RG,IN); } } +static void bic_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BIC_M(RG,IND); } } +static void bic_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BIC_M(RG,DE); } } +static void bic_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BIC_M(RG,DED); } } +static void bic_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BIC_M(RG,IX); } } +static void bic_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { BIC_M(RG,IXD); } } +static void bic_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIC_X(RGD,RG); } } +static void bic_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIC_M(RGD,RGD); } } +static void bic_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIC_M(RGD,IN); } } +static void bic_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIC_M(RGD,IND); } } +static void bic_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIC_M(RGD,DE); } } +static void bic_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIC_M(RGD,DED); } } +static void bic_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIC_M(RGD,IX); } } +static void bic_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BIC_M(RGD,IXD); } } +static void bic_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIC_X(IN,RG); } } +static void bic_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIC_M(IN,RGD); } } +static void bic_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIC_M(IN,IN); } } +static void bic_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIC_M(IN,IND); } } +static void bic_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIC_M(IN,DE); } } +static void bic_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIC_M(IN,DED); } } +static void bic_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIC_M(IN,IX); } } +static void bic_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BIC_M(IN,IXD); } } +static void bic_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BIC_X(IND,RG); } } +static void bic_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BIC_M(IND,RGD); } } +static void bic_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BIC_M(IND,IN); } } +static void bic_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BIC_M(IND,IND); } } +static void bic_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BIC_M(IND,DE); } } +static void bic_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BIC_M(IND,DED); } } +static void bic_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BIC_M(IND,IX); } } +static void bic_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { BIC_M(IND,IXD); } } +static void bic_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BIC_X(DE,RG); } } +static void bic_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BIC_M(DE,RGD); } } +static void bic_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BIC_M(DE,IN); } } +static void bic_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BIC_M(DE,IND); } } +static void bic_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BIC_M(DE,DE); } } +static void bic_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BIC_M(DE,DED); } } +static void bic_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BIC_M(DE,IX); } } +static void bic_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { BIC_M(DE,IXD); } } +static void bic_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIC_X(DED,RG); } } +static void bic_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIC_M(DED,RGD); } } +static void bic_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIC_M(DED,IN); } } +static void bic_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIC_M(DED,IND); } } +static void bic_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIC_M(DED,DE); } } +static void bic_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIC_M(DED,DED); } } +static void bic_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIC_M(DED,IX); } } +static void bic_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BIC_M(DED,IXD); } } +static void bic_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIC_X(IX,RG); } } +static void bic_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIC_M(IX,RGD); } } +static void bic_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIC_M(IX,IN); } } +static void bic_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIC_M(IX,IND); } } +static void bic_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIC_M(IX,DE); } } +static void bic_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIC_M(IX,DED); } } +static void bic_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIC_M(IX,IX); } } +static void bic_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BIC_M(IX,IXD); } } +static void bic_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BIC_X(IXD,RG); } } +static void bic_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BIC_M(IXD,RGD); } } +static void bic_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BIC_M(IXD,IN); } } +static void bic_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BIC_M(IXD,IND); } } +static void bic_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BIC_M(IXD,DE); } } +static void bic_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BIC_M(IXD,DED); } } +static void bic_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BIC_M(IXD,IX); } } +static void bic_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { BIC_M(IXD,IXD); } } + +static void bis_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BIS_R(RG,RG); } } +static void bis_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BIS_M(RG,RGD); } } +static void bis_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BIS_M(RG,IN); } } +static void bis_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BIS_M(RG,IND); } } +static void bis_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BIS_M(RG,DE); } } +static void bis_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BIS_M(RG,DED); } } +static void bis_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BIS_M(RG,IX); } } +static void bis_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { BIS_M(RG,IXD); } } +static void bis_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIS_X(RGD,RG); } } +static void bis_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIS_M(RGD,RGD); } } +static void bis_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIS_M(RGD,IN); } } +static void bis_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIS_M(RGD,IND); } } +static void bis_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIS_M(RGD,DE); } } +static void bis_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIS_M(RGD,DED); } } +static void bis_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIS_M(RGD,IX); } } +static void bis_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BIS_M(RGD,IXD); } } +static void bis_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BIS_X(IN,RG); } } +static void bis_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIS_M(IN,RGD); } } +static void bis_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BIS_M(IN,IN); } } +static void bis_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BIS_M(IN,IND); } } +static void bis_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BIS_M(IN,DE); } } +static void bis_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIS_M(IN,DED); } } +static void bis_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BIS_M(IN,IX); } } +static void bis_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BIS_M(IN,IXD); } } +static void bis_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BIS_X(IND,RG); } } +static void bis_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BIS_M(IND,RGD); } } +static void bis_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BIS_M(IND,IN); } } +static void bis_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BIS_M(IND,IND); } } +static void bis_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BIS_M(IND,DE); } } +static void bis_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BIS_M(IND,DED); } } +static void bis_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BIS_M(IND,IX); } } +static void bis_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { BIS_M(IND,IXD); } } +static void bis_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BIS_X(DE,RG); } } +static void bis_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BIS_M(DE,RGD); } } +static void bis_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BIS_M(DE,IN); } } +static void bis_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BIS_M(DE,IND); } } +static void bis_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BIS_M(DE,DE); } } +static void bis_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BIS_M(DE,DED); } } +static void bis_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BIS_M(DE,IX); } } +static void bis_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { BIS_M(DE,IXD); } } +static void bis_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIS_X(DED,RG); } } +static void bis_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIS_M(DED,RGD); } } +static void bis_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIS_M(DED,IN); } } +static void bis_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIS_M(DED,IND); } } +static void bis_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIS_M(DED,DE); } } +static void bis_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIS_M(DED,DED); } } +static void bis_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIS_M(DED,IX); } } +static void bis_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BIS_M(DED,IXD); } } +static void bis_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BIS_X(IX,RG); } } +static void bis_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIS_M(IX,RGD); } } +static void bis_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BIS_M(IX,IN); } } +static void bis_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BIS_M(IX,IND); } } +static void bis_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BIS_M(IX,DE); } } +static void bis_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIS_M(IX,DED); } } +static void bis_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BIS_M(IX,IX); } } +static void bis_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BIS_M(IX,IXD); } } +static void bis_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BIS_X(IXD,RG); } } +static void bis_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BIS_M(IXD,RGD); } } +static void bis_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BIS_M(IXD,IN); } } +static void bis_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BIS_M(IXD,IND); } } +static void bis_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BIS_M(IXD,DE); } } +static void bis_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BIS_M(IXD,DED); } } +static void bis_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BIS_M(IXD,IX); } } +static void bis_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { BIS_M(IXD,IXD); } } + +static void add_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { ADD_R(RG,RG); } } +static void add_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { ADD_M(RG,RGD); } } +static void add_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { ADD_M(RG,IN); } } +static void add_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { ADD_M(RG,IND); } } +static void add_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { ADD_M(RG,DE); } } +static void add_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { ADD_M(RG,DED); } } +static void add_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { ADD_M(RG,IX); } } +static void add_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { ADD_M(RG,IXD); } } +static void add_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { ADD_X(RGD,RG); } } +static void add_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { ADD_M(RGD,RGD); } } +static void add_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { ADD_M(RGD,IN); } } +static void add_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { ADD_M(RGD,IND); } } +static void add_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { ADD_M(RGD,DE); } } +static void add_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { ADD_M(RGD,DED); } } +static void add_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { ADD_M(RGD,IX); } } +static void add_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { ADD_M(RGD,IXD); } } +static void add_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { ADD_X(IN,RG); } } +static void add_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { ADD_M(IN,RGD); } } +static void add_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { ADD_M(IN,IN); } } +static void add_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { ADD_M(IN,IND); } } +static void add_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { ADD_M(IN,DE); } } +static void add_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { ADD_M(IN,DED); } } +static void add_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { ADD_M(IN,IX); } } +static void add_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { ADD_M(IN,IXD); } } +static void add_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { ADD_X(IND,RG); } } +static void add_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { ADD_M(IND,RGD); } } +static void add_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { ADD_M(IND,IN); } } +static void add_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { ADD_M(IND,IND); } } +static void add_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { ADD_M(IND,DE); } } +static void add_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { ADD_M(IND,DED); } } +static void add_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { ADD_M(IND,IX); } } +static void add_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { ADD_M(IND,IXD); } } +static void add_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { ADD_X(DE,RG); } } +static void add_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { ADD_M(DE,RGD); } } +static void add_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { ADD_M(DE,IN); } } +static void add_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { ADD_M(DE,IND); } } +static void add_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { ADD_M(DE,DE); } } +static void add_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { ADD_M(DE,DED); } } +static void add_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { ADD_M(DE,IX); } } +static void add_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { ADD_M(DE,IXD); } } +static void add_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { ADD_X(DED,RG); } } +static void add_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { ADD_M(DED,RGD); } } +static void add_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { ADD_M(DED,IN); } } +static void add_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { ADD_M(DED,IND); } } +static void add_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { ADD_M(DED,DE); } } +static void add_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { ADD_M(DED,DED); } } +static void add_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { ADD_M(DED,IX); } } +static void add_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { ADD_M(DED,IXD); } } +static void add_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { ADD_X(IX,RG); } } +static void add_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { ADD_M(IX,RGD); } } +static void add_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { ADD_M(IX,IN); } } +static void add_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { ADD_M(IX,IND); } } +static void add_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { ADD_M(IX,DE); } } +static void add_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { ADD_M(IX,DED); } } +static void add_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { ADD_M(IX,IX); } } +static void add_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { ADD_M(IX,IXD); } } +static void add_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { ADD_X(IXD,RG); } } +static void add_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { ADD_M(IXD,RGD); } } +static void add_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { ADD_M(IXD,IN); } } +static void add_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { ADD_M(IXD,IND); } } +static void add_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { ADD_M(IXD,DE); } } +static void add_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { ADD_M(IXD,DED); } } +static void add_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { ADD_M(IXD,IX); } } +static void add_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { ADD_M(IXD,IXD); } } + +static void xor_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { XOR_R(RG); } } +static void xor_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { XOR_M(RGD); } } +static void xor_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { XOR_M(IN); } } +static void xor_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { XOR_M(IND); } } +static void xor_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { XOR_M(DE); } } +static void xor_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { XOR_M(DED); } } +static void xor_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { XOR_M(IX); } } +static void xor_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { XOR_M(IXD); } } + +static void sob(t11_state *cpustate, UINT16 op) { int sreg, source; - t11_ICount -= 18; - GET_SREG; source = REGD(sreg); + cpustate->icount -= 18; + GET_SREG; source = cpustate->REGD(sreg); source -= 1; - REGW(sreg) = source; + cpustate->REGW(sreg) = source; if (source) - PC -= 2 * (t11.op & 0x3f); + cpustate->PC -= 2 * (op & 0x3f); } -static void bpl(void) { t11_ICount -= 12; { BR(!GET_N); } } -static void bmi(void) { t11_ICount -= 12; { BR( GET_N); } } -static void bhi(void) { t11_ICount -= 12; { BR(!GET_C && !GET_Z); } } -static void blos(void) { t11_ICount -= 12; { BR( GET_C || GET_Z); } } -static void bvc(void) { t11_ICount -= 12; { BR(!GET_V); } } -static void bvs(void) { t11_ICount -= 12; { BR( GET_V); } } -static void bcc(void) { t11_ICount -= 12; { BR(!GET_C); } } -static void bcs(void) { t11_ICount -= 12; { BR( GET_C); } } +static void bpl(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_N); } } +static void bmi(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_N); } } +static void bhi(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_C && !GET_Z); } } +static void blos(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_C || GET_Z); } } +static void bvc(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_V); } } +static void bvs(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_V); } } +static void bcc(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR(!GET_C); } } +static void bcs(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { BR( GET_C); } } -static void emt(void) +static void emt(t11_state *cpustate, UINT16 op) { - t11_ICount -= 48; - PUSH(PSW); - PUSH(PC); - PC = RWORD(0x18); - PSW = RWORD(0x1a); - t11_check_irqs(); + cpustate->icount -= 48; + PUSH(cpustate, cpustate->PSW); + PUSH(cpustate, cpustate->PC); + cpustate->PC = RWORD(cpustate, 0x18); + cpustate->PSW = RWORD(cpustate, 0x1a); + t11_check_irqs(cpustate); } -static void trap(void) +static void trap(t11_state *cpustate, UINT16 op) { - t11_ICount -= 48; - PUSH(PSW); - PUSH(PC); - PC = RWORD(0x1c); - PSW = RWORD(0x1e); - t11_check_irqs(); + cpustate->icount -= 48; + PUSH(cpustate, cpustate->PSW); + PUSH(cpustate, cpustate->PC); + cpustate->PC = RWORD(cpustate, 0x1c); + cpustate->PSW = RWORD(cpustate, 0x1e); + t11_check_irqs(cpustate); } -static void clrb_rg(void) { t11_ICount -= 12; { CLRB_R(RG); } } -static void clrb_rgd(void) { t11_ICount -= 21; { CLRB_M(RGD); } } -static void clrb_in(void) { t11_ICount -= 21; { CLRB_M(IN); } } -static void clrb_ind(void) { t11_ICount -= 27; { CLRB_M(IND); } } -static void clrb_de(void) { t11_ICount -= 24; { CLRB_M(DE); } } -static void clrb_ded(void) { t11_ICount -= 30; { CLRB_M(DED); } } -static void clrb_ix(void) { t11_ICount -= 30; { CLRB_M(IX); } } -static void clrb_ixd(void) { t11_ICount -= 36; { CLRB_M(IXD); } } - -static void comb_rg(void) { t11_ICount -= 12; { COMB_R(RG); } } -static void comb_rgd(void) { t11_ICount -= 21; { COMB_M(RGD); } } -static void comb_in(void) { t11_ICount -= 21; { COMB_M(IN); } } -static void comb_ind(void) { t11_ICount -= 27; { COMB_M(IND); } } -static void comb_de(void) { t11_ICount -= 24; { COMB_M(DE); } } -static void comb_ded(void) { t11_ICount -= 30; { COMB_M(DED); } } -static void comb_ix(void) { t11_ICount -= 30; { COMB_M(IX); } } -static void comb_ixd(void) { t11_ICount -= 36; { COMB_M(IXD); } } - -static void incb_rg(void) { t11_ICount -= 12; { INCB_R(RG); } } -static void incb_rgd(void) { t11_ICount -= 21; { INCB_M(RGD); } } -static void incb_in(void) { t11_ICount -= 21; { INCB_M(IN); } } -static void incb_ind(void) { t11_ICount -= 27; { INCB_M(IND); } } -static void incb_de(void) { t11_ICount -= 24; { INCB_M(DE); } } -static void incb_ded(void) { t11_ICount -= 30; { INCB_M(DED); } } -static void incb_ix(void) { t11_ICount -= 30; { INCB_M(IX); } } -static void incb_ixd(void) { t11_ICount -= 36; { INCB_M(IXD); } } - -static void decb_rg(void) { t11_ICount -= 12; { DECB_R(RG); } } -static void decb_rgd(void) { t11_ICount -= 21; { DECB_M(RGD); } } -static void decb_in(void) { t11_ICount -= 21; { DECB_M(IN); } } -static void decb_ind(void) { t11_ICount -= 27; { DECB_M(IND); } } -static void decb_de(void) { t11_ICount -= 24; { DECB_M(DE); } } -static void decb_ded(void) { t11_ICount -= 30; { DECB_M(DED); } } -static void decb_ix(void) { t11_ICount -= 30; { DECB_M(IX); } } -static void decb_ixd(void) { t11_ICount -= 36; { DECB_M(IXD); } } - -static void negb_rg(void) { t11_ICount -= 12; { NEGB_R(RG); } } -static void negb_rgd(void) { t11_ICount -= 21; { NEGB_M(RGD); } } -static void negb_in(void) { t11_ICount -= 21; { NEGB_M(IN); } } -static void negb_ind(void) { t11_ICount -= 27; { NEGB_M(IND); } } -static void negb_de(void) { t11_ICount -= 24; { NEGB_M(DE); } } -static void negb_ded(void) { t11_ICount -= 30; { NEGB_M(DED); } } -static void negb_ix(void) { t11_ICount -= 30; { NEGB_M(IX); } } -static void negb_ixd(void) { t11_ICount -= 36; { NEGB_M(IXD); } } - -static void adcb_rg(void) { t11_ICount -= 12; { ADCB_R(RG); } } -static void adcb_rgd(void) { t11_ICount -= 21; { ADCB_M(RGD); } } -static void adcb_in(void) { t11_ICount -= 21; { ADCB_M(IN); } } -static void adcb_ind(void) { t11_ICount -= 27; { ADCB_M(IND); } } -static void adcb_de(void) { t11_ICount -= 24; { ADCB_M(DE); } } -static void adcb_ded(void) { t11_ICount -= 30; { ADCB_M(DED); } } -static void adcb_ix(void) { t11_ICount -= 30; { ADCB_M(IX); } } -static void adcb_ixd(void) { t11_ICount -= 36; { ADCB_M(IXD); } } - -static void sbcb_rg(void) { t11_ICount -= 12; { SBCB_R(RG); } } -static void sbcb_rgd(void) { t11_ICount -= 21; { SBCB_M(RGD); } } -static void sbcb_in(void) { t11_ICount -= 21; { SBCB_M(IN); } } -static void sbcb_ind(void) { t11_ICount -= 27; { SBCB_M(IND); } } -static void sbcb_de(void) { t11_ICount -= 24; { SBCB_M(DE); } } -static void sbcb_ded(void) { t11_ICount -= 30; { SBCB_M(DED); } } -static void sbcb_ix(void) { t11_ICount -= 30; { SBCB_M(IX); } } -static void sbcb_ixd(void) { t11_ICount -= 36; { SBCB_M(IXD); } } - -static void tstb_rg(void) { t11_ICount -= 12; { TSTB_R(RG); } } -static void tstb_rgd(void) { t11_ICount -= 18; { TSTB_M(RGD); } } -static void tstb_in(void) { t11_ICount -= 18; { TSTB_M(IN); } } -static void tstb_ind(void) { t11_ICount -= 24; { TSTB_M(IND); } } -static void tstb_de(void) { t11_ICount -= 21; { TSTB_M(DE); } } -static void tstb_ded(void) { t11_ICount -= 27; { TSTB_M(DED); } } -static void tstb_ix(void) { t11_ICount -= 27; { TSTB_M(IX); } } -static void tstb_ixd(void) { t11_ICount -= 33; { TSTB_M(IXD); } } - -static void rorb_rg(void) { t11_ICount -= 12; { RORB_R(RG); } } -static void rorb_rgd(void) { t11_ICount -= 21; { RORB_M(RGD); } } -static void rorb_in(void) { t11_ICount -= 21; { RORB_M(IN); } } -static void rorb_ind(void) { t11_ICount -= 27; { RORB_M(IND); } } -static void rorb_de(void) { t11_ICount -= 24; { RORB_M(DE); } } -static void rorb_ded(void) { t11_ICount -= 30; { RORB_M(DED); } } -static void rorb_ix(void) { t11_ICount -= 30; { RORB_M(IX); } } -static void rorb_ixd(void) { t11_ICount -= 36; { RORB_M(IXD); } } - -static void rolb_rg(void) { t11_ICount -= 12; { ROLB_R(RG); } } -static void rolb_rgd(void) { t11_ICount -= 21; { ROLB_M(RGD); } } -static void rolb_in(void) { t11_ICount -= 21; { ROLB_M(IN); } } -static void rolb_ind(void) { t11_ICount -= 27; { ROLB_M(IND); } } -static void rolb_de(void) { t11_ICount -= 24; { ROLB_M(DE); } } -static void rolb_ded(void) { t11_ICount -= 30; { ROLB_M(DED); } } -static void rolb_ix(void) { t11_ICount -= 30; { ROLB_M(IX); } } -static void rolb_ixd(void) { t11_ICount -= 36; { ROLB_M(IXD); } } - -static void asrb_rg(void) { t11_ICount -= 12; { ASRB_R(RG); } } -static void asrb_rgd(void) { t11_ICount -= 21; { ASRB_M(RGD); } } -static void asrb_in(void) { t11_ICount -= 21; { ASRB_M(IN); } } -static void asrb_ind(void) { t11_ICount -= 27; { ASRB_M(IND); } } -static void asrb_de(void) { t11_ICount -= 24; { ASRB_M(DE); } } -static void asrb_ded(void) { t11_ICount -= 30; { ASRB_M(DED); } } -static void asrb_ix(void) { t11_ICount -= 30; { ASRB_M(IX); } } -static void asrb_ixd(void) { t11_ICount -= 36; { ASRB_M(IXD); } } - -static void aslb_rg(void) { t11_ICount -= 12; { ASLB_R(RG); } } -static void aslb_rgd(void) { t11_ICount -= 21; { ASLB_M(RGD); } } -static void aslb_in(void) { t11_ICount -= 21; { ASLB_M(IN); } } -static void aslb_ind(void) { t11_ICount -= 27; { ASLB_M(IND); } } -static void aslb_de(void) { t11_ICount -= 24; { ASLB_M(DE); } } -static void aslb_ded(void) { t11_ICount -= 30; { ASLB_M(DED); } } -static void aslb_ix(void) { t11_ICount -= 30; { ASLB_M(IX); } } -static void aslb_ixd(void) { t11_ICount -= 36; { ASLB_M(IXD); } } - -static void mtps_rg(void) { t11_ICount -= 24; { MTPS_R(RG); } } -static void mtps_rgd(void) { t11_ICount -= 30; { MTPS_M(RGD); } } -static void mtps_in(void) { t11_ICount -= 30; { MTPS_M(IN); } } -static void mtps_ind(void) { t11_ICount -= 36; { MTPS_M(IND); } } -static void mtps_de(void) { t11_ICount -= 33; { MTPS_M(DE); } } -static void mtps_ded(void) { t11_ICount -= 39; { MTPS_M(DED); } } -static void mtps_ix(void) { t11_ICount -= 39; { MTPS_M(IX); } } -static void mtps_ixd(void) { t11_ICount -= 45; { MTPS_M(IXD); } } - -static void mfps_rg(void) { t11_ICount -= 12; { MFPS_R(RG); } } -static void mfps_rgd(void) { t11_ICount -= 21; { MFPS_M(RGD); } } -static void mfps_in(void) { t11_ICount -= 21; { MFPS_M(IN); } } -static void mfps_ind(void) { t11_ICount -= 27; { MFPS_M(IND); } } -static void mfps_de(void) { t11_ICount -= 24; { MFPS_M(DE); } } -static void mfps_ded(void) { t11_ICount -= 30; { MFPS_M(DED); } } -static void mfps_ix(void) { t11_ICount -= 30; { MFPS_M(IX); } } -static void mfps_ixd(void) { t11_ICount -= 36; { MFPS_M(IXD); } } - -static void movb_rg_rg(void) { t11_ICount -= 9+ 3; { MOVB_R(RG,RG); } } -static void movb_rg_rgd(void) { t11_ICount -= 9+12; { MOVB_M(RG,RGD); } } -static void movb_rg_in(void) { t11_ICount -= 9+12; { MOVB_M(RG,IN); } } -static void movb_rg_ind(void) { t11_ICount -= 9+18; { MOVB_M(RG,IND); } } -static void movb_rg_de(void) { t11_ICount -= 9+15; { MOVB_M(RG,DE); } } -static void movb_rg_ded(void) { t11_ICount -= 9+21; { MOVB_M(RG,DED); } } -static void movb_rg_ix(void) { t11_ICount -= 9+21; { MOVB_M(RG,IX); } } -static void movb_rg_ixd(void) { t11_ICount -= 9+27; { MOVB_M(RG,IXD); } } -static void movb_rgd_rg(void) { t11_ICount -= 15+ 3; { MOVB_X(RGD,RG); } } -static void movb_rgd_rgd(void) { t11_ICount -= 15+12; { MOVB_M(RGD,RGD); } } -static void movb_rgd_in(void) { t11_ICount -= 15+12; { MOVB_M(RGD,IN); } } -static void movb_rgd_ind(void) { t11_ICount -= 15+18; { MOVB_M(RGD,IND); } } -static void movb_rgd_de(void) { t11_ICount -= 15+15; { MOVB_M(RGD,DE); } } -static void movb_rgd_ded(void) { t11_ICount -= 15+21; { MOVB_M(RGD,DED); } } -static void movb_rgd_ix(void) { t11_ICount -= 15+21; { MOVB_M(RGD,IX); } } -static void movb_rgd_ixd(void) { t11_ICount -= 15+27; { MOVB_M(RGD,IXD); } } -static void movb_in_rg(void) { t11_ICount -= 15+ 3; { MOVB_X(IN,RG); } } -static void movb_in_rgd(void) { t11_ICount -= 15+12; { MOVB_M(IN,RGD); } } -static void movb_in_in(void) { t11_ICount -= 15+12; { MOVB_M(IN,IN); } } -static void movb_in_ind(void) { t11_ICount -= 15+18; { MOVB_M(IN,IND); } } -static void movb_in_de(void) { t11_ICount -= 15+15; { MOVB_M(IN,DE); } } -static void movb_in_ded(void) { t11_ICount -= 15+21; { MOVB_M(IN,DED); } } -static void movb_in_ix(void) { t11_ICount -= 15+21; { MOVB_M(IN,IX); } } -static void movb_in_ixd(void) { t11_ICount -= 15+27; { MOVB_M(IN,IXD); } } -static void movb_ind_rg(void) { t11_ICount -= 21+ 3; { MOVB_X(IND,RG); } } -static void movb_ind_rgd(void) { t11_ICount -= 21+12; { MOVB_M(IND,RGD); } } -static void movb_ind_in(void) { t11_ICount -= 21+12; { MOVB_M(IND,IN); } } -static void movb_ind_ind(void) { t11_ICount -= 21+18; { MOVB_M(IND,IND); } } -static void movb_ind_de(void) { t11_ICount -= 21+15; { MOVB_M(IND,DE); } } -static void movb_ind_ded(void) { t11_ICount -= 21+21; { MOVB_M(IND,DED); } } -static void movb_ind_ix(void) { t11_ICount -= 21+21; { MOVB_M(IND,IX); } } -static void movb_ind_ixd(void) { t11_ICount -= 21+27; { MOVB_M(IND,IXD); } } -static void movb_de_rg(void) { t11_ICount -= 18+ 3; { MOVB_X(DE,RG); } } -static void movb_de_rgd(void) { t11_ICount -= 18+12; { MOVB_M(DE,RGD); } } -static void movb_de_in(void) { t11_ICount -= 18+12; { MOVB_M(DE,IN); } } -static void movb_de_ind(void) { t11_ICount -= 18+18; { MOVB_M(DE,IND); } } -static void movb_de_de(void) { t11_ICount -= 18+15; { MOVB_M(DE,DE); } } -static void movb_de_ded(void) { t11_ICount -= 18+21; { MOVB_M(DE,DED); } } -static void movb_de_ix(void) { t11_ICount -= 18+21; { MOVB_M(DE,IX); } } -static void movb_de_ixd(void) { t11_ICount -= 18+27; { MOVB_M(DE,IXD); } } -static void movb_ded_rg(void) { t11_ICount -= 24+ 3; { MOVB_X(DED,RG); } } -static void movb_ded_rgd(void) { t11_ICount -= 24+12; { MOVB_M(DED,RGD); } } -static void movb_ded_in(void) { t11_ICount -= 24+12; { MOVB_M(DED,IN); } } -static void movb_ded_ind(void) { t11_ICount -= 24+18; { MOVB_M(DED,IND); } } -static void movb_ded_de(void) { t11_ICount -= 24+15; { MOVB_M(DED,DE); } } -static void movb_ded_ded(void) { t11_ICount -= 24+21; { MOVB_M(DED,DED); } } -static void movb_ded_ix(void) { t11_ICount -= 24+21; { MOVB_M(DED,IX); } } -static void movb_ded_ixd(void) { t11_ICount -= 24+27; { MOVB_M(DED,IXD); } } -static void movb_ix_rg(void) { t11_ICount -= 24+ 3; { MOVB_X(IX,RG); } } -static void movb_ix_rgd(void) { t11_ICount -= 24+12; { MOVB_M(IX,RGD); } } -static void movb_ix_in(void) { t11_ICount -= 24+12; { MOVB_M(IX,IN); } } -static void movb_ix_ind(void) { t11_ICount -= 24+18; { MOVB_M(IX,IND); } } -static void movb_ix_de(void) { t11_ICount -= 24+15; { MOVB_M(IX,DE); } } -static void movb_ix_ded(void) { t11_ICount -= 24+21; { MOVB_M(IX,DED); } } -static void movb_ix_ix(void) { t11_ICount -= 24+21; { MOVB_M(IX,IX); } } -static void movb_ix_ixd(void) { t11_ICount -= 24+27; { MOVB_M(IX,IXD); } } -static void movb_ixd_rg(void) { t11_ICount -= 30+ 3; { MOVB_X(IXD,RG); } } -static void movb_ixd_rgd(void) { t11_ICount -= 30+12; { MOVB_M(IXD,RGD); } } -static void movb_ixd_in(void) { t11_ICount -= 30+12; { MOVB_M(IXD,IN); } } -static void movb_ixd_ind(void) { t11_ICount -= 30+18; { MOVB_M(IXD,IND); } } -static void movb_ixd_de(void) { t11_ICount -= 30+15; { MOVB_M(IXD,DE); } } -static void movb_ixd_ded(void) { t11_ICount -= 30+21; { MOVB_M(IXD,DED); } } -static void movb_ixd_ix(void) { t11_ICount -= 30+21; { MOVB_M(IXD,IX); } } -static void movb_ixd_ixd(void) { t11_ICount -= 30+27; { MOVB_M(IXD,IXD); } } - -static void cmpb_rg_rg(void) { t11_ICount -= 9+ 3; { CMPB_R(RG,RG); } } -static void cmpb_rg_rgd(void) { t11_ICount -= 9+ 9; { CMPB_M(RG,RGD); } } -static void cmpb_rg_in(void) { t11_ICount -= 9+ 9; { CMPB_M(RG,IN); } } -static void cmpb_rg_ind(void) { t11_ICount -= 9+15; { CMPB_M(RG,IND); } } -static void cmpb_rg_de(void) { t11_ICount -= 9+12; { CMPB_M(RG,DE); } } -static void cmpb_rg_ded(void) { t11_ICount -= 9+18; { CMPB_M(RG,DED); } } -static void cmpb_rg_ix(void) { t11_ICount -= 9+18; { CMPB_M(RG,IX); } } -static void cmpb_rg_ixd(void) { t11_ICount -= 9+24; { CMPB_M(RG,IXD); } } -static void cmpb_rgd_rg(void) { t11_ICount -= 15+ 3; { CMPB_M(RGD,RG); } } -static void cmpb_rgd_rgd(void) { t11_ICount -= 15+ 9; { CMPB_M(RGD,RGD); } } -static void cmpb_rgd_in(void) { t11_ICount -= 15+ 9; { CMPB_M(RGD,IN); } } -static void cmpb_rgd_ind(void) { t11_ICount -= 15+15; { CMPB_M(RGD,IND); } } -static void cmpb_rgd_de(void) { t11_ICount -= 15+12; { CMPB_M(RGD,DE); } } -static void cmpb_rgd_ded(void) { t11_ICount -= 15+18; { CMPB_M(RGD,DED); } } -static void cmpb_rgd_ix(void) { t11_ICount -= 15+18; { CMPB_M(RGD,IX); } } -static void cmpb_rgd_ixd(void) { t11_ICount -= 15+24; { CMPB_M(RGD,IXD); } } -static void cmpb_in_rg(void) { t11_ICount -= 15+ 3; { CMPB_M(IN,RG); } } -static void cmpb_in_rgd(void) { t11_ICount -= 15+ 9; { CMPB_M(IN,RGD); } } -static void cmpb_in_in(void) { t11_ICount -= 15+ 9; { CMPB_M(IN,IN); } } -static void cmpb_in_ind(void) { t11_ICount -= 15+15; { CMPB_M(IN,IND); } } -static void cmpb_in_de(void) { t11_ICount -= 15+12; { CMPB_M(IN,DE); } } -static void cmpb_in_ded(void) { t11_ICount -= 15+18; { CMPB_M(IN,DED); } } -static void cmpb_in_ix(void) { t11_ICount -= 15+18; { CMPB_M(IN,IX); } } -static void cmpb_in_ixd(void) { t11_ICount -= 15+24; { CMPB_M(IN,IXD); } } -static void cmpb_ind_rg(void) { t11_ICount -= 21+ 3; { CMPB_M(IND,RG); } } -static void cmpb_ind_rgd(void) { t11_ICount -= 21+ 9; { CMPB_M(IND,RGD); } } -static void cmpb_ind_in(void) { t11_ICount -= 21+ 9; { CMPB_M(IND,IN); } } -static void cmpb_ind_ind(void) { t11_ICount -= 21+15; { CMPB_M(IND,IND); } } -static void cmpb_ind_de(void) { t11_ICount -= 21+12; { CMPB_M(IND,DE); } } -static void cmpb_ind_ded(void) { t11_ICount -= 21+18; { CMPB_M(IND,DED); } } -static void cmpb_ind_ix(void) { t11_ICount -= 21+18; { CMPB_M(IND,IX); } } -static void cmpb_ind_ixd(void) { t11_ICount -= 21+24; { CMPB_M(IND,IXD); } } -static void cmpb_de_rg(void) { t11_ICount -= 18+ 3; { CMPB_M(DE,RG); } } -static void cmpb_de_rgd(void) { t11_ICount -= 18+ 9; { CMPB_M(DE,RGD); } } -static void cmpb_de_in(void) { t11_ICount -= 18+ 9; { CMPB_M(DE,IN); } } -static void cmpb_de_ind(void) { t11_ICount -= 18+15; { CMPB_M(DE,IND); } } -static void cmpb_de_de(void) { t11_ICount -= 18+12; { CMPB_M(DE,DE); } } -static void cmpb_de_ded(void) { t11_ICount -= 18+18; { CMPB_M(DE,DED); } } -static void cmpb_de_ix(void) { t11_ICount -= 18+18; { CMPB_M(DE,IX); } } -static void cmpb_de_ixd(void) { t11_ICount -= 18+24; { CMPB_M(DE,IXD); } } -static void cmpb_ded_rg(void) { t11_ICount -= 24+ 3; { CMPB_M(DED,RG); } } -static void cmpb_ded_rgd(void) { t11_ICount -= 24+ 9; { CMPB_M(DED,RGD); } } -static void cmpb_ded_in(void) { t11_ICount -= 24+ 9; { CMPB_M(DED,IN); } } -static void cmpb_ded_ind(void) { t11_ICount -= 24+15; { CMPB_M(DED,IND); } } -static void cmpb_ded_de(void) { t11_ICount -= 24+12; { CMPB_M(DED,DE); } } -static void cmpb_ded_ded(void) { t11_ICount -= 24+18; { CMPB_M(DED,DED); } } -static void cmpb_ded_ix(void) { t11_ICount -= 24+18; { CMPB_M(DED,IX); } } -static void cmpb_ded_ixd(void) { t11_ICount -= 24+24; { CMPB_M(DED,IXD); } } -static void cmpb_ix_rg(void) { t11_ICount -= 24+ 3; { CMPB_M(IX,RG); } } -static void cmpb_ix_rgd(void) { t11_ICount -= 24+ 9; { CMPB_M(IX,RGD); } } -static void cmpb_ix_in(void) { t11_ICount -= 24+ 9; { CMPB_M(IX,IN); } } -static void cmpb_ix_ind(void) { t11_ICount -= 24+15; { CMPB_M(IX,IND); } } -static void cmpb_ix_de(void) { t11_ICount -= 24+12; { CMPB_M(IX,DE); } } -static void cmpb_ix_ded(void) { t11_ICount -= 24+18; { CMPB_M(IX,DED); } } -static void cmpb_ix_ix(void) { t11_ICount -= 24+18; { CMPB_M(IX,IX); } } -static void cmpb_ix_ixd(void) { t11_ICount -= 24+24; { CMPB_M(IX,IXD); } } -static void cmpb_ixd_rg(void) { t11_ICount -= 30+ 3; { CMPB_M(IXD,RG); } } -static void cmpb_ixd_rgd(void) { t11_ICount -= 30+ 9; { CMPB_M(IXD,RGD); } } -static void cmpb_ixd_in(void) { t11_ICount -= 30+ 9; { CMPB_M(IXD,IN); } } -static void cmpb_ixd_ind(void) { t11_ICount -= 30+15; { CMPB_M(IXD,IND); } } -static void cmpb_ixd_de(void) { t11_ICount -= 30+12; { CMPB_M(IXD,DE); } } -static void cmpb_ixd_ded(void) { t11_ICount -= 30+18; { CMPB_M(IXD,DED); } } -static void cmpb_ixd_ix(void) { t11_ICount -= 30+18; { CMPB_M(IXD,IX); } } -static void cmpb_ixd_ixd(void) { t11_ICount -= 30+24; { CMPB_M(IXD,IXD); } } - -static void bitb_rg_rg(void) { t11_ICount -= 9+ 3; { BITB_R(RG,RG); } } -static void bitb_rg_rgd(void) { t11_ICount -= 9+ 9; { BITB_M(RG,RGD); } } -static void bitb_rg_in(void) { t11_ICount -= 9+ 9; { BITB_M(RG,IN); } } -static void bitb_rg_ind(void) { t11_ICount -= 9+15; { BITB_M(RG,IND); } } -static void bitb_rg_de(void) { t11_ICount -= 9+12; { BITB_M(RG,DE); } } -static void bitb_rg_ded(void) { t11_ICount -= 9+18; { BITB_M(RG,DED); } } -static void bitb_rg_ix(void) { t11_ICount -= 9+18; { BITB_M(RG,IX); } } -static void bitb_rg_ixd(void) { t11_ICount -= 9+24; { BITB_M(RG,IXD); } } -static void bitb_rgd_rg(void) { t11_ICount -= 15+ 3; { BITB_M(RGD,RG); } } -static void bitb_rgd_rgd(void) { t11_ICount -= 15+ 9; { BITB_M(RGD,RGD); } } -static void bitb_rgd_in(void) { t11_ICount -= 15+ 9; { BITB_M(RGD,IN); } } -static void bitb_rgd_ind(void) { t11_ICount -= 15+15; { BITB_M(RGD,IND); } } -static void bitb_rgd_de(void) { t11_ICount -= 15+12; { BITB_M(RGD,DE); } } -static void bitb_rgd_ded(void) { t11_ICount -= 15+18; { BITB_M(RGD,DED); } } -static void bitb_rgd_ix(void) { t11_ICount -= 15+18; { BITB_M(RGD,IX); } } -static void bitb_rgd_ixd(void) { t11_ICount -= 15+24; { BITB_M(RGD,IXD); } } -static void bitb_in_rg(void) { t11_ICount -= 15+ 3; { BITB_M(IN,RG); } } -static void bitb_in_rgd(void) { t11_ICount -= 15+ 9; { BITB_M(IN,RGD); } } -static void bitb_in_in(void) { t11_ICount -= 15+ 9; { BITB_M(IN,IN); } } -static void bitb_in_ind(void) { t11_ICount -= 15+15; { BITB_M(IN,IND); } } -static void bitb_in_de(void) { t11_ICount -= 15+12; { BITB_M(IN,DE); } } -static void bitb_in_ded(void) { t11_ICount -= 15+18; { BITB_M(IN,DED); } } -static void bitb_in_ix(void) { t11_ICount -= 15+18; { BITB_M(IN,IX); } } -static void bitb_in_ixd(void) { t11_ICount -= 15+24; { BITB_M(IN,IXD); } } -static void bitb_ind_rg(void) { t11_ICount -= 21+ 3; { BITB_M(IND,RG); } } -static void bitb_ind_rgd(void) { t11_ICount -= 21+ 9; { BITB_M(IND,RGD); } } -static void bitb_ind_in(void) { t11_ICount -= 21+ 9; { BITB_M(IND,IN); } } -static void bitb_ind_ind(void) { t11_ICount -= 21+15; { BITB_M(IND,IND); } } -static void bitb_ind_de(void) { t11_ICount -= 21+12; { BITB_M(IND,DE); } } -static void bitb_ind_ded(void) { t11_ICount -= 21+18; { BITB_M(IND,DED); } } -static void bitb_ind_ix(void) { t11_ICount -= 21+18; { BITB_M(IND,IX); } } -static void bitb_ind_ixd(void) { t11_ICount -= 21+24; { BITB_M(IND,IXD); } } -static void bitb_de_rg(void) { t11_ICount -= 18+ 3; { BITB_M(DE,RG); } } -static void bitb_de_rgd(void) { t11_ICount -= 18+ 9; { BITB_M(DE,RGD); } } -static void bitb_de_in(void) { t11_ICount -= 18+ 9; { BITB_M(DE,IN); } } -static void bitb_de_ind(void) { t11_ICount -= 18+15; { BITB_M(DE,IND); } } -static void bitb_de_de(void) { t11_ICount -= 18+12; { BITB_M(DE,DE); } } -static void bitb_de_ded(void) { t11_ICount -= 18+18; { BITB_M(DE,DED); } } -static void bitb_de_ix(void) { t11_ICount -= 18+18; { BITB_M(DE,IX); } } -static void bitb_de_ixd(void) { t11_ICount -= 18+24; { BITB_M(DE,IXD); } } -static void bitb_ded_rg(void) { t11_ICount -= 24+ 3; { BITB_M(DED,RG); } } -static void bitb_ded_rgd(void) { t11_ICount -= 24+ 9; { BITB_M(DED,RGD); } } -static void bitb_ded_in(void) { t11_ICount -= 24+ 9; { BITB_M(DED,IN); } } -static void bitb_ded_ind(void) { t11_ICount -= 24+15; { BITB_M(DED,IND); } } -static void bitb_ded_de(void) { t11_ICount -= 24+12; { BITB_M(DED,DE); } } -static void bitb_ded_ded(void) { t11_ICount -= 24+18; { BITB_M(DED,DED); } } -static void bitb_ded_ix(void) { t11_ICount -= 24+18; { BITB_M(DED,IX); } } -static void bitb_ded_ixd(void) { t11_ICount -= 24+24; { BITB_M(DED,IXD); } } -static void bitb_ix_rg(void) { t11_ICount -= 24+ 3; { BITB_M(IX,RG); } } -static void bitb_ix_rgd(void) { t11_ICount -= 24+ 9; { BITB_M(IX,RGD); } } -static void bitb_ix_in(void) { t11_ICount -= 24+ 9; { BITB_M(IX,IN); } } -static void bitb_ix_ind(void) { t11_ICount -= 24+15; { BITB_M(IX,IND); } } -static void bitb_ix_de(void) { t11_ICount -= 24+12; { BITB_M(IX,DE); } } -static void bitb_ix_ded(void) { t11_ICount -= 24+18; { BITB_M(IX,DED); } } -static void bitb_ix_ix(void) { t11_ICount -= 24+18; { BITB_M(IX,IX); } } -static void bitb_ix_ixd(void) { t11_ICount -= 24+24; { BITB_M(IX,IXD); } } -static void bitb_ixd_rg(void) { t11_ICount -= 30+ 3; { BITB_M(IXD,RG); } } -static void bitb_ixd_rgd(void) { t11_ICount -= 30+ 9; { BITB_M(IXD,RGD); } } -static void bitb_ixd_in(void) { t11_ICount -= 30+ 9; { BITB_M(IXD,IN); } } -static void bitb_ixd_ind(void) { t11_ICount -= 30+15; { BITB_M(IXD,IND); } } -static void bitb_ixd_de(void) { t11_ICount -= 30+12; { BITB_M(IXD,DE); } } -static void bitb_ixd_ded(void) { t11_ICount -= 30+18; { BITB_M(IXD,DED); } } -static void bitb_ixd_ix(void) { t11_ICount -= 30+18; { BITB_M(IXD,IX); } } -static void bitb_ixd_ixd(void) { t11_ICount -= 30+24; { BITB_M(IXD,IXD); } } - -static void bicb_rg_rg(void) { t11_ICount -= 9+ 3; { BICB_R(RG,RG); } } -static void bicb_rg_rgd(void) { t11_ICount -= 9+12; { BICB_M(RG,RGD); } } -static void bicb_rg_in(void) { t11_ICount -= 9+12; { BICB_M(RG,IN); } } -static void bicb_rg_ind(void) { t11_ICount -= 9+18; { BICB_M(RG,IND); } } -static void bicb_rg_de(void) { t11_ICount -= 9+15; { BICB_M(RG,DE); } } -static void bicb_rg_ded(void) { t11_ICount -= 9+21; { BICB_M(RG,DED); } } -static void bicb_rg_ix(void) { t11_ICount -= 9+21; { BICB_M(RG,IX); } } -static void bicb_rg_ixd(void) { t11_ICount -= 9+27; { BICB_M(RG,IXD); } } -static void bicb_rgd_rg(void) { t11_ICount -= 15+ 3; { BICB_X(RGD,RG); } } -static void bicb_rgd_rgd(void) { t11_ICount -= 15+12; { BICB_M(RGD,RGD); } } -static void bicb_rgd_in(void) { t11_ICount -= 15+12; { BICB_M(RGD,IN); } } -static void bicb_rgd_ind(void) { t11_ICount -= 15+18; { BICB_M(RGD,IND); } } -static void bicb_rgd_de(void) { t11_ICount -= 15+15; { BICB_M(RGD,DE); } } -static void bicb_rgd_ded(void) { t11_ICount -= 15+21; { BICB_M(RGD,DED); } } -static void bicb_rgd_ix(void) { t11_ICount -= 15+21; { BICB_M(RGD,IX); } } -static void bicb_rgd_ixd(void) { t11_ICount -= 15+27; { BICB_M(RGD,IXD); } } -static void bicb_in_rg(void) { t11_ICount -= 15+ 3; { BICB_X(IN,RG); } } -static void bicb_in_rgd(void) { t11_ICount -= 15+12; { BICB_M(IN,RGD); } } -static void bicb_in_in(void) { t11_ICount -= 15+12; { BICB_M(IN,IN); } } -static void bicb_in_ind(void) { t11_ICount -= 15+18; { BICB_M(IN,IND); } } -static void bicb_in_de(void) { t11_ICount -= 15+15; { BICB_M(IN,DE); } } -static void bicb_in_ded(void) { t11_ICount -= 15+21; { BICB_M(IN,DED); } } -static void bicb_in_ix(void) { t11_ICount -= 15+21; { BICB_M(IN,IX); } } -static void bicb_in_ixd(void) { t11_ICount -= 15+27; { BICB_M(IN,IXD); } } -static void bicb_ind_rg(void) { t11_ICount -= 21+ 3; { BICB_X(IND,RG); } } -static void bicb_ind_rgd(void) { t11_ICount -= 21+12; { BICB_M(IND,RGD); } } -static void bicb_ind_in(void) { t11_ICount -= 21+12; { BICB_M(IND,IN); } } -static void bicb_ind_ind(void) { t11_ICount -= 21+18; { BICB_M(IND,IND); } } -static void bicb_ind_de(void) { t11_ICount -= 21+15; { BICB_M(IND,DE); } } -static void bicb_ind_ded(void) { t11_ICount -= 21+21; { BICB_M(IND,DED); } } -static void bicb_ind_ix(void) { t11_ICount -= 21+21; { BICB_M(IND,IX); } } -static void bicb_ind_ixd(void) { t11_ICount -= 21+27; { BICB_M(IND,IXD); } } -static void bicb_de_rg(void) { t11_ICount -= 18+ 3; { BICB_X(DE,RG); } } -static void bicb_de_rgd(void) { t11_ICount -= 18+12; { BICB_M(DE,RGD); } } -static void bicb_de_in(void) { t11_ICount -= 18+12; { BICB_M(DE,IN); } } -static void bicb_de_ind(void) { t11_ICount -= 18+18; { BICB_M(DE,IND); } } -static void bicb_de_de(void) { t11_ICount -= 18+15; { BICB_M(DE,DE); } } -static void bicb_de_ded(void) { t11_ICount -= 18+21; { BICB_M(DE,DED); } } -static void bicb_de_ix(void) { t11_ICount -= 18+21; { BICB_M(DE,IX); } } -static void bicb_de_ixd(void) { t11_ICount -= 18+27; { BICB_M(DE,IXD); } } -static void bicb_ded_rg(void) { t11_ICount -= 24+ 3; { BICB_X(DED,RG); } } -static void bicb_ded_rgd(void) { t11_ICount -= 24+12; { BICB_M(DED,RGD); } } -static void bicb_ded_in(void) { t11_ICount -= 24+12; { BICB_M(DED,IN); } } -static void bicb_ded_ind(void) { t11_ICount -= 24+18; { BICB_M(DED,IND); } } -static void bicb_ded_de(void) { t11_ICount -= 24+15; { BICB_M(DED,DE); } } -static void bicb_ded_ded(void) { t11_ICount -= 24+21; { BICB_M(DED,DED); } } -static void bicb_ded_ix(void) { t11_ICount -= 24+21; { BICB_M(DED,IX); } } -static void bicb_ded_ixd(void) { t11_ICount -= 24+27; { BICB_M(DED,IXD); } } -static void bicb_ix_rg(void) { t11_ICount -= 24+ 3; { BICB_X(IX,RG); } } -static void bicb_ix_rgd(void) { t11_ICount -= 24+12; { BICB_M(IX,RGD); } } -static void bicb_ix_in(void) { t11_ICount -= 24+12; { BICB_M(IX,IN); } } -static void bicb_ix_ind(void) { t11_ICount -= 24+18; { BICB_M(IX,IND); } } -static void bicb_ix_de(void) { t11_ICount -= 24+15; { BICB_M(IX,DE); } } -static void bicb_ix_ded(void) { t11_ICount -= 24+21; { BICB_M(IX,DED); } } -static void bicb_ix_ix(void) { t11_ICount -= 24+21; { BICB_M(IX,IX); } } -static void bicb_ix_ixd(void) { t11_ICount -= 24+27; { BICB_M(IX,IXD); } } -static void bicb_ixd_rg(void) { t11_ICount -= 30+ 3; { BICB_X(IXD,RG); } } -static void bicb_ixd_rgd(void) { t11_ICount -= 30+12; { BICB_M(IXD,RGD); } } -static void bicb_ixd_in(void) { t11_ICount -= 30+12; { BICB_M(IXD,IN); } } -static void bicb_ixd_ind(void) { t11_ICount -= 30+18; { BICB_M(IXD,IND); } } -static void bicb_ixd_de(void) { t11_ICount -= 30+15; { BICB_M(IXD,DE); } } -static void bicb_ixd_ded(void) { t11_ICount -= 30+21; { BICB_M(IXD,DED); } } -static void bicb_ixd_ix(void) { t11_ICount -= 30+21; { BICB_M(IXD,IX); } } -static void bicb_ixd_ixd(void) { t11_ICount -= 30+27; { BICB_M(IXD,IXD); } } - -static void bisb_rg_rg(void) { t11_ICount -= 9+ 3; { BISB_R(RG,RG); } } -static void bisb_rg_rgd(void) { t11_ICount -= 9+12; { BISB_M(RG,RGD); } } -static void bisb_rg_in(void) { t11_ICount -= 9+12; { BISB_M(RG,IN); } } -static void bisb_rg_ind(void) { t11_ICount -= 9+18; { BISB_M(RG,IND); } } -static void bisb_rg_de(void) { t11_ICount -= 9+15; { BISB_M(RG,DE); } } -static void bisb_rg_ded(void) { t11_ICount -= 9+21; { BISB_M(RG,DED); } } -static void bisb_rg_ix(void) { t11_ICount -= 9+21; { BISB_M(RG,IX); } } -static void bisb_rg_ixd(void) { t11_ICount -= 9+27; { BISB_M(RG,IXD); } } -static void bisb_rgd_rg(void) { t11_ICount -= 15+ 3; { BISB_X(RGD,RG); } } -static void bisb_rgd_rgd(void) { t11_ICount -= 15+12; { BISB_M(RGD,RGD); } } -static void bisb_rgd_in(void) { t11_ICount -= 15+12; { BISB_M(RGD,IN); } } -static void bisb_rgd_ind(void) { t11_ICount -= 15+18; { BISB_M(RGD,IND); } } -static void bisb_rgd_de(void) { t11_ICount -= 15+15; { BISB_M(RGD,DE); } } -static void bisb_rgd_ded(void) { t11_ICount -= 15+21; { BISB_M(RGD,DED); } } -static void bisb_rgd_ix(void) { t11_ICount -= 15+21; { BISB_M(RGD,IX); } } -static void bisb_rgd_ixd(void) { t11_ICount -= 15+27; { BISB_M(RGD,IXD); } } -static void bisb_in_rg(void) { t11_ICount -= 15+ 3; { BISB_X(IN,RG); } } -static void bisb_in_rgd(void) { t11_ICount -= 15+12; { BISB_M(IN,RGD); } } -static void bisb_in_in(void) { t11_ICount -= 15+12; { BISB_M(IN,IN); } } -static void bisb_in_ind(void) { t11_ICount -= 15+18; { BISB_M(IN,IND); } } -static void bisb_in_de(void) { t11_ICount -= 15+15; { BISB_M(IN,DE); } } -static void bisb_in_ded(void) { t11_ICount -= 15+21; { BISB_M(IN,DED); } } -static void bisb_in_ix(void) { t11_ICount -= 15+21; { BISB_M(IN,IX); } } -static void bisb_in_ixd(void) { t11_ICount -= 15+27; { BISB_M(IN,IXD); } } -static void bisb_ind_rg(void) { t11_ICount -= 21+ 3; { BISB_X(IND,RG); } } -static void bisb_ind_rgd(void) { t11_ICount -= 21+12; { BISB_M(IND,RGD); } } -static void bisb_ind_in(void) { t11_ICount -= 21+12; { BISB_M(IND,IN); } } -static void bisb_ind_ind(void) { t11_ICount -= 21+18; { BISB_M(IND,IND); } } -static void bisb_ind_de(void) { t11_ICount -= 21+15; { BISB_M(IND,DE); } } -static void bisb_ind_ded(void) { t11_ICount -= 21+21; { BISB_M(IND,DED); } } -static void bisb_ind_ix(void) { t11_ICount -= 21+21; { BISB_M(IND,IX); } } -static void bisb_ind_ixd(void) { t11_ICount -= 21+27; { BISB_M(IND,IXD); } } -static void bisb_de_rg(void) { t11_ICount -= 18+ 3; { BISB_X(DE,RG); } } -static void bisb_de_rgd(void) { t11_ICount -= 18+12; { BISB_M(DE,RGD); } } -static void bisb_de_in(void) { t11_ICount -= 18+12; { BISB_M(DE,IN); } } -static void bisb_de_ind(void) { t11_ICount -= 18+18; { BISB_M(DE,IND); } } -static void bisb_de_de(void) { t11_ICount -= 18+15; { BISB_M(DE,DE); } } -static void bisb_de_ded(void) { t11_ICount -= 18+21; { BISB_M(DE,DED); } } -static void bisb_de_ix(void) { t11_ICount -= 18+21; { BISB_M(DE,IX); } } -static void bisb_de_ixd(void) { t11_ICount -= 18+27; { BISB_M(DE,IXD); } } -static void bisb_ded_rg(void) { t11_ICount -= 24+ 3; { BISB_X(DED,RG); } } -static void bisb_ded_rgd(void) { t11_ICount -= 24+12; { BISB_M(DED,RGD); } } -static void bisb_ded_in(void) { t11_ICount -= 24+12; { BISB_M(DED,IN); } } -static void bisb_ded_ind(void) { t11_ICount -= 24+18; { BISB_M(DED,IND); } } -static void bisb_ded_de(void) { t11_ICount -= 24+15; { BISB_M(DED,DE); } } -static void bisb_ded_ded(void) { t11_ICount -= 24+21; { BISB_M(DED,DED); } } -static void bisb_ded_ix(void) { t11_ICount -= 24+21; { BISB_M(DED,IX); } } -static void bisb_ded_ixd(void) { t11_ICount -= 24+27; { BISB_M(DED,IXD); } } -static void bisb_ix_rg(void) { t11_ICount -= 24+ 3; { BISB_X(IX,RG); } } -static void bisb_ix_rgd(void) { t11_ICount -= 24+12; { BISB_M(IX,RGD); } } -static void bisb_ix_in(void) { t11_ICount -= 24+12; { BISB_M(IX,IN); } } -static void bisb_ix_ind(void) { t11_ICount -= 24+18; { BISB_M(IX,IND); } } -static void bisb_ix_de(void) { t11_ICount -= 24+15; { BISB_M(IX,DE); } } -static void bisb_ix_ded(void) { t11_ICount -= 24+21; { BISB_M(IX,DED); } } -static void bisb_ix_ix(void) { t11_ICount -= 24+21; { BISB_M(IX,IX); } } -static void bisb_ix_ixd(void) { t11_ICount -= 24+27; { BISB_M(IX,IXD); } } -static void bisb_ixd_rg(void) { t11_ICount -= 30+ 3; { BISB_X(IXD,RG); } } -static void bisb_ixd_rgd(void) { t11_ICount -= 30+12; { BISB_M(IXD,RGD); } } -static void bisb_ixd_in(void) { t11_ICount -= 30+12; { BISB_M(IXD,IN); } } -static void bisb_ixd_ind(void) { t11_ICount -= 30+18; { BISB_M(IXD,IND); } } -static void bisb_ixd_de(void) { t11_ICount -= 30+15; { BISB_M(IXD,DE); } } -static void bisb_ixd_ded(void) { t11_ICount -= 30+21; { BISB_M(IXD,DED); } } -static void bisb_ixd_ix(void) { t11_ICount -= 30+21; { BISB_M(IXD,IX); } } -static void bisb_ixd_ixd(void) { t11_ICount -= 30+27; { BISB_M(IXD,IXD); } } - -static void sub_rg_rg(void) { t11_ICount -= 9+ 3; { SUB_R(RG,RG); } } -static void sub_rg_rgd(void) { t11_ICount -= 9+12; { SUB_M(RG,RGD); } } -static void sub_rg_in(void) { t11_ICount -= 9+12; { SUB_M(RG,IN); } } -static void sub_rg_ind(void) { t11_ICount -= 9+18; { SUB_M(RG,IND); } } -static void sub_rg_de(void) { t11_ICount -= 9+15; { SUB_M(RG,DE); } } -static void sub_rg_ded(void) { t11_ICount -= 9+21; { SUB_M(RG,DED); } } -static void sub_rg_ix(void) { t11_ICount -= 9+21; { SUB_M(RG,IX); } } -static void sub_rg_ixd(void) { t11_ICount -= 9+27; { SUB_M(RG,IXD); } } -static void sub_rgd_rg(void) { t11_ICount -= 15+ 3; { SUB_X(RGD,RG); } } -static void sub_rgd_rgd(void) { t11_ICount -= 15+12; { SUB_M(RGD,RGD); } } -static void sub_rgd_in(void) { t11_ICount -= 15+12; { SUB_M(RGD,IN); } } -static void sub_rgd_ind(void) { t11_ICount -= 15+18; { SUB_M(RGD,IND); } } -static void sub_rgd_de(void) { t11_ICount -= 15+15; { SUB_M(RGD,DE); } } -static void sub_rgd_ded(void) { t11_ICount -= 15+21; { SUB_M(RGD,DED); } } -static void sub_rgd_ix(void) { t11_ICount -= 15+21; { SUB_M(RGD,IX); } } -static void sub_rgd_ixd(void) { t11_ICount -= 15+27; { SUB_M(RGD,IXD); } } -static void sub_in_rg(void) { t11_ICount -= 15+ 3; { SUB_X(IN,RG); } } -static void sub_in_rgd(void) { t11_ICount -= 15+12; { SUB_M(IN,RGD); } } -static void sub_in_in(void) { t11_ICount -= 15+12; { SUB_M(IN,IN); } } -static void sub_in_ind(void) { t11_ICount -= 15+18; { SUB_M(IN,IND); } } -static void sub_in_de(void) { t11_ICount -= 15+15; { SUB_M(IN,DE); } } -static void sub_in_ded(void) { t11_ICount -= 15+21; { SUB_M(IN,DED); } } -static void sub_in_ix(void) { t11_ICount -= 15+21; { SUB_M(IN,IX); } } -static void sub_in_ixd(void) { t11_ICount -= 15+27; { SUB_M(IN,IXD); } } -static void sub_ind_rg(void) { t11_ICount -= 21+ 3; { SUB_X(IND,RG); } } -static void sub_ind_rgd(void) { t11_ICount -= 21+12; { SUB_M(IND,RGD); } } -static void sub_ind_in(void) { t11_ICount -= 21+12; { SUB_M(IND,IN); } } -static void sub_ind_ind(void) { t11_ICount -= 21+18; { SUB_M(IND,IND); } } -static void sub_ind_de(void) { t11_ICount -= 21+15; { SUB_M(IND,DE); } } -static void sub_ind_ded(void) { t11_ICount -= 21+21; { SUB_M(IND,DED); } } -static void sub_ind_ix(void) { t11_ICount -= 21+21; { SUB_M(IND,IX); } } -static void sub_ind_ixd(void) { t11_ICount -= 21+27; { SUB_M(IND,IXD); } } -static void sub_de_rg(void) { t11_ICount -= 18+ 3; { SUB_X(DE,RG); } } -static void sub_de_rgd(void) { t11_ICount -= 18+12; { SUB_M(DE,RGD); } } -static void sub_de_in(void) { t11_ICount -= 18+12; { SUB_M(DE,IN); } } -static void sub_de_ind(void) { t11_ICount -= 18+18; { SUB_M(DE,IND); } } -static void sub_de_de(void) { t11_ICount -= 18+15; { SUB_M(DE,DE); } } -static void sub_de_ded(void) { t11_ICount -= 18+21; { SUB_M(DE,DED); } } -static void sub_de_ix(void) { t11_ICount -= 18+21; { SUB_M(DE,IX); } } -static void sub_de_ixd(void) { t11_ICount -= 18+27; { SUB_M(DE,IXD); } } -static void sub_ded_rg(void) { t11_ICount -= 24+ 3; { SUB_X(DED,RG); } } -static void sub_ded_rgd(void) { t11_ICount -= 24+12; { SUB_M(DED,RGD); } } -static void sub_ded_in(void) { t11_ICount -= 24+12; { SUB_M(DED,IN); } } -static void sub_ded_ind(void) { t11_ICount -= 24+18; { SUB_M(DED,IND); } } -static void sub_ded_de(void) { t11_ICount -= 24+15; { SUB_M(DED,DE); } } -static void sub_ded_ded(void) { t11_ICount -= 24+21; { SUB_M(DED,DED); } } -static void sub_ded_ix(void) { t11_ICount -= 24+21; { SUB_M(DED,IX); } } -static void sub_ded_ixd(void) { t11_ICount -= 24+27; { SUB_M(DED,IXD); } } -static void sub_ix_rg(void) { t11_ICount -= 24+ 3; { SUB_X(IX,RG); } } -static void sub_ix_rgd(void) { t11_ICount -= 24+12; { SUB_M(IX,RGD); } } -static void sub_ix_in(void) { t11_ICount -= 24+12; { SUB_M(IX,IN); } } -static void sub_ix_ind(void) { t11_ICount -= 24+18; { SUB_M(IX,IND); } } -static void sub_ix_de(void) { t11_ICount -= 24+15; { SUB_M(IX,DE); } } -static void sub_ix_ded(void) { t11_ICount -= 24+21; { SUB_M(IX,DED); } } -static void sub_ix_ix(void) { t11_ICount -= 24+21; { SUB_M(IX,IX); } } -static void sub_ix_ixd(void) { t11_ICount -= 24+27; { SUB_M(IX,IXD); } } -static void sub_ixd_rg(void) { t11_ICount -= 30+ 3; { SUB_X(IXD,RG); } } -static void sub_ixd_rgd(void) { t11_ICount -= 30+12; { SUB_M(IXD,RGD); } } -static void sub_ixd_in(void) { t11_ICount -= 30+12; { SUB_M(IXD,IN); } } -static void sub_ixd_ind(void) { t11_ICount -= 30+18; { SUB_M(IXD,IND); } } -static void sub_ixd_de(void) { t11_ICount -= 30+15; { SUB_M(IXD,DE); } } -static void sub_ixd_ded(void) { t11_ICount -= 30+21; { SUB_M(IXD,DED); } } -static void sub_ixd_ix(void) { t11_ICount -= 30+21; { SUB_M(IXD,IX); } } -static void sub_ixd_ixd(void) { t11_ICount -= 30+27; { SUB_M(IXD,IXD); } } +static void clrb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { CLRB_R(RG); } } +static void clrb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { CLRB_M(RGD); } } +static void clrb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { CLRB_M(IN); } } +static void clrb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { CLRB_M(IND); } } +static void clrb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { CLRB_M(DE); } } +static void clrb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { CLRB_M(DED); } } +static void clrb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { CLRB_M(IX); } } +static void clrb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { CLRB_M(IXD); } } + +static void comb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { COMB_R(RG); } } +static void comb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { COMB_M(RGD); } } +static void comb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { COMB_M(IN); } } +static void comb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { COMB_M(IND); } } +static void comb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { COMB_M(DE); } } +static void comb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { COMB_M(DED); } } +static void comb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { COMB_M(IX); } } +static void comb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { COMB_M(IXD); } } + +static void incb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { INCB_R(RG); } } +static void incb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { INCB_M(RGD); } } +static void incb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { INCB_M(IN); } } +static void incb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { INCB_M(IND); } } +static void incb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { INCB_M(DE); } } +static void incb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { INCB_M(DED); } } +static void incb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { INCB_M(IX); } } +static void incb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { INCB_M(IXD); } } + +static void decb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { DECB_R(RG); } } +static void decb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { DECB_M(RGD); } } +static void decb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { DECB_M(IN); } } +static void decb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { DECB_M(IND); } } +static void decb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { DECB_M(DE); } } +static void decb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { DECB_M(DED); } } +static void decb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { DECB_M(IX); } } +static void decb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { DECB_M(IXD); } } + +static void negb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { NEGB_R(RG); } } +static void negb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { NEGB_M(RGD); } } +static void negb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { NEGB_M(IN); } } +static void negb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { NEGB_M(IND); } } +static void negb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { NEGB_M(DE); } } +static void negb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { NEGB_M(DED); } } +static void negb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { NEGB_M(IX); } } +static void negb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { NEGB_M(IXD); } } + +static void adcb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ADCB_R(RG); } } +static void adcb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ADCB_M(RGD); } } +static void adcb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ADCB_M(IN); } } +static void adcb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ADCB_M(IND); } } +static void adcb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ADCB_M(DE); } } +static void adcb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ADCB_M(DED); } } +static void adcb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ADCB_M(IX); } } +static void adcb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ADCB_M(IXD); } } + +static void sbcb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { SBCB_R(RG); } } +static void sbcb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SBCB_M(RGD); } } +static void sbcb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { SBCB_M(IN); } } +static void sbcb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { SBCB_M(IND); } } +static void sbcb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { SBCB_M(DE); } } +static void sbcb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SBCB_M(DED); } } +static void sbcb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { SBCB_M(IX); } } +static void sbcb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { SBCB_M(IXD); } } + +static void tstb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { TSTB_R(RG); } } +static void tstb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { TSTB_M(RGD); } } +static void tstb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18; { TSTB_M(IN); } } +static void tstb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { TSTB_M(IND); } } +static void tstb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { TSTB_M(DE); } } +static void tstb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { TSTB_M(DED); } } +static void tstb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { TSTB_M(IX); } } +static void tstb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 33; { TSTB_M(IXD); } } + +static void rorb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { RORB_R(RG); } } +static void rorb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { RORB_M(RGD); } } +static void rorb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { RORB_M(IN); } } +static void rorb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { RORB_M(IND); } } +static void rorb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { RORB_M(DE); } } +static void rorb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { RORB_M(DED); } } +static void rorb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { RORB_M(IX); } } +static void rorb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { RORB_M(IXD); } } + +static void rolb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ROLB_R(RG); } } +static void rolb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROLB_M(RGD); } } +static void rolb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ROLB_M(IN); } } +static void rolb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ROLB_M(IND); } } +static void rolb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ROLB_M(DE); } } +static void rolb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROLB_M(DED); } } +static void rolb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ROLB_M(IX); } } +static void rolb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ROLB_M(IXD); } } + +static void asrb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ASRB_R(RG); } } +static void asrb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASRB_M(RGD); } } +static void asrb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASRB_M(IN); } } +static void asrb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ASRB_M(IND); } } +static void asrb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ASRB_M(DE); } } +static void asrb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASRB_M(DED); } } +static void asrb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASRB_M(IX); } } +static void asrb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ASRB_M(IXD); } } + +static void aslb_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { ASLB_R(RG); } } +static void aslb_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASLB_M(RGD); } } +static void aslb_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { ASLB_M(IN); } } +static void aslb_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { ASLB_M(IND); } } +static void aslb_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { ASLB_M(DE); } } +static void aslb_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASLB_M(DED); } } +static void aslb_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { ASLB_M(IX); } } +static void aslb_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { ASLB_M(IXD); } } + +static void mtps_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { MTPS_R(RG); } } +static void mtps_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { MTPS_M(RGD); } } +static void mtps_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { MTPS_M(IN); } } +static void mtps_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { MTPS_M(IND); } } +static void mtps_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 33; { MTPS_M(DE); } } +static void mtps_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 39; { MTPS_M(DED); } } +static void mtps_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 39; { MTPS_M(IX); } } +static void mtps_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 45; { MTPS_M(IXD); } } + +static void mfps_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 12; { MFPS_R(RG); } } +static void mfps_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { MFPS_M(RGD); } } +static void mfps_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21; { MFPS_M(IN); } } +static void mfps_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 27; { MFPS_M(IND); } } +static void mfps_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24; { MFPS_M(DE); } } +static void mfps_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { MFPS_M(DED); } } +static void mfps_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30; { MFPS_M(IX); } } +static void mfps_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 36; { MFPS_M(IXD); } } + +static void movb_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { MOVB_R(RG,RG); } } +static void movb_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { MOVB_M(RG,RGD); } } +static void movb_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { MOVB_M(RG,IN); } } +static void movb_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { MOVB_M(RG,IND); } } +static void movb_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { MOVB_M(RG,DE); } } +static void movb_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { MOVB_M(RG,DED); } } +static void movb_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { MOVB_M(RG,IX); } } +static void movb_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { MOVB_M(RG,IXD); } } +static void movb_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { MOVB_X(RGD,RG); } } +static void movb_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOVB_M(RGD,RGD); } } +static void movb_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOVB_M(RGD,IN); } } +static void movb_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { MOVB_M(RGD,IND); } } +static void movb_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { MOVB_M(RGD,DE); } } +static void movb_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOVB_M(RGD,DED); } } +static void movb_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOVB_M(RGD,IX); } } +static void movb_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { MOVB_M(RGD,IXD); } } +static void movb_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { MOVB_X(IN,RG); } } +static void movb_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOVB_M(IN,RGD); } } +static void movb_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { MOVB_M(IN,IN); } } +static void movb_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { MOVB_M(IN,IND); } } +static void movb_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { MOVB_M(IN,DE); } } +static void movb_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOVB_M(IN,DED); } } +static void movb_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { MOVB_M(IN,IX); } } +static void movb_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { MOVB_M(IN,IXD); } } +static void movb_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { MOVB_X(IND,RG); } } +static void movb_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { MOVB_M(IND,RGD); } } +static void movb_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { MOVB_M(IND,IN); } } +static void movb_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { MOVB_M(IND,IND); } } +static void movb_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { MOVB_M(IND,DE); } } +static void movb_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { MOVB_M(IND,DED); } } +static void movb_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { MOVB_M(IND,IX); } } +static void movb_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { MOVB_M(IND,IXD); } } +static void movb_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { MOVB_X(DE,RG); } } +static void movb_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { MOVB_M(DE,RGD); } } +static void movb_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { MOVB_M(DE,IN); } } +static void movb_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { MOVB_M(DE,IND); } } +static void movb_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { MOVB_M(DE,DE); } } +static void movb_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { MOVB_M(DE,DED); } } +static void movb_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { MOVB_M(DE,IX); } } +static void movb_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { MOVB_M(DE,IXD); } } +static void movb_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { MOVB_X(DED,RG); } } +static void movb_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOVB_M(DED,RGD); } } +static void movb_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOVB_M(DED,IN); } } +static void movb_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { MOVB_M(DED,IND); } } +static void movb_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { MOVB_M(DED,DE); } } +static void movb_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOVB_M(DED,DED); } } +static void movb_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOVB_M(DED,IX); } } +static void movb_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { MOVB_M(DED,IXD); } } +static void movb_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { MOVB_X(IX,RG); } } +static void movb_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOVB_M(IX,RGD); } } +static void movb_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { MOVB_M(IX,IN); } } +static void movb_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { MOVB_M(IX,IND); } } +static void movb_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { MOVB_M(IX,DE); } } +static void movb_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOVB_M(IX,DED); } } +static void movb_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { MOVB_M(IX,IX); } } +static void movb_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { MOVB_M(IX,IXD); } } +static void movb_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { MOVB_X(IXD,RG); } } +static void movb_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { MOVB_M(IXD,RGD); } } +static void movb_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { MOVB_M(IXD,IN); } } +static void movb_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { MOVB_M(IXD,IND); } } +static void movb_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { MOVB_M(IXD,DE); } } +static void movb_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { MOVB_M(IXD,DED); } } +static void movb_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { MOVB_M(IXD,IX); } } +static void movb_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { MOVB_M(IXD,IXD); } } + +static void cmpb_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { CMPB_R(RG,RG); } } +static void cmpb_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { CMPB_M(RG,RGD); } } +static void cmpb_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { CMPB_M(RG,IN); } } +static void cmpb_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { CMPB_M(RG,IND); } } +static void cmpb_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { CMPB_M(RG,DE); } } +static void cmpb_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { CMPB_M(RG,DED); } } +static void cmpb_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { CMPB_M(RG,IX); } } +static void cmpb_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+24; { CMPB_M(RG,IXD); } } +static void cmpb_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { CMPB_M(RGD,RG); } } +static void cmpb_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMPB_M(RGD,RGD); } } +static void cmpb_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMPB_M(RGD,IN); } } +static void cmpb_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { CMPB_M(RGD,IND); } } +static void cmpb_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { CMPB_M(RGD,DE); } } +static void cmpb_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMPB_M(RGD,DED); } } +static void cmpb_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMPB_M(RGD,IX); } } +static void cmpb_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { CMPB_M(RGD,IXD); } } +static void cmpb_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { CMPB_M(IN,RG); } } +static void cmpb_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMPB_M(IN,RGD); } } +static void cmpb_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { CMPB_M(IN,IN); } } +static void cmpb_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { CMPB_M(IN,IND); } } +static void cmpb_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { CMPB_M(IN,DE); } } +static void cmpb_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMPB_M(IN,DED); } } +static void cmpb_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { CMPB_M(IN,IX); } } +static void cmpb_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { CMPB_M(IN,IXD); } } +static void cmpb_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { CMPB_M(IND,RG); } } +static void cmpb_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { CMPB_M(IND,RGD); } } +static void cmpb_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { CMPB_M(IND,IN); } } +static void cmpb_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { CMPB_M(IND,IND); } } +static void cmpb_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { CMPB_M(IND,DE); } } +static void cmpb_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { CMPB_M(IND,DED); } } +static void cmpb_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { CMPB_M(IND,IX); } } +static void cmpb_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+24; { CMPB_M(IND,IXD); } } +static void cmpb_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { CMPB_M(DE,RG); } } +static void cmpb_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { CMPB_M(DE,RGD); } } +static void cmpb_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { CMPB_M(DE,IN); } } +static void cmpb_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { CMPB_M(DE,IND); } } +static void cmpb_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { CMPB_M(DE,DE); } } +static void cmpb_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { CMPB_M(DE,DED); } } +static void cmpb_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { CMPB_M(DE,IX); } } +static void cmpb_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+24; { CMPB_M(DE,IXD); } } +static void cmpb_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { CMPB_M(DED,RG); } } +static void cmpb_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMPB_M(DED,RGD); } } +static void cmpb_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMPB_M(DED,IN); } } +static void cmpb_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { CMPB_M(DED,IND); } } +static void cmpb_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { CMPB_M(DED,DE); } } +static void cmpb_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMPB_M(DED,DED); } } +static void cmpb_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMPB_M(DED,IX); } } +static void cmpb_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { CMPB_M(DED,IXD); } } +static void cmpb_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { CMPB_M(IX,RG); } } +static void cmpb_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMPB_M(IX,RGD); } } +static void cmpb_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { CMPB_M(IX,IN); } } +static void cmpb_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { CMPB_M(IX,IND); } } +static void cmpb_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { CMPB_M(IX,DE); } } +static void cmpb_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMPB_M(IX,DED); } } +static void cmpb_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { CMPB_M(IX,IX); } } +static void cmpb_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { CMPB_M(IX,IXD); } } +static void cmpb_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { CMPB_M(IXD,RG); } } +static void cmpb_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { CMPB_M(IXD,RGD); } } +static void cmpb_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { CMPB_M(IXD,IN); } } +static void cmpb_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { CMPB_M(IXD,IND); } } +static void cmpb_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { CMPB_M(IXD,DE); } } +static void cmpb_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { CMPB_M(IXD,DED); } } +static void cmpb_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { CMPB_M(IXD,IX); } } +static void cmpb_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+24; { CMPB_M(IXD,IXD); } } + +static void bitb_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BITB_R(RG,RG); } } +static void bitb_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { BITB_M(RG,RGD); } } +static void bitb_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 9; { BITB_M(RG,IN); } } +static void bitb_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BITB_M(RG,IND); } } +static void bitb_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BITB_M(RG,DE); } } +static void bitb_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BITB_M(RG,DED); } } +static void bitb_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BITB_M(RG,IX); } } +static void bitb_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+24; { BITB_M(RG,IXD); } } +static void bitb_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BITB_M(RGD,RG); } } +static void bitb_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BITB_M(RGD,RGD); } } +static void bitb_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BITB_M(RGD,IN); } } +static void bitb_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BITB_M(RGD,IND); } } +static void bitb_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BITB_M(RGD,DE); } } +static void bitb_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BITB_M(RGD,DED); } } +static void bitb_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BITB_M(RGD,IX); } } +static void bitb_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { BITB_M(RGD,IXD); } } +static void bitb_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BITB_M(IN,RG); } } +static void bitb_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BITB_M(IN,RGD); } } +static void bitb_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 9; { BITB_M(IN,IN); } } +static void bitb_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BITB_M(IN,IND); } } +static void bitb_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BITB_M(IN,DE); } } +static void bitb_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BITB_M(IN,DED); } } +static void bitb_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BITB_M(IN,IX); } } +static void bitb_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+24; { BITB_M(IN,IXD); } } +static void bitb_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BITB_M(IND,RG); } } +static void bitb_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { BITB_M(IND,RGD); } } +static void bitb_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 9; { BITB_M(IND,IN); } } +static void bitb_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BITB_M(IND,IND); } } +static void bitb_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BITB_M(IND,DE); } } +static void bitb_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BITB_M(IND,DED); } } +static void bitb_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BITB_M(IND,IX); } } +static void bitb_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+24; { BITB_M(IND,IXD); } } +static void bitb_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BITB_M(DE,RG); } } +static void bitb_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { BITB_M(DE,RGD); } } +static void bitb_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 9; { BITB_M(DE,IN); } } +static void bitb_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BITB_M(DE,IND); } } +static void bitb_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BITB_M(DE,DE); } } +static void bitb_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BITB_M(DE,DED); } } +static void bitb_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BITB_M(DE,IX); } } +static void bitb_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+24; { BITB_M(DE,IXD); } } +static void bitb_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BITB_M(DED,RG); } } +static void bitb_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BITB_M(DED,RGD); } } +static void bitb_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BITB_M(DED,IN); } } +static void bitb_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BITB_M(DED,IND); } } +static void bitb_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BITB_M(DED,DE); } } +static void bitb_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BITB_M(DED,DED); } } +static void bitb_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BITB_M(DED,IX); } } +static void bitb_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { BITB_M(DED,IXD); } } +static void bitb_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BITB_M(IX,RG); } } +static void bitb_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BITB_M(IX,RGD); } } +static void bitb_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 9; { BITB_M(IX,IN); } } +static void bitb_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BITB_M(IX,IND); } } +static void bitb_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BITB_M(IX,DE); } } +static void bitb_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BITB_M(IX,DED); } } +static void bitb_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BITB_M(IX,IX); } } +static void bitb_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+24; { BITB_M(IX,IXD); } } +static void bitb_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BITB_M(IXD,RG); } } +static void bitb_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { BITB_M(IXD,RGD); } } +static void bitb_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 9; { BITB_M(IXD,IN); } } +static void bitb_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BITB_M(IXD,IND); } } +static void bitb_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BITB_M(IXD,DE); } } +static void bitb_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BITB_M(IXD,DED); } } +static void bitb_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BITB_M(IXD,IX); } } +static void bitb_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+24; { BITB_M(IXD,IXD); } } + +static void bicb_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BICB_R(RG,RG); } } +static void bicb_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BICB_M(RG,RGD); } } +static void bicb_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BICB_M(RG,IN); } } +static void bicb_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BICB_M(RG,IND); } } +static void bicb_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BICB_M(RG,DE); } } +static void bicb_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BICB_M(RG,DED); } } +static void bicb_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BICB_M(RG,IX); } } +static void bicb_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { BICB_M(RG,IXD); } } +static void bicb_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BICB_X(RGD,RG); } } +static void bicb_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BICB_M(RGD,RGD); } } +static void bicb_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BICB_M(RGD,IN); } } +static void bicb_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BICB_M(RGD,IND); } } +static void bicb_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BICB_M(RGD,DE); } } +static void bicb_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BICB_M(RGD,DED); } } +static void bicb_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BICB_M(RGD,IX); } } +static void bicb_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BICB_M(RGD,IXD); } } +static void bicb_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BICB_X(IN,RG); } } +static void bicb_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BICB_M(IN,RGD); } } +static void bicb_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BICB_M(IN,IN); } } +static void bicb_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BICB_M(IN,IND); } } +static void bicb_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BICB_M(IN,DE); } } +static void bicb_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BICB_M(IN,DED); } } +static void bicb_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BICB_M(IN,IX); } } +static void bicb_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BICB_M(IN,IXD); } } +static void bicb_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BICB_X(IND,RG); } } +static void bicb_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BICB_M(IND,RGD); } } +static void bicb_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BICB_M(IND,IN); } } +static void bicb_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BICB_M(IND,IND); } } +static void bicb_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BICB_M(IND,DE); } } +static void bicb_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BICB_M(IND,DED); } } +static void bicb_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BICB_M(IND,IX); } } +static void bicb_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { BICB_M(IND,IXD); } } +static void bicb_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BICB_X(DE,RG); } } +static void bicb_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BICB_M(DE,RGD); } } +static void bicb_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BICB_M(DE,IN); } } +static void bicb_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BICB_M(DE,IND); } } +static void bicb_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BICB_M(DE,DE); } } +static void bicb_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BICB_M(DE,DED); } } +static void bicb_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BICB_M(DE,IX); } } +static void bicb_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { BICB_M(DE,IXD); } } +static void bicb_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BICB_X(DED,RG); } } +static void bicb_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BICB_M(DED,RGD); } } +static void bicb_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BICB_M(DED,IN); } } +static void bicb_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BICB_M(DED,IND); } } +static void bicb_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BICB_M(DED,DE); } } +static void bicb_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BICB_M(DED,DED); } } +static void bicb_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BICB_M(DED,IX); } } +static void bicb_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BICB_M(DED,IXD); } } +static void bicb_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BICB_X(IX,RG); } } +static void bicb_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BICB_M(IX,RGD); } } +static void bicb_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BICB_M(IX,IN); } } +static void bicb_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BICB_M(IX,IND); } } +static void bicb_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BICB_M(IX,DE); } } +static void bicb_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BICB_M(IX,DED); } } +static void bicb_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BICB_M(IX,IX); } } +static void bicb_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BICB_M(IX,IXD); } } +static void bicb_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BICB_X(IXD,RG); } } +static void bicb_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BICB_M(IXD,RGD); } } +static void bicb_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BICB_M(IXD,IN); } } +static void bicb_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BICB_M(IXD,IND); } } +static void bicb_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BICB_M(IXD,DE); } } +static void bicb_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BICB_M(IXD,DED); } } +static void bicb_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BICB_M(IXD,IX); } } +static void bicb_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { BICB_M(IXD,IXD); } } + +static void bisb_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { BISB_R(RG,RG); } } +static void bisb_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BISB_M(RG,RGD); } } +static void bisb_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { BISB_M(RG,IN); } } +static void bisb_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { BISB_M(RG,IND); } } +static void bisb_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { BISB_M(RG,DE); } } +static void bisb_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BISB_M(RG,DED); } } +static void bisb_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { BISB_M(RG,IX); } } +static void bisb_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { BISB_M(RG,IXD); } } +static void bisb_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BISB_X(RGD,RG); } } +static void bisb_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BISB_M(RGD,RGD); } } +static void bisb_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BISB_M(RGD,IN); } } +static void bisb_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BISB_M(RGD,IND); } } +static void bisb_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BISB_M(RGD,DE); } } +static void bisb_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BISB_M(RGD,DED); } } +static void bisb_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BISB_M(RGD,IX); } } +static void bisb_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BISB_M(RGD,IXD); } } +static void bisb_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { BISB_X(IN,RG); } } +static void bisb_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BISB_M(IN,RGD); } } +static void bisb_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { BISB_M(IN,IN); } } +static void bisb_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { BISB_M(IN,IND); } } +static void bisb_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { BISB_M(IN,DE); } } +static void bisb_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BISB_M(IN,DED); } } +static void bisb_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { BISB_M(IN,IX); } } +static void bisb_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { BISB_M(IN,IXD); } } +static void bisb_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { BISB_X(IND,RG); } } +static void bisb_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BISB_M(IND,RGD); } } +static void bisb_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { BISB_M(IND,IN); } } +static void bisb_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { BISB_M(IND,IND); } } +static void bisb_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { BISB_M(IND,DE); } } +static void bisb_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BISB_M(IND,DED); } } +static void bisb_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { BISB_M(IND,IX); } } +static void bisb_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { BISB_M(IND,IXD); } } +static void bisb_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { BISB_X(DE,RG); } } +static void bisb_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BISB_M(DE,RGD); } } +static void bisb_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { BISB_M(DE,IN); } } +static void bisb_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { BISB_M(DE,IND); } } +static void bisb_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { BISB_M(DE,DE); } } +static void bisb_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BISB_M(DE,DED); } } +static void bisb_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { BISB_M(DE,IX); } } +static void bisb_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { BISB_M(DE,IXD); } } +static void bisb_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BISB_X(DED,RG); } } +static void bisb_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BISB_M(DED,RGD); } } +static void bisb_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BISB_M(DED,IN); } } +static void bisb_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BISB_M(DED,IND); } } +static void bisb_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BISB_M(DED,DE); } } +static void bisb_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BISB_M(DED,DED); } } +static void bisb_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BISB_M(DED,IX); } } +static void bisb_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BISB_M(DED,IXD); } } +static void bisb_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { BISB_X(IX,RG); } } +static void bisb_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BISB_M(IX,RGD); } } +static void bisb_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { BISB_M(IX,IN); } } +static void bisb_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { BISB_M(IX,IND); } } +static void bisb_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { BISB_M(IX,DE); } } +static void bisb_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BISB_M(IX,DED); } } +static void bisb_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { BISB_M(IX,IX); } } +static void bisb_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { BISB_M(IX,IXD); } } +static void bisb_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { BISB_X(IXD,RG); } } +static void bisb_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BISB_M(IXD,RGD); } } +static void bisb_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { BISB_M(IXD,IN); } } +static void bisb_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { BISB_M(IXD,IND); } } +static void bisb_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { BISB_M(IXD,DE); } } +static void bisb_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BISB_M(IXD,DED); } } +static void bisb_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { BISB_M(IXD,IX); } } +static void bisb_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { BISB_M(IXD,IXD); } } + +static void sub_rg_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+ 3; { SUB_R(RG,RG); } } +static void sub_rg_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { SUB_M(RG,RGD); } } +static void sub_rg_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+12; { SUB_M(RG,IN); } } +static void sub_rg_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+18; { SUB_M(RG,IND); } } +static void sub_rg_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+15; { SUB_M(RG,DE); } } +static void sub_rg_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { SUB_M(RG,DED); } } +static void sub_rg_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+21; { SUB_M(RG,IX); } } +static void sub_rg_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 9+27; { SUB_M(RG,IXD); } } +static void sub_rgd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { SUB_X(RGD,RG); } } +static void sub_rgd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { SUB_M(RGD,RGD); } } +static void sub_rgd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { SUB_M(RGD,IN); } } +static void sub_rgd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { SUB_M(RGD,IND); } } +static void sub_rgd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { SUB_M(RGD,DE); } } +static void sub_rgd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { SUB_M(RGD,DED); } } +static void sub_rgd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { SUB_M(RGD,IX); } } +static void sub_rgd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { SUB_M(RGD,IXD); } } +static void sub_in_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+ 3; { SUB_X(IN,RG); } } +static void sub_in_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { SUB_M(IN,RGD); } } +static void sub_in_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+12; { SUB_M(IN,IN); } } +static void sub_in_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+18; { SUB_M(IN,IND); } } +static void sub_in_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+15; { SUB_M(IN,DE); } } +static void sub_in_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { SUB_M(IN,DED); } } +static void sub_in_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+21; { SUB_M(IN,IX); } } +static void sub_in_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 15+27; { SUB_M(IN,IXD); } } +static void sub_ind_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+ 3; { SUB_X(IND,RG); } } +static void sub_ind_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { SUB_M(IND,RGD); } } +static void sub_ind_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+12; { SUB_M(IND,IN); } } +static void sub_ind_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+18; { SUB_M(IND,IND); } } +static void sub_ind_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+15; { SUB_M(IND,DE); } } +static void sub_ind_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { SUB_M(IND,DED); } } +static void sub_ind_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+21; { SUB_M(IND,IX); } } +static void sub_ind_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 21+27; { SUB_M(IND,IXD); } } +static void sub_de_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+ 3; { SUB_X(DE,RG); } } +static void sub_de_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { SUB_M(DE,RGD); } } +static void sub_de_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+12; { SUB_M(DE,IN); } } +static void sub_de_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+18; { SUB_M(DE,IND); } } +static void sub_de_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+15; { SUB_M(DE,DE); } } +static void sub_de_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { SUB_M(DE,DED); } } +static void sub_de_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+21; { SUB_M(DE,IX); } } +static void sub_de_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 18+27; { SUB_M(DE,IXD); } } +static void sub_ded_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { SUB_X(DED,RG); } } +static void sub_ded_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { SUB_M(DED,RGD); } } +static void sub_ded_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { SUB_M(DED,IN); } } +static void sub_ded_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { SUB_M(DED,IND); } } +static void sub_ded_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { SUB_M(DED,DE); } } +static void sub_ded_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { SUB_M(DED,DED); } } +static void sub_ded_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { SUB_M(DED,IX); } } +static void sub_ded_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { SUB_M(DED,IXD); } } +static void sub_ix_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+ 3; { SUB_X(IX,RG); } } +static void sub_ix_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { SUB_M(IX,RGD); } } +static void sub_ix_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+12; { SUB_M(IX,IN); } } +static void sub_ix_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+18; { SUB_M(IX,IND); } } +static void sub_ix_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+15; { SUB_M(IX,DE); } } +static void sub_ix_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { SUB_M(IX,DED); } } +static void sub_ix_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+21; { SUB_M(IX,IX); } } +static void sub_ix_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 24+27; { SUB_M(IX,IXD); } } +static void sub_ixd_rg(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+ 3; { SUB_X(IXD,RG); } } +static void sub_ixd_rgd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { SUB_M(IXD,RGD); } } +static void sub_ixd_in(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+12; { SUB_M(IXD,IN); } } +static void sub_ixd_ind(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+18; { SUB_M(IXD,IND); } } +static void sub_ixd_de(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+15; { SUB_M(IXD,DE); } } +static void sub_ixd_ded(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { SUB_M(IXD,DED); } } +static void sub_ixd_ix(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+21; { SUB_M(IXD,IX); } } +static void sub_ixd_ixd(t11_state *cpustate, UINT16 op) { cpustate->icount -= 30+27; { SUB_M(IXD,IXD); } } diff --git a/src/emu/cpu/t11/t11table.c b/src/emu/cpu/t11/t11table.c index 3c32e043ef0..5bb263378de 100644 --- a/src/emu/cpu/t11/t11table.c +++ b/src/emu/cpu/t11/t11table.c @@ -20,1097 +20,1097 @@ modes: */ -static void op_0000(void); -static void halt(void); -static void illegal(void); - -static void jmp_rgd(void); -static void jmp_in(void); -static void jmp_ind(void); -static void jmp_de(void); -static void jmp_ded(void); -static void jmp_ix(void); -static void jmp_ixd(void); - -static void rts(void); -static void ccc(void); -static void scc(void); - -static void swab_rg(void); -static void swab_rgd(void); -static void swab_in(void); -static void swab_ind(void); -static void swab_de(void); -static void swab_ded(void); -static void swab_ix(void); -static void swab_ixd(void); - -static void br(void); -static void bne(void); -static void beq(void); -static void bge(void); -static void blt(void); -static void bgt(void); -static void ble(void); - -static void jsr_rgd(void); -static void jsr_in(void); -static void jsr_ind(void); -static void jsr_de(void); -static void jsr_ded(void); -static void jsr_ix(void); -static void jsr_ixd(void); - -static void clr_rg(void); -static void clr_rgd(void); -static void clr_in(void); -static void clr_ind(void); -static void clr_de(void); -static void clr_ded(void); -static void clr_ix(void); -static void clr_ixd(void); - -static void com_rg(void); -static void com_rgd(void); -static void com_in(void); -static void com_ind(void); -static void com_de(void); -static void com_ded(void); -static void com_ix(void); -static void com_ixd(void); - -static void inc_rg(void); -static void inc_rgd(void); -static void inc_in(void); -static void inc_ind(void); -static void inc_de(void); -static void inc_ded(void); -static void inc_ix(void); -static void inc_ixd(void); - -static void dec_rg(void); -static void dec_rgd(void); -static void dec_in(void); -static void dec_ind(void); -static void dec_de(void); -static void dec_ded(void); -static void dec_ix(void); -static void dec_ixd(void); - -static void neg_rg(void); -static void neg_rgd(void); -static void neg_in(void); -static void neg_ind(void); -static void neg_de(void); -static void neg_ded(void); -static void neg_ix(void); -static void neg_ixd(void); - -static void adc_rg(void); -static void adc_rgd(void); -static void adc_in(void); -static void adc_ind(void); -static void adc_de(void); -static void adc_ded(void); -static void adc_ix(void); -static void adc_ixd(void); - -static void sbc_rg(void); -static void sbc_rgd(void); -static void sbc_in(void); -static void sbc_ind(void); -static void sbc_de(void); -static void sbc_ded(void); -static void sbc_ix(void); -static void sbc_ixd(void); - -static void tst_rg(void); -static void tst_rgd(void); -static void tst_in(void); -static void tst_ind(void); -static void tst_de(void); -static void tst_ded(void); -static void tst_ix(void); -static void tst_ixd(void); - -static void ror_rg(void); -static void ror_rgd(void); -static void ror_in(void); -static void ror_ind(void); -static void ror_de(void); -static void ror_ded(void); -static void ror_ix(void); -static void ror_ixd(void); - -static void rol_rg(void); -static void rol_rgd(void); -static void rol_in(void); -static void rol_ind(void); -static void rol_de(void); -static void rol_ded(void); -static void rol_ix(void); -static void rol_ixd(void); - -static void asr_rg(void); -static void asr_rgd(void); -static void asr_in(void); -static void asr_ind(void); -static void asr_de(void); -static void asr_ded(void); -static void asr_ix(void); -static void asr_ixd(void); - -static void asl_rg(void); -static void asl_rgd(void); -static void asl_in(void); -static void asl_ind(void); -static void asl_de(void); -static void asl_ded(void); -static void asl_ix(void); -static void asl_ixd(void); - -static void mark(void); - -static void sxt_rg(void); -static void sxt_rgd(void); -static void sxt_in(void); -static void sxt_ind(void); -static void sxt_de(void); -static void sxt_ded(void); -static void sxt_ix(void); -static void sxt_ixd(void); - -static void mov_rg_rg(void); -static void mov_rg_rgd(void); -static void mov_rg_in(void); -static void mov_rg_ind(void); -static void mov_rg_de(void); -static void mov_rg_ded(void); -static void mov_rg_ix(void); -static void mov_rg_ixd(void); -static void mov_rgd_rg(void); -static void mov_rgd_rgd(void); -static void mov_rgd_in(void); -static void mov_rgd_ind(void); -static void mov_rgd_de(void); -static void mov_rgd_ded(void); -static void mov_rgd_ix(void); -static void mov_rgd_ixd(void); -static void mov_in_rg(void); -static void mov_in_rgd(void); -static void mov_in_in(void); -static void mov_in_ind(void); -static void mov_in_de(void); -static void mov_in_ded(void); -static void mov_in_ix(void); -static void mov_in_ixd(void); -static void mov_ind_rg(void); -static void mov_ind_rgd(void); -static void mov_ind_in(void); -static void mov_ind_ind(void); -static void mov_ind_de(void); -static void mov_ind_ded(void); -static void mov_ind_ix(void); -static void mov_ind_ixd(void); -static void mov_de_rg(void); -static void mov_de_rgd(void); -static void mov_de_in(void); -static void mov_de_ind(void); -static void mov_de_de(void); -static void mov_de_ded(void); -static void mov_de_ix(void); -static void mov_de_ixd(void); -static void mov_ded_rg(void); -static void mov_ded_rgd(void); -static void mov_ded_in(void); -static void mov_ded_ind(void); -static void mov_ded_de(void); -static void mov_ded_ded(void); -static void mov_ded_ix(void); -static void mov_ded_ixd(void); -static void mov_ix_rg(void); -static void mov_ix_rgd(void); -static void mov_ix_in(void); -static void mov_ix_ind(void); -static void mov_ix_de(void); -static void mov_ix_ded(void); -static void mov_ix_ix(void); -static void mov_ix_ixd(void); -static void mov_ixd_rg(void); -static void mov_ixd_rgd(void); -static void mov_ixd_in(void); -static void mov_ixd_ind(void); -static void mov_ixd_de(void); -static void mov_ixd_ded(void); -static void mov_ixd_ix(void); -static void mov_ixd_ixd(void); - -static void cmp_rg_rg(void); -static void cmp_rg_rgd(void); -static void cmp_rg_in(void); -static void cmp_rg_ind(void); -static void cmp_rg_de(void); -static void cmp_rg_ded(void); -static void cmp_rg_ix(void); -static void cmp_rg_ixd(void); -static void cmp_rgd_rg(void); -static void cmp_rgd_rgd(void); -static void cmp_rgd_in(void); -static void cmp_rgd_ind(void); -static void cmp_rgd_de(void); -static void cmp_rgd_ded(void); -static void cmp_rgd_ix(void); -static void cmp_rgd_ixd(void); -static void cmp_in_rg(void); -static void cmp_in_rgd(void); -static void cmp_in_in(void); -static void cmp_in_ind(void); -static void cmp_in_de(void); -static void cmp_in_ded(void); -static void cmp_in_ix(void); -static void cmp_in_ixd(void); -static void cmp_ind_rg(void); -static void cmp_ind_rgd(void); -static void cmp_ind_in(void); -static void cmp_ind_ind(void); -static void cmp_ind_de(void); -static void cmp_ind_ded(void); -static void cmp_ind_ix(void); -static void cmp_ind_ixd(void); -static void cmp_de_rg(void); -static void cmp_de_rgd(void); -static void cmp_de_in(void); -static void cmp_de_ind(void); -static void cmp_de_de(void); -static void cmp_de_ded(void); -static void cmp_de_ix(void); -static void cmp_de_ixd(void); -static void cmp_ded_rg(void); -static void cmp_ded_rgd(void); -static void cmp_ded_in(void); -static void cmp_ded_ind(void); -static void cmp_ded_de(void); -static void cmp_ded_ded(void); -static void cmp_ded_ix(void); -static void cmp_ded_ixd(void); -static void cmp_ix_rg(void); -static void cmp_ix_rgd(void); -static void cmp_ix_in(void); -static void cmp_ix_ind(void); -static void cmp_ix_de(void); -static void cmp_ix_ded(void); -static void cmp_ix_ix(void); -static void cmp_ix_ixd(void); -static void cmp_ixd_rg(void); -static void cmp_ixd_rgd(void); -static void cmp_ixd_in(void); -static void cmp_ixd_ind(void); -static void cmp_ixd_de(void); -static void cmp_ixd_ded(void); -static void cmp_ixd_ix(void); -static void cmp_ixd_ixd(void); - -static void bit_rg_rg(void); -static void bit_rg_rgd(void); -static void bit_rg_in(void); -static void bit_rg_ind(void); -static void bit_rg_de(void); -static void bit_rg_ded(void); -static void bit_rg_ix(void); -static void bit_rg_ixd(void); -static void bit_rgd_rg(void); -static void bit_rgd_rgd(void); -static void bit_rgd_in(void); -static void bit_rgd_ind(void); -static void bit_rgd_de(void); -static void bit_rgd_ded(void); -static void bit_rgd_ix(void); -static void bit_rgd_ixd(void); -static void bit_in_rg(void); -static void bit_in_rgd(void); -static void bit_in_in(void); -static void bit_in_ind(void); -static void bit_in_de(void); -static void bit_in_ded(void); -static void bit_in_ix(void); -static void bit_in_ixd(void); -static void bit_ind_rg(void); -static void bit_ind_rgd(void); -static void bit_ind_in(void); -static void bit_ind_ind(void); -static void bit_ind_de(void); -static void bit_ind_ded(void); -static void bit_ind_ix(void); -static void bit_ind_ixd(void); -static void bit_de_rg(void); -static void bit_de_rgd(void); -static void bit_de_in(void); -static void bit_de_ind(void); -static void bit_de_de(void); -static void bit_de_ded(void); -static void bit_de_ix(void); -static void bit_de_ixd(void); -static void bit_ded_rg(void); -static void bit_ded_rgd(void); -static void bit_ded_in(void); -static void bit_ded_ind(void); -static void bit_ded_de(void); -static void bit_ded_ded(void); -static void bit_ded_ix(void); -static void bit_ded_ixd(void); -static void bit_ix_rg(void); -static void bit_ix_rgd(void); -static void bit_ix_in(void); -static void bit_ix_ind(void); -static void bit_ix_de(void); -static void bit_ix_ded(void); -static void bit_ix_ix(void); -static void bit_ix_ixd(void); -static void bit_ixd_rg(void); -static void bit_ixd_rgd(void); -static void bit_ixd_in(void); -static void bit_ixd_ind(void); -static void bit_ixd_de(void); -static void bit_ixd_ded(void); -static void bit_ixd_ix(void); -static void bit_ixd_ixd(void); - -static void bic_rg_rg(void); -static void bic_rg_rgd(void); -static void bic_rg_in(void); -static void bic_rg_ind(void); -static void bic_rg_de(void); -static void bic_rg_ded(void); -static void bic_rg_ix(void); -static void bic_rg_ixd(void); -static void bic_rgd_rg(void); -static void bic_rgd_rgd(void); -static void bic_rgd_in(void); -static void bic_rgd_ind(void); -static void bic_rgd_de(void); -static void bic_rgd_ded(void); -static void bic_rgd_ix(void); -static void bic_rgd_ixd(void); -static void bic_in_rg(void); -static void bic_in_rgd(void); -static void bic_in_in(void); -static void bic_in_ind(void); -static void bic_in_de(void); -static void bic_in_ded(void); -static void bic_in_ix(void); -static void bic_in_ixd(void); -static void bic_ind_rg(void); -static void bic_ind_rgd(void); -static void bic_ind_in(void); -static void bic_ind_ind(void); -static void bic_ind_de(void); -static void bic_ind_ded(void); -static void bic_ind_ix(void); -static void bic_ind_ixd(void); -static void bic_de_rg(void); -static void bic_de_rgd(void); -static void bic_de_in(void); -static void bic_de_ind(void); -static void bic_de_de(void); -static void bic_de_ded(void); -static void bic_de_ix(void); -static void bic_de_ixd(void); -static void bic_ded_rg(void); -static void bic_ded_rgd(void); -static void bic_ded_in(void); -static void bic_ded_ind(void); -static void bic_ded_de(void); -static void bic_ded_ded(void); -static void bic_ded_ix(void); -static void bic_ded_ixd(void); -static void bic_ix_rg(void); -static void bic_ix_rgd(void); -static void bic_ix_in(void); -static void bic_ix_ind(void); -static void bic_ix_de(void); -static void bic_ix_ded(void); -static void bic_ix_ix(void); -static void bic_ix_ixd(void); -static void bic_ixd_rg(void); -static void bic_ixd_rgd(void); -static void bic_ixd_in(void); -static void bic_ixd_ind(void); -static void bic_ixd_de(void); -static void bic_ixd_ded(void); -static void bic_ixd_ix(void); -static void bic_ixd_ixd(void); - -static void bis_rg_rg(void); -static void bis_rg_rgd(void); -static void bis_rg_in(void); -static void bis_rg_ind(void); -static void bis_rg_de(void); -static void bis_rg_ded(void); -static void bis_rg_ix(void); -static void bis_rg_ixd(void); -static void bis_rgd_rg(void); -static void bis_rgd_rgd(void); -static void bis_rgd_in(void); -static void bis_rgd_ind(void); -static void bis_rgd_de(void); -static void bis_rgd_ded(void); -static void bis_rgd_ix(void); -static void bis_rgd_ixd(void); -static void bis_in_rg(void); -static void bis_in_rgd(void); -static void bis_in_in(void); -static void bis_in_ind(void); -static void bis_in_de(void); -static void bis_in_ded(void); -static void bis_in_ix(void); -static void bis_in_ixd(void); -static void bis_ind_rg(void); -static void bis_ind_rgd(void); -static void bis_ind_in(void); -static void bis_ind_ind(void); -static void bis_ind_de(void); -static void bis_ind_ded(void); -static void bis_ind_ix(void); -static void bis_ind_ixd(void); -static void bis_de_rg(void); -static void bis_de_rgd(void); -static void bis_de_in(void); -static void bis_de_ind(void); -static void bis_de_de(void); -static void bis_de_ded(void); -static void bis_de_ix(void); -static void bis_de_ixd(void); -static void bis_ded_rg(void); -static void bis_ded_rgd(void); -static void bis_ded_in(void); -static void bis_ded_ind(void); -static void bis_ded_de(void); -static void bis_ded_ded(void); -static void bis_ded_ix(void); -static void bis_ded_ixd(void); -static void bis_ix_rg(void); -static void bis_ix_rgd(void); -static void bis_ix_in(void); -static void bis_ix_ind(void); -static void bis_ix_de(void); -static void bis_ix_ded(void); -static void bis_ix_ix(void); -static void bis_ix_ixd(void); -static void bis_ixd_rg(void); -static void bis_ixd_rgd(void); -static void bis_ixd_in(void); -static void bis_ixd_ind(void); -static void bis_ixd_de(void); -static void bis_ixd_ded(void); -static void bis_ixd_ix(void); -static void bis_ixd_ixd(void); - -static void add_rg_rg(void); -static void add_rg_rgd(void); -static void add_rg_in(void); -static void add_rg_ind(void); -static void add_rg_de(void); -static void add_rg_ded(void); -static void add_rg_ix(void); -static void add_rg_ixd(void); -static void add_rgd_rg(void); -static void add_rgd_rgd(void); -static void add_rgd_in(void); -static void add_rgd_ind(void); -static void add_rgd_de(void); -static void add_rgd_ded(void); -static void add_rgd_ix(void); -static void add_rgd_ixd(void); -static void add_in_rg(void); -static void add_in_rgd(void); -static void add_in_in(void); -static void add_in_ind(void); -static void add_in_de(void); -static void add_in_ded(void); -static void add_in_ix(void); -static void add_in_ixd(void); -static void add_ind_rg(void); -static void add_ind_rgd(void); -static void add_ind_in(void); -static void add_ind_ind(void); -static void add_ind_de(void); -static void add_ind_ded(void); -static void add_ind_ix(void); -static void add_ind_ixd(void); -static void add_de_rg(void); -static void add_de_rgd(void); -static void add_de_in(void); -static void add_de_ind(void); -static void add_de_de(void); -static void add_de_ded(void); -static void add_de_ix(void); -static void add_de_ixd(void); -static void add_ded_rg(void); -static void add_ded_rgd(void); -static void add_ded_in(void); -static void add_ded_ind(void); -static void add_ded_de(void); -static void add_ded_ded(void); -static void add_ded_ix(void); -static void add_ded_ixd(void); -static void add_ix_rg(void); -static void add_ix_rgd(void); -static void add_ix_in(void); -static void add_ix_ind(void); -static void add_ix_de(void); -static void add_ix_ded(void); -static void add_ix_ix(void); -static void add_ix_ixd(void); -static void add_ixd_rg(void); -static void add_ixd_rgd(void); -static void add_ixd_in(void); -static void add_ixd_ind(void); -static void add_ixd_de(void); -static void add_ixd_ded(void); -static void add_ixd_ix(void); -static void add_ixd_ixd(void); - -static void xor_rg(void); -static void xor_rgd(void); -static void xor_in(void); -static void xor_ind(void); -static void xor_de(void); -static void xor_ded(void); -static void xor_ix(void); -static void xor_ixd(void); - -static void sob(void); - -static void bpl(void); -static void bmi(void); -static void bhi(void); -static void blos(void); -static void bvc(void); -static void bvs(void); -static void bcc(void); -static void bcs(void); -static void emt(void); -static void trap(void); - -static void clrb_rg(void); -static void clrb_rgd(void); -static void clrb_in(void); -static void clrb_ind(void); -static void clrb_de(void); -static void clrb_ded(void); -static void clrb_ix(void); -static void clrb_ixd(void); - -static void comb_rg(void); -static void comb_rgd(void); -static void comb_in(void); -static void comb_ind(void); -static void comb_de(void); -static void comb_ded(void); -static void comb_ix(void); -static void comb_ixd(void); - -static void incb_rg(void); -static void incb_rgd(void); -static void incb_in(void); -static void incb_ind(void); -static void incb_de(void); -static void incb_ded(void); -static void incb_ix(void); -static void incb_ixd(void); - -static void decb_rg(void); -static void decb_rgd(void); -static void decb_in(void); -static void decb_ind(void); -static void decb_de(void); -static void decb_ded(void); -static void decb_ix(void); -static void decb_ixd(void); - -static void negb_rg(void); -static void negb_rgd(void); -static void negb_in(void); -static void negb_ind(void); -static void negb_de(void); -static void negb_ded(void); -static void negb_ix(void); -static void negb_ixd(void); - -static void adcb_rg(void); -static void adcb_rgd(void); -static void adcb_in(void); -static void adcb_ind(void); -static void adcb_de(void); -static void adcb_ded(void); -static void adcb_ix(void); -static void adcb_ixd(void); - -static void sbcb_rg(void); -static void sbcb_rgd(void); -static void sbcb_in(void); -static void sbcb_ind(void); -static void sbcb_de(void); -static void sbcb_ded(void); -static void sbcb_ix(void); -static void sbcb_ixd(void); - -static void tstb_rg(void); -static void tstb_rgd(void); -static void tstb_in(void); -static void tstb_ind(void); -static void tstb_de(void); -static void tstb_ded(void); -static void tstb_ix(void); -static void tstb_ixd(void); - -static void rorb_rg(void); -static void rorb_rgd(void); -static void rorb_in(void); -static void rorb_ind(void); -static void rorb_de(void); -static void rorb_ded(void); -static void rorb_ix(void); -static void rorb_ixd(void); - -static void rolb_rg(void); -static void rolb_rgd(void); -static void rolb_in(void); -static void rolb_ind(void); -static void rolb_de(void); -static void rolb_ded(void); -static void rolb_ix(void); -static void rolb_ixd(void); - -static void asrb_rg(void); -static void asrb_rgd(void); -static void asrb_in(void); -static void asrb_ind(void); -static void asrb_de(void); -static void asrb_ded(void); -static void asrb_ix(void); -static void asrb_ixd(void); - -static void aslb_rg(void); -static void aslb_rgd(void); -static void aslb_in(void); -static void aslb_ind(void); -static void aslb_de(void); -static void aslb_ded(void); -static void aslb_ix(void); -static void aslb_ixd(void); - -static void mtps_rg(void); -static void mtps_rgd(void); -static void mtps_in(void); -static void mtps_ind(void); -static void mtps_de(void); -static void mtps_ded(void); -static void mtps_ix(void); -static void mtps_ixd(void); - -static void mfps_rg(void); -static void mfps_rgd(void); -static void mfps_in(void); -static void mfps_ind(void); -static void mfps_de(void); -static void mfps_ded(void); -static void mfps_ix(void); -static void mfps_ixd(void); - -static void movb_rg_rg(void); -static void movb_rg_rgd(void); -static void movb_rg_in(void); -static void movb_rg_ind(void); -static void movb_rg_de(void); -static void movb_rg_ded(void); -static void movb_rg_ix(void); -static void movb_rg_ixd(void); -static void movb_rgd_rg(void); -static void movb_rgd_rgd(void); -static void movb_rgd_in(void); -static void movb_rgd_ind(void); -static void movb_rgd_de(void); -static void movb_rgd_ded(void); -static void movb_rgd_ix(void); -static void movb_rgd_ixd(void); -static void movb_in_rg(void); -static void movb_in_rgd(void); -static void movb_in_in(void); -static void movb_in_ind(void); -static void movb_in_de(void); -static void movb_in_ded(void); -static void movb_in_ix(void); -static void movb_in_ixd(void); -static void movb_ind_rg(void); -static void movb_ind_rgd(void); -static void movb_ind_in(void); -static void movb_ind_ind(void); -static void movb_ind_de(void); -static void movb_ind_ded(void); -static void movb_ind_ix(void); -static void movb_ind_ixd(void); -static void movb_de_rg(void); -static void movb_de_rgd(void); -static void movb_de_in(void); -static void movb_de_ind(void); -static void movb_de_de(void); -static void movb_de_ded(void); -static void movb_de_ix(void); -static void movb_de_ixd(void); -static void movb_ded_rg(void); -static void movb_ded_rgd(void); -static void movb_ded_in(void); -static void movb_ded_ind(void); -static void movb_ded_de(void); -static void movb_ded_ded(void); -static void movb_ded_ix(void); -static void movb_ded_ixd(void); -static void movb_ix_rg(void); -static void movb_ix_rgd(void); -static void movb_ix_in(void); -static void movb_ix_ind(void); -static void movb_ix_de(void); -static void movb_ix_ded(void); -static void movb_ix_ix(void); -static void movb_ix_ixd(void); -static void movb_ixd_rg(void); -static void movb_ixd_rgd(void); -static void movb_ixd_in(void); -static void movb_ixd_ind(void); -static void movb_ixd_de(void); -static void movb_ixd_ded(void); -static void movb_ixd_ix(void); -static void movb_ixd_ixd(void); - -static void cmpb_rg_rg(void); -static void cmpb_rg_rgd(void); -static void cmpb_rg_in(void); -static void cmpb_rg_ind(void); -static void cmpb_rg_de(void); -static void cmpb_rg_ded(void); -static void cmpb_rg_ix(void); -static void cmpb_rg_ixd(void); -static void cmpb_rgd_rg(void); -static void cmpb_rgd_rgd(void); -static void cmpb_rgd_in(void); -static void cmpb_rgd_ind(void); -static void cmpb_rgd_de(void); -static void cmpb_rgd_ded(void); -static void cmpb_rgd_ix(void); -static void cmpb_rgd_ixd(void); -static void cmpb_in_rg(void); -static void cmpb_in_rgd(void); -static void cmpb_in_in(void); -static void cmpb_in_ind(void); -static void cmpb_in_de(void); -static void cmpb_in_ded(void); -static void cmpb_in_ix(void); -static void cmpb_in_ixd(void); -static void cmpb_ind_rg(void); -static void cmpb_ind_rgd(void); -static void cmpb_ind_in(void); -static void cmpb_ind_ind(void); -static void cmpb_ind_de(void); -static void cmpb_ind_ded(void); -static void cmpb_ind_ix(void); -static void cmpb_ind_ixd(void); -static void cmpb_de_rg(void); -static void cmpb_de_rgd(void); -static void cmpb_de_in(void); -static void cmpb_de_ind(void); -static void cmpb_de_de(void); -static void cmpb_de_ded(void); -static void cmpb_de_ix(void); -static void cmpb_de_ixd(void); -static void cmpb_ded_rg(void); -static void cmpb_ded_rgd(void); -static void cmpb_ded_in(void); -static void cmpb_ded_ind(void); -static void cmpb_ded_de(void); -static void cmpb_ded_ded(void); -static void cmpb_ded_ix(void); -static void cmpb_ded_ixd(void); -static void cmpb_ix_rg(void); -static void cmpb_ix_rgd(void); -static void cmpb_ix_in(void); -static void cmpb_ix_ind(void); -static void cmpb_ix_de(void); -static void cmpb_ix_ded(void); -static void cmpb_ix_ix(void); -static void cmpb_ix_ixd(void); -static void cmpb_ixd_rg(void); -static void cmpb_ixd_rgd(void); -static void cmpb_ixd_in(void); -static void cmpb_ixd_ind(void); -static void cmpb_ixd_de(void); -static void cmpb_ixd_ded(void); -static void cmpb_ixd_ix(void); -static void cmpb_ixd_ixd(void); - -static void bitb_rg_rg(void); -static void bitb_rg_rgd(void); -static void bitb_rg_in(void); -static void bitb_rg_ind(void); -static void bitb_rg_de(void); -static void bitb_rg_ded(void); -static void bitb_rg_ix(void); -static void bitb_rg_ixd(void); -static void bitb_rgd_rg(void); -static void bitb_rgd_rgd(void); -static void bitb_rgd_in(void); -static void bitb_rgd_ind(void); -static void bitb_rgd_de(void); -static void bitb_rgd_ded(void); -static void bitb_rgd_ix(void); -static void bitb_rgd_ixd(void); -static void bitb_in_rg(void); -static void bitb_in_rgd(void); -static void bitb_in_in(void); -static void bitb_in_ind(void); -static void bitb_in_de(void); -static void bitb_in_ded(void); -static void bitb_in_ix(void); -static void bitb_in_ixd(void); -static void bitb_ind_rg(void); -static void bitb_ind_rgd(void); -static void bitb_ind_in(void); -static void bitb_ind_ind(void); -static void bitb_ind_de(void); -static void bitb_ind_ded(void); -static void bitb_ind_ix(void); -static void bitb_ind_ixd(void); -static void bitb_de_rg(void); -static void bitb_de_rgd(void); -static void bitb_de_in(void); -static void bitb_de_ind(void); -static void bitb_de_de(void); -static void bitb_de_ded(void); -static void bitb_de_ix(void); -static void bitb_de_ixd(void); -static void bitb_ded_rg(void); -static void bitb_ded_rgd(void); -static void bitb_ded_in(void); -static void bitb_ded_ind(void); -static void bitb_ded_de(void); -static void bitb_ded_ded(void); -static void bitb_ded_ix(void); -static void bitb_ded_ixd(void); -static void bitb_ix_rg(void); -static void bitb_ix_rgd(void); -static void bitb_ix_in(void); -static void bitb_ix_ind(void); -static void bitb_ix_de(void); -static void bitb_ix_ded(void); -static void bitb_ix_ix(void); -static void bitb_ix_ixd(void); -static void bitb_ixd_rg(void); -static void bitb_ixd_rgd(void); -static void bitb_ixd_in(void); -static void bitb_ixd_ind(void); -static void bitb_ixd_de(void); -static void bitb_ixd_ded(void); -static void bitb_ixd_ix(void); -static void bitb_ixd_ixd(void); - -static void bicb_rg_rg(void); -static void bicb_rg_rgd(void); -static void bicb_rg_in(void); -static void bicb_rg_ind(void); -static void bicb_rg_de(void); -static void bicb_rg_ded(void); -static void bicb_rg_ix(void); -static void bicb_rg_ixd(void); -static void bicb_rgd_rg(void); -static void bicb_rgd_rgd(void); -static void bicb_rgd_in(void); -static void bicb_rgd_ind(void); -static void bicb_rgd_de(void); -static void bicb_rgd_ded(void); -static void bicb_rgd_ix(void); -static void bicb_rgd_ixd(void); -static void bicb_in_rg(void); -static void bicb_in_rgd(void); -static void bicb_in_in(void); -static void bicb_in_ind(void); -static void bicb_in_de(void); -static void bicb_in_ded(void); -static void bicb_in_ix(void); -static void bicb_in_ixd(void); -static void bicb_ind_rg(void); -static void bicb_ind_rgd(void); -static void bicb_ind_in(void); -static void bicb_ind_ind(void); -static void bicb_ind_de(void); -static void bicb_ind_ded(void); -static void bicb_ind_ix(void); -static void bicb_ind_ixd(void); -static void bicb_de_rg(void); -static void bicb_de_rgd(void); -static void bicb_de_in(void); -static void bicb_de_ind(void); -static void bicb_de_de(void); -static void bicb_de_ded(void); -static void bicb_de_ix(void); -static void bicb_de_ixd(void); -static void bicb_ded_rg(void); -static void bicb_ded_rgd(void); -static void bicb_ded_in(void); -static void bicb_ded_ind(void); -static void bicb_ded_de(void); -static void bicb_ded_ded(void); -static void bicb_ded_ix(void); -static void bicb_ded_ixd(void); -static void bicb_ix_rg(void); -static void bicb_ix_rgd(void); -static void bicb_ix_in(void); -static void bicb_ix_ind(void); -static void bicb_ix_de(void); -static void bicb_ix_ded(void); -static void bicb_ix_ix(void); -static void bicb_ix_ixd(void); -static void bicb_ixd_rg(void); -static void bicb_ixd_rgd(void); -static void bicb_ixd_in(void); -static void bicb_ixd_ind(void); -static void bicb_ixd_de(void); -static void bicb_ixd_ded(void); -static void bicb_ixd_ix(void); -static void bicb_ixd_ixd(void); - -static void bisb_rg_rg(void); -static void bisb_rg_rgd(void); -static void bisb_rg_in(void); -static void bisb_rg_ind(void); -static void bisb_rg_de(void); -static void bisb_rg_ded(void); -static void bisb_rg_ix(void); -static void bisb_rg_ixd(void); -static void bisb_rgd_rg(void); -static void bisb_rgd_rgd(void); -static void bisb_rgd_in(void); -static void bisb_rgd_ind(void); -static void bisb_rgd_de(void); -static void bisb_rgd_ded(void); -static void bisb_rgd_ix(void); -static void bisb_rgd_ixd(void); -static void bisb_in_rg(void); -static void bisb_in_rgd(void); -static void bisb_in_in(void); -static void bisb_in_ind(void); -static void bisb_in_de(void); -static void bisb_in_ded(void); -static void bisb_in_ix(void); -static void bisb_in_ixd(void); -static void bisb_ind_rg(void); -static void bisb_ind_rgd(void); -static void bisb_ind_in(void); -static void bisb_ind_ind(void); -static void bisb_ind_de(void); -static void bisb_ind_ded(void); -static void bisb_ind_ix(void); -static void bisb_ind_ixd(void); -static void bisb_de_rg(void); -static void bisb_de_rgd(void); -static void bisb_de_in(void); -static void bisb_de_ind(void); -static void bisb_de_de(void); -static void bisb_de_ded(void); -static void bisb_de_ix(void); -static void bisb_de_ixd(void); -static void bisb_ded_rg(void); -static void bisb_ded_rgd(void); -static void bisb_ded_in(void); -static void bisb_ded_ind(void); -static void bisb_ded_de(void); -static void bisb_ded_ded(void); -static void bisb_ded_ix(void); -static void bisb_ded_ixd(void); -static void bisb_ix_rg(void); -static void bisb_ix_rgd(void); -static void bisb_ix_in(void); -static void bisb_ix_ind(void); -static void bisb_ix_de(void); -static void bisb_ix_ded(void); -static void bisb_ix_ix(void); -static void bisb_ix_ixd(void); -static void bisb_ixd_rg(void); -static void bisb_ixd_rgd(void); -static void bisb_ixd_in(void); -static void bisb_ixd_ind(void); -static void bisb_ixd_de(void); -static void bisb_ixd_ded(void); -static void bisb_ixd_ix(void); -static void bisb_ixd_ixd(void); - -static void sub_rg_rg(void); -static void sub_rg_rgd(void); -static void sub_rg_in(void); -static void sub_rg_ind(void); -static void sub_rg_de(void); -static void sub_rg_ded(void); -static void sub_rg_ix(void); -static void sub_rg_ixd(void); -static void sub_rgd_rg(void); -static void sub_rgd_rgd(void); -static void sub_rgd_in(void); -static void sub_rgd_ind(void); -static void sub_rgd_de(void); -static void sub_rgd_ded(void); -static void sub_rgd_ix(void); -static void sub_rgd_ixd(void); -static void sub_in_rg(void); -static void sub_in_rgd(void); -static void sub_in_in(void); -static void sub_in_ind(void); -static void sub_in_de(void); -static void sub_in_ded(void); -static void sub_in_ix(void); -static void sub_in_ixd(void); -static void sub_ind_rg(void); -static void sub_ind_rgd(void); -static void sub_ind_in(void); -static void sub_ind_ind(void); -static void sub_ind_de(void); -static void sub_ind_ded(void); -static void sub_ind_ix(void); -static void sub_ind_ixd(void); -static void sub_de_rg(void); -static void sub_de_rgd(void); -static void sub_de_in(void); -static void sub_de_ind(void); -static void sub_de_de(void); -static void sub_de_ded(void); -static void sub_de_ix(void); -static void sub_de_ixd(void); -static void sub_ded_rg(void); -static void sub_ded_rgd(void); -static void sub_ded_in(void); -static void sub_ded_ind(void); -static void sub_ded_de(void); -static void sub_ded_ded(void); -static void sub_ded_ix(void); -static void sub_ded_ixd(void); -static void sub_ix_rg(void); -static void sub_ix_rgd(void); -static void sub_ix_in(void); -static void sub_ix_ind(void); -static void sub_ix_de(void); -static void sub_ix_ded(void); -static void sub_ix_ix(void); -static void sub_ix_ixd(void); -static void sub_ixd_rg(void); -static void sub_ixd_rgd(void); -static void sub_ixd_in(void); -static void sub_ixd_ind(void); -static void sub_ixd_de(void); -static void sub_ixd_ded(void); -static void sub_ixd_ix(void); -static void sub_ixd_ixd(void); - - - -static void (*const opcode_table[65536 >> 3])(void) = +static void op_0000(t11_state *cpustate, UINT16 op); +static void halt(t11_state *cpustate, UINT16 op); +static void illegal(t11_state *cpustate, UINT16 op); + +static void jmp_rgd(t11_state *cpustate, UINT16 op); +static void jmp_in(t11_state *cpustate, UINT16 op); +static void jmp_ind(t11_state *cpustate, UINT16 op); +static void jmp_de(t11_state *cpustate, UINT16 op); +static void jmp_ded(t11_state *cpustate, UINT16 op); +static void jmp_ix(t11_state *cpustate, UINT16 op); +static void jmp_ixd(t11_state *cpustate, UINT16 op); + +static void rts(t11_state *cpustate, UINT16 op); +static void ccc(t11_state *cpustate, UINT16 op); +static void scc(t11_state *cpustate, UINT16 op); + +static void swab_rg(t11_state *cpustate, UINT16 op); +static void swab_rgd(t11_state *cpustate, UINT16 op); +static void swab_in(t11_state *cpustate, UINT16 op); +static void swab_ind(t11_state *cpustate, UINT16 op); +static void swab_de(t11_state *cpustate, UINT16 op); +static void swab_ded(t11_state *cpustate, UINT16 op); +static void swab_ix(t11_state *cpustate, UINT16 op); +static void swab_ixd(t11_state *cpustate, UINT16 op); + +static void br(t11_state *cpustate, UINT16 op); +static void bne(t11_state *cpustate, UINT16 op); +static void beq(t11_state *cpustate, UINT16 op); +static void bge(t11_state *cpustate, UINT16 op); +static void blt(t11_state *cpustate, UINT16 op); +static void bgt(t11_state *cpustate, UINT16 op); +static void ble(t11_state *cpustate, UINT16 op); + +static void jsr_rgd(t11_state *cpustate, UINT16 op); +static void jsr_in(t11_state *cpustate, UINT16 op); +static void jsr_ind(t11_state *cpustate, UINT16 op); +static void jsr_de(t11_state *cpustate, UINT16 op); +static void jsr_ded(t11_state *cpustate, UINT16 op); +static void jsr_ix(t11_state *cpustate, UINT16 op); +static void jsr_ixd(t11_state *cpustate, UINT16 op); + +static void clr_rg(t11_state *cpustate, UINT16 op); +static void clr_rgd(t11_state *cpustate, UINT16 op); +static void clr_in(t11_state *cpustate, UINT16 op); +static void clr_ind(t11_state *cpustate, UINT16 op); +static void clr_de(t11_state *cpustate, UINT16 op); +static void clr_ded(t11_state *cpustate, UINT16 op); +static void clr_ix(t11_state *cpustate, UINT16 op); +static void clr_ixd(t11_state *cpustate, UINT16 op); + +static void com_rg(t11_state *cpustate, UINT16 op); +static void com_rgd(t11_state *cpustate, UINT16 op); +static void com_in(t11_state *cpustate, UINT16 op); +static void com_ind(t11_state *cpustate, UINT16 op); +static void com_de(t11_state *cpustate, UINT16 op); +static void com_ded(t11_state *cpustate, UINT16 op); +static void com_ix(t11_state *cpustate, UINT16 op); +static void com_ixd(t11_state *cpustate, UINT16 op); + +static void inc_rg(t11_state *cpustate, UINT16 op); +static void inc_rgd(t11_state *cpustate, UINT16 op); +static void inc_in(t11_state *cpustate, UINT16 op); +static void inc_ind(t11_state *cpustate, UINT16 op); +static void inc_de(t11_state *cpustate, UINT16 op); +static void inc_ded(t11_state *cpustate, UINT16 op); +static void inc_ix(t11_state *cpustate, UINT16 op); +static void inc_ixd(t11_state *cpustate, UINT16 op); + +static void dec_rg(t11_state *cpustate, UINT16 op); +static void dec_rgd(t11_state *cpustate, UINT16 op); +static void dec_in(t11_state *cpustate, UINT16 op); +static void dec_ind(t11_state *cpustate, UINT16 op); +static void dec_de(t11_state *cpustate, UINT16 op); +static void dec_ded(t11_state *cpustate, UINT16 op); +static void dec_ix(t11_state *cpustate, UINT16 op); +static void dec_ixd(t11_state *cpustate, UINT16 op); + +static void neg_rg(t11_state *cpustate, UINT16 op); +static void neg_rgd(t11_state *cpustate, UINT16 op); +static void neg_in(t11_state *cpustate, UINT16 op); +static void neg_ind(t11_state *cpustate, UINT16 op); +static void neg_de(t11_state *cpustate, UINT16 op); +static void neg_ded(t11_state *cpustate, UINT16 op); +static void neg_ix(t11_state *cpustate, UINT16 op); +static void neg_ixd(t11_state *cpustate, UINT16 op); + +static void adc_rg(t11_state *cpustate, UINT16 op); +static void adc_rgd(t11_state *cpustate, UINT16 op); +static void adc_in(t11_state *cpustate, UINT16 op); +static void adc_ind(t11_state *cpustate, UINT16 op); +static void adc_de(t11_state *cpustate, UINT16 op); +static void adc_ded(t11_state *cpustate, UINT16 op); +static void adc_ix(t11_state *cpustate, UINT16 op); +static void adc_ixd(t11_state *cpustate, UINT16 op); + +static void sbc_rg(t11_state *cpustate, UINT16 op); +static void sbc_rgd(t11_state *cpustate, UINT16 op); +static void sbc_in(t11_state *cpustate, UINT16 op); +static void sbc_ind(t11_state *cpustate, UINT16 op); +static void sbc_de(t11_state *cpustate, UINT16 op); +static void sbc_ded(t11_state *cpustate, UINT16 op); +static void sbc_ix(t11_state *cpustate, UINT16 op); +static void sbc_ixd(t11_state *cpustate, UINT16 op); + +static void tst_rg(t11_state *cpustate, UINT16 op); +static void tst_rgd(t11_state *cpustate, UINT16 op); +static void tst_in(t11_state *cpustate, UINT16 op); +static void tst_ind(t11_state *cpustate, UINT16 op); +static void tst_de(t11_state *cpustate, UINT16 op); +static void tst_ded(t11_state *cpustate, UINT16 op); +static void tst_ix(t11_state *cpustate, UINT16 op); +static void tst_ixd(t11_state *cpustate, UINT16 op); + +static void ror_rg(t11_state *cpustate, UINT16 op); +static void ror_rgd(t11_state *cpustate, UINT16 op); +static void ror_in(t11_state *cpustate, UINT16 op); +static void ror_ind(t11_state *cpustate, UINT16 op); +static void ror_de(t11_state *cpustate, UINT16 op); +static void ror_ded(t11_state *cpustate, UINT16 op); +static void ror_ix(t11_state *cpustate, UINT16 op); +static void ror_ixd(t11_state *cpustate, UINT16 op); + +static void rol_rg(t11_state *cpustate, UINT16 op); +static void rol_rgd(t11_state *cpustate, UINT16 op); +static void rol_in(t11_state *cpustate, UINT16 op); +static void rol_ind(t11_state *cpustate, UINT16 op); +static void rol_de(t11_state *cpustate, UINT16 op); +static void rol_ded(t11_state *cpustate, UINT16 op); +static void rol_ix(t11_state *cpustate, UINT16 op); +static void rol_ixd(t11_state *cpustate, UINT16 op); + +static void asr_rg(t11_state *cpustate, UINT16 op); +static void asr_rgd(t11_state *cpustate, UINT16 op); +static void asr_in(t11_state *cpustate, UINT16 op); +static void asr_ind(t11_state *cpustate, UINT16 op); +static void asr_de(t11_state *cpustate, UINT16 op); +static void asr_ded(t11_state *cpustate, UINT16 op); +static void asr_ix(t11_state *cpustate, UINT16 op); +static void asr_ixd(t11_state *cpustate, UINT16 op); + +static void asl_rg(t11_state *cpustate, UINT16 op); +static void asl_rgd(t11_state *cpustate, UINT16 op); +static void asl_in(t11_state *cpustate, UINT16 op); +static void asl_ind(t11_state *cpustate, UINT16 op); +static void asl_de(t11_state *cpustate, UINT16 op); +static void asl_ded(t11_state *cpustate, UINT16 op); +static void asl_ix(t11_state *cpustate, UINT16 op); +static void asl_ixd(t11_state *cpustate, UINT16 op); + +static void mark(t11_state *cpustate, UINT16 op); + +static void sxt_rg(t11_state *cpustate, UINT16 op); +static void sxt_rgd(t11_state *cpustate, UINT16 op); +static void sxt_in(t11_state *cpustate, UINT16 op); +static void sxt_ind(t11_state *cpustate, UINT16 op); +static void sxt_de(t11_state *cpustate, UINT16 op); +static void sxt_ded(t11_state *cpustate, UINT16 op); +static void sxt_ix(t11_state *cpustate, UINT16 op); +static void sxt_ixd(t11_state *cpustate, UINT16 op); + +static void mov_rg_rg(t11_state *cpustate, UINT16 op); +static void mov_rg_rgd(t11_state *cpustate, UINT16 op); +static void mov_rg_in(t11_state *cpustate, UINT16 op); +static void mov_rg_ind(t11_state *cpustate, UINT16 op); +static void mov_rg_de(t11_state *cpustate, UINT16 op); +static void mov_rg_ded(t11_state *cpustate, UINT16 op); +static void mov_rg_ix(t11_state *cpustate, UINT16 op); +static void mov_rg_ixd(t11_state *cpustate, UINT16 op); +static void mov_rgd_rg(t11_state *cpustate, UINT16 op); +static void mov_rgd_rgd(t11_state *cpustate, UINT16 op); +static void mov_rgd_in(t11_state *cpustate, UINT16 op); +static void mov_rgd_ind(t11_state *cpustate, UINT16 op); +static void mov_rgd_de(t11_state *cpustate, UINT16 op); +static void mov_rgd_ded(t11_state *cpustate, UINT16 op); +static void mov_rgd_ix(t11_state *cpustate, UINT16 op); +static void mov_rgd_ixd(t11_state *cpustate, UINT16 op); +static void mov_in_rg(t11_state *cpustate, UINT16 op); +static void mov_in_rgd(t11_state *cpustate, UINT16 op); +static void mov_in_in(t11_state *cpustate, UINT16 op); +static void mov_in_ind(t11_state *cpustate, UINT16 op); +static void mov_in_de(t11_state *cpustate, UINT16 op); +static void mov_in_ded(t11_state *cpustate, UINT16 op); +static void mov_in_ix(t11_state *cpustate, UINT16 op); +static void mov_in_ixd(t11_state *cpustate, UINT16 op); +static void mov_ind_rg(t11_state *cpustate, UINT16 op); +static void mov_ind_rgd(t11_state *cpustate, UINT16 op); +static void mov_ind_in(t11_state *cpustate, UINT16 op); +static void mov_ind_ind(t11_state *cpustate, UINT16 op); +static void mov_ind_de(t11_state *cpustate, UINT16 op); +static void mov_ind_ded(t11_state *cpustate, UINT16 op); +static void mov_ind_ix(t11_state *cpustate, UINT16 op); +static void mov_ind_ixd(t11_state *cpustate, UINT16 op); +static void mov_de_rg(t11_state *cpustate, UINT16 op); +static void mov_de_rgd(t11_state *cpustate, UINT16 op); +static void mov_de_in(t11_state *cpustate, UINT16 op); +static void mov_de_ind(t11_state *cpustate, UINT16 op); +static void mov_de_de(t11_state *cpustate, UINT16 op); +static void mov_de_ded(t11_state *cpustate, UINT16 op); +static void mov_de_ix(t11_state *cpustate, UINT16 op); +static void mov_de_ixd(t11_state *cpustate, UINT16 op); +static void mov_ded_rg(t11_state *cpustate, UINT16 op); +static void mov_ded_rgd(t11_state *cpustate, UINT16 op); +static void mov_ded_in(t11_state *cpustate, UINT16 op); +static void mov_ded_ind(t11_state *cpustate, UINT16 op); +static void mov_ded_de(t11_state *cpustate, UINT16 op); +static void mov_ded_ded(t11_state *cpustate, UINT16 op); +static void mov_ded_ix(t11_state *cpustate, UINT16 op); +static void mov_ded_ixd(t11_state *cpustate, UINT16 op); +static void mov_ix_rg(t11_state *cpustate, UINT16 op); +static void mov_ix_rgd(t11_state *cpustate, UINT16 op); +static void mov_ix_in(t11_state *cpustate, UINT16 op); +static void mov_ix_ind(t11_state *cpustate, UINT16 op); +static void mov_ix_de(t11_state *cpustate, UINT16 op); +static void mov_ix_ded(t11_state *cpustate, UINT16 op); +static void mov_ix_ix(t11_state *cpustate, UINT16 op); +static void mov_ix_ixd(t11_state *cpustate, UINT16 op); +static void mov_ixd_rg(t11_state *cpustate, UINT16 op); +static void mov_ixd_rgd(t11_state *cpustate, UINT16 op); +static void mov_ixd_in(t11_state *cpustate, UINT16 op); +static void mov_ixd_ind(t11_state *cpustate, UINT16 op); +static void mov_ixd_de(t11_state *cpustate, UINT16 op); +static void mov_ixd_ded(t11_state *cpustate, UINT16 op); +static void mov_ixd_ix(t11_state *cpustate, UINT16 op); +static void mov_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void cmp_rg_rg(t11_state *cpustate, UINT16 op); +static void cmp_rg_rgd(t11_state *cpustate, UINT16 op); +static void cmp_rg_in(t11_state *cpustate, UINT16 op); +static void cmp_rg_ind(t11_state *cpustate, UINT16 op); +static void cmp_rg_de(t11_state *cpustate, UINT16 op); +static void cmp_rg_ded(t11_state *cpustate, UINT16 op); +static void cmp_rg_ix(t11_state *cpustate, UINT16 op); +static void cmp_rg_ixd(t11_state *cpustate, UINT16 op); +static void cmp_rgd_rg(t11_state *cpustate, UINT16 op); +static void cmp_rgd_rgd(t11_state *cpustate, UINT16 op); +static void cmp_rgd_in(t11_state *cpustate, UINT16 op); +static void cmp_rgd_ind(t11_state *cpustate, UINT16 op); +static void cmp_rgd_de(t11_state *cpustate, UINT16 op); +static void cmp_rgd_ded(t11_state *cpustate, UINT16 op); +static void cmp_rgd_ix(t11_state *cpustate, UINT16 op); +static void cmp_rgd_ixd(t11_state *cpustate, UINT16 op); +static void cmp_in_rg(t11_state *cpustate, UINT16 op); +static void cmp_in_rgd(t11_state *cpustate, UINT16 op); +static void cmp_in_in(t11_state *cpustate, UINT16 op); +static void cmp_in_ind(t11_state *cpustate, UINT16 op); +static void cmp_in_de(t11_state *cpustate, UINT16 op); +static void cmp_in_ded(t11_state *cpustate, UINT16 op); +static void cmp_in_ix(t11_state *cpustate, UINT16 op); +static void cmp_in_ixd(t11_state *cpustate, UINT16 op); +static void cmp_ind_rg(t11_state *cpustate, UINT16 op); +static void cmp_ind_rgd(t11_state *cpustate, UINT16 op); +static void cmp_ind_in(t11_state *cpustate, UINT16 op); +static void cmp_ind_ind(t11_state *cpustate, UINT16 op); +static void cmp_ind_de(t11_state *cpustate, UINT16 op); +static void cmp_ind_ded(t11_state *cpustate, UINT16 op); +static void cmp_ind_ix(t11_state *cpustate, UINT16 op); +static void cmp_ind_ixd(t11_state *cpustate, UINT16 op); +static void cmp_de_rg(t11_state *cpustate, UINT16 op); +static void cmp_de_rgd(t11_state *cpustate, UINT16 op); +static void cmp_de_in(t11_state *cpustate, UINT16 op); +static void cmp_de_ind(t11_state *cpustate, UINT16 op); +static void cmp_de_de(t11_state *cpustate, UINT16 op); +static void cmp_de_ded(t11_state *cpustate, UINT16 op); +static void cmp_de_ix(t11_state *cpustate, UINT16 op); +static void cmp_de_ixd(t11_state *cpustate, UINT16 op); +static void cmp_ded_rg(t11_state *cpustate, UINT16 op); +static void cmp_ded_rgd(t11_state *cpustate, UINT16 op); +static void cmp_ded_in(t11_state *cpustate, UINT16 op); +static void cmp_ded_ind(t11_state *cpustate, UINT16 op); +static void cmp_ded_de(t11_state *cpustate, UINT16 op); +static void cmp_ded_ded(t11_state *cpustate, UINT16 op); +static void cmp_ded_ix(t11_state *cpustate, UINT16 op); +static void cmp_ded_ixd(t11_state *cpustate, UINT16 op); +static void cmp_ix_rg(t11_state *cpustate, UINT16 op); +static void cmp_ix_rgd(t11_state *cpustate, UINT16 op); +static void cmp_ix_in(t11_state *cpustate, UINT16 op); +static void cmp_ix_ind(t11_state *cpustate, UINT16 op); +static void cmp_ix_de(t11_state *cpustate, UINT16 op); +static void cmp_ix_ded(t11_state *cpustate, UINT16 op); +static void cmp_ix_ix(t11_state *cpustate, UINT16 op); +static void cmp_ix_ixd(t11_state *cpustate, UINT16 op); +static void cmp_ixd_rg(t11_state *cpustate, UINT16 op); +static void cmp_ixd_rgd(t11_state *cpustate, UINT16 op); +static void cmp_ixd_in(t11_state *cpustate, UINT16 op); +static void cmp_ixd_ind(t11_state *cpustate, UINT16 op); +static void cmp_ixd_de(t11_state *cpustate, UINT16 op); +static void cmp_ixd_ded(t11_state *cpustate, UINT16 op); +static void cmp_ixd_ix(t11_state *cpustate, UINT16 op); +static void cmp_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bit_rg_rg(t11_state *cpustate, UINT16 op); +static void bit_rg_rgd(t11_state *cpustate, UINT16 op); +static void bit_rg_in(t11_state *cpustate, UINT16 op); +static void bit_rg_ind(t11_state *cpustate, UINT16 op); +static void bit_rg_de(t11_state *cpustate, UINT16 op); +static void bit_rg_ded(t11_state *cpustate, UINT16 op); +static void bit_rg_ix(t11_state *cpustate, UINT16 op); +static void bit_rg_ixd(t11_state *cpustate, UINT16 op); +static void bit_rgd_rg(t11_state *cpustate, UINT16 op); +static void bit_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bit_rgd_in(t11_state *cpustate, UINT16 op); +static void bit_rgd_ind(t11_state *cpustate, UINT16 op); +static void bit_rgd_de(t11_state *cpustate, UINT16 op); +static void bit_rgd_ded(t11_state *cpustate, UINT16 op); +static void bit_rgd_ix(t11_state *cpustate, UINT16 op); +static void bit_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bit_in_rg(t11_state *cpustate, UINT16 op); +static void bit_in_rgd(t11_state *cpustate, UINT16 op); +static void bit_in_in(t11_state *cpustate, UINT16 op); +static void bit_in_ind(t11_state *cpustate, UINT16 op); +static void bit_in_de(t11_state *cpustate, UINT16 op); +static void bit_in_ded(t11_state *cpustate, UINT16 op); +static void bit_in_ix(t11_state *cpustate, UINT16 op); +static void bit_in_ixd(t11_state *cpustate, UINT16 op); +static void bit_ind_rg(t11_state *cpustate, UINT16 op); +static void bit_ind_rgd(t11_state *cpustate, UINT16 op); +static void bit_ind_in(t11_state *cpustate, UINT16 op); +static void bit_ind_ind(t11_state *cpustate, UINT16 op); +static void bit_ind_de(t11_state *cpustate, UINT16 op); +static void bit_ind_ded(t11_state *cpustate, UINT16 op); +static void bit_ind_ix(t11_state *cpustate, UINT16 op); +static void bit_ind_ixd(t11_state *cpustate, UINT16 op); +static void bit_de_rg(t11_state *cpustate, UINT16 op); +static void bit_de_rgd(t11_state *cpustate, UINT16 op); +static void bit_de_in(t11_state *cpustate, UINT16 op); +static void bit_de_ind(t11_state *cpustate, UINT16 op); +static void bit_de_de(t11_state *cpustate, UINT16 op); +static void bit_de_ded(t11_state *cpustate, UINT16 op); +static void bit_de_ix(t11_state *cpustate, UINT16 op); +static void bit_de_ixd(t11_state *cpustate, UINT16 op); +static void bit_ded_rg(t11_state *cpustate, UINT16 op); +static void bit_ded_rgd(t11_state *cpustate, UINT16 op); +static void bit_ded_in(t11_state *cpustate, UINT16 op); +static void bit_ded_ind(t11_state *cpustate, UINT16 op); +static void bit_ded_de(t11_state *cpustate, UINT16 op); +static void bit_ded_ded(t11_state *cpustate, UINT16 op); +static void bit_ded_ix(t11_state *cpustate, UINT16 op); +static void bit_ded_ixd(t11_state *cpustate, UINT16 op); +static void bit_ix_rg(t11_state *cpustate, UINT16 op); +static void bit_ix_rgd(t11_state *cpustate, UINT16 op); +static void bit_ix_in(t11_state *cpustate, UINT16 op); +static void bit_ix_ind(t11_state *cpustate, UINT16 op); +static void bit_ix_de(t11_state *cpustate, UINT16 op); +static void bit_ix_ded(t11_state *cpustate, UINT16 op); +static void bit_ix_ix(t11_state *cpustate, UINT16 op); +static void bit_ix_ixd(t11_state *cpustate, UINT16 op); +static void bit_ixd_rg(t11_state *cpustate, UINT16 op); +static void bit_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bit_ixd_in(t11_state *cpustate, UINT16 op); +static void bit_ixd_ind(t11_state *cpustate, UINT16 op); +static void bit_ixd_de(t11_state *cpustate, UINT16 op); +static void bit_ixd_ded(t11_state *cpustate, UINT16 op); +static void bit_ixd_ix(t11_state *cpustate, UINT16 op); +static void bit_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bic_rg_rg(t11_state *cpustate, UINT16 op); +static void bic_rg_rgd(t11_state *cpustate, UINT16 op); +static void bic_rg_in(t11_state *cpustate, UINT16 op); +static void bic_rg_ind(t11_state *cpustate, UINT16 op); +static void bic_rg_de(t11_state *cpustate, UINT16 op); +static void bic_rg_ded(t11_state *cpustate, UINT16 op); +static void bic_rg_ix(t11_state *cpustate, UINT16 op); +static void bic_rg_ixd(t11_state *cpustate, UINT16 op); +static void bic_rgd_rg(t11_state *cpustate, UINT16 op); +static void bic_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bic_rgd_in(t11_state *cpustate, UINT16 op); +static void bic_rgd_ind(t11_state *cpustate, UINT16 op); +static void bic_rgd_de(t11_state *cpustate, UINT16 op); +static void bic_rgd_ded(t11_state *cpustate, UINT16 op); +static void bic_rgd_ix(t11_state *cpustate, UINT16 op); +static void bic_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bic_in_rg(t11_state *cpustate, UINT16 op); +static void bic_in_rgd(t11_state *cpustate, UINT16 op); +static void bic_in_in(t11_state *cpustate, UINT16 op); +static void bic_in_ind(t11_state *cpustate, UINT16 op); +static void bic_in_de(t11_state *cpustate, UINT16 op); +static void bic_in_ded(t11_state *cpustate, UINT16 op); +static void bic_in_ix(t11_state *cpustate, UINT16 op); +static void bic_in_ixd(t11_state *cpustate, UINT16 op); +static void bic_ind_rg(t11_state *cpustate, UINT16 op); +static void bic_ind_rgd(t11_state *cpustate, UINT16 op); +static void bic_ind_in(t11_state *cpustate, UINT16 op); +static void bic_ind_ind(t11_state *cpustate, UINT16 op); +static void bic_ind_de(t11_state *cpustate, UINT16 op); +static void bic_ind_ded(t11_state *cpustate, UINT16 op); +static void bic_ind_ix(t11_state *cpustate, UINT16 op); +static void bic_ind_ixd(t11_state *cpustate, UINT16 op); +static void bic_de_rg(t11_state *cpustate, UINT16 op); +static void bic_de_rgd(t11_state *cpustate, UINT16 op); +static void bic_de_in(t11_state *cpustate, UINT16 op); +static void bic_de_ind(t11_state *cpustate, UINT16 op); +static void bic_de_de(t11_state *cpustate, UINT16 op); +static void bic_de_ded(t11_state *cpustate, UINT16 op); +static void bic_de_ix(t11_state *cpustate, UINT16 op); +static void bic_de_ixd(t11_state *cpustate, UINT16 op); +static void bic_ded_rg(t11_state *cpustate, UINT16 op); +static void bic_ded_rgd(t11_state *cpustate, UINT16 op); +static void bic_ded_in(t11_state *cpustate, UINT16 op); +static void bic_ded_ind(t11_state *cpustate, UINT16 op); +static void bic_ded_de(t11_state *cpustate, UINT16 op); +static void bic_ded_ded(t11_state *cpustate, UINT16 op); +static void bic_ded_ix(t11_state *cpustate, UINT16 op); +static void bic_ded_ixd(t11_state *cpustate, UINT16 op); +static void bic_ix_rg(t11_state *cpustate, UINT16 op); +static void bic_ix_rgd(t11_state *cpustate, UINT16 op); +static void bic_ix_in(t11_state *cpustate, UINT16 op); +static void bic_ix_ind(t11_state *cpustate, UINT16 op); +static void bic_ix_de(t11_state *cpustate, UINT16 op); +static void bic_ix_ded(t11_state *cpustate, UINT16 op); +static void bic_ix_ix(t11_state *cpustate, UINT16 op); +static void bic_ix_ixd(t11_state *cpustate, UINT16 op); +static void bic_ixd_rg(t11_state *cpustate, UINT16 op); +static void bic_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bic_ixd_in(t11_state *cpustate, UINT16 op); +static void bic_ixd_ind(t11_state *cpustate, UINT16 op); +static void bic_ixd_de(t11_state *cpustate, UINT16 op); +static void bic_ixd_ded(t11_state *cpustate, UINT16 op); +static void bic_ixd_ix(t11_state *cpustate, UINT16 op); +static void bic_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bis_rg_rg(t11_state *cpustate, UINT16 op); +static void bis_rg_rgd(t11_state *cpustate, UINT16 op); +static void bis_rg_in(t11_state *cpustate, UINT16 op); +static void bis_rg_ind(t11_state *cpustate, UINT16 op); +static void bis_rg_de(t11_state *cpustate, UINT16 op); +static void bis_rg_ded(t11_state *cpustate, UINT16 op); +static void bis_rg_ix(t11_state *cpustate, UINT16 op); +static void bis_rg_ixd(t11_state *cpustate, UINT16 op); +static void bis_rgd_rg(t11_state *cpustate, UINT16 op); +static void bis_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bis_rgd_in(t11_state *cpustate, UINT16 op); +static void bis_rgd_ind(t11_state *cpustate, UINT16 op); +static void bis_rgd_de(t11_state *cpustate, UINT16 op); +static void bis_rgd_ded(t11_state *cpustate, UINT16 op); +static void bis_rgd_ix(t11_state *cpustate, UINT16 op); +static void bis_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bis_in_rg(t11_state *cpustate, UINT16 op); +static void bis_in_rgd(t11_state *cpustate, UINT16 op); +static void bis_in_in(t11_state *cpustate, UINT16 op); +static void bis_in_ind(t11_state *cpustate, UINT16 op); +static void bis_in_de(t11_state *cpustate, UINT16 op); +static void bis_in_ded(t11_state *cpustate, UINT16 op); +static void bis_in_ix(t11_state *cpustate, UINT16 op); +static void bis_in_ixd(t11_state *cpustate, UINT16 op); +static void bis_ind_rg(t11_state *cpustate, UINT16 op); +static void bis_ind_rgd(t11_state *cpustate, UINT16 op); +static void bis_ind_in(t11_state *cpustate, UINT16 op); +static void bis_ind_ind(t11_state *cpustate, UINT16 op); +static void bis_ind_de(t11_state *cpustate, UINT16 op); +static void bis_ind_ded(t11_state *cpustate, UINT16 op); +static void bis_ind_ix(t11_state *cpustate, UINT16 op); +static void bis_ind_ixd(t11_state *cpustate, UINT16 op); +static void bis_de_rg(t11_state *cpustate, UINT16 op); +static void bis_de_rgd(t11_state *cpustate, UINT16 op); +static void bis_de_in(t11_state *cpustate, UINT16 op); +static void bis_de_ind(t11_state *cpustate, UINT16 op); +static void bis_de_de(t11_state *cpustate, UINT16 op); +static void bis_de_ded(t11_state *cpustate, UINT16 op); +static void bis_de_ix(t11_state *cpustate, UINT16 op); +static void bis_de_ixd(t11_state *cpustate, UINT16 op); +static void bis_ded_rg(t11_state *cpustate, UINT16 op); +static void bis_ded_rgd(t11_state *cpustate, UINT16 op); +static void bis_ded_in(t11_state *cpustate, UINT16 op); +static void bis_ded_ind(t11_state *cpustate, UINT16 op); +static void bis_ded_de(t11_state *cpustate, UINT16 op); +static void bis_ded_ded(t11_state *cpustate, UINT16 op); +static void bis_ded_ix(t11_state *cpustate, UINT16 op); +static void bis_ded_ixd(t11_state *cpustate, UINT16 op); +static void bis_ix_rg(t11_state *cpustate, UINT16 op); +static void bis_ix_rgd(t11_state *cpustate, UINT16 op); +static void bis_ix_in(t11_state *cpustate, UINT16 op); +static void bis_ix_ind(t11_state *cpustate, UINT16 op); +static void bis_ix_de(t11_state *cpustate, UINT16 op); +static void bis_ix_ded(t11_state *cpustate, UINT16 op); +static void bis_ix_ix(t11_state *cpustate, UINT16 op); +static void bis_ix_ixd(t11_state *cpustate, UINT16 op); +static void bis_ixd_rg(t11_state *cpustate, UINT16 op); +static void bis_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bis_ixd_in(t11_state *cpustate, UINT16 op); +static void bis_ixd_ind(t11_state *cpustate, UINT16 op); +static void bis_ixd_de(t11_state *cpustate, UINT16 op); +static void bis_ixd_ded(t11_state *cpustate, UINT16 op); +static void bis_ixd_ix(t11_state *cpustate, UINT16 op); +static void bis_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void add_rg_rg(t11_state *cpustate, UINT16 op); +static void add_rg_rgd(t11_state *cpustate, UINT16 op); +static void add_rg_in(t11_state *cpustate, UINT16 op); +static void add_rg_ind(t11_state *cpustate, UINT16 op); +static void add_rg_de(t11_state *cpustate, UINT16 op); +static void add_rg_ded(t11_state *cpustate, UINT16 op); +static void add_rg_ix(t11_state *cpustate, UINT16 op); +static void add_rg_ixd(t11_state *cpustate, UINT16 op); +static void add_rgd_rg(t11_state *cpustate, UINT16 op); +static void add_rgd_rgd(t11_state *cpustate, UINT16 op); +static void add_rgd_in(t11_state *cpustate, UINT16 op); +static void add_rgd_ind(t11_state *cpustate, UINT16 op); +static void add_rgd_de(t11_state *cpustate, UINT16 op); +static void add_rgd_ded(t11_state *cpustate, UINT16 op); +static void add_rgd_ix(t11_state *cpustate, UINT16 op); +static void add_rgd_ixd(t11_state *cpustate, UINT16 op); +static void add_in_rg(t11_state *cpustate, UINT16 op); +static void add_in_rgd(t11_state *cpustate, UINT16 op); +static void add_in_in(t11_state *cpustate, UINT16 op); +static void add_in_ind(t11_state *cpustate, UINT16 op); +static void add_in_de(t11_state *cpustate, UINT16 op); +static void add_in_ded(t11_state *cpustate, UINT16 op); +static void add_in_ix(t11_state *cpustate, UINT16 op); +static void add_in_ixd(t11_state *cpustate, UINT16 op); +static void add_ind_rg(t11_state *cpustate, UINT16 op); +static void add_ind_rgd(t11_state *cpustate, UINT16 op); +static void add_ind_in(t11_state *cpustate, UINT16 op); +static void add_ind_ind(t11_state *cpustate, UINT16 op); +static void add_ind_de(t11_state *cpustate, UINT16 op); +static void add_ind_ded(t11_state *cpustate, UINT16 op); +static void add_ind_ix(t11_state *cpustate, UINT16 op); +static void add_ind_ixd(t11_state *cpustate, UINT16 op); +static void add_de_rg(t11_state *cpustate, UINT16 op); +static void add_de_rgd(t11_state *cpustate, UINT16 op); +static void add_de_in(t11_state *cpustate, UINT16 op); +static void add_de_ind(t11_state *cpustate, UINT16 op); +static void add_de_de(t11_state *cpustate, UINT16 op); +static void add_de_ded(t11_state *cpustate, UINT16 op); +static void add_de_ix(t11_state *cpustate, UINT16 op); +static void add_de_ixd(t11_state *cpustate, UINT16 op); +static void add_ded_rg(t11_state *cpustate, UINT16 op); +static void add_ded_rgd(t11_state *cpustate, UINT16 op); +static void add_ded_in(t11_state *cpustate, UINT16 op); +static void add_ded_ind(t11_state *cpustate, UINT16 op); +static void add_ded_de(t11_state *cpustate, UINT16 op); +static void add_ded_ded(t11_state *cpustate, UINT16 op); +static void add_ded_ix(t11_state *cpustate, UINT16 op); +static void add_ded_ixd(t11_state *cpustate, UINT16 op); +static void add_ix_rg(t11_state *cpustate, UINT16 op); +static void add_ix_rgd(t11_state *cpustate, UINT16 op); +static void add_ix_in(t11_state *cpustate, UINT16 op); +static void add_ix_ind(t11_state *cpustate, UINT16 op); +static void add_ix_de(t11_state *cpustate, UINT16 op); +static void add_ix_ded(t11_state *cpustate, UINT16 op); +static void add_ix_ix(t11_state *cpustate, UINT16 op); +static void add_ix_ixd(t11_state *cpustate, UINT16 op); +static void add_ixd_rg(t11_state *cpustate, UINT16 op); +static void add_ixd_rgd(t11_state *cpustate, UINT16 op); +static void add_ixd_in(t11_state *cpustate, UINT16 op); +static void add_ixd_ind(t11_state *cpustate, UINT16 op); +static void add_ixd_de(t11_state *cpustate, UINT16 op); +static void add_ixd_ded(t11_state *cpustate, UINT16 op); +static void add_ixd_ix(t11_state *cpustate, UINT16 op); +static void add_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void xor_rg(t11_state *cpustate, UINT16 op); +static void xor_rgd(t11_state *cpustate, UINT16 op); +static void xor_in(t11_state *cpustate, UINT16 op); +static void xor_ind(t11_state *cpustate, UINT16 op); +static void xor_de(t11_state *cpustate, UINT16 op); +static void xor_ded(t11_state *cpustate, UINT16 op); +static void xor_ix(t11_state *cpustate, UINT16 op); +static void xor_ixd(t11_state *cpustate, UINT16 op); + +static void sob(t11_state *cpustate, UINT16 op); + +static void bpl(t11_state *cpustate, UINT16 op); +static void bmi(t11_state *cpustate, UINT16 op); +static void bhi(t11_state *cpustate, UINT16 op); +static void blos(t11_state *cpustate, UINT16 op); +static void bvc(t11_state *cpustate, UINT16 op); +static void bvs(t11_state *cpustate, UINT16 op); +static void bcc(t11_state *cpustate, UINT16 op); +static void bcs(t11_state *cpustate, UINT16 op); +static void emt(t11_state *cpustate, UINT16 op); +static void trap(t11_state *cpustate, UINT16 op); + +static void clrb_rg(t11_state *cpustate, UINT16 op); +static void clrb_rgd(t11_state *cpustate, UINT16 op); +static void clrb_in(t11_state *cpustate, UINT16 op); +static void clrb_ind(t11_state *cpustate, UINT16 op); +static void clrb_de(t11_state *cpustate, UINT16 op); +static void clrb_ded(t11_state *cpustate, UINT16 op); +static void clrb_ix(t11_state *cpustate, UINT16 op); +static void clrb_ixd(t11_state *cpustate, UINT16 op); + +static void comb_rg(t11_state *cpustate, UINT16 op); +static void comb_rgd(t11_state *cpustate, UINT16 op); +static void comb_in(t11_state *cpustate, UINT16 op); +static void comb_ind(t11_state *cpustate, UINT16 op); +static void comb_de(t11_state *cpustate, UINT16 op); +static void comb_ded(t11_state *cpustate, UINT16 op); +static void comb_ix(t11_state *cpustate, UINT16 op); +static void comb_ixd(t11_state *cpustate, UINT16 op); + +static void incb_rg(t11_state *cpustate, UINT16 op); +static void incb_rgd(t11_state *cpustate, UINT16 op); +static void incb_in(t11_state *cpustate, UINT16 op); +static void incb_ind(t11_state *cpustate, UINT16 op); +static void incb_de(t11_state *cpustate, UINT16 op); +static void incb_ded(t11_state *cpustate, UINT16 op); +static void incb_ix(t11_state *cpustate, UINT16 op); +static void incb_ixd(t11_state *cpustate, UINT16 op); + +static void decb_rg(t11_state *cpustate, UINT16 op); +static void decb_rgd(t11_state *cpustate, UINT16 op); +static void decb_in(t11_state *cpustate, UINT16 op); +static void decb_ind(t11_state *cpustate, UINT16 op); +static void decb_de(t11_state *cpustate, UINT16 op); +static void decb_ded(t11_state *cpustate, UINT16 op); +static void decb_ix(t11_state *cpustate, UINT16 op); +static void decb_ixd(t11_state *cpustate, UINT16 op); + +static void negb_rg(t11_state *cpustate, UINT16 op); +static void negb_rgd(t11_state *cpustate, UINT16 op); +static void negb_in(t11_state *cpustate, UINT16 op); +static void negb_ind(t11_state *cpustate, UINT16 op); +static void negb_de(t11_state *cpustate, UINT16 op); +static void negb_ded(t11_state *cpustate, UINT16 op); +static void negb_ix(t11_state *cpustate, UINT16 op); +static void negb_ixd(t11_state *cpustate, UINT16 op); + +static void adcb_rg(t11_state *cpustate, UINT16 op); +static void adcb_rgd(t11_state *cpustate, UINT16 op); +static void adcb_in(t11_state *cpustate, UINT16 op); +static void adcb_ind(t11_state *cpustate, UINT16 op); +static void adcb_de(t11_state *cpustate, UINT16 op); +static void adcb_ded(t11_state *cpustate, UINT16 op); +static void adcb_ix(t11_state *cpustate, UINT16 op); +static void adcb_ixd(t11_state *cpustate, UINT16 op); + +static void sbcb_rg(t11_state *cpustate, UINT16 op); +static void sbcb_rgd(t11_state *cpustate, UINT16 op); +static void sbcb_in(t11_state *cpustate, UINT16 op); +static void sbcb_ind(t11_state *cpustate, UINT16 op); +static void sbcb_de(t11_state *cpustate, UINT16 op); +static void sbcb_ded(t11_state *cpustate, UINT16 op); +static void sbcb_ix(t11_state *cpustate, UINT16 op); +static void sbcb_ixd(t11_state *cpustate, UINT16 op); + +static void tstb_rg(t11_state *cpustate, UINT16 op); +static void tstb_rgd(t11_state *cpustate, UINT16 op); +static void tstb_in(t11_state *cpustate, UINT16 op); +static void tstb_ind(t11_state *cpustate, UINT16 op); +static void tstb_de(t11_state *cpustate, UINT16 op); +static void tstb_ded(t11_state *cpustate, UINT16 op); +static void tstb_ix(t11_state *cpustate, UINT16 op); +static void tstb_ixd(t11_state *cpustate, UINT16 op); + +static void rorb_rg(t11_state *cpustate, UINT16 op); +static void rorb_rgd(t11_state *cpustate, UINT16 op); +static void rorb_in(t11_state *cpustate, UINT16 op); +static void rorb_ind(t11_state *cpustate, UINT16 op); +static void rorb_de(t11_state *cpustate, UINT16 op); +static void rorb_ded(t11_state *cpustate, UINT16 op); +static void rorb_ix(t11_state *cpustate, UINT16 op); +static void rorb_ixd(t11_state *cpustate, UINT16 op); + +static void rolb_rg(t11_state *cpustate, UINT16 op); +static void rolb_rgd(t11_state *cpustate, UINT16 op); +static void rolb_in(t11_state *cpustate, UINT16 op); +static void rolb_ind(t11_state *cpustate, UINT16 op); +static void rolb_de(t11_state *cpustate, UINT16 op); +static void rolb_ded(t11_state *cpustate, UINT16 op); +static void rolb_ix(t11_state *cpustate, UINT16 op); +static void rolb_ixd(t11_state *cpustate, UINT16 op); + +static void asrb_rg(t11_state *cpustate, UINT16 op); +static void asrb_rgd(t11_state *cpustate, UINT16 op); +static void asrb_in(t11_state *cpustate, UINT16 op); +static void asrb_ind(t11_state *cpustate, UINT16 op); +static void asrb_de(t11_state *cpustate, UINT16 op); +static void asrb_ded(t11_state *cpustate, UINT16 op); +static void asrb_ix(t11_state *cpustate, UINT16 op); +static void asrb_ixd(t11_state *cpustate, UINT16 op); + +static void aslb_rg(t11_state *cpustate, UINT16 op); +static void aslb_rgd(t11_state *cpustate, UINT16 op); +static void aslb_in(t11_state *cpustate, UINT16 op); +static void aslb_ind(t11_state *cpustate, UINT16 op); +static void aslb_de(t11_state *cpustate, UINT16 op); +static void aslb_ded(t11_state *cpustate, UINT16 op); +static void aslb_ix(t11_state *cpustate, UINT16 op); +static void aslb_ixd(t11_state *cpustate, UINT16 op); + +static void mtps_rg(t11_state *cpustate, UINT16 op); +static void mtps_rgd(t11_state *cpustate, UINT16 op); +static void mtps_in(t11_state *cpustate, UINT16 op); +static void mtps_ind(t11_state *cpustate, UINT16 op); +static void mtps_de(t11_state *cpustate, UINT16 op); +static void mtps_ded(t11_state *cpustate, UINT16 op); +static void mtps_ix(t11_state *cpustate, UINT16 op); +static void mtps_ixd(t11_state *cpustate, UINT16 op); + +static void mfps_rg(t11_state *cpustate, UINT16 op); +static void mfps_rgd(t11_state *cpustate, UINT16 op); +static void mfps_in(t11_state *cpustate, UINT16 op); +static void mfps_ind(t11_state *cpustate, UINT16 op); +static void mfps_de(t11_state *cpustate, UINT16 op); +static void mfps_ded(t11_state *cpustate, UINT16 op); +static void mfps_ix(t11_state *cpustate, UINT16 op); +static void mfps_ixd(t11_state *cpustate, UINT16 op); + +static void movb_rg_rg(t11_state *cpustate, UINT16 op); +static void movb_rg_rgd(t11_state *cpustate, UINT16 op); +static void movb_rg_in(t11_state *cpustate, UINT16 op); +static void movb_rg_ind(t11_state *cpustate, UINT16 op); +static void movb_rg_de(t11_state *cpustate, UINT16 op); +static void movb_rg_ded(t11_state *cpustate, UINT16 op); +static void movb_rg_ix(t11_state *cpustate, UINT16 op); +static void movb_rg_ixd(t11_state *cpustate, UINT16 op); +static void movb_rgd_rg(t11_state *cpustate, UINT16 op); +static void movb_rgd_rgd(t11_state *cpustate, UINT16 op); +static void movb_rgd_in(t11_state *cpustate, UINT16 op); +static void movb_rgd_ind(t11_state *cpustate, UINT16 op); +static void movb_rgd_de(t11_state *cpustate, UINT16 op); +static void movb_rgd_ded(t11_state *cpustate, UINT16 op); +static void movb_rgd_ix(t11_state *cpustate, UINT16 op); +static void movb_rgd_ixd(t11_state *cpustate, UINT16 op); +static void movb_in_rg(t11_state *cpustate, UINT16 op); +static void movb_in_rgd(t11_state *cpustate, UINT16 op); +static void movb_in_in(t11_state *cpustate, UINT16 op); +static void movb_in_ind(t11_state *cpustate, UINT16 op); +static void movb_in_de(t11_state *cpustate, UINT16 op); +static void movb_in_ded(t11_state *cpustate, UINT16 op); +static void movb_in_ix(t11_state *cpustate, UINT16 op); +static void movb_in_ixd(t11_state *cpustate, UINT16 op); +static void movb_ind_rg(t11_state *cpustate, UINT16 op); +static void movb_ind_rgd(t11_state *cpustate, UINT16 op); +static void movb_ind_in(t11_state *cpustate, UINT16 op); +static void movb_ind_ind(t11_state *cpustate, UINT16 op); +static void movb_ind_de(t11_state *cpustate, UINT16 op); +static void movb_ind_ded(t11_state *cpustate, UINT16 op); +static void movb_ind_ix(t11_state *cpustate, UINT16 op); +static void movb_ind_ixd(t11_state *cpustate, UINT16 op); +static void movb_de_rg(t11_state *cpustate, UINT16 op); +static void movb_de_rgd(t11_state *cpustate, UINT16 op); +static void movb_de_in(t11_state *cpustate, UINT16 op); +static void movb_de_ind(t11_state *cpustate, UINT16 op); +static void movb_de_de(t11_state *cpustate, UINT16 op); +static void movb_de_ded(t11_state *cpustate, UINT16 op); +static void movb_de_ix(t11_state *cpustate, UINT16 op); +static void movb_de_ixd(t11_state *cpustate, UINT16 op); +static void movb_ded_rg(t11_state *cpustate, UINT16 op); +static void movb_ded_rgd(t11_state *cpustate, UINT16 op); +static void movb_ded_in(t11_state *cpustate, UINT16 op); +static void movb_ded_ind(t11_state *cpustate, UINT16 op); +static void movb_ded_de(t11_state *cpustate, UINT16 op); +static void movb_ded_ded(t11_state *cpustate, UINT16 op); +static void movb_ded_ix(t11_state *cpustate, UINT16 op); +static void movb_ded_ixd(t11_state *cpustate, UINT16 op); +static void movb_ix_rg(t11_state *cpustate, UINT16 op); +static void movb_ix_rgd(t11_state *cpustate, UINT16 op); +static void movb_ix_in(t11_state *cpustate, UINT16 op); +static void movb_ix_ind(t11_state *cpustate, UINT16 op); +static void movb_ix_de(t11_state *cpustate, UINT16 op); +static void movb_ix_ded(t11_state *cpustate, UINT16 op); +static void movb_ix_ix(t11_state *cpustate, UINT16 op); +static void movb_ix_ixd(t11_state *cpustate, UINT16 op); +static void movb_ixd_rg(t11_state *cpustate, UINT16 op); +static void movb_ixd_rgd(t11_state *cpustate, UINT16 op); +static void movb_ixd_in(t11_state *cpustate, UINT16 op); +static void movb_ixd_ind(t11_state *cpustate, UINT16 op); +static void movb_ixd_de(t11_state *cpustate, UINT16 op); +static void movb_ixd_ded(t11_state *cpustate, UINT16 op); +static void movb_ixd_ix(t11_state *cpustate, UINT16 op); +static void movb_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void cmpb_rg_rg(t11_state *cpustate, UINT16 op); +static void cmpb_rg_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_rg_in(t11_state *cpustate, UINT16 op); +static void cmpb_rg_ind(t11_state *cpustate, UINT16 op); +static void cmpb_rg_de(t11_state *cpustate, UINT16 op); +static void cmpb_rg_ded(t11_state *cpustate, UINT16 op); +static void cmpb_rg_ix(t11_state *cpustate, UINT16 op); +static void cmpb_rg_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_rg(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_in(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_ind(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_de(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_ded(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_ix(t11_state *cpustate, UINT16 op); +static void cmpb_rgd_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_in_rg(t11_state *cpustate, UINT16 op); +static void cmpb_in_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_in_in(t11_state *cpustate, UINT16 op); +static void cmpb_in_ind(t11_state *cpustate, UINT16 op); +static void cmpb_in_de(t11_state *cpustate, UINT16 op); +static void cmpb_in_ded(t11_state *cpustate, UINT16 op); +static void cmpb_in_ix(t11_state *cpustate, UINT16 op); +static void cmpb_in_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_ind_rg(t11_state *cpustate, UINT16 op); +static void cmpb_ind_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_ind_in(t11_state *cpustate, UINT16 op); +static void cmpb_ind_ind(t11_state *cpustate, UINT16 op); +static void cmpb_ind_de(t11_state *cpustate, UINT16 op); +static void cmpb_ind_ded(t11_state *cpustate, UINT16 op); +static void cmpb_ind_ix(t11_state *cpustate, UINT16 op); +static void cmpb_ind_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_de_rg(t11_state *cpustate, UINT16 op); +static void cmpb_de_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_de_in(t11_state *cpustate, UINT16 op); +static void cmpb_de_ind(t11_state *cpustate, UINT16 op); +static void cmpb_de_de(t11_state *cpustate, UINT16 op); +static void cmpb_de_ded(t11_state *cpustate, UINT16 op); +static void cmpb_de_ix(t11_state *cpustate, UINT16 op); +static void cmpb_de_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_ded_rg(t11_state *cpustate, UINT16 op); +static void cmpb_ded_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_ded_in(t11_state *cpustate, UINT16 op); +static void cmpb_ded_ind(t11_state *cpustate, UINT16 op); +static void cmpb_ded_de(t11_state *cpustate, UINT16 op); +static void cmpb_ded_ded(t11_state *cpustate, UINT16 op); +static void cmpb_ded_ix(t11_state *cpustate, UINT16 op); +static void cmpb_ded_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_ix_rg(t11_state *cpustate, UINT16 op); +static void cmpb_ix_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_ix_in(t11_state *cpustate, UINT16 op); +static void cmpb_ix_ind(t11_state *cpustate, UINT16 op); +static void cmpb_ix_de(t11_state *cpustate, UINT16 op); +static void cmpb_ix_ded(t11_state *cpustate, UINT16 op); +static void cmpb_ix_ix(t11_state *cpustate, UINT16 op); +static void cmpb_ix_ixd(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_rg(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_rgd(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_in(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_ind(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_de(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_ded(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_ix(t11_state *cpustate, UINT16 op); +static void cmpb_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bitb_rg_rg(t11_state *cpustate, UINT16 op); +static void bitb_rg_rgd(t11_state *cpustate, UINT16 op); +static void bitb_rg_in(t11_state *cpustate, UINT16 op); +static void bitb_rg_ind(t11_state *cpustate, UINT16 op); +static void bitb_rg_de(t11_state *cpustate, UINT16 op); +static void bitb_rg_ded(t11_state *cpustate, UINT16 op); +static void bitb_rg_ix(t11_state *cpustate, UINT16 op); +static void bitb_rg_ixd(t11_state *cpustate, UINT16 op); +static void bitb_rgd_rg(t11_state *cpustate, UINT16 op); +static void bitb_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bitb_rgd_in(t11_state *cpustate, UINT16 op); +static void bitb_rgd_ind(t11_state *cpustate, UINT16 op); +static void bitb_rgd_de(t11_state *cpustate, UINT16 op); +static void bitb_rgd_ded(t11_state *cpustate, UINT16 op); +static void bitb_rgd_ix(t11_state *cpustate, UINT16 op); +static void bitb_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bitb_in_rg(t11_state *cpustate, UINT16 op); +static void bitb_in_rgd(t11_state *cpustate, UINT16 op); +static void bitb_in_in(t11_state *cpustate, UINT16 op); +static void bitb_in_ind(t11_state *cpustate, UINT16 op); +static void bitb_in_de(t11_state *cpustate, UINT16 op); +static void bitb_in_ded(t11_state *cpustate, UINT16 op); +static void bitb_in_ix(t11_state *cpustate, UINT16 op); +static void bitb_in_ixd(t11_state *cpustate, UINT16 op); +static void bitb_ind_rg(t11_state *cpustate, UINT16 op); +static void bitb_ind_rgd(t11_state *cpustate, UINT16 op); +static void bitb_ind_in(t11_state *cpustate, UINT16 op); +static void bitb_ind_ind(t11_state *cpustate, UINT16 op); +static void bitb_ind_de(t11_state *cpustate, UINT16 op); +static void bitb_ind_ded(t11_state *cpustate, UINT16 op); +static void bitb_ind_ix(t11_state *cpustate, UINT16 op); +static void bitb_ind_ixd(t11_state *cpustate, UINT16 op); +static void bitb_de_rg(t11_state *cpustate, UINT16 op); +static void bitb_de_rgd(t11_state *cpustate, UINT16 op); +static void bitb_de_in(t11_state *cpustate, UINT16 op); +static void bitb_de_ind(t11_state *cpustate, UINT16 op); +static void bitb_de_de(t11_state *cpustate, UINT16 op); +static void bitb_de_ded(t11_state *cpustate, UINT16 op); +static void bitb_de_ix(t11_state *cpustate, UINT16 op); +static void bitb_de_ixd(t11_state *cpustate, UINT16 op); +static void bitb_ded_rg(t11_state *cpustate, UINT16 op); +static void bitb_ded_rgd(t11_state *cpustate, UINT16 op); +static void bitb_ded_in(t11_state *cpustate, UINT16 op); +static void bitb_ded_ind(t11_state *cpustate, UINT16 op); +static void bitb_ded_de(t11_state *cpustate, UINT16 op); +static void bitb_ded_ded(t11_state *cpustate, UINT16 op); +static void bitb_ded_ix(t11_state *cpustate, UINT16 op); +static void bitb_ded_ixd(t11_state *cpustate, UINT16 op); +static void bitb_ix_rg(t11_state *cpustate, UINT16 op); +static void bitb_ix_rgd(t11_state *cpustate, UINT16 op); +static void bitb_ix_in(t11_state *cpustate, UINT16 op); +static void bitb_ix_ind(t11_state *cpustate, UINT16 op); +static void bitb_ix_de(t11_state *cpustate, UINT16 op); +static void bitb_ix_ded(t11_state *cpustate, UINT16 op); +static void bitb_ix_ix(t11_state *cpustate, UINT16 op); +static void bitb_ix_ixd(t11_state *cpustate, UINT16 op); +static void bitb_ixd_rg(t11_state *cpustate, UINT16 op); +static void bitb_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bitb_ixd_in(t11_state *cpustate, UINT16 op); +static void bitb_ixd_ind(t11_state *cpustate, UINT16 op); +static void bitb_ixd_de(t11_state *cpustate, UINT16 op); +static void bitb_ixd_ded(t11_state *cpustate, UINT16 op); +static void bitb_ixd_ix(t11_state *cpustate, UINT16 op); +static void bitb_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bicb_rg_rg(t11_state *cpustate, UINT16 op); +static void bicb_rg_rgd(t11_state *cpustate, UINT16 op); +static void bicb_rg_in(t11_state *cpustate, UINT16 op); +static void bicb_rg_ind(t11_state *cpustate, UINT16 op); +static void bicb_rg_de(t11_state *cpustate, UINT16 op); +static void bicb_rg_ded(t11_state *cpustate, UINT16 op); +static void bicb_rg_ix(t11_state *cpustate, UINT16 op); +static void bicb_rg_ixd(t11_state *cpustate, UINT16 op); +static void bicb_rgd_rg(t11_state *cpustate, UINT16 op); +static void bicb_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bicb_rgd_in(t11_state *cpustate, UINT16 op); +static void bicb_rgd_ind(t11_state *cpustate, UINT16 op); +static void bicb_rgd_de(t11_state *cpustate, UINT16 op); +static void bicb_rgd_ded(t11_state *cpustate, UINT16 op); +static void bicb_rgd_ix(t11_state *cpustate, UINT16 op); +static void bicb_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bicb_in_rg(t11_state *cpustate, UINT16 op); +static void bicb_in_rgd(t11_state *cpustate, UINT16 op); +static void bicb_in_in(t11_state *cpustate, UINT16 op); +static void bicb_in_ind(t11_state *cpustate, UINT16 op); +static void bicb_in_de(t11_state *cpustate, UINT16 op); +static void bicb_in_ded(t11_state *cpustate, UINT16 op); +static void bicb_in_ix(t11_state *cpustate, UINT16 op); +static void bicb_in_ixd(t11_state *cpustate, UINT16 op); +static void bicb_ind_rg(t11_state *cpustate, UINT16 op); +static void bicb_ind_rgd(t11_state *cpustate, UINT16 op); +static void bicb_ind_in(t11_state *cpustate, UINT16 op); +static void bicb_ind_ind(t11_state *cpustate, UINT16 op); +static void bicb_ind_de(t11_state *cpustate, UINT16 op); +static void bicb_ind_ded(t11_state *cpustate, UINT16 op); +static void bicb_ind_ix(t11_state *cpustate, UINT16 op); +static void bicb_ind_ixd(t11_state *cpustate, UINT16 op); +static void bicb_de_rg(t11_state *cpustate, UINT16 op); +static void bicb_de_rgd(t11_state *cpustate, UINT16 op); +static void bicb_de_in(t11_state *cpustate, UINT16 op); +static void bicb_de_ind(t11_state *cpustate, UINT16 op); +static void bicb_de_de(t11_state *cpustate, UINT16 op); +static void bicb_de_ded(t11_state *cpustate, UINT16 op); +static void bicb_de_ix(t11_state *cpustate, UINT16 op); +static void bicb_de_ixd(t11_state *cpustate, UINT16 op); +static void bicb_ded_rg(t11_state *cpustate, UINT16 op); +static void bicb_ded_rgd(t11_state *cpustate, UINT16 op); +static void bicb_ded_in(t11_state *cpustate, UINT16 op); +static void bicb_ded_ind(t11_state *cpustate, UINT16 op); +static void bicb_ded_de(t11_state *cpustate, UINT16 op); +static void bicb_ded_ded(t11_state *cpustate, UINT16 op); +static void bicb_ded_ix(t11_state *cpustate, UINT16 op); +static void bicb_ded_ixd(t11_state *cpustate, UINT16 op); +static void bicb_ix_rg(t11_state *cpustate, UINT16 op); +static void bicb_ix_rgd(t11_state *cpustate, UINT16 op); +static void bicb_ix_in(t11_state *cpustate, UINT16 op); +static void bicb_ix_ind(t11_state *cpustate, UINT16 op); +static void bicb_ix_de(t11_state *cpustate, UINT16 op); +static void bicb_ix_ded(t11_state *cpustate, UINT16 op); +static void bicb_ix_ix(t11_state *cpustate, UINT16 op); +static void bicb_ix_ixd(t11_state *cpustate, UINT16 op); +static void bicb_ixd_rg(t11_state *cpustate, UINT16 op); +static void bicb_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bicb_ixd_in(t11_state *cpustate, UINT16 op); +static void bicb_ixd_ind(t11_state *cpustate, UINT16 op); +static void bicb_ixd_de(t11_state *cpustate, UINT16 op); +static void bicb_ixd_ded(t11_state *cpustate, UINT16 op); +static void bicb_ixd_ix(t11_state *cpustate, UINT16 op); +static void bicb_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void bisb_rg_rg(t11_state *cpustate, UINT16 op); +static void bisb_rg_rgd(t11_state *cpustate, UINT16 op); +static void bisb_rg_in(t11_state *cpustate, UINT16 op); +static void bisb_rg_ind(t11_state *cpustate, UINT16 op); +static void bisb_rg_de(t11_state *cpustate, UINT16 op); +static void bisb_rg_ded(t11_state *cpustate, UINT16 op); +static void bisb_rg_ix(t11_state *cpustate, UINT16 op); +static void bisb_rg_ixd(t11_state *cpustate, UINT16 op); +static void bisb_rgd_rg(t11_state *cpustate, UINT16 op); +static void bisb_rgd_rgd(t11_state *cpustate, UINT16 op); +static void bisb_rgd_in(t11_state *cpustate, UINT16 op); +static void bisb_rgd_ind(t11_state *cpustate, UINT16 op); +static void bisb_rgd_de(t11_state *cpustate, UINT16 op); +static void bisb_rgd_ded(t11_state *cpustate, UINT16 op); +static void bisb_rgd_ix(t11_state *cpustate, UINT16 op); +static void bisb_rgd_ixd(t11_state *cpustate, UINT16 op); +static void bisb_in_rg(t11_state *cpustate, UINT16 op); +static void bisb_in_rgd(t11_state *cpustate, UINT16 op); +static void bisb_in_in(t11_state *cpustate, UINT16 op); +static void bisb_in_ind(t11_state *cpustate, UINT16 op); +static void bisb_in_de(t11_state *cpustate, UINT16 op); +static void bisb_in_ded(t11_state *cpustate, UINT16 op); +static void bisb_in_ix(t11_state *cpustate, UINT16 op); +static void bisb_in_ixd(t11_state *cpustate, UINT16 op); +static void bisb_ind_rg(t11_state *cpustate, UINT16 op); +static void bisb_ind_rgd(t11_state *cpustate, UINT16 op); +static void bisb_ind_in(t11_state *cpustate, UINT16 op); +static void bisb_ind_ind(t11_state *cpustate, UINT16 op); +static void bisb_ind_de(t11_state *cpustate, UINT16 op); +static void bisb_ind_ded(t11_state *cpustate, UINT16 op); +static void bisb_ind_ix(t11_state *cpustate, UINT16 op); +static void bisb_ind_ixd(t11_state *cpustate, UINT16 op); +static void bisb_de_rg(t11_state *cpustate, UINT16 op); +static void bisb_de_rgd(t11_state *cpustate, UINT16 op); +static void bisb_de_in(t11_state *cpustate, UINT16 op); +static void bisb_de_ind(t11_state *cpustate, UINT16 op); +static void bisb_de_de(t11_state *cpustate, UINT16 op); +static void bisb_de_ded(t11_state *cpustate, UINT16 op); +static void bisb_de_ix(t11_state *cpustate, UINT16 op); +static void bisb_de_ixd(t11_state *cpustate, UINT16 op); +static void bisb_ded_rg(t11_state *cpustate, UINT16 op); +static void bisb_ded_rgd(t11_state *cpustate, UINT16 op); +static void bisb_ded_in(t11_state *cpustate, UINT16 op); +static void bisb_ded_ind(t11_state *cpustate, UINT16 op); +static void bisb_ded_de(t11_state *cpustate, UINT16 op); +static void bisb_ded_ded(t11_state *cpustate, UINT16 op); +static void bisb_ded_ix(t11_state *cpustate, UINT16 op); +static void bisb_ded_ixd(t11_state *cpustate, UINT16 op); +static void bisb_ix_rg(t11_state *cpustate, UINT16 op); +static void bisb_ix_rgd(t11_state *cpustate, UINT16 op); +static void bisb_ix_in(t11_state *cpustate, UINT16 op); +static void bisb_ix_ind(t11_state *cpustate, UINT16 op); +static void bisb_ix_de(t11_state *cpustate, UINT16 op); +static void bisb_ix_ded(t11_state *cpustate, UINT16 op); +static void bisb_ix_ix(t11_state *cpustate, UINT16 op); +static void bisb_ix_ixd(t11_state *cpustate, UINT16 op); +static void bisb_ixd_rg(t11_state *cpustate, UINT16 op); +static void bisb_ixd_rgd(t11_state *cpustate, UINT16 op); +static void bisb_ixd_in(t11_state *cpustate, UINT16 op); +static void bisb_ixd_ind(t11_state *cpustate, UINT16 op); +static void bisb_ixd_de(t11_state *cpustate, UINT16 op); +static void bisb_ixd_ded(t11_state *cpustate, UINT16 op); +static void bisb_ixd_ix(t11_state *cpustate, UINT16 op); +static void bisb_ixd_ixd(t11_state *cpustate, UINT16 op); + +static void sub_rg_rg(t11_state *cpustate, UINT16 op); +static void sub_rg_rgd(t11_state *cpustate, UINT16 op); +static void sub_rg_in(t11_state *cpustate, UINT16 op); +static void sub_rg_ind(t11_state *cpustate, UINT16 op); +static void sub_rg_de(t11_state *cpustate, UINT16 op); +static void sub_rg_ded(t11_state *cpustate, UINT16 op); +static void sub_rg_ix(t11_state *cpustate, UINT16 op); +static void sub_rg_ixd(t11_state *cpustate, UINT16 op); +static void sub_rgd_rg(t11_state *cpustate, UINT16 op); +static void sub_rgd_rgd(t11_state *cpustate, UINT16 op); +static void sub_rgd_in(t11_state *cpustate, UINT16 op); +static void sub_rgd_ind(t11_state *cpustate, UINT16 op); +static void sub_rgd_de(t11_state *cpustate, UINT16 op); +static void sub_rgd_ded(t11_state *cpustate, UINT16 op); +static void sub_rgd_ix(t11_state *cpustate, UINT16 op); +static void sub_rgd_ixd(t11_state *cpustate, UINT16 op); +static void sub_in_rg(t11_state *cpustate, UINT16 op); +static void sub_in_rgd(t11_state *cpustate, UINT16 op); +static void sub_in_in(t11_state *cpustate, UINT16 op); +static void sub_in_ind(t11_state *cpustate, UINT16 op); +static void sub_in_de(t11_state *cpustate, UINT16 op); +static void sub_in_ded(t11_state *cpustate, UINT16 op); +static void sub_in_ix(t11_state *cpustate, UINT16 op); +static void sub_in_ixd(t11_state *cpustate, UINT16 op); +static void sub_ind_rg(t11_state *cpustate, UINT16 op); +static void sub_ind_rgd(t11_state *cpustate, UINT16 op); +static void sub_ind_in(t11_state *cpustate, UINT16 op); +static void sub_ind_ind(t11_state *cpustate, UINT16 op); +static void sub_ind_de(t11_state *cpustate, UINT16 op); +static void sub_ind_ded(t11_state *cpustate, UINT16 op); +static void sub_ind_ix(t11_state *cpustate, UINT16 op); +static void sub_ind_ixd(t11_state *cpustate, UINT16 op); +static void sub_de_rg(t11_state *cpustate, UINT16 op); +static void sub_de_rgd(t11_state *cpustate, UINT16 op); +static void sub_de_in(t11_state *cpustate, UINT16 op); +static void sub_de_ind(t11_state *cpustate, UINT16 op); +static void sub_de_de(t11_state *cpustate, UINT16 op); +static void sub_de_ded(t11_state *cpustate, UINT16 op); +static void sub_de_ix(t11_state *cpustate, UINT16 op); +static void sub_de_ixd(t11_state *cpustate, UINT16 op); +static void sub_ded_rg(t11_state *cpustate, UINT16 op); +static void sub_ded_rgd(t11_state *cpustate, UINT16 op); +static void sub_ded_in(t11_state *cpustate, UINT16 op); +static void sub_ded_ind(t11_state *cpustate, UINT16 op); +static void sub_ded_de(t11_state *cpustate, UINT16 op); +static void sub_ded_ded(t11_state *cpustate, UINT16 op); +static void sub_ded_ix(t11_state *cpustate, UINT16 op); +static void sub_ded_ixd(t11_state *cpustate, UINT16 op); +static void sub_ix_rg(t11_state *cpustate, UINT16 op); +static void sub_ix_rgd(t11_state *cpustate, UINT16 op); +static void sub_ix_in(t11_state *cpustate, UINT16 op); +static void sub_ix_ind(t11_state *cpustate, UINT16 op); +static void sub_ix_de(t11_state *cpustate, UINT16 op); +static void sub_ix_ded(t11_state *cpustate, UINT16 op); +static void sub_ix_ix(t11_state *cpustate, UINT16 op); +static void sub_ix_ixd(t11_state *cpustate, UINT16 op); +static void sub_ixd_rg(t11_state *cpustate, UINT16 op); +static void sub_ixd_rgd(t11_state *cpustate, UINT16 op); +static void sub_ixd_in(t11_state *cpustate, UINT16 op); +static void sub_ixd_ind(t11_state *cpustate, UINT16 op); +static void sub_ixd_de(t11_state *cpustate, UINT16 op); +static void sub_ixd_ded(t11_state *cpustate, UINT16 op); +static void sub_ixd_ix(t11_state *cpustate, UINT16 op); +static void sub_ixd_ixd(t11_state *cpustate, UINT16 op); + + + +static void (*const opcode_table[65536 >> 3])(t11_state *cpustate, UINT16 op) = { /* 0x0000 */ op_0000, halt, illegal, illegal, illegal, illegal, illegal, illegal, diff --git a/src/mame/drivers/cinemat.c b/src/mame/drivers/cinemat.c index d8fc982f29c..13c5c07020a 100644 --- a/src/mame/drivers/cinemat.c +++ b/src/mame/drivers/cinemat.c @@ -149,14 +149,14 @@ static WRITE8_HANDLER( mux_select_w ) * *************************************/ -static UINT8 joystick_read(void) +static UINT8 joystick_read(const device_config *device) { - if (mame_get_phase(Machine) != MAME_PHASE_RUNNING) + if (mame_get_phase(device->machine) != MAME_PHASE_RUNNING) return 0; else { - int xval = (INT16)(cpu_get_reg(Machine->cpu[0], CCPU_X) << 4) >> 4; - return (input_port_read_safe(Machine, mux_select ? "ANALOGX" : "ANALOGY", 0) - xval) < 0x800; + int xval = (INT16)(cpu_get_reg(device, CCPU_X) << 4) >> 4; + return (input_port_read_safe(device->machine, mux_select ? "ANALOGX" : "ANALOGY", 0) - xval) < 0x800; } } diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h index a214feffdbe..94a65199ada 100644 --- a/src/mame/includes/cinemat.h +++ b/src/mame/includes/cinemat.h @@ -34,8 +34,8 @@ MACHINE_DRIVER_EXTERN( qb3_sound ); /*----------- defined in video/cinemat.c -----------*/ -void cinemat_vector_callback(INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); -WRITE8_HANDLER(cinemat_vector_control_w); +void cinemat_vector_callback(const device_config *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); +WRITE8_HANDLER( cinemat_vector_control_w ); VIDEO_START( cinemat_bilevel ); VIDEO_START( cinemat_16level ); diff --git a/src/mame/video/cinemat.c b/src/mame/video/cinemat.c index 7b120c5e15a..4a8802d073b 100644 --- a/src/mame/video/cinemat.c +++ b/src/mame/video/cinemat.c @@ -47,9 +47,9 @@ static UINT8 last_control; * *************************************/ -void cinemat_vector_callback(INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift) +void cinemat_vector_callback(const device_config *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift) { - const rectangle *visarea = video_screen_get_visible_area(Machine->primary_screen); + const rectangle *visarea = video_screen_get_visible_area(device->machine->primary_screen); int intensity = 0xff; /* adjust for slop */ @@ -227,7 +227,7 @@ VIDEO_UPDATE( cinemat ) vector_clear_list(); cpu_push_context(screen->machine->cpu[0]); - ccpu_wdt_timer_trigger(); + ccpu_wdt_timer_trigger(screen->machine->cpu[0]); cpu_pop_context(); return 0; |