Ver código fonte

RET; IN/OUT r/(C), (C)/r; INI/D; INI/DR; OUTI/D; OTI/DR; NOP2

master
Ben Kurtovic 8 anos atrás
pai
commit
a167e9dcd7
2 arquivos alterados com 543 adições e 363 exclusões
  1. +194
    -14
      src/z80_ops.inc.c
  2. +349
    -349
      src/z80_tables.inc.c

+ 194
- 14
src/z80_ops.inc.c Ver arquivo

@@ -662,9 +662,31 @@ static uint8_t z80_inst_call_cc_nn(Z80 *z80, uint8_t opcode)
}
}

// RET
/*
RET (0xC9):
Pop PC from the stack.
*/
static uint8_t z80_inst_ret(Z80 *z80, uint8_t opcode)
{
(void) opcode;
z80->regfile.pc = stack_pop(z80);
return 10;
}

// RET cc
/*
RET cc (0xC0, 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF0, 0xF8):
Pop PC from the stack if cc is true.
*/
static uint8_t z80_inst_ret_cc(Z80 *z80, uint8_t opcode)
{
if (extract_cond(z80, opcode)) {
z80->regfile.pc = stack_pop(z80);
return 11;
} else {
z80->regfile.pc++;
return 5;
}
}

// RETI

@@ -673,7 +695,7 @@ static uint8_t z80_inst_call_cc_nn(Z80 *z80, uint8_t opcode)
// RST p

/*
IN A, (n): (0xDB):
IN A, (n) (0xDB):
Read a byte from port n into a.
*/
static uint8_t z80_inst_in_a_n(Z80 *z80, uint8_t opcode)
@@ -685,18 +707,93 @@ static uint8_t z80_inst_in_a_n(Z80 *z80, uint8_t opcode)
return 11;
}

// IN r (C)
/*
IN r, (C) (0xED40, 0xED48, 0xED50, 0xED58, 0xED60, 0xED68, 0xED70, 0xED78):
Read a byte from port C into r, or affect flags only if 0xED70.
*/
static uint8_t z80_inst_in_r_c(Z80 *z80, uint8_t opcode)
{
uint8_t data = read_port(z80, z80->regfile.c);
bool parity = !(__builtin_popcount(data) % 2);

// INI
if (opcode != 0x70)
*extract_reg(z80, opcode) = data;
update_flags(z80, 0, 0, parity, !!(data & 0x08), 0, !!(data & 0x20),
data == 0, !!(data & 0x80), 0xFE);
z80->regfile.pc++;
return 12;
}

// INIR
/*
INI (0xEDA2):
IN (HL), (C); INC HL; DEC B
*/
static uint8_t z80_inst_ini(Z80 *z80, uint8_t opcode)
{
(void) opcode;
uint8_t data = read_port(z80, z80->regfile.c), *b = &z80->regfile.b;
uint16_t hl = get_pair(z80, REG_HL);
bool h = !!(((*b & 0x0F) - 1) & 0x10);

mmu_write_byte(z80->mmu, hl, data);
set_pair(z80, REG_HL, hl + 1);
(*b)--;

update_flags(z80, 0, 1, *b == 0x7F, !!(*b & 0x08), h, !!(*b & 0x20),
*b == 0, !!(*b & 0x80), 0xFE);
z80->regfile.pc++;
return 16;
}

/*
INIR (0xEDB2):
INI; JR NZ, -1
*/
static uint8_t z80_inst_inir(Z80 *z80, uint8_t opcode)
{
z80_inst_ini(z80, opcode);
if (z80->regfile.b == 0)
return 16;
z80->regfile.pc -= 2;
return 21;
}

/*
IND (0xEDAA):
IN (HL), (C); DEC HL; DEC B
*/
static uint8_t z80_inst_ind(Z80 *z80, uint8_t opcode)
{
(void) opcode;
uint8_t data = read_port(z80, z80->regfile.c), *b = &z80->regfile.b;
uint16_t hl = get_pair(z80, REG_HL);
bool h = !!(((*b & 0x0F) - 1) & 0x10);

// IND
mmu_write_byte(z80->mmu, hl, data);
set_pair(z80, REG_HL, hl - 1);
(*b)--;

// INDR
update_flags(z80, 0, 1, *b == 0x7F, !!(*b & 0x08), h, !!(*b & 0x20),
*b == 0, !!(*b & 0x80), 0xFE);
z80->regfile.pc++;
return 16;
}

/*
INDR (0xEDBA):
IND; JR NZ, -1
*/
static uint8_t z80_inst_indr(Z80 *z80, uint8_t opcode)
{
z80_inst_ind(z80, opcode);
if (z80->regfile.b == 0)
return 16;
z80->regfile.pc -= 2;
return 21;
}

/*
OUT (n), A: (0xD3):
OUT (n), A (0xD3):
Write a byte from a into port n.
*/
static uint8_t z80_inst_out_n_a(Z80 *z80, uint8_t opcode)
@@ -708,15 +805,98 @@ static uint8_t z80_inst_out_n_a(Z80 *z80, uint8_t opcode)
return 11;
}

// OUT (C), r
/*
OUT (C), r (0xED41, 0xED49, 0xED51, 0xED59, 0xED61, 0xED69, 0xED71,
0xED79):
Write a byte from r (8-bit reg, or 0 if 0xED71) into port C.
*/
static uint8_t z80_inst_out_c_r(Z80 *z80, uint8_t opcode)
{
uint8_t value = opcode != 0x71 ? *extract_reg(z80, opcode) : 0;
write_port(z80, z80->regfile.c, value);
z80->regfile.pc++;
return 12;
}

// OUTI
/*
OUTI (0xEDA3):
OUT (C), (HL); INC HL; DEC B
*/
static uint8_t z80_inst_outi(Z80 *z80, uint8_t opcode)
{
(void) opcode;
uint16_t hl = get_pair(z80, REG_HL);
uint8_t *b = &z80->regfile.b;
bool h = !!(((*b & 0x0F) - 1) & 0x10);

write_port(z80, z80->regfile.c, mmu_read_byte(z80->mmu, hl));
set_pair(z80, REG_HL, hl + 1);
(*b)--;

// OTIR
update_flags(z80, 0, 1, *b == 0x7F, !!(*b & 0x08), h, !!(*b & 0x20),
*b == 0, !!(*b & 0x80), 0xFE);
z80->regfile.pc++;
return 16;
}

// OUTD
/*
OTIR (0xEDB3):
OUTI; JR NZ, -1
*/
static uint8_t z80_inst_otir(Z80 *z80, uint8_t opcode)
{
z80_inst_outi(z80, opcode);
if (z80->regfile.b == 0)
return 16;
z80->regfile.pc -= 2;
return 21;
}

// OTDR
/*
OUTD (0xEDAB):
OUT (C), (HL); DEC HL; DEC B
*/
static uint8_t z80_inst_outd(Z80 *z80, uint8_t opcode)
{
(void) opcode;
uint16_t hl = get_pair(z80, REG_HL);
uint8_t *b = &z80->regfile.b;
bool h = !!(((*b & 0x0F) - 1) & 0x10);

write_port(z80, z80->regfile.c, mmu_read_byte(z80->mmu, hl));
set_pair(z80, REG_HL, hl - 1);
(*b)--;

update_flags(z80, 0, 1, *b == 0x7F, !!(*b & 0x08), h, !!(*b & 0x20),
*b == 0, !!(*b & 0x80), 0xFE);
z80->regfile.pc++;
return 16;
}

/*
OTDR (0xEDBB):
OUTD; JR NZ, -1
*/
static uint8_t z80_inst_otdr(Z80 *z80, uint8_t opcode)
{
z80_inst_outd(z80, opcode);
if (z80->regfile.b == 0)
return 16;
z80->regfile.pc -= 2;
return 21;
}

/*
NOP2:
No operation is performed twice; i.e., 2 NOPs-worth of cycles are spent.
Used for unimplemented extended and index instructions.
*/
static uint8_t z80_inst_nop2(Z80 *z80, uint8_t opcode)
{
(void) opcode;
z80->regfile.pc++;
return 8;
}

/*
0xED:


+ 349
- 349
src/z80_tables.inc.c Ver arquivo

@@ -194,7 +194,7 @@ static DispatchTable instruction_table = {
[0xBD] = z80_inst_cp_r,
[0xBE] = z80_inst_unimplemented, // TODO
[0xBF] = z80_inst_cp_r,
[0xC0] = z80_inst_unimplemented, // TODO
[0xC0] = z80_inst_ret_cc,
[0xC1] = z80_inst_pop_qq,
[0xC2] = z80_inst_jp_cc_nn,
[0xC3] = z80_inst_jp_nn,
@@ -202,15 +202,15 @@ static DispatchTable instruction_table = {
[0xC5] = z80_inst_push_qq,
[0xC6] = z80_inst_unimplemented, // TODO
[0xC7] = z80_inst_unimplemented, // TODO
[0xC8] = z80_inst_unimplemented, // TODO
[0xC9] = z80_inst_unimplemented, // TODO
[0xC8] = z80_inst_ret_cc,
[0xC9] = z80_inst_ret,
[0xCA] = z80_inst_jp_cc_nn,
[0xCB] = z80_prefix_bits,
[0xCC] = z80_inst_call_cc_nn,
[0xCD] = z80_inst_call_nn,
[0xCE] = z80_inst_unimplemented, // TODO
[0xCF] = z80_inst_unimplemented, // TODO
[0xD0] = z80_inst_unimplemented, // TODO
[0xD0] = z80_inst_ret_cc,
[0xD1] = z80_inst_pop_qq,
[0xD2] = z80_inst_jp_cc_nn,
[0xD3] = z80_inst_out_n_a,
@@ -218,7 +218,7 @@ static DispatchTable instruction_table = {
[0xD5] = z80_inst_push_qq,
[0xD6] = z80_inst_unimplemented, // TODO
[0xD7] = z80_inst_unimplemented, // TODO
[0xD8] = z80_inst_unimplemented, // TODO
[0xD8] = z80_inst_ret_cc,
[0xD9] = z80_inst_exx,
[0xDA] = z80_inst_jp_cc_nn,
[0xDB] = z80_inst_in_a_n,
@@ -226,7 +226,7 @@ static DispatchTable instruction_table = {
[0xDD] = z80_prefix_index,
[0xDE] = z80_inst_unimplemented, // TODO
[0xDF] = z80_inst_unimplemented, // TODO
[0xE0] = z80_inst_unimplemented, // TODO
[0xE0] = z80_inst_ret_cc,
[0xE1] = z80_inst_pop_qq,
[0xE2] = z80_inst_jp_cc_nn,
[0xE3] = z80_inst_unimplemented, // TODO
@@ -234,7 +234,7 @@ static DispatchTable instruction_table = {
[0xE5] = z80_inst_push_qq,
[0xE6] = z80_inst_unimplemented, // TODO
[0xE7] = z80_inst_unimplemented, // TODO
[0xE8] = z80_inst_unimplemented, // TODO
[0xE8] = z80_inst_ret_cc,
[0xE9] = z80_inst_unimplemented, // TODO
[0xEA] = z80_inst_jp_cc_nn,
[0xEB] = z80_inst_unimplemented, // TODO
@@ -242,7 +242,7 @@ static DispatchTable instruction_table = {
[0xED] = z80_prefix_extended,
[0xEE] = z80_inst_unimplemented, // TODO
[0xEF] = z80_inst_unimplemented, // TODO
[0xF0] = z80_inst_unimplemented, // TODO
[0xF0] = z80_inst_ret_cc,
[0xF1] = z80_inst_pop_qq,
[0xF2] = z80_inst_jp_cc_nn,
[0xF3] = z80_inst_di,
@@ -250,7 +250,7 @@ static DispatchTable instruction_table = {
[0xF5] = z80_inst_push_qq,
[0xF6] = z80_inst_unimplemented, // TODO
[0xF7] = z80_inst_unimplemented, // TODO
[0xF8] = z80_inst_unimplemented, // TODO
[0xF8] = z80_inst_ret_cc,
[0xF9] = z80_inst_unimplemented, // TODO
[0xFA] = z80_inst_jp_cc_nn,
[0xFB] = z80_inst_ei,
@@ -261,134 +261,134 @@ static DispatchTable instruction_table = {
};

static DispatchTable instruction_table_extended = {
[0x00] = z80_inst_unimplemented, // TODO
[0x01] = z80_inst_unimplemented, // TODO
[0x02] = z80_inst_unimplemented, // TODO
[0x03] = z80_inst_unimplemented, // TODO
[0x04] = z80_inst_unimplemented, // TODO
[0x05] = z80_inst_unimplemented, // TODO
[0x06] = z80_inst_unimplemented, // TODO
[0x07] = z80_inst_unimplemented, // TODO
[0x08] = z80_inst_unimplemented, // TODO
[0x09] = z80_inst_unimplemented, // TODO
[0x0A] = z80_inst_unimplemented, // TODO
[0x0B] = z80_inst_unimplemented, // TODO
[0x0C] = z80_inst_unimplemented, // TODO
[0x0D] = z80_inst_unimplemented, // TODO
[0x0E] = z80_inst_unimplemented, // TODO
[0x0F] = z80_inst_unimplemented, // TODO
[0x10] = z80_inst_unimplemented, // TODO
[0x11] = z80_inst_unimplemented, // TODO
[0x12] = z80_inst_unimplemented, // TODO
[0x13] = z80_inst_unimplemented, // TODO
[0x14] = z80_inst_unimplemented, // TODO
[0x15] = z80_inst_unimplemented, // TODO
[0x16] = z80_inst_unimplemented, // TODO
[0x17] = z80_inst_unimplemented, // TODO
[0x18] = z80_inst_unimplemented, // TODO
[0x19] = z80_inst_unimplemented, // TODO
[0x1A] = z80_inst_unimplemented, // TODO
[0x1B] = z80_inst_unimplemented, // TODO
[0x1C] = z80_inst_unimplemented, // TODO
[0x1D] = z80_inst_unimplemented, // TODO
[0x1E] = z80_inst_unimplemented, // TODO
[0x1F] = z80_inst_unimplemented, // TODO
[0x20] = z80_inst_unimplemented, // TODO
[0x21] = z80_inst_unimplemented, // TODO
[0x22] = z80_inst_unimplemented, // TODO
[0x23] = z80_inst_unimplemented, // TODO
[0x24] = z80_inst_unimplemented, // TODO
[0x25] = z80_inst_unimplemented, // TODO
[0x26] = z80_inst_unimplemented, // TODO
[0x27] = z80_inst_unimplemented, // TODO
[0x28] = z80_inst_unimplemented, // TODO
[0x29] = z80_inst_unimplemented, // TODO
[0x2A] = z80_inst_unimplemented, // TODO
[0x2B] = z80_inst_unimplemented, // TODO
[0x2C] = z80_inst_unimplemented, // TODO
[0x2D] = z80_inst_unimplemented, // TODO
[0x2E] = z80_inst_unimplemented, // TODO
[0x2F] = z80_inst_unimplemented, // TODO
[0x30] = z80_inst_unimplemented, // TODO
[0x31] = z80_inst_unimplemented, // TODO
[0x32] = z80_inst_unimplemented, // TODO
[0x33] = z80_inst_unimplemented, // TODO
[0x34] = z80_inst_unimplemented, // TODO
[0x35] = z80_inst_unimplemented, // TODO
[0x36] = z80_inst_unimplemented, // TODO
[0x37] = z80_inst_unimplemented, // TODO
[0x38] = z80_inst_unimplemented, // TODO
[0x39] = z80_inst_unimplemented, // TODO
[0x3A] = z80_inst_unimplemented, // TODO
[0x3B] = z80_inst_unimplemented, // TODO
[0x3C] = z80_inst_unimplemented, // TODO
[0x3D] = z80_inst_unimplemented, // TODO
[0x3E] = z80_inst_unimplemented, // TODO
[0x3F] = z80_inst_unimplemented, // TODO
[0x40] = z80_inst_unimplemented, // TODO
[0x41] = z80_inst_unimplemented, // TODO
[0x00] = z80_inst_nop2,
[0x01] = z80_inst_nop2,
[0x02] = z80_inst_nop2,
[0x03] = z80_inst_nop2,
[0x04] = z80_inst_nop2,
[0x05] = z80_inst_nop2,
[0x06] = z80_inst_nop2,
[0x07] = z80_inst_nop2,
[0x08] = z80_inst_nop2,
[0x09] = z80_inst_nop2,
[0x0A] = z80_inst_nop2,
[0x0B] = z80_inst_nop2,
[0x0C] = z80_inst_nop2,
[0x0D] = z80_inst_nop2,
[0x0E] = z80_inst_nop2,
[0x0F] = z80_inst_nop2,
[0x10] = z80_inst_nop2,
[0x11] = z80_inst_nop2,
[0x12] = z80_inst_nop2,
[0x13] = z80_inst_nop2,
[0x14] = z80_inst_nop2,
[0x15] = z80_inst_nop2,
[0x16] = z80_inst_nop2,
[0x17] = z80_inst_nop2,
[0x18] = z80_inst_nop2,
[0x19] = z80_inst_nop2,
[0x1A] = z80_inst_nop2,
[0x1B] = z80_inst_nop2,
[0x1C] = z80_inst_nop2,
[0x1D] = z80_inst_nop2,
[0x1E] = z80_inst_nop2,
[0x1F] = z80_inst_nop2,
[0x20] = z80_inst_nop2,
[0x21] = z80_inst_nop2,
[0x22] = z80_inst_nop2,
[0x23] = z80_inst_nop2,
[0x24] = z80_inst_nop2,
[0x25] = z80_inst_nop2,
[0x26] = z80_inst_nop2,
[0x27] = z80_inst_nop2,
[0x28] = z80_inst_nop2,
[0x29] = z80_inst_nop2,
[0x2A] = z80_inst_nop2,
[0x2B] = z80_inst_nop2,
[0x2C] = z80_inst_nop2,
[0x2D] = z80_inst_nop2,
[0x2E] = z80_inst_nop2,
[0x2F] = z80_inst_nop2,
[0x30] = z80_inst_nop2,
[0x31] = z80_inst_nop2,
[0x32] = z80_inst_nop2,
[0x33] = z80_inst_nop2,
[0x34] = z80_inst_nop2,
[0x35] = z80_inst_nop2,
[0x36] = z80_inst_nop2,
[0x37] = z80_inst_nop2,
[0x38] = z80_inst_nop2,
[0x39] = z80_inst_nop2,
[0x3A] = z80_inst_nop2,
[0x3B] = z80_inst_nop2,
[0x3C] = z80_inst_nop2,
[0x3D] = z80_inst_nop2,
[0x3E] = z80_inst_nop2,
[0x3F] = z80_inst_nop2,
[0x40] = z80_inst_in_r_c,
[0x41] = z80_inst_out_c_r,
[0x42] = z80_inst_unimplemented, // TODO
[0x43] = z80_inst_unimplemented, // TODO
[0x44] = z80_inst_unimplemented, // TODO
[0x45] = z80_inst_unimplemented, // TODO
[0x46] = z80_inst_im,
[0x47] = z80_inst_unimplemented, // TODO
[0x48] = z80_inst_unimplemented, // TODO
[0x49] = z80_inst_unimplemented, // TODO
[0x48] = z80_inst_in_r_c,
[0x49] = z80_inst_out_c_r,
[0x4A] = z80_inst_unimplemented, // TODO
[0x4B] = z80_inst_unimplemented, // TODO
[0x4C] = z80_inst_unimplemented, // TODO
[0x4D] = z80_inst_unimplemented, // TODO
[0x4E] = z80_inst_im,
[0x4F] = z80_inst_unimplemented, // TODO
[0x50] = z80_inst_unimplemented, // TODO
[0x51] = z80_inst_unimplemented, // TODO
[0x50] = z80_inst_in_r_c,
[0x51] = z80_inst_out_c_r,
[0x52] = z80_inst_unimplemented, // TODO
[0x53] = z80_inst_unimplemented, // TODO
[0x54] = z80_inst_unimplemented, // TODO
[0x55] = z80_inst_unimplemented, // TODO
[0x56] = z80_inst_im,
[0x57] = z80_inst_unimplemented, // TODO
[0x58] = z80_inst_unimplemented, // TODO
[0x59] = z80_inst_unimplemented, // TODO
[0x58] = z80_inst_in_r_c,
[0x59] = z80_inst_out_c_r,
[0x5A] = z80_inst_unimplemented, // TODO
[0x5B] = z80_inst_unimplemented, // TODO
[0x5C] = z80_inst_unimplemented, // TODO
[0x5D] = z80_inst_unimplemented, // TODO
[0x5E] = z80_inst_im,
[0x5F] = z80_inst_unimplemented, // TODO
[0x60] = z80_inst_unimplemented, // TODO
[0x61] = z80_inst_unimplemented, // TODO
[0x60] = z80_inst_in_r_c,
[0x61] = z80_inst_out_c_r,
[0x62] = z80_inst_unimplemented, // TODO
[0x63] = z80_inst_unimplemented, // TODO
[0x64] = z80_inst_unimplemented, // TODO
[0x65] = z80_inst_unimplemented, // TODO
[0x66] = z80_inst_im,
[0x67] = z80_inst_unimplemented, // TODO
[0x68] = z80_inst_unimplemented, // TODO
[0x69] = z80_inst_unimplemented, // TODO
[0x68] = z80_inst_in_r_c,
[0x69] = z80_inst_out_c_r,
[0x6A] = z80_inst_unimplemented, // TODO
[0x6B] = z80_inst_unimplemented, // TODO
[0x6C] = z80_inst_unimplemented, // TODO
[0x6D] = z80_inst_unimplemented, // TODO
[0x6E] = z80_inst_im,
[0x6F] = z80_inst_unimplemented, // TODO
[0x70] = z80_inst_unimplemented, // TODO
[0x71] = z80_inst_unimplemented, // TODO
[0x70] = z80_inst_in_r_c,
[0x71] = z80_inst_out_c_r,
[0x72] = z80_inst_unimplemented, // TODO
[0x73] = z80_inst_unimplemented, // TODO
[0x74] = z80_inst_unimplemented, // TODO
[0x75] = z80_inst_unimplemented, // TODO
[0x76] = z80_inst_im,
[0x77] = z80_inst_unimplemented, // TODO
[0x78] = z80_inst_unimplemented, // TODO
[0x79] = z80_inst_unimplemented, // TODO
[0x77] = z80_inst_nop2,
[0x78] = z80_inst_in_r_c,
[0x79] = z80_inst_out_c_r,
[0x7A] = z80_inst_unimplemented, // TODO
[0x7B] = z80_inst_unimplemented, // TODO
[0x7C] = z80_inst_unimplemented, // TODO
[0x7D] = z80_inst_unimplemented, // TODO
[0x7E] = z80_inst_im,
[0x7F] = z80_inst_unimplemented, // TODO
[0x7F] = z80_inst_nop2,
[0x80] = z80_inst_unimplemented, // TODO
[0x81] = z80_inst_unimplemented, // TODO
[0x82] = z80_inst_unimplemented, // TODO
@@ -423,100 +423,100 @@ static DispatchTable instruction_table_extended = {
[0x9F] = z80_inst_unimplemented, // TODO
[0xA0] = z80_inst_unimplemented, // TODO
[0xA1] = z80_inst_unimplemented, // TODO
[0xA2] = z80_inst_unimplemented, // TODO
[0xA3] = z80_inst_unimplemented, // TODO
[0xA4] = z80_inst_unimplemented, // TODO
[0xA5] = z80_inst_unimplemented, // TODO
[0xA6] = z80_inst_unimplemented, // TODO
[0xA7] = z80_inst_unimplemented, // TODO
[0xA2] = z80_inst_ini,
[0xA3] = z80_inst_outi,
[0xA4] = z80_inst_nop2,
[0xA5] = z80_inst_nop2,
[0xA6] = z80_inst_nop2,
[0xA7] = z80_inst_nop2,
[0xA8] = z80_inst_unimplemented, // TODO
[0xA9] = z80_inst_unimplemented, // TODO
[0xAA] = z80_inst_unimplemented, // TODO
[0xAB] = z80_inst_unimplemented, // TODO
[0xAC] = z80_inst_unimplemented, // TODO
[0xAD] = z80_inst_unimplemented, // TODO
[0xAE] = z80_inst_unimplemented, // TODO
[0xAF] = z80_inst_unimplemented, // TODO
[0xAA] = z80_inst_ind,
[0xAB] = z80_inst_outd,
[0xAC] = z80_inst_nop2,
[0xAD] = z80_inst_nop2,
[0xAE] = z80_inst_nop2,
[0xAF] = z80_inst_nop2,
[0xB0] = z80_inst_unimplemented, // TODO
[0xB1] = z80_inst_unimplemented, // TODO
[0xB2] = z80_inst_unimplemented, // TODO
[0xB3] = z80_inst_unimplemented, // TODO
[0xB4] = z80_inst_unimplemented, // TODO
[0xB5] = z80_inst_unimplemented, // TODO
[0xB6] = z80_inst_unimplemented, // TODO
[0xB7] = z80_inst_unimplemented, // TODO
[0xB2] = z80_inst_inir,
[0xB3] = z80_inst_otir,
[0xB4] = z80_inst_nop2,
[0xB5] = z80_inst_nop2,
[0xB6] = z80_inst_nop2,
[0xB7] = z80_inst_nop2,
[0xB8] = z80_inst_unimplemented, // TODO
[0xB9] = z80_inst_unimplemented, // TODO
[0xBA] = z80_inst_unimplemented, // TODO
[0xBB] = z80_inst_unimplemented, // TODO
[0xBC] = z80_inst_unimplemented, // TODO
[0xBD] = z80_inst_unimplemented, // TODO
[0xBE] = z80_inst_unimplemented, // TODO
[0xBF] = z80_inst_unimplemented, // TODO
[0xC0] = z80_inst_unimplemented, // TODO
[0xC1] = z80_inst_unimplemented, // TODO
[0xC2] = z80_inst_unimplemented, // TODO
[0xC3] = z80_inst_unimplemented, // TODO
[0xC4] = z80_inst_unimplemented, // TODO
[0xC5] = z80_inst_unimplemented, // TODO
[0xC6] = z80_inst_unimplemented, // TODO
[0xC7] = z80_inst_unimplemented, // TODO
[0xC8] = z80_inst_unimplemented, // TODO
[0xC9] = z80_inst_unimplemented, // TODO
[0xCA] = z80_inst_unimplemented, // TODO
[0xCB] = z80_inst_unimplemented, // TODO
[0xCC] = z80_inst_unimplemented, // TODO
[0xCD] = z80_inst_unimplemented, // TODO
[0xCE] = z80_inst_unimplemented, // TODO
[0xCF] = z80_inst_unimplemented, // TODO
[0xD0] = z80_inst_unimplemented, // TODO
[0xD1] = z80_inst_unimplemented, // TODO
[0xD2] = z80_inst_unimplemented, // TODO
[0xD3] = z80_inst_unimplemented, // TODO
[0xD4] = z80_inst_unimplemented, // TODO
[0xD5] = z80_inst_unimplemented, // TODO
[0xD6] = z80_inst_unimplemented, // TODO
[0xD7] = z80_inst_unimplemented, // TODO
[0xD8] = z80_inst_unimplemented, // TODO
[0xD9] = z80_inst_unimplemented, // TODO
[0xDA] = z80_inst_unimplemented, // TODO
[0xDB] = z80_inst_unimplemented, // TODO
[0xDC] = z80_inst_unimplemented, // TODO
[0xDD] = z80_inst_unimplemented, // TODO
[0xDE] = z80_inst_unimplemented, // TODO
[0xDF] = z80_inst_unimplemented, // TODO
[0xE0] = z80_inst_unimplemented, // TODO
[0xE1] = z80_inst_unimplemented, // TODO
[0xE2] = z80_inst_unimplemented, // TODO
[0xE3] = z80_inst_unimplemented, // TODO
[0xE4] = z80_inst_unimplemented, // TODO
[0xE5] = z80_inst_unimplemented, // TODO
[0xE6] = z80_inst_unimplemented, // TODO
[0xE7] = z80_inst_unimplemented, // TODO
[0xE8] = z80_inst_unimplemented, // TODO
[0xE9] = z80_inst_unimplemented, // TODO
[0xEA] = z80_inst_unimplemented, // TODO
[0xEB] = z80_inst_unimplemented, // TODO
[0xEC] = z80_inst_unimplemented, // TODO
[0xED] = z80_inst_unimplemented, // TODO
[0xEE] = z80_inst_unimplemented, // TODO
[0xEF] = z80_inst_unimplemented, // TODO
[0xF0] = z80_inst_unimplemented, // TODO
[0xF1] = z80_inst_unimplemented, // TODO
[0xF2] = z80_inst_unimplemented, // TODO
[0xF3] = z80_inst_unimplemented, // TODO
[0xF4] = z80_inst_unimplemented, // TODO
[0xF5] = z80_inst_unimplemented, // TODO
[0xF6] = z80_inst_unimplemented, // TODO
[0xF7] = z80_inst_unimplemented, // TODO
[0xF8] = z80_inst_unimplemented, // TODO
[0xF9] = z80_inst_unimplemented, // TODO
[0xFA] = z80_inst_unimplemented, // TODO
[0xFB] = z80_inst_unimplemented, // TODO
[0xFC] = z80_inst_unimplemented, // TODO
[0xFD] = z80_inst_unimplemented, // TODO
[0xFE] = z80_inst_unimplemented, // TODO
[0xFF] = z80_inst_unimplemented // TODO
[0xBA] = z80_inst_indr,
[0xBB] = z80_inst_otdr,
[0xBC] = z80_inst_nop2,
[0xBD] = z80_inst_nop2,
[0xBE] = z80_inst_nop2,
[0xBF] = z80_inst_nop2,
[0xC0] = z80_inst_nop2,
[0xC1] = z80_inst_nop2,
[0xC2] = z80_inst_nop2,
[0xC3] = z80_inst_nop2,
[0xC4] = z80_inst_nop2,
[0xC5] = z80_inst_nop2,
[0xC6] = z80_inst_nop2,
[0xC7] = z80_inst_nop2,
[0xC8] = z80_inst_nop2,
[0xC9] = z80_inst_nop2,
[0xCA] = z80_inst_nop2,
[0xCB] = z80_inst_nop2,
[0xCC] = z80_inst_nop2,
[0xCD] = z80_inst_nop2,
[0xCE] = z80_inst_nop2,
[0xCF] = z80_inst_nop2,
[0xD0] = z80_inst_nop2,
[0xD1] = z80_inst_nop2,
[0xD2] = z80_inst_nop2,
[0xD3] = z80_inst_nop2,
[0xD4] = z80_inst_nop2,
[0xD5] = z80_inst_nop2,
[0xD6] = z80_inst_nop2,
[0xD7] = z80_inst_nop2,
[0xD8] = z80_inst_nop2,
[0xD9] = z80_inst_nop2,
[0xDA] = z80_inst_nop2,
[0xDB] = z80_inst_nop2,
[0xDC] = z80_inst_nop2,
[0xDD] = z80_inst_nop2,
[0xDE] = z80_inst_nop2,
[0xDF] = z80_inst_nop2,
[0xE0] = z80_inst_nop2,
[0xE1] = z80_inst_nop2,
[0xE2] = z80_inst_nop2,
[0xE3] = z80_inst_nop2,
[0xE4] = z80_inst_nop2,
[0xE5] = z80_inst_nop2,
[0xE6] = z80_inst_nop2,
[0xE7] = z80_inst_nop2,
[0xE8] = z80_inst_nop2,
[0xE9] = z80_inst_nop2,
[0xEA] = z80_inst_nop2,
[0xEB] = z80_inst_nop2,
[0xEC] = z80_inst_nop2,
[0xED] = z80_inst_nop2,
[0xEE] = z80_inst_nop2,
[0xEF] = z80_inst_nop2,
[0xF0] = z80_inst_nop2,
[0xF1] = z80_inst_nop2,
[0xF2] = z80_inst_nop2,
[0xF3] = z80_inst_nop2,
[0xF4] = z80_inst_nop2,
[0xF5] = z80_inst_nop2,
[0xF6] = z80_inst_nop2,
[0xF7] = z80_inst_nop2,
[0xF8] = z80_inst_nop2,
[0xF9] = z80_inst_nop2,
[0xFA] = z80_inst_nop2,
[0xFB] = z80_inst_nop2,
[0xFC] = z80_inst_nop2,
[0xFD] = z80_inst_nop2,
[0xFE] = z80_inst_nop2,
[0xFF] = z80_inst_nop2
};

static DispatchTable instruction_table_bits = {
@@ -779,102 +779,102 @@ static DispatchTable instruction_table_bits = {
};

static DispatchTable instruction_table_index = {
[0x00] = z80_inst_unimplemented, // TODO
[0x01] = z80_inst_unimplemented, // TODO
[0x02] = z80_inst_unimplemented, // TODO
[0x03] = z80_inst_unimplemented, // TODO
[0x04] = z80_inst_unimplemented, // TODO
[0x05] = z80_inst_unimplemented, // TODO
[0x06] = z80_inst_unimplemented, // TODO
[0x07] = z80_inst_unimplemented, // TODO
[0x08] = z80_inst_unimplemented, // TODO
[0x00] = z80_inst_nop2,
[0x01] = z80_inst_nop2,
[0x02] = z80_inst_nop2,
[0x03] = z80_inst_nop2,
[0x04] = z80_inst_nop2,
[0x05] = z80_inst_nop2,
[0x06] = z80_inst_nop2,
[0x07] = z80_inst_nop2,
[0x08] = z80_inst_nop2,
[0x09] = z80_inst_unimplemented, // TODO
[0x0A] = z80_inst_unimplemented, // TODO
[0x0B] = z80_inst_unimplemented, // TODO
[0x0C] = z80_inst_unimplemented, // TODO
[0x0D] = z80_inst_unimplemented, // TODO
[0x0E] = z80_inst_unimplemented, // TODO
[0x0F] = z80_inst_unimplemented, // TODO
[0x10] = z80_inst_unimplemented, // TODO
[0x11] = z80_inst_unimplemented, // TODO
[0x12] = z80_inst_unimplemented, // TODO
[0x13] = z80_inst_unimplemented, // TODO
[0x14] = z80_inst_unimplemented, // TODO
[0x15] = z80_inst_unimplemented, // TODO
[0x16] = z80_inst_unimplemented, // TODO
[0x17] = z80_inst_unimplemented, // TODO
[0x18] = z80_inst_unimplemented, // TODO
[0x0A] = z80_inst_nop2,
[0x0B] = z80_inst_nop2,
[0x0C] = z80_inst_nop2,
[0x0D] = z80_inst_nop2,
[0x0E] = z80_inst_nop2,
[0x0F] = z80_inst_nop2,
[0x10] = z80_inst_nop2,
[0x11] = z80_inst_nop2,
[0x12] = z80_inst_nop2,
[0x13] = z80_inst_nop2,
[0x14] = z80_inst_nop2,
[0x15] = z80_inst_nop2,
[0x16] = z80_inst_nop2,
[0x17] = z80_inst_nop2,
[0x18] = z80_inst_nop2,
[0x19] = z80_inst_unimplemented, // TODO
[0x1A] = z80_inst_unimplemented, // TODO
[0x1B] = z80_inst_unimplemented, // TODO
[0x1C] = z80_inst_unimplemented, // TODO
[0x1D] = z80_inst_unimplemented, // TODO
[0x1E] = z80_inst_unimplemented, // TODO
[0x1F] = z80_inst_unimplemented, // TODO
[0x20] = z80_inst_unimplemented, // TODO
[0x1A] = z80_inst_nop2,
[0x1B] = z80_inst_nop2,
[0x1C] = z80_inst_nop2,
[0x1D] = z80_inst_nop2,
[0x1E] = z80_inst_nop2,
[0x1F] = z80_inst_nop2,
[0x20] = z80_inst_nop2,
[0x21] = z80_inst_unimplemented, // TODO
[0x22] = z80_inst_unimplemented, // TODO
[0x23] = z80_inst_unimplemented, // TODO
[0x24] = z80_inst_unimplemented, // TODO
[0x25] = z80_inst_unimplemented, // TODO
[0x26] = z80_inst_unimplemented, // TODO
[0x27] = z80_inst_unimplemented, // TODO
[0x28] = z80_inst_unimplemented, // TODO
[0x27] = z80_inst_nop2,
[0x28] = z80_inst_nop2,
[0x29] = z80_inst_unimplemented, // TODO
[0x2A] = z80_inst_unimplemented, // TODO
[0x2B] = z80_inst_unimplemented, // TODO
[0x2C] = z80_inst_unimplemented, // TODO
[0x2D] = z80_inst_unimplemented, // TODO
[0x2E] = z80_inst_unimplemented, // TODO
[0x2F] = z80_inst_unimplemented, // TODO
[0x30] = z80_inst_unimplemented, // TODO
[0x31] = z80_inst_unimplemented, // TODO
[0x32] = z80_inst_unimplemented, // TODO
[0x33] = z80_inst_unimplemented, // TODO
[0x2F] = z80_inst_nop2,
[0x30] = z80_inst_nop2,
[0x31] = z80_inst_nop2,
[0x32] = z80_inst_nop2,
[0x33] = z80_inst_nop2,
[0x34] = z80_inst_unimplemented, // TODO
[0x35] = z80_inst_unimplemented, // TODO
[0x36] = z80_inst_unimplemented, // TODO
[0x37] = z80_inst_unimplemented, // TODO
[0x38] = z80_inst_unimplemented, // TODO
[0x37] = z80_inst_nop2,
[0x38] = z80_inst_nop2,
[0x39] = z80_inst_unimplemented, // TODO
[0x3A] = z80_inst_unimplemented, // TODO
[0x3B] = z80_inst_unimplemented, // TODO
[0x3C] = z80_inst_unimplemented, // TODO
[0x3D] = z80_inst_unimplemented, // TODO
[0x3E] = z80_inst_unimplemented, // TODO
[0x3F] = z80_inst_unimplemented, // TODO
[0x40] = z80_inst_unimplemented, // TODO
[0x41] = z80_inst_unimplemented, // TODO
[0x42] = z80_inst_unimplemented, // TODO
[0x43] = z80_inst_unimplemented, // TODO
[0x3A] = z80_inst_nop2,
[0x3B] = z80_inst_nop2,
[0x3C] = z80_inst_nop2,
[0x3D] = z80_inst_nop2,
[0x3E] = z80_inst_nop2,
[0x3F] = z80_inst_nop2,
[0x40] = z80_inst_nop2,
[0x41] = z80_inst_nop2,
[0x42] = z80_inst_nop2,
[0x43] = z80_inst_nop2,
[0x44] = z80_inst_unimplemented, // TODO
[0x45] = z80_inst_unimplemented, // TODO
[0x46] = z80_inst_unimplemented, // TODO
[0x47] = z80_inst_unimplemented, // TODO
[0x48] = z80_inst_unimplemented, // TODO
[0x49] = z80_inst_unimplemented, // TODO
[0x4A] = z80_inst_unimplemented, // TODO
[0x4B] = z80_inst_unimplemented, // TODO
[0x47] = z80_inst_nop2,
[0x48] = z80_inst_nop2,
[0x49] = z80_inst_nop2,
[0x4A] = z80_inst_nop2,
[0x4B] = z80_inst_nop2,
[0x4C] = z80_inst_unimplemented, // TODO
[0x4D] = z80_inst_unimplemented, // TODO
[0x4E] = z80_inst_unimplemented, // TODO
[0x4F] = z80_inst_unimplemented, // TODO
[0x50] = z80_inst_unimplemented, // TODO
[0x51] = z80_inst_unimplemented, // TODO
[0x52] = z80_inst_unimplemented, // TODO
[0x53] = z80_inst_unimplemented, // TODO
[0x4F] = z80_inst_nop2,
[0x50] = z80_inst_nop2,
[0x51] = z80_inst_nop2,
[0x52] = z80_inst_nop2,
[0x53] = z80_inst_nop2,
[0x54] = z80_inst_unimplemented, // TODO
[0x55] = z80_inst_unimplemented, // TODO
[0x56] = z80_inst_unimplemented, // TODO
[0x57] = z80_inst_unimplemented, // TODO
[0x58] = z80_inst_unimplemented, // TODO
[0x59] = z80_inst_unimplemented, // TODO
[0x5A] = z80_inst_unimplemented, // TODO
[0x5B] = z80_inst_unimplemented, // TODO
[0x57] = z80_inst_nop2,
[0x58] = z80_inst_nop2,
[0x59] = z80_inst_nop2,
[0x5A] = z80_inst_nop2,
[0x5B] = z80_inst_nop2,
[0x5C] = z80_inst_unimplemented, // TODO
[0x5D] = z80_inst_unimplemented, // TODO
[0x5E] = z80_inst_unimplemented, // TODO
[0x5F] = z80_inst_unimplemented, // TODO
[0x5F] = z80_inst_nop2,
[0x60] = z80_inst_unimplemented, // TODO
[0x61] = z80_inst_unimplemented, // TODO
[0x62] = z80_inst_unimplemented, // TODO
@@ -897,144 +897,144 @@ static DispatchTable instruction_table_index = {
[0x73] = z80_inst_unimplemented, // TODO
[0x74] = z80_inst_unimplemented, // TODO
[0x75] = z80_inst_unimplemented, // TODO
[0x76] = z80_inst_unimplemented, // TODO
[0x76] = z80_inst_nop2,
[0x77] = z80_inst_unimplemented, // TODO
[0x78] = z80_inst_unimplemented, // TODO
[0x79] = z80_inst_unimplemented, // TODO
[0x7A] = z80_inst_unimplemented, // TODO
[0x7B] = z80_inst_unimplemented, // TODO
[0x78] = z80_inst_nop2,
[0x79] = z80_inst_nop2,
[0x7A] = z80_inst_nop2,
[0x7B] = z80_inst_nop2,
[0x7C] = z80_inst_unimplemented, // TODO
[0x7D] = z80_inst_unimplemented, // TODO
[0x7E] = z80_inst_unimplemented, // TODO
[0x7F] = z80_inst_unimplemented, // TODO
[0x80] = z80_inst_unimplemented, // TODO
[0x81] = z80_inst_unimplemented, // TODO
[0x82] = z80_inst_unimplemented, // TODO
[0x83] = z80_inst_unimplemented, // TODO
[0x7F] = z80_inst_nop2,
[0x80] = z80_inst_nop2,
[0x81] = z80_inst_nop2,
[0x82] = z80_inst_nop2,
[0x83] = z80_inst_nop2,
[0x84] = z80_inst_unimplemented, // TODO
[0x85] = z80_inst_unimplemented, // TODO
[0x86] = z80_inst_unimplemented, // TODO
[0x87] = z80_inst_unimplemented, // TODO
[0x88] = z80_inst_unimplemented, // TODO
[0x89] = z80_inst_unimplemented, // TODO
[0x8A] = z80_inst_unimplemented, // TODO
[0x8B] = z80_inst_unimplemented, // TODO
[0x87] = z80_inst_nop2,
[0x88] = z80_inst_nop2,
[0x89] = z80_inst_nop2,
[0x8A] = z80_inst_nop2,
[0x8B] = z80_inst_nop2,
[0x8C] = z80_inst_unimplemented, // TODO
[0x8D] = z80_inst_unimplemented, // TODO
[0x8E] = z80_inst_unimplemented, // TODO
[0x8F] = z80_inst_unimplemented, // TODO
[0x90] = z80_inst_unimplemented, // TODO
[0x91] = z80_inst_unimplemented, // TODO
[0x92] = z80_inst_unimplemented, // TODO
[0x93] = z80_inst_unimplemented, // TODO
[0x8F] = z80_inst_nop2,
[0x90] = z80_inst_nop2,
[0x91] = z80_inst_nop2,
[0x92] = z80_inst_nop2,
[0x93] = z80_inst_nop2,
[0x94] = z80_inst_unimplemented, // TODO
[0x95] = z80_inst_unimplemented, // TODO
[0x96] = z80_inst_unimplemented, // TODO
[0x97] = z80_inst_unimplemented, // TODO
[0x98] = z80_inst_unimplemented, // TODO
[0x99] = z80_inst_unimplemented, // TODO
[0x9A] = z80_inst_unimplemented, // TODO
[0x9B] = z80_inst_unimplemented, // TODO
[0x97] = z80_inst_nop2,
[0x98] = z80_inst_nop2,
[0x99] = z80_inst_nop2,
[0x9A] = z80_inst_nop2,
[0x9B] = z80_inst_nop2,
[0x9C] = z80_inst_unimplemented, // TODO
[0x9D] = z80_inst_unimplemented, // TODO
[0x9E] = z80_inst_unimplemented, // TODO
[0x9F] = z80_inst_unimplemented, // TODO
[0xA0] = z80_inst_unimplemented, // TODO
[0xA1] = z80_inst_unimplemented, // TODO
[0xA2] = z80_inst_unimplemented, // TODO
[0xA3] = z80_inst_unimplemented, // TODO
[0x9F] = z80_inst_nop2,
[0xA0] = z80_inst_nop2,
[0xA1] = z80_inst_nop2,
[0xA2] = z80_inst_nop2,
[0xA3] = z80_inst_nop2,
[0xA4] = z80_inst_unimplemented, // TODO
[0xA5] = z80_inst_unimplemented, // TODO
[0xA6] = z80_inst_unimplemented, // TODO
[0xA7] = z80_inst_unimplemented, // TODO
[0xA8] = z80_inst_unimplemented, // TODO
[0xA9] = z80_inst_unimplemented, // TODO
[0xAA] = z80_inst_unimplemented, // TODO
[0xAB] = z80_inst_unimplemented, // TODO
[0xA7] = z80_inst_nop2,
[0xA8] = z80_inst_nop2,
[0xA9] = z80_inst_nop2,
[0xAA] = z80_inst_nop2,
[0xAB] = z80_inst_nop2,
[0xAC] = z80_inst_unimplemented, // TODO
[0xAD] = z80_inst_unimplemented, // TODO
[0xAE] = z80_inst_unimplemented, // TODO
[0xAF] = z80_inst_unimplemented, // TODO
[0xB0] = z80_inst_unimplemented, // TODO
[0xB1] = z80_inst_unimplemented, // TODO
[0xB2] = z80_inst_unimplemented, // TODO
[0xB3] = z80_inst_unimplemented, // TODO
[0xAF] = z80_inst_nop2,
[0xB0] = z80_inst_nop2,
[0xB1] = z80_inst_nop2,
[0xB2] = z80_inst_nop2,
[0xB3] = z80_inst_nop2,
[0xB4] = z80_inst_unimplemented, // TODO
[0xB5] = z80_inst_unimplemented, // TODO
[0xB6] = z80_inst_unimplemented, // TODO
[0xB7] = z80_inst_unimplemented, // TODO
[0xB8] = z80_inst_unimplemented, // TODO
[0xB9] = z80_inst_unimplemented, // TODO
[0xBA] = z80_inst_unimplemented, // TODO
[0xBB] = z80_inst_unimplemented, // TODO
[0xB7] = z80_inst_nop2,
[0xB8] = z80_inst_nop2,
[0xB9] = z80_inst_nop2,
[0xBA] = z80_inst_nop2,
[0xBB] = z80_inst_nop2,
[0xBC] = z80_inst_unimplemented, // TODO
[0xBD] = z80_inst_unimplemented, // TODO
[0xBE] = z80_inst_unimplemented, // TODO
[0xBF] = z80_inst_unimplemented, // TODO
[0xC0] = z80_inst_unimplemented, // TODO
[0xC1] = z80_inst_unimplemented, // TODO
[0xC2] = z80_inst_unimplemented, // TODO
[0xC3] = z80_inst_unimplemented, // TODO
[0xC4] = z80_inst_unimplemented, // TODO
[0xC5] = z80_inst_unimplemented, // TODO
[0xC6] = z80_inst_unimplemented, // TODO
[0xC7] = z80_inst_unimplemented, // TODO
[0xC8] = z80_inst_unimplemented, // TODO
[0xC9] = z80_inst_unimplemented, // TODO
[0xCA] = z80_inst_unimplemented, // TODO
[0xBF] = z80_inst_nop2,
[0xC0] = z80_inst_nop2,
[0xC1] = z80_inst_nop2,
[0xC2] = z80_inst_nop2,
[0xC3] = z80_inst_nop2,
[0xC4] = z80_inst_nop2,
[0xC5] = z80_inst_nop2,
[0xC6] = z80_inst_nop2,
[0xC7] = z80_inst_nop2,
[0xC8] = z80_inst_nop2,
[0xC9] = z80_inst_nop2,
[0xCA] = z80_inst_nop2,
[0xCB] = z80_prefix_index_bits,
[0xCC] = z80_inst_unimplemented, // TODO
[0xCD] = z80_inst_unimplemented, // TODO
[0xCE] = z80_inst_unimplemented, // TODO
[0xCF] = z80_inst_unimplemented, // TODO
[0xD0] = z80_inst_unimplemented, // TODO
[0xD1] = z80_inst_unimplemented, // TODO
[0xD2] = z80_inst_unimplemented, // TODO
[0xD3] = z80_inst_unimplemented, // TODO
[0xD4] = z80_inst_unimplemented, // TODO
[0xD5] = z80_inst_unimplemented, // TODO
[0xD6] = z80_inst_unimplemented, // TODO
[0xD7] = z80_inst_unimplemented, // TODO
[0xD8] = z80_inst_unimplemented, // TODO
[0xD9] = z80_inst_unimplemented, // TODO
[0xDA] = z80_inst_unimplemented, // TODO
[0xDB] = z80_inst_unimplemented, // TODO
[0xDC] = z80_inst_unimplemented, // TODO
[0xDD] = z80_inst_unimplemented, // TODO
[0xDE] = z80_inst_unimplemented, // TODO
[0xDF] = z80_inst_unimplemented, // TODO
[0xE0] = z80_inst_unimplemented, // TODO
[0xCC] = z80_inst_nop2,
[0xCD] = z80_inst_nop2,
[0xCE] = z80_inst_nop2,
[0xCF] = z80_inst_nop2,
[0xD0] = z80_inst_nop2,
[0xD1] = z80_inst_nop2,
[0xD2] = z80_inst_nop2,
[0xD3] = z80_inst_nop2,
[0xD4] = z80_inst_nop2,
[0xD5] = z80_inst_nop2,
[0xD6] = z80_inst_nop2,
[0xD7] = z80_inst_nop2,
[0xD8] = z80_inst_nop2,
[0xD9] = z80_inst_nop2,
[0xDA] = z80_inst_nop2,
[0xDB] = z80_inst_nop2,
[0xDC] = z80_inst_nop2,
[0xDD] = z80_inst_nop2,
[0xDE] = z80_inst_nop2,
[0xDF] = z80_inst_nop2,
[0xE0] = z80_inst_nop2,
[0xE1] = z80_inst_unimplemented, // TODO
[0xE2] = z80_inst_unimplemented, // TODO
[0xE2] = z80_inst_nop2,
[0xE3] = z80_inst_unimplemented, // TODO
[0xE4] = z80_inst_unimplemented, // TODO
[0xE4] = z80_inst_nop2,
[0xE5] = z80_inst_unimplemented, // TODO
[0xE6] = z80_inst_unimplemented, // TODO
[0xE7] = z80_inst_unimplemented, // TODO
[0xE8] = z80_inst_unimplemented, // TODO
[0xE6] = z80_inst_nop2,
[0xE7] = z80_inst_nop2,
[0xE8] = z80_inst_nop2,
[0xE9] = z80_inst_unimplemented, // TODO
[0xEA] = z80_inst_unimplemented, // TODO
[0xEB] = z80_inst_unimplemented, // TODO
[0xEC] = z80_inst_unimplemented, // TODO
[0xED] = z80_inst_unimplemented, // TODO
[0xEE] = z80_inst_unimplemented, // TODO
[0xEF] = z80_inst_unimplemented, // TODO
[0xF0] = z80_inst_unimplemented, // TODO
[0xF1] = z80_inst_unimplemented, // TODO
[0xF2] = z80_inst_unimplemented, // TODO
[0xF3] = z80_inst_unimplemented, // TODO
[0xF4] = z80_inst_unimplemented, // TODO
[0xF5] = z80_inst_unimplemented, // TODO
[0xF6] = z80_inst_unimplemented, // TODO
[0xF7] = z80_inst_unimplemented, // TODO
[0xF8] = z80_inst_unimplemented, // TODO
[0xEA] = z80_inst_nop2,
[0xEB] = z80_inst_nop2,
[0xEC] = z80_inst_nop2,
[0xED] = z80_inst_nop2,
[0xEE] = z80_inst_nop2,
[0xEF] = z80_inst_nop2,
[0xF0] = z80_inst_nop2,
[0xF1] = z80_inst_nop2,
[0xF2] = z80_inst_nop2,
[0xF3] = z80_inst_nop2,
[0xF4] = z80_inst_nop2,
[0xF5] = z80_inst_nop2,
[0xF6] = z80_inst_nop2,
[0xF7] = z80_inst_nop2,
[0xF8] = z80_inst_nop2,
[0xF9] = z80_inst_unimplemented, // TODO
[0xFA] = z80_inst_unimplemented, // TODO
[0xFB] = z80_inst_unimplemented, // TODO
[0xFC] = z80_inst_unimplemented, // TODO
[0xFD] = z80_inst_unimplemented, // TODO
[0xFE] = z80_inst_unimplemented, // TODO
[0xFF] = z80_inst_unimplemented // TODO
[0xFA] = z80_inst_nop2,
[0xFB] = z80_inst_nop2,
[0xFC] = z80_inst_nop2,
[0xFD] = z80_inst_nop2,
[0xFE] = z80_inst_nop2,
[0xFF] = z80_inst_nop2
};

static DispatchTable instruction_table_index_bits = {


Carregando…
Cancelar
Salvar