|
|
@@ -10,7 +10,7 @@ static DispatchTable instruction_table = { |
|
|
|
[0x05] = z80_inst_dec_r, |
|
|
|
[0x06] = z80_inst_ld_r_n, |
|
|
|
[0x07] = z80_inst_unimplemented, // TODO |
|
|
|
[0x08] = z80_inst_unimplemented, // TODO |
|
|
|
[0x08] = z80_inst_ex_af_af, |
|
|
|
[0x09] = z80_inst_add_hl_ss, |
|
|
|
[0x0A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x0B] = z80_inst_dec_ss, |
|
|
@@ -44,7 +44,7 @@ static DispatchTable instruction_table = { |
|
|
|
[0x27] = z80_inst_unimplemented, // TODO |
|
|
|
[0x28] = z80_inst_jr_cc_e, |
|
|
|
[0x29] = z80_inst_add_hl_ss, |
|
|
|
[0x2A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x2A] = z80_inst_ld_hl_nn, |
|
|
|
[0x2B] = z80_inst_dec_ss, |
|
|
|
[0x2C] = z80_inst_inc_r, |
|
|
|
[0x2D] = z80_inst_dec_r, |
|
|
@@ -54,7 +54,7 @@ static DispatchTable instruction_table = { |
|
|
|
[0x31] = z80_inst_ld_dd_nn, |
|
|
|
[0x32] = z80_inst_ld_nn_a, |
|
|
|
[0x33] = z80_inst_inc_ss, |
|
|
|
[0x34] = z80_inst_unimplemented, // TODO |
|
|
|
[0x34] = z80_inst_inc_hl, |
|
|
|
[0x35] = z80_inst_unimplemented, // TODO |
|
|
|
[0x36] = z80_inst_ld_hl_n, |
|
|
|
[0x37] = z80_inst_unimplemented, // TODO |
|
|
@@ -229,10 +229,10 @@ static DispatchTable instruction_table = { |
|
|
|
[0xE0] = z80_inst_ret_cc, |
|
|
|
[0xE1] = z80_inst_pop_qq, |
|
|
|
[0xE2] = z80_inst_jp_cc_nn, |
|
|
|
[0xE3] = z80_inst_unimplemented, // TODO |
|
|
|
[0xE3] = z80_inst_ex_sp_hl, |
|
|
|
[0xE4] = z80_inst_call_cc_nn, |
|
|
|
[0xE5] = z80_inst_push_qq, |
|
|
|
[0xE6] = z80_inst_unimplemented, // TODO |
|
|
|
[0xE6] = z80_inst_and_n, |
|
|
|
[0xE7] = z80_inst_rst_p, |
|
|
|
[0xE8] = z80_inst_ret_cc, |
|
|
|
[0xE9] = z80_inst_unimplemented, // TODO |
|
|
@@ -336,9 +336,9 @@ static DispatchTable instruction_table_extended = { |
|
|
|
[0x48] = z80_inst_in_r_c, |
|
|
|
[0x49] = z80_inst_out_c_r, |
|
|
|
[0x4A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x4B] = z80_inst_unimplemented, // TODO |
|
|
|
[0x4B] = z80_inst_ld_dd_inn, |
|
|
|
[0x4C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x4D] = z80_inst_unimplemented, // TODO |
|
|
|
[0x4D] = z80_inst_reti, |
|
|
|
[0x4E] = z80_inst_im, |
|
|
|
[0x4F] = z80_inst_unimplemented, // TODO |
|
|
|
[0x50] = z80_inst_in_r_c, |
|
|
@@ -352,7 +352,7 @@ static DispatchTable instruction_table_extended = { |
|
|
|
[0x58] = z80_inst_in_r_c, |
|
|
|
[0x59] = z80_inst_out_c_r, |
|
|
|
[0x5A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5B] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5B] = z80_inst_ld_dd_inn, |
|
|
|
[0x5C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5D] = z80_inst_retn, |
|
|
|
[0x5E] = z80_inst_im, |
|
|
@@ -368,7 +368,7 @@ static DispatchTable instruction_table_extended = { |
|
|
|
[0x68] = z80_inst_in_r_c, |
|
|
|
[0x69] = z80_inst_out_c_r, |
|
|
|
[0x6A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6B] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6B] = z80_inst_ld_dd_inn, |
|
|
|
[0x6C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6D] = z80_inst_retn, |
|
|
|
[0x6E] = z80_inst_im, |
|
|
@@ -384,43 +384,43 @@ static DispatchTable instruction_table_extended = { |
|
|
|
[0x78] = z80_inst_in_r_c, |
|
|
|
[0x79] = z80_inst_out_c_r, |
|
|
|
[0x7A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7B] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7B] = z80_inst_ld_dd_inn, |
|
|
|
[0x7C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7D] = z80_inst_retn, |
|
|
|
[0x7E] = z80_inst_im, |
|
|
|
[0x7F] = z80_inst_nop2, |
|
|
|
[0x80] = z80_inst_unimplemented, // TODO |
|
|
|
[0x81] = z80_inst_unimplemented, // TODO |
|
|
|
[0x82] = z80_inst_unimplemented, // TODO |
|
|
|
[0x83] = z80_inst_unimplemented, // TODO |
|
|
|
[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 |
|
|
|
[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 |
|
|
|
[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 |
|
|
|
[0x9C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x9D] = z80_inst_unimplemented, // TODO |
|
|
|
[0x9E] = z80_inst_unimplemented, // TODO |
|
|
|
[0x9F] = z80_inst_unimplemented, // TODO |
|
|
|
[0x80] = z80_inst_nop2, |
|
|
|
[0x81] = z80_inst_nop2, |
|
|
|
[0x82] = z80_inst_nop2, |
|
|
|
[0x83] = z80_inst_nop2, |
|
|
|
[0x84] = z80_inst_nop2, |
|
|
|
[0x85] = z80_inst_nop2, |
|
|
|
[0x86] = z80_inst_nop2, |
|
|
|
[0x87] = z80_inst_nop2, |
|
|
|
[0x88] = z80_inst_nop2, |
|
|
|
[0x89] = z80_inst_nop2, |
|
|
|
[0x8A] = z80_inst_nop2, |
|
|
|
[0x8B] = z80_inst_nop2, |
|
|
|
[0x8C] = z80_inst_nop2, |
|
|
|
[0x8D] = z80_inst_nop2, |
|
|
|
[0x8E] = z80_inst_nop2, |
|
|
|
[0x8F] = z80_inst_nop2, |
|
|
|
[0x90] = z80_inst_nop2, |
|
|
|
[0x91] = z80_inst_nop2, |
|
|
|
[0x92] = z80_inst_nop2, |
|
|
|
[0x93] = z80_inst_nop2, |
|
|
|
[0x94] = z80_inst_nop2, |
|
|
|
[0x95] = z80_inst_nop2, |
|
|
|
[0x96] = z80_inst_nop2, |
|
|
|
[0x97] = z80_inst_nop2, |
|
|
|
[0x98] = z80_inst_nop2, |
|
|
|
[0x99] = z80_inst_nop2, |
|
|
|
[0x9A] = z80_inst_nop2, |
|
|
|
[0x9B] = z80_inst_nop2, |
|
|
|
[0x9C] = z80_inst_nop2, |
|
|
|
[0x9D] = z80_inst_nop2, |
|
|
|
[0x9E] = z80_inst_nop2, |
|
|
|
[0x9F] = z80_inst_nop2, |
|
|
|
[0xA0] = z80_inst_ldi, |
|
|
|
[0xA1] = z80_inst_unimplemented, // TODO |
|
|
|
[0xA2] = z80_inst_ini, |
|
|
@@ -584,70 +584,70 @@ static DispatchTable instruction_table_bits = { |
|
|
|
[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 |
|
|
|
[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 |
|
|
|
[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 |
|
|
|
[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 |
|
|
|
[0x5C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5D] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5E] = z80_inst_unimplemented, // TODO |
|
|
|
[0x5F] = z80_inst_unimplemented, // TODO |
|
|
|
[0x60] = z80_inst_unimplemented, // TODO |
|
|
|
[0x61] = z80_inst_unimplemented, // TODO |
|
|
|
[0x62] = z80_inst_unimplemented, // TODO |
|
|
|
[0x63] = z80_inst_unimplemented, // TODO |
|
|
|
[0x64] = z80_inst_unimplemented, // TODO |
|
|
|
[0x65] = z80_inst_unimplemented, // TODO |
|
|
|
[0x66] = z80_inst_unimplemented, // TODO |
|
|
|
[0x67] = z80_inst_unimplemented, // TODO |
|
|
|
[0x68] = z80_inst_unimplemented, // TODO |
|
|
|
[0x69] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6A] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6B] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6D] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6E] = z80_inst_unimplemented, // TODO |
|
|
|
[0x6F] = z80_inst_unimplemented, // TODO |
|
|
|
[0x70] = z80_inst_unimplemented, // TODO |
|
|
|
[0x71] = z80_inst_unimplemented, // TODO |
|
|
|
[0x72] = z80_inst_unimplemented, // TODO |
|
|
|
[0x73] = z80_inst_unimplemented, // TODO |
|
|
|
[0x74] = z80_inst_unimplemented, // TODO |
|
|
|
[0x75] = z80_inst_unimplemented, // TODO |
|
|
|
[0x76] = z80_inst_unimplemented, // TODO |
|
|
|
[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 |
|
|
|
[0x7C] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7D] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7E] = z80_inst_unimplemented, // TODO |
|
|
|
[0x7F] = z80_inst_unimplemented, // TODO |
|
|
|
[0x40] = z80_inst_bit_b_r, |
|
|
|
[0x41] = z80_inst_bit_b_r, |
|
|
|
[0x42] = z80_inst_bit_b_r, |
|
|
|
[0x43] = z80_inst_bit_b_r, |
|
|
|
[0x44] = z80_inst_bit_b_r, |
|
|
|
[0x45] = z80_inst_bit_b_r, |
|
|
|
[0x46] = z80_inst_bit_b_hl, |
|
|
|
[0x47] = z80_inst_bit_b_r, |
|
|
|
[0x48] = z80_inst_bit_b_r, |
|
|
|
[0x49] = z80_inst_bit_b_r, |
|
|
|
[0x4A] = z80_inst_bit_b_r, |
|
|
|
[0x4B] = z80_inst_bit_b_r, |
|
|
|
[0x4C] = z80_inst_bit_b_r, |
|
|
|
[0x4D] = z80_inst_bit_b_r, |
|
|
|
[0x4E] = z80_inst_bit_b_hl, |
|
|
|
[0x4F] = z80_inst_bit_b_r, |
|
|
|
[0x50] = z80_inst_bit_b_r, |
|
|
|
[0x51] = z80_inst_bit_b_r, |
|
|
|
[0x52] = z80_inst_bit_b_r, |
|
|
|
[0x53] = z80_inst_bit_b_r, |
|
|
|
[0x54] = z80_inst_bit_b_r, |
|
|
|
[0x55] = z80_inst_bit_b_r, |
|
|
|
[0x56] = z80_inst_bit_b_hl, |
|
|
|
[0x57] = z80_inst_bit_b_r, |
|
|
|
[0x58] = z80_inst_bit_b_r, |
|
|
|
[0x59] = z80_inst_bit_b_r, |
|
|
|
[0x5A] = z80_inst_bit_b_r, |
|
|
|
[0x5B] = z80_inst_bit_b_r, |
|
|
|
[0x5C] = z80_inst_bit_b_r, |
|
|
|
[0x5D] = z80_inst_bit_b_r, |
|
|
|
[0x5E] = z80_inst_bit_b_hl, |
|
|
|
[0x5F] = z80_inst_bit_b_r, |
|
|
|
[0x60] = z80_inst_bit_b_r, |
|
|
|
[0x61] = z80_inst_bit_b_r, |
|
|
|
[0x62] = z80_inst_bit_b_r, |
|
|
|
[0x63] = z80_inst_bit_b_r, |
|
|
|
[0x64] = z80_inst_bit_b_r, |
|
|
|
[0x65] = z80_inst_bit_b_r, |
|
|
|
[0x66] = z80_inst_bit_b_hl, |
|
|
|
[0x67] = z80_inst_bit_b_r, |
|
|
|
[0x68] = z80_inst_bit_b_r, |
|
|
|
[0x69] = z80_inst_bit_b_r, |
|
|
|
[0x6A] = z80_inst_bit_b_r, |
|
|
|
[0x6B] = z80_inst_bit_b_r, |
|
|
|
[0x6C] = z80_inst_bit_b_r, |
|
|
|
[0x6D] = z80_inst_bit_b_r, |
|
|
|
[0x6E] = z80_inst_bit_b_hl, |
|
|
|
[0x6F] = z80_inst_bit_b_r, |
|
|
|
[0x70] = z80_inst_bit_b_r, |
|
|
|
[0x71] = z80_inst_bit_b_r, |
|
|
|
[0x72] = z80_inst_bit_b_r, |
|
|
|
[0x73] = z80_inst_bit_b_r, |
|
|
|
[0x74] = z80_inst_bit_b_r, |
|
|
|
[0x75] = z80_inst_bit_b_r, |
|
|
|
[0x76] = z80_inst_bit_b_hl, |
|
|
|
[0x77] = z80_inst_bit_b_r, |
|
|
|
[0x78] = z80_inst_bit_b_r, |
|
|
|
[0x79] = z80_inst_bit_b_r, |
|
|
|
[0x7A] = z80_inst_bit_b_r, |
|
|
|
[0x7B] = z80_inst_bit_b_r, |
|
|
|
[0x7C] = z80_inst_bit_b_r, |
|
|
|
[0x7D] = z80_inst_bit_b_r, |
|
|
|
[0x7E] = z80_inst_bit_b_hl, |
|
|
|
[0x7F] = z80_inst_bit_b_r, |
|
|
|
[0x80] = z80_inst_unimplemented, // TODO |
|
|
|
[0x81] = z80_inst_unimplemented, // TODO |
|
|
|
[0x82] = z80_inst_unimplemented, // TODO |
|
|
|