./z80ex-1.1.21/0000755000175000017500000000000012175333011011023 5ustar booboo./z80ex-1.1.21/ptables.c0000644000175000017500000007336111061323052012630 0ustar booboo/* Whether a half carry occured or not can be determined by looking at the 3rd bit of the two arguments and the result; these are hashed into this table in the form r12, where r is the 3rd bit of the result, 1 is the 3rd bit of the 1st argument and 2 is the third bit of the 2nd argument; the tables differ for add and subtract operations */ static const Z80EX_BYTE halfcarry_add_table[] = { 0, FLAG_H, FLAG_H, FLAG_H, 0, 0, 0, FLAG_H }; static const Z80EX_BYTE halfcarry_sub_table[] = { 0, 0, FLAG_H, 0, FLAG_H, 0, FLAG_H, FLAG_H }; /* Similarly, overflow can be determined by looking at the 7th bits; again the hash into this table is r12 */ static const Z80EX_BYTE overflow_add_table[] = { 0, 0, 0, FLAG_V, FLAG_V, 0, 0, 0 }; static const Z80EX_BYTE overflow_sub_table[] = { 0, FLAG_V, 0, 0, 0, 0, FLAG_V, 0 }; /* The S, Z, 5 and 3 bits of the index */ static const Z80EX_BYTE sz53_table[0x100] = { 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 ,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 ,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 ,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 ,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 ,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 ,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 ,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 ,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28 ,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 ,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88 ,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 ,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88 ,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0 ,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8 ,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0 ,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8 ,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 ,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88 ,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 ,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88 ,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0 ,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8 ,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0 ,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8 }; /* The parity of the lookup value */ static const Z80EX_BYTE parity_table[0x100] = { 0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 }; /* OR the above two tables together */ static const Z80EX_BYTE sz53p_table[0x100] = { 0x44,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x08,0x0c,0x0c,0x08,0x0c,0x08,0x08,0x0c ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x0c,0x08,0x08,0x0c,0x08,0x0c,0x0c,0x08 ,0x20,0x24,0x24,0x20,0x24,0x20,0x20,0x24 ,0x2c,0x28,0x28,0x2c,0x28,0x2c,0x2c,0x28 ,0x24,0x20,0x20,0x24,0x20,0x24,0x24,0x20 ,0x28,0x2c,0x2c,0x28,0x2c,0x28,0x28,0x2c ,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04 ,0x0c,0x08,0x08,0x0c,0x08,0x0c,0x0c,0x08 ,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00 ,0x08,0x0c,0x0c,0x08,0x0c,0x08,0x08,0x0c ,0x24,0x20,0x20,0x24,0x20,0x24,0x24,0x20 ,0x28,0x2c,0x2c,0x28,0x2c,0x28,0x28,0x2c ,0x20,0x24,0x24,0x20,0x24,0x20,0x20,0x24 ,0x2c,0x28,0x28,0x2c,0x28,0x2c,0x2c,0x28 ,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84 ,0x8c,0x88,0x88,0x8c,0x88,0x8c,0x8c,0x88 ,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80 ,0x88,0x8c,0x8c,0x88,0x8c,0x88,0x88,0x8c ,0xa4,0xa0,0xa0,0xa4,0xa0,0xa4,0xa4,0xa0 ,0xa8,0xac,0xac,0xa8,0xac,0xa8,0xa8,0xac ,0xa0,0xa4,0xa4,0xa0,0xa4,0xa0,0xa0,0xa4 ,0xac,0xa8,0xa8,0xac,0xa8,0xac,0xac,0xa8 ,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80 ,0x88,0x8c,0x8c,0x88,0x8c,0x88,0x88,0x8c ,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84 ,0x8c,0x88,0x88,0x8c,0x88,0x8c,0x8c,0x88 ,0xa0,0xa4,0xa4,0xa0,0xa4,0xa0,0xa0,0xa4 ,0xac,0xa8,0xa8,0xac,0xa8,0xac,0xac,0xa8 ,0xa4,0xa0,0xa0,0xa4,0xa0,0xa4,0xa4,0xa0 ,0xa8,0xac,0xac,0xa8,0xac,0xa8,0xa8,0xac }; /*table for daa, contains af*/ static const Z80EX_BYTE daatab[0x1000] = { 0x44,0x00,0x00,0x01,0x00,0x02,0x04,0x03 ,0x00,0x04,0x04,0x05,0x04,0x06,0x00,0x07 ,0x08,0x08,0x0c,0x09,0x10,0x10,0x14,0x11 ,0x14,0x12,0x10,0x13,0x14,0x14,0x10,0x15 ,0x00,0x10,0x04,0x11,0x04,0x12,0x00,0x13 ,0x04,0x14,0x00,0x15,0x00,0x16,0x04,0x17 ,0x0c,0x18,0x08,0x19,0x30,0x20,0x34,0x21 ,0x34,0x22,0x30,0x23,0x34,0x24,0x30,0x25 ,0x20,0x20,0x24,0x21,0x24,0x22,0x20,0x23 ,0x24,0x24,0x20,0x25,0x20,0x26,0x24,0x27 ,0x2c,0x28,0x28,0x29,0x34,0x30,0x30,0x31 ,0x30,0x32,0x34,0x33,0x30,0x34,0x34,0x35 ,0x24,0x30,0x20,0x31,0x20,0x32,0x24,0x33 ,0x20,0x34,0x24,0x35,0x24,0x36,0x20,0x37 ,0x28,0x38,0x2c,0x39,0x10,0x40,0x14,0x41 ,0x14,0x42,0x10,0x43,0x14,0x44,0x10,0x45 ,0x00,0x40,0x04,0x41,0x04,0x42,0x00,0x43 ,0x04,0x44,0x00,0x45,0x00,0x46,0x04,0x47 ,0x0c,0x48,0x08,0x49,0x14,0x50,0x10,0x51 ,0x10,0x52,0x14,0x53,0x10,0x54,0x14,0x55 ,0x04,0x50,0x00,0x51,0x00,0x52,0x04,0x53 ,0x00,0x54,0x04,0x55,0x04,0x56,0x00,0x57 ,0x08,0x58,0x0c,0x59,0x34,0x60,0x30,0x61 ,0x30,0x62,0x34,0x63,0x30,0x64,0x34,0x65 ,0x24,0x60,0x20,0x61,0x20,0x62,0x24,0x63 ,0x20,0x64,0x24,0x65,0x24,0x66,0x20,0x67 ,0x28,0x68,0x2c,0x69,0x30,0x70,0x34,0x71 ,0x34,0x72,0x30,0x73,0x34,0x74,0x30,0x75 ,0x20,0x70,0x24,0x71,0x24,0x72,0x20,0x73 ,0x24,0x74,0x20,0x75,0x20,0x76,0x24,0x77 ,0x2c,0x78,0x28,0x79,0x90,0x80,0x94,0x81 ,0x94,0x82,0x90,0x83,0x94,0x84,0x90,0x85 ,0x80,0x80,0x84,0x81,0x84,0x82,0x80,0x83 ,0x84,0x84,0x80,0x85,0x80,0x86,0x84,0x87 ,0x8c,0x88,0x88,0x89,0x94,0x90,0x90,0x91 ,0x90,0x92,0x94,0x93,0x90,0x94,0x94,0x95 ,0x84,0x90,0x80,0x91,0x80,0x92,0x84,0x93 ,0x80,0x94,0x84,0x95,0x84,0x96,0x80,0x97 ,0x88,0x98,0x8c,0x99,0x55,0x00,0x11,0x01 ,0x11,0x02,0x15,0x03,0x11,0x04,0x15,0x05 ,0x45,0x00,0x01,0x01,0x01,0x02,0x05,0x03 ,0x01,0x04,0x05,0x05,0x05,0x06,0x01,0x07 ,0x09,0x08,0x0d,0x09,0x11,0x10,0x15,0x11 ,0x15,0x12,0x11,0x13,0x15,0x14,0x11,0x15 ,0x01,0x10,0x05,0x11,0x05,0x12,0x01,0x13 ,0x05,0x14,0x01,0x15,0x01,0x16,0x05,0x17 ,0x0d,0x18,0x09,0x19,0x31,0x20,0x35,0x21 ,0x35,0x22,0x31,0x23,0x35,0x24,0x31,0x25 ,0x21,0x20,0x25,0x21,0x25,0x22,0x21,0x23 ,0x25,0x24,0x21,0x25,0x21,0x26,0x25,0x27 ,0x2d,0x28,0x29,0x29,0x35,0x30,0x31,0x31 ,0x31,0x32,0x35,0x33,0x31,0x34,0x35,0x35 ,0x25,0x30,0x21,0x31,0x21,0x32,0x25,0x33 ,0x21,0x34,0x25,0x35,0x25,0x36,0x21,0x37 ,0x29,0x38,0x2d,0x39,0x11,0x40,0x15,0x41 ,0x15,0x42,0x11,0x43,0x15,0x44,0x11,0x45 ,0x01,0x40,0x05,0x41,0x05,0x42,0x01,0x43 ,0x05,0x44,0x01,0x45,0x01,0x46,0x05,0x47 ,0x0d,0x48,0x09,0x49,0x15,0x50,0x11,0x51 ,0x11,0x52,0x15,0x53,0x11,0x54,0x15,0x55 ,0x05,0x50,0x01,0x51,0x01,0x52,0x05,0x53 ,0x01,0x54,0x05,0x55,0x05,0x56,0x01,0x57 ,0x09,0x58,0x0d,0x59,0x35,0x60,0x31,0x61 ,0x31,0x62,0x35,0x63,0x31,0x64,0x35,0x65 ,0x25,0x60,0x21,0x61,0x21,0x62,0x25,0x63 ,0x21,0x64,0x25,0x65,0x25,0x66,0x21,0x67 ,0x29,0x68,0x2d,0x69,0x31,0x70,0x35,0x71 ,0x35,0x72,0x31,0x73,0x35,0x74,0x31,0x75 ,0x21,0x70,0x25,0x71,0x25,0x72,0x21,0x73 ,0x25,0x74,0x21,0x75,0x21,0x76,0x25,0x77 ,0x2d,0x78,0x29,0x79,0x91,0x80,0x95,0x81 ,0x95,0x82,0x91,0x83,0x95,0x84,0x91,0x85 ,0x81,0x80,0x85,0x81,0x85,0x82,0x81,0x83 ,0x85,0x84,0x81,0x85,0x81,0x86,0x85,0x87 ,0x8d,0x88,0x89,0x89,0x95,0x90,0x91,0x91 ,0x91,0x92,0x95,0x93,0x91,0x94,0x95,0x95 ,0x85,0x90,0x81,0x91,0x81,0x92,0x85,0x93 ,0x81,0x94,0x85,0x95,0x85,0x96,0x81,0x97 ,0x89,0x98,0x8d,0x99,0xb5,0xa0,0xb1,0xa1 ,0xb1,0xa2,0xb5,0xa3,0xb1,0xa4,0xb5,0xa5 ,0xa5,0xa0,0xa1,0xa1,0xa1,0xa2,0xa5,0xa3 ,0xa1,0xa4,0xa5,0xa5,0xa5,0xa6,0xa1,0xa7 ,0xa9,0xa8,0xad,0xa9,0xb1,0xb0,0xb5,0xb1 ,0xb5,0xb2,0xb1,0xb3,0xb5,0xb4,0xb1,0xb5 ,0xa1,0xb0,0xa5,0xb1,0xa5,0xb2,0xa1,0xb3 ,0xa5,0xb4,0xa1,0xb5,0xa1,0xb6,0xa5,0xb7 ,0xad,0xb8,0xa9,0xb9,0x95,0xc0,0x91,0xc1 ,0x91,0xc2,0x95,0xc3,0x91,0xc4,0x95,0xc5 ,0x85,0xc0,0x81,0xc1,0x81,0xc2,0x85,0xc3 ,0x81,0xc4,0x85,0xc5,0x85,0xc6,0x81,0xc7 ,0x89,0xc8,0x8d,0xc9,0x91,0xd0,0x95,0xd1 ,0x95,0xd2,0x91,0xd3,0x95,0xd4,0x91,0xd5 ,0x81,0xd0,0x85,0xd1,0x85,0xd2,0x81,0xd3 ,0x85,0xd4,0x81,0xd5,0x81,0xd6,0x85,0xd7 ,0x8d,0xd8,0x89,0xd9,0xb1,0xe0,0xb5,0xe1 ,0xb5,0xe2,0xb1,0xe3,0xb5,0xe4,0xb1,0xe5 ,0xa1,0xe0,0xa5,0xe1,0xa5,0xe2,0xa1,0xe3 ,0xa5,0xe4,0xa1,0xe5,0xa1,0xe6,0xa5,0xe7 ,0xad,0xe8,0xa9,0xe9,0xb5,0xf0,0xb1,0xf1 ,0xb1,0xf2,0xb5,0xf3,0xb1,0xf4,0xb5,0xf5 ,0xa5,0xf0,0xa1,0xf1,0xa1,0xf2,0xa5,0xf3 ,0xa1,0xf4,0xa5,0xf5,0xa5,0xf6,0xa1,0xf7 ,0xa9,0xf8,0xad,0xf9,0x55,0x00,0x11,0x01 ,0x11,0x02,0x15,0x03,0x11,0x04,0x15,0x05 ,0x45,0x00,0x01,0x01,0x01,0x02,0x05,0x03 ,0x01,0x04,0x05,0x05,0x05,0x06,0x01,0x07 ,0x09,0x08,0x0d,0x09,0x11,0x10,0x15,0x11 ,0x15,0x12,0x11,0x13,0x15,0x14,0x11,0x15 ,0x01,0x10,0x05,0x11,0x05,0x12,0x01,0x13 ,0x05,0x14,0x01,0x15,0x01,0x16,0x05,0x17 ,0x0d,0x18,0x09,0x19,0x31,0x20,0x35,0x21 ,0x35,0x22,0x31,0x23,0x35,0x24,0x31,0x25 ,0x21,0x20,0x25,0x21,0x25,0x22,0x21,0x23 ,0x25,0x24,0x21,0x25,0x21,0x26,0x25,0x27 ,0x2d,0x28,0x29,0x29,0x35,0x30,0x31,0x31 ,0x31,0x32,0x35,0x33,0x31,0x34,0x35,0x35 ,0x25,0x30,0x21,0x31,0x21,0x32,0x25,0x33 ,0x21,0x34,0x25,0x35,0x25,0x36,0x21,0x37 ,0x29,0x38,0x2d,0x39,0x11,0x40,0x15,0x41 ,0x15,0x42,0x11,0x43,0x15,0x44,0x11,0x45 ,0x01,0x40,0x05,0x41,0x05,0x42,0x01,0x43 ,0x05,0x44,0x01,0x45,0x01,0x46,0x05,0x47 ,0x0d,0x48,0x09,0x49,0x15,0x50,0x11,0x51 ,0x11,0x52,0x15,0x53,0x11,0x54,0x15,0x55 ,0x05,0x50,0x01,0x51,0x01,0x52,0x05,0x53 ,0x01,0x54,0x05,0x55,0x05,0x56,0x01,0x57 ,0x09,0x58,0x0d,0x59,0x35,0x60,0x31,0x61 ,0x31,0x62,0x35,0x63,0x31,0x64,0x35,0x65 ,0x46,0x00,0x02,0x01,0x02,0x02,0x06,0x03 ,0x02,0x04,0x06,0x05,0x06,0x06,0x02,0x07 ,0x0a,0x08,0x0e,0x09,0x02,0x04,0x06,0x05 ,0x06,0x06,0x02,0x07,0x0a,0x08,0x0e,0x09 ,0x02,0x10,0x06,0x11,0x06,0x12,0x02,0x13 ,0x06,0x14,0x02,0x15,0x02,0x16,0x06,0x17 ,0x0e,0x18,0x0a,0x19,0x06,0x14,0x02,0x15 ,0x02,0x16,0x06,0x17,0x0e,0x18,0x0a,0x19 ,0x22,0x20,0x26,0x21,0x26,0x22,0x22,0x23 ,0x26,0x24,0x22,0x25,0x22,0x26,0x26,0x27 ,0x2e,0x28,0x2a,0x29,0x26,0x24,0x22,0x25 ,0x22,0x26,0x26,0x27,0x2e,0x28,0x2a,0x29 ,0x26,0x30,0x22,0x31,0x22,0x32,0x26,0x33 ,0x22,0x34,0x26,0x35,0x26,0x36,0x22,0x37 ,0x2a,0x38,0x2e,0x39,0x22,0x34,0x26,0x35 ,0x26,0x36,0x22,0x37,0x2a,0x38,0x2e,0x39 ,0x02,0x40,0x06,0x41,0x06,0x42,0x02,0x43 ,0x06,0x44,0x02,0x45,0x02,0x46,0x06,0x47 ,0x0e,0x48,0x0a,0x49,0x06,0x44,0x02,0x45 ,0x02,0x46,0x06,0x47,0x0e,0x48,0x0a,0x49 ,0x06,0x50,0x02,0x51,0x02,0x52,0x06,0x53 ,0x02,0x54,0x06,0x55,0x06,0x56,0x02,0x57 ,0x0a,0x58,0x0e,0x59,0x02,0x54,0x06,0x55 ,0x06,0x56,0x02,0x57,0x0a,0x58,0x0e,0x59 ,0x26,0x60,0x22,0x61,0x22,0x62,0x26,0x63 ,0x22,0x64,0x26,0x65,0x26,0x66,0x22,0x67 ,0x2a,0x68,0x2e,0x69,0x22,0x64,0x26,0x65 ,0x26,0x66,0x22,0x67,0x2a,0x68,0x2e,0x69 ,0x22,0x70,0x26,0x71,0x26,0x72,0x22,0x73 ,0x26,0x74,0x22,0x75,0x22,0x76,0x26,0x77 ,0x2e,0x78,0x2a,0x79,0x26,0x74,0x22,0x75 ,0x22,0x76,0x26,0x77,0x2e,0x78,0x2a,0x79 ,0x82,0x80,0x86,0x81,0x86,0x82,0x82,0x83 ,0x86,0x84,0x82,0x85,0x82,0x86,0x86,0x87 ,0x8e,0x88,0x8a,0x89,0x86,0x84,0x82,0x85 ,0x82,0x86,0x86,0x87,0x8e,0x88,0x8a,0x89 ,0x86,0x90,0x82,0x91,0x82,0x92,0x86,0x93 ,0x82,0x94,0x86,0x95,0x86,0x96,0x82,0x97 ,0x8a,0x98,0x8e,0x99,0x23,0x34,0x27,0x35 ,0x27,0x36,0x23,0x37,0x2b,0x38,0x2f,0x39 ,0x03,0x40,0x07,0x41,0x07,0x42,0x03,0x43 ,0x07,0x44,0x03,0x45,0x03,0x46,0x07,0x47 ,0x0f,0x48,0x0b,0x49,0x07,0x44,0x03,0x45 ,0x03,0x46,0x07,0x47,0x0f,0x48,0x0b,0x49 ,0x07,0x50,0x03,0x51,0x03,0x52,0x07,0x53 ,0x03,0x54,0x07,0x55,0x07,0x56,0x03,0x57 ,0x0b,0x58,0x0f,0x59,0x03,0x54,0x07,0x55 ,0x07,0x56,0x03,0x57,0x0b,0x58,0x0f,0x59 ,0x27,0x60,0x23,0x61,0x23,0x62,0x27,0x63 ,0x23,0x64,0x27,0x65,0x27,0x66,0x23,0x67 ,0x2b,0x68,0x2f,0x69,0x23,0x64,0x27,0x65 ,0x27,0x66,0x23,0x67,0x2b,0x68,0x2f,0x69 ,0x23,0x70,0x27,0x71,0x27,0x72,0x23,0x73 ,0x27,0x74,0x23,0x75,0x23,0x76,0x27,0x77 ,0x2f,0x78,0x2b,0x79,0x27,0x74,0x23,0x75 ,0x23,0x76,0x27,0x77,0x2f,0x78,0x2b,0x79 ,0x83,0x80,0x87,0x81,0x87,0x82,0x83,0x83 ,0x87,0x84,0x83,0x85,0x83,0x86,0x87,0x87 ,0x8f,0x88,0x8b,0x89,0x87,0x84,0x83,0x85 ,0x83,0x86,0x87,0x87,0x8f,0x88,0x8b,0x89 ,0x87,0x90,0x83,0x91,0x83,0x92,0x87,0x93 ,0x83,0x94,0x87,0x95,0x87,0x96,0x83,0x97 ,0x8b,0x98,0x8f,0x99,0x83,0x94,0x87,0x95 ,0x87,0x96,0x83,0x97,0x8b,0x98,0x8f,0x99 ,0xa7,0xa0,0xa3,0xa1,0xa3,0xa2,0xa7,0xa3 ,0xa3,0xa4,0xa7,0xa5,0xa7,0xa6,0xa3,0xa7 ,0xab,0xa8,0xaf,0xa9,0xa3,0xa4,0xa7,0xa5 ,0xa7,0xa6,0xa3,0xa7,0xab,0xa8,0xaf,0xa9 ,0xa3,0xb0,0xa7,0xb1,0xa7,0xb2,0xa3,0xb3 ,0xa7,0xb4,0xa3,0xb5,0xa3,0xb6,0xa7,0xb7 ,0xaf,0xb8,0xab,0xb9,0xa7,0xb4,0xa3,0xb5 ,0xa3,0xb6,0xa7,0xb7,0xaf,0xb8,0xab,0xb9 ,0x87,0xc0,0x83,0xc1,0x83,0xc2,0x87,0xc3 ,0x83,0xc4,0x87,0xc5,0x87,0xc6,0x83,0xc7 ,0x8b,0xc8,0x8f,0xc9,0x83,0xc4,0x87,0xc5 ,0x87,0xc6,0x83,0xc7,0x8b,0xc8,0x8f,0xc9 ,0x83,0xd0,0x87,0xd1,0x87,0xd2,0x83,0xd3 ,0x87,0xd4,0x83,0xd5,0x83,0xd6,0x87,0xd7 ,0x8f,0xd8,0x8b,0xd9,0x87,0xd4,0x83,0xd5 ,0x83,0xd6,0x87,0xd7,0x8f,0xd8,0x8b,0xd9 ,0xa3,0xe0,0xa7,0xe1,0xa7,0xe2,0xa3,0xe3 ,0xa7,0xe4,0xa3,0xe5,0xa3,0xe6,0xa7,0xe7 ,0xaf,0xe8,0xab,0xe9,0xa7,0xe4,0xa3,0xe5 ,0xa3,0xe6,0xa7,0xe7,0xaf,0xe8,0xab,0xe9 ,0xa7,0xf0,0xa3,0xf1,0xa3,0xf2,0xa7,0xf3 ,0xa3,0xf4,0xa7,0xf5,0xa7,0xf6,0xa3,0xf7 ,0xab,0xf8,0xaf,0xf9,0xa3,0xf4,0xa7,0xf5 ,0xa7,0xf6,0xa3,0xf7,0xab,0xf8,0xaf,0xf9 ,0x47,0x00,0x03,0x01,0x03,0x02,0x07,0x03 ,0x03,0x04,0x07,0x05,0x07,0x06,0x03,0x07 ,0x0b,0x08,0x0f,0x09,0x03,0x04,0x07,0x05 ,0x07,0x06,0x03,0x07,0x0b,0x08,0x0f,0x09 ,0x03,0x10,0x07,0x11,0x07,0x12,0x03,0x13 ,0x07,0x14,0x03,0x15,0x03,0x16,0x07,0x17 ,0x0f,0x18,0x0b,0x19,0x07,0x14,0x03,0x15 ,0x03,0x16,0x07,0x17,0x0f,0x18,0x0b,0x19 ,0x23,0x20,0x27,0x21,0x27,0x22,0x23,0x23 ,0x27,0x24,0x23,0x25,0x23,0x26,0x27,0x27 ,0x2f,0x28,0x2b,0x29,0x27,0x24,0x23,0x25 ,0x23,0x26,0x27,0x27,0x2f,0x28,0x2b,0x29 ,0x27,0x30,0x23,0x31,0x23,0x32,0x27,0x33 ,0x23,0x34,0x27,0x35,0x27,0x36,0x23,0x37 ,0x2b,0x38,0x2f,0x39,0x23,0x34,0x27,0x35 ,0x27,0x36,0x23,0x37,0x2b,0x38,0x2f,0x39 ,0x03,0x40,0x07,0x41,0x07,0x42,0x03,0x43 ,0x07,0x44,0x03,0x45,0x03,0x46,0x07,0x47 ,0x0f,0x48,0x0b,0x49,0x07,0x44,0x03,0x45 ,0x03,0x46,0x07,0x47,0x0f,0x48,0x0b,0x49 ,0x07,0x50,0x03,0x51,0x03,0x52,0x07,0x53 ,0x03,0x54,0x07,0x55,0x07,0x56,0x03,0x57 ,0x0b,0x58,0x0f,0x59,0x03,0x54,0x07,0x55 ,0x07,0x56,0x03,0x57,0x0b,0x58,0x0f,0x59 ,0x27,0x60,0x23,0x61,0x23,0x62,0x27,0x63 ,0x23,0x64,0x27,0x65,0x27,0x66,0x23,0x67 ,0x2b,0x68,0x2f,0x69,0x23,0x64,0x27,0x65 ,0x27,0x66,0x23,0x67,0x2b,0x68,0x2f,0x69 ,0x23,0x70,0x27,0x71,0x27,0x72,0x23,0x73 ,0x27,0x74,0x23,0x75,0x23,0x76,0x27,0x77 ,0x2f,0x78,0x2b,0x79,0x27,0x74,0x23,0x75 ,0x23,0x76,0x27,0x77,0x2f,0x78,0x2b,0x79 ,0x83,0x80,0x87,0x81,0x87,0x82,0x83,0x83 ,0x87,0x84,0x83,0x85,0x83,0x86,0x87,0x87 ,0x8f,0x88,0x8b,0x89,0x87,0x84,0x83,0x85 ,0x83,0x86,0x87,0x87,0x8f,0x88,0x8b,0x89 ,0x87,0x90,0x83,0x91,0x83,0x92,0x87,0x93 ,0x83,0x94,0x87,0x95,0x87,0x96,0x83,0x97 ,0x8b,0x98,0x8f,0x99,0x83,0x94,0x87,0x95 ,0x87,0x96,0x83,0x97,0x8b,0x98,0x8f,0x99 ,0x04,0x06,0x00,0x07,0x08,0x08,0x0c,0x09 ,0x0c,0x0a,0x08,0x0b,0x0c,0x0c,0x08,0x0d ,0x08,0x0e,0x0c,0x0f,0x10,0x10,0x14,0x11 ,0x14,0x12,0x10,0x13,0x14,0x14,0x10,0x15 ,0x00,0x16,0x04,0x17,0x0c,0x18,0x08,0x19 ,0x08,0x1a,0x0c,0x1b,0x08,0x1c,0x0c,0x1d ,0x0c,0x1e,0x08,0x1f,0x30,0x20,0x34,0x21 ,0x34,0x22,0x30,0x23,0x34,0x24,0x30,0x25 ,0x20,0x26,0x24,0x27,0x2c,0x28,0x28,0x29 ,0x28,0x2a,0x2c,0x2b,0x28,0x2c,0x2c,0x2d ,0x2c,0x2e,0x28,0x2f,0x34,0x30,0x30,0x31 ,0x30,0x32,0x34,0x33,0x30,0x34,0x34,0x35 ,0x24,0x36,0x20,0x37,0x28,0x38,0x2c,0x39 ,0x2c,0x3a,0x28,0x3b,0x2c,0x3c,0x28,0x3d ,0x28,0x3e,0x2c,0x3f,0x10,0x40,0x14,0x41 ,0x14,0x42,0x10,0x43,0x14,0x44,0x10,0x45 ,0x00,0x46,0x04,0x47,0x0c,0x48,0x08,0x49 ,0x08,0x4a,0x0c,0x4b,0x08,0x4c,0x0c,0x4d ,0x0c,0x4e,0x08,0x4f,0x14,0x50,0x10,0x51 ,0x10,0x52,0x14,0x53,0x10,0x54,0x14,0x55 ,0x04,0x56,0x00,0x57,0x08,0x58,0x0c,0x59 ,0x0c,0x5a,0x08,0x5b,0x0c,0x5c,0x08,0x5d ,0x08,0x5e,0x0c,0x5f,0x34,0x60,0x30,0x61 ,0x30,0x62,0x34,0x63,0x30,0x64,0x34,0x65 ,0x24,0x66,0x20,0x67,0x28,0x68,0x2c,0x69 ,0x2c,0x6a,0x28,0x6b,0x2c,0x6c,0x28,0x6d ,0x28,0x6e,0x2c,0x6f,0x30,0x70,0x34,0x71 ,0x34,0x72,0x30,0x73,0x34,0x74,0x30,0x75 ,0x20,0x76,0x24,0x77,0x2c,0x78,0x28,0x79 ,0x28,0x7a,0x2c,0x7b,0x28,0x7c,0x2c,0x7d ,0x2c,0x7e,0x28,0x7f,0x90,0x80,0x94,0x81 ,0x94,0x82,0x90,0x83,0x94,0x84,0x90,0x85 ,0x80,0x86,0x84,0x87,0x8c,0x88,0x88,0x89 ,0x88,0x8a,0x8c,0x8b,0x88,0x8c,0x8c,0x8d ,0x8c,0x8e,0x88,0x8f,0x94,0x90,0x90,0x91 ,0x90,0x92,0x94,0x93,0x90,0x94,0x94,0x95 ,0x84,0x96,0x80,0x97,0x88,0x98,0x8c,0x99 ,0x8c,0x9a,0x88,0x9b,0x8c,0x9c,0x88,0x9d ,0x88,0x9e,0x8c,0x9f,0x55,0x00,0x11,0x01 ,0x11,0x02,0x15,0x03,0x11,0x04,0x15,0x05 ,0x05,0x06,0x01,0x07,0x09,0x08,0x0d,0x09 ,0x0d,0x0a,0x09,0x0b,0x0d,0x0c,0x09,0x0d ,0x09,0x0e,0x0d,0x0f,0x11,0x10,0x15,0x11 ,0x15,0x12,0x11,0x13,0x15,0x14,0x11,0x15 ,0x01,0x16,0x05,0x17,0x0d,0x18,0x09,0x19 ,0x09,0x1a,0x0d,0x1b,0x09,0x1c,0x0d,0x1d ,0x0d,0x1e,0x09,0x1f,0x31,0x20,0x35,0x21 ,0x35,0x22,0x31,0x23,0x35,0x24,0x31,0x25 ,0x21,0x26,0x25,0x27,0x2d,0x28,0x29,0x29 ,0x29,0x2a,0x2d,0x2b,0x29,0x2c,0x2d,0x2d ,0x2d,0x2e,0x29,0x2f,0x35,0x30,0x31,0x31 ,0x31,0x32,0x35,0x33,0x31,0x34,0x35,0x35 ,0x25,0x36,0x21,0x37,0x29,0x38,0x2d,0x39 ,0x2d,0x3a,0x29,0x3b,0x2d,0x3c,0x29,0x3d ,0x29,0x3e,0x2d,0x3f,0x11,0x40,0x15,0x41 ,0x15,0x42,0x11,0x43,0x15,0x44,0x11,0x45 ,0x01,0x46,0x05,0x47,0x0d,0x48,0x09,0x49 ,0x09,0x4a,0x0d,0x4b,0x09,0x4c,0x0d,0x4d ,0x0d,0x4e,0x09,0x4f,0x15,0x50,0x11,0x51 ,0x11,0x52,0x15,0x53,0x11,0x54,0x15,0x55 ,0x05,0x56,0x01,0x57,0x09,0x58,0x0d,0x59 ,0x0d,0x5a,0x09,0x5b,0x0d,0x5c,0x09,0x5d ,0x09,0x5e,0x0d,0x5f,0x35,0x60,0x31,0x61 ,0x31,0x62,0x35,0x63,0x31,0x64,0x35,0x65 ,0x25,0x66,0x21,0x67,0x29,0x68,0x2d,0x69 ,0x2d,0x6a,0x29,0x6b,0x2d,0x6c,0x29,0x6d ,0x29,0x6e,0x2d,0x6f,0x31,0x70,0x35,0x71 ,0x35,0x72,0x31,0x73,0x35,0x74,0x31,0x75 ,0x21,0x76,0x25,0x77,0x2d,0x78,0x29,0x79 ,0x29,0x7a,0x2d,0x7b,0x29,0x7c,0x2d,0x7d ,0x2d,0x7e,0x29,0x7f,0x91,0x80,0x95,0x81 ,0x95,0x82,0x91,0x83,0x95,0x84,0x91,0x85 ,0x81,0x86,0x85,0x87,0x8d,0x88,0x89,0x89 ,0x89,0x8a,0x8d,0x8b,0x89,0x8c,0x8d,0x8d ,0x8d,0x8e,0x89,0x8f,0x95,0x90,0x91,0x91 ,0x91,0x92,0x95,0x93,0x91,0x94,0x95,0x95 ,0x85,0x96,0x81,0x97,0x89,0x98,0x8d,0x99 ,0x8d,0x9a,0x89,0x9b,0x8d,0x9c,0x89,0x9d ,0x89,0x9e,0x8d,0x9f,0xb5,0xa0,0xb1,0xa1 ,0xb1,0xa2,0xb5,0xa3,0xb1,0xa4,0xb5,0xa5 ,0xa5,0xa6,0xa1,0xa7,0xa9,0xa8,0xad,0xa9 ,0xad,0xaa,0xa9,0xab,0xad,0xac,0xa9,0xad ,0xa9,0xae,0xad,0xaf,0xb1,0xb0,0xb5,0xb1 ,0xb5,0xb2,0xb1,0xb3,0xb5,0xb4,0xb1,0xb5 ,0xa1,0xb6,0xa5,0xb7,0xad,0xb8,0xa9,0xb9 ,0xa9,0xba,0xad,0xbb,0xa9,0xbc,0xad,0xbd ,0xad,0xbe,0xa9,0xbf,0x95,0xc0,0x91,0xc1 ,0x91,0xc2,0x95,0xc3,0x91,0xc4,0x95,0xc5 ,0x85,0xc6,0x81,0xc7,0x89,0xc8,0x8d,0xc9 ,0x8d,0xca,0x89,0xcb,0x8d,0xcc,0x89,0xcd ,0x89,0xce,0x8d,0xcf,0x91,0xd0,0x95,0xd1 ,0x95,0xd2,0x91,0xd3,0x95,0xd4,0x91,0xd5 ,0x81,0xd6,0x85,0xd7,0x8d,0xd8,0x89,0xd9 ,0x89,0xda,0x8d,0xdb,0x89,0xdc,0x8d,0xdd ,0x8d,0xde,0x89,0xdf,0xb1,0xe0,0xb5,0xe1 ,0xb5,0xe2,0xb1,0xe3,0xb5,0xe4,0xb1,0xe5 ,0xa1,0xe6,0xa5,0xe7,0xad,0xe8,0xa9,0xe9 ,0xa9,0xea,0xad,0xeb,0xa9,0xec,0xad,0xed ,0xad,0xee,0xa9,0xef,0xb5,0xf0,0xb1,0xf1 ,0xb1,0xf2,0xb5,0xf3,0xb1,0xf4,0xb5,0xf5 ,0xa5,0xf6,0xa1,0xf7,0xa9,0xf8,0xad,0xf9 ,0xad,0xfa,0xa9,0xfb,0xad,0xfc,0xa9,0xfd ,0xa9,0xfe,0xad,0xff,0x55,0x00,0x11,0x01 ,0x11,0x02,0x15,0x03,0x11,0x04,0x15,0x05 ,0x05,0x06,0x01,0x07,0x09,0x08,0x0d,0x09 ,0x0d,0x0a,0x09,0x0b,0x0d,0x0c,0x09,0x0d ,0x09,0x0e,0x0d,0x0f,0x11,0x10,0x15,0x11 ,0x15,0x12,0x11,0x13,0x15,0x14,0x11,0x15 ,0x01,0x16,0x05,0x17,0x0d,0x18,0x09,0x19 ,0x09,0x1a,0x0d,0x1b,0x09,0x1c,0x0d,0x1d ,0x0d,0x1e,0x09,0x1f,0x31,0x20,0x35,0x21 ,0x35,0x22,0x31,0x23,0x35,0x24,0x31,0x25 ,0x21,0x26,0x25,0x27,0x2d,0x28,0x29,0x29 ,0x29,0x2a,0x2d,0x2b,0x29,0x2c,0x2d,0x2d ,0x2d,0x2e,0x29,0x2f,0x35,0x30,0x31,0x31 ,0x31,0x32,0x35,0x33,0x31,0x34,0x35,0x35 ,0x25,0x36,0x21,0x37,0x29,0x38,0x2d,0x39 ,0x2d,0x3a,0x29,0x3b,0x2d,0x3c,0x29,0x3d ,0x29,0x3e,0x2d,0x3f,0x11,0x40,0x15,0x41 ,0x15,0x42,0x11,0x43,0x15,0x44,0x11,0x45 ,0x01,0x46,0x05,0x47,0x0d,0x48,0x09,0x49 ,0x09,0x4a,0x0d,0x4b,0x09,0x4c,0x0d,0x4d ,0x0d,0x4e,0x09,0x4f,0x15,0x50,0x11,0x51 ,0x11,0x52,0x15,0x53,0x11,0x54,0x15,0x55 ,0x05,0x56,0x01,0x57,0x09,0x58,0x0d,0x59 ,0x0d,0x5a,0x09,0x5b,0x0d,0x5c,0x09,0x5d ,0x09,0x5e,0x0d,0x5f,0x35,0x60,0x31,0x61 ,0x31,0x62,0x35,0x63,0x31,0x64,0x35,0x65 ,0xbe,0xfa,0xba,0xfb,0xbe,0xfc,0xba,0xfd ,0xba,0xfe,0xbe,0xff,0x46,0x00,0x02,0x01 ,0x02,0x02,0x06,0x03,0x02,0x04,0x06,0x05 ,0x06,0x06,0x02,0x07,0x0a,0x08,0x0e,0x09 ,0x1e,0x0a,0x1a,0x0b,0x1e,0x0c,0x1a,0x0d ,0x1a,0x0e,0x1e,0x0f,0x02,0x10,0x06,0x11 ,0x06,0x12,0x02,0x13,0x06,0x14,0x02,0x15 ,0x02,0x16,0x06,0x17,0x0e,0x18,0x0a,0x19 ,0x1a,0x1a,0x1e,0x1b,0x1a,0x1c,0x1e,0x1d ,0x1e,0x1e,0x1a,0x1f,0x22,0x20,0x26,0x21 ,0x26,0x22,0x22,0x23,0x26,0x24,0x22,0x25 ,0x22,0x26,0x26,0x27,0x2e,0x28,0x2a,0x29 ,0x3a,0x2a,0x3e,0x2b,0x3a,0x2c,0x3e,0x2d ,0x3e,0x2e,0x3a,0x2f,0x26,0x30,0x22,0x31 ,0x22,0x32,0x26,0x33,0x22,0x34,0x26,0x35 ,0x26,0x36,0x22,0x37,0x2a,0x38,0x2e,0x39 ,0x3e,0x3a,0x3a,0x3b,0x3e,0x3c,0x3a,0x3d ,0x3a,0x3e,0x3e,0x3f,0x02,0x40,0x06,0x41 ,0x06,0x42,0x02,0x43,0x06,0x44,0x02,0x45 ,0x02,0x46,0x06,0x47,0x0e,0x48,0x0a,0x49 ,0x1a,0x4a,0x1e,0x4b,0x1a,0x4c,0x1e,0x4d ,0x1e,0x4e,0x1a,0x4f,0x06,0x50,0x02,0x51 ,0x02,0x52,0x06,0x53,0x02,0x54,0x06,0x55 ,0x06,0x56,0x02,0x57,0x0a,0x58,0x0e,0x59 ,0x1e,0x5a,0x1a,0x5b,0x1e,0x5c,0x1a,0x5d ,0x1a,0x5e,0x1e,0x5f,0x26,0x60,0x22,0x61 ,0x22,0x62,0x26,0x63,0x22,0x64,0x26,0x65 ,0x26,0x66,0x22,0x67,0x2a,0x68,0x2e,0x69 ,0x3e,0x6a,0x3a,0x6b,0x3e,0x6c,0x3a,0x6d ,0x3a,0x6e,0x3e,0x6f,0x22,0x70,0x26,0x71 ,0x26,0x72,0x22,0x73,0x26,0x74,0x22,0x75 ,0x22,0x76,0x26,0x77,0x2e,0x78,0x2a,0x79 ,0x3a,0x7a,0x3e,0x7b,0x3a,0x7c,0x3e,0x7d ,0x3e,0x7e,0x3a,0x7f,0x82,0x80,0x86,0x81 ,0x86,0x82,0x82,0x83,0x86,0x84,0x82,0x85 ,0x82,0x86,0x86,0x87,0x8e,0x88,0x8a,0x89 ,0x9a,0x8a,0x9e,0x8b,0x9a,0x8c,0x9e,0x8d ,0x9e,0x8e,0x9a,0x8f,0x86,0x90,0x82,0x91 ,0x82,0x92,0x86,0x93,0x23,0x34,0x27,0x35 ,0x27,0x36,0x23,0x37,0x2b,0x38,0x2f,0x39 ,0x3f,0x3a,0x3b,0x3b,0x3f,0x3c,0x3b,0x3d ,0x3b,0x3e,0x3f,0x3f,0x03,0x40,0x07,0x41 ,0x07,0x42,0x03,0x43,0x07,0x44,0x03,0x45 ,0x03,0x46,0x07,0x47,0x0f,0x48,0x0b,0x49 ,0x1b,0x4a,0x1f,0x4b,0x1b,0x4c,0x1f,0x4d ,0x1f,0x4e,0x1b,0x4f,0x07,0x50,0x03,0x51 ,0x03,0x52,0x07,0x53,0x03,0x54,0x07,0x55 ,0x07,0x56,0x03,0x57,0x0b,0x58,0x0f,0x59 ,0x1f,0x5a,0x1b,0x5b,0x1f,0x5c,0x1b,0x5d ,0x1b,0x5e,0x1f,0x5f,0x27,0x60,0x23,0x61 ,0x23,0x62,0x27,0x63,0x23,0x64,0x27,0x65 ,0x27,0x66,0x23,0x67,0x2b,0x68,0x2f,0x69 ,0x3f,0x6a,0x3b,0x6b,0x3f,0x6c,0x3b,0x6d ,0x3b,0x6e,0x3f,0x6f,0x23,0x70,0x27,0x71 ,0x27,0x72,0x23,0x73,0x27,0x74,0x23,0x75 ,0x23,0x76,0x27,0x77,0x2f,0x78,0x2b,0x79 ,0x3b,0x7a,0x3f,0x7b,0x3b,0x7c,0x3f,0x7d ,0x3f,0x7e,0x3b,0x7f,0x83,0x80,0x87,0x81 ,0x87,0x82,0x83,0x83,0x87,0x84,0x83,0x85 ,0x83,0x86,0x87,0x87,0x8f,0x88,0x8b,0x89 ,0x9b,0x8a,0x9f,0x8b,0x9b,0x8c,0x9f,0x8d ,0x9f,0x8e,0x9b,0x8f,0x87,0x90,0x83,0x91 ,0x83,0x92,0x87,0x93,0x83,0x94,0x87,0x95 ,0x87,0x96,0x83,0x97,0x8b,0x98,0x8f,0x99 ,0x9f,0x9a,0x9b,0x9b,0x9f,0x9c,0x9b,0x9d ,0x9b,0x9e,0x9f,0x9f,0xa7,0xa0,0xa3,0xa1 ,0xa3,0xa2,0xa7,0xa3,0xa3,0xa4,0xa7,0xa5 ,0xa7,0xa6,0xa3,0xa7,0xab,0xa8,0xaf,0xa9 ,0xbf,0xaa,0xbb,0xab,0xbf,0xac,0xbb,0xad ,0xbb,0xae,0xbf,0xaf,0xa3,0xb0,0xa7,0xb1 ,0xa7,0xb2,0xa3,0xb3,0xa7,0xb4,0xa3,0xb5 ,0xa3,0xb6,0xa7,0xb7,0xaf,0xb8,0xab,0xb9 ,0xbb,0xba,0xbf,0xbb,0xbb,0xbc,0xbf,0xbd ,0xbf,0xbe,0xbb,0xbf,0x87,0xc0,0x83,0xc1 ,0x83,0xc2,0x87,0xc3,0x83,0xc4,0x87,0xc5 ,0x87,0xc6,0x83,0xc7,0x8b,0xc8,0x8f,0xc9 ,0x9f,0xca,0x9b,0xcb,0x9f,0xcc,0x9b,0xcd ,0x9b,0xce,0x9f,0xcf,0x83,0xd0,0x87,0xd1 ,0x87,0xd2,0x83,0xd3,0x87,0xd4,0x83,0xd5 ,0x83,0xd6,0x87,0xd7,0x8f,0xd8,0x8b,0xd9 ,0x9b,0xda,0x9f,0xdb,0x9b,0xdc,0x9f,0xdd ,0x9f,0xde,0x9b,0xdf,0xa3,0xe0,0xa7,0xe1 ,0xa7,0xe2,0xa3,0xe3,0xa7,0xe4,0xa3,0xe5 ,0xa3,0xe6,0xa7,0xe7,0xaf,0xe8,0xab,0xe9 ,0xbb,0xea,0xbf,0xeb,0xbb,0xec,0xbf,0xed ,0xbf,0xee,0xbb,0xef,0xa7,0xf0,0xa3,0xf1 ,0xa3,0xf2,0xa7,0xf3,0xa3,0xf4,0xa7,0xf5 ,0xa7,0xf6,0xa3,0xf7,0xab,0xf8,0xaf,0xf9 ,0xbf,0xfa,0xbb,0xfb,0xbf,0xfc,0xbb,0xfd ,0xbb,0xfe,0xbf,0xff,0x47,0x00,0x03,0x01 ,0x03,0x02,0x07,0x03,0x03,0x04,0x07,0x05 ,0x07,0x06,0x03,0x07,0x0b,0x08,0x0f,0x09 ,0x1f,0x0a,0x1b,0x0b,0x1f,0x0c,0x1b,0x0d ,0x1b,0x0e,0x1f,0x0f,0x03,0x10,0x07,0x11 ,0x07,0x12,0x03,0x13,0x07,0x14,0x03,0x15 ,0x03,0x16,0x07,0x17,0x0f,0x18,0x0b,0x19 ,0x1b,0x1a,0x1f,0x1b,0x1b,0x1c,0x1f,0x1d ,0x1f,0x1e,0x1b,0x1f,0x23,0x20,0x27,0x21 ,0x27,0x22,0x23,0x23,0x27,0x24,0x23,0x25 ,0x23,0x26,0x27,0x27,0x2f,0x28,0x2b,0x29 ,0x3b,0x2a,0x3f,0x2b,0x3b,0x2c,0x3f,0x2d ,0x3f,0x2e,0x3b,0x2f,0x27,0x30,0x23,0x31 ,0x23,0x32,0x27,0x33,0x23,0x34,0x27,0x35 ,0x27,0x36,0x23,0x37,0x2b,0x38,0x2f,0x39 ,0x3f,0x3a,0x3b,0x3b,0x3f,0x3c,0x3b,0x3d ,0x3b,0x3e,0x3f,0x3f,0x03,0x40,0x07,0x41 ,0x07,0x42,0x03,0x43,0x07,0x44,0x03,0x45 ,0x03,0x46,0x07,0x47,0x0f,0x48,0x0b,0x49 ,0x1b,0x4a,0x1f,0x4b,0x1b,0x4c,0x1f,0x4d ,0x1f,0x4e,0x1b,0x4f,0x07,0x50,0x03,0x51 ,0x03,0x52,0x07,0x53,0x03,0x54,0x07,0x55 ,0x07,0x56,0x03,0x57,0x0b,0x58,0x0f,0x59 ,0x1f,0x5a,0x1b,0x5b,0x1f,0x5c,0x1b,0x5d ,0x1b,0x5e,0x1f,0x5f,0x27,0x60,0x23,0x61 ,0x23,0x62,0x27,0x63,0x23,0x64,0x27,0x65 ,0x27,0x66,0x23,0x67,0x2b,0x68,0x2f,0x69 ,0x3f,0x6a,0x3b,0x6b,0x3f,0x6c,0x3b,0x6d ,0x3b,0x6e,0x3f,0x6f,0x23,0x70,0x27,0x71 ,0x27,0x72,0x23,0x73,0x27,0x74,0x23,0x75 ,0x23,0x76,0x27,0x77,0x2f,0x78,0x2b,0x79 ,0x3b,0x7a,0x3f,0x7b,0x3b,0x7c,0x3f,0x7d ,0x3f,0x7e,0x3b,0x7f,0x83,0x80,0x87,0x81 ,0x87,0x82,0x83,0x83,0x87,0x84,0x83,0x85 ,0x83,0x86,0x87,0x87,0x8f,0x88,0x8b,0x89 ,0x9b,0x8a,0x9f,0x8b,0x9b,0x8c,0x9f,0x8d ,0x9f,0x8e,0x9b,0x8f,0x87,0x90,0x83,0x91 ,0x83,0x92,0x87,0x93,0x83,0x94,0x87,0x95 ,0x87,0x96,0x83,0x97,0x8b,0x98,0x8f,0x99 }; ./z80ex-1.1.21/TODO0000644000175000017500000000102011252377054011516 0ustar booboo- [rst] option to build the library with t-state callback permanently disabled, but with full timings (contrary to Z80EX_OPSTEP_FAST_AND_ROUGH) in this mode two macroses must be stripped down to: #define T_WAIT_UNTIL(t_state) \ { \ if (t_state > cpu->op_tstate) { \ cpu->tstate += t_state - cpu->op_tstate; \ cpu->op_tstate = t_state; \ } \ } #define TSTATES(amount) \ { \ cpu->tstate += amount; \ } Z80EX_OPSTEP_FAST_AND_ROUGH must enable this mode automatically ? BUSACK/BUSREQ emulation ./z80ex-1.1.21/examples/0000755000175000017500000000000012175330304012643 5ustar booboo./z80ex-1.1.21/examples/dasm.c0000644000175000017500000000216111213323315013727 0ustar booboo#include #include #include Z80EX_BYTE *data=NULL; int data_len=0; void usage(char *name) { printf("simple z80 code disassembler\nusage: %s binary_file [base_adress]\n",name); } Z80EX_BYTE readbyte_cb(Z80EX_WORD addr, void *user_data) { int base_addr = *((int *)user_data); return(data[addr-base_addr]); } int main(int argc,char *argv[]) { FILE *fp; int base_addr=0,addr=0; int t,t2; char buf[80]; if(argc < 2 || argc > 3) { usage(argv[0]); return(0); } fp=fopen(argv[1],"rb"); if(fp==NULL) goto fail; fseek(fp,0,SEEK_END); data_len=ftell(fp); fseek(fp,0,SEEK_SET); if(NULL==(data=(Z80EX_BYTE *)malloc(data_len))) goto fail; if(fread(data,1,data_len,fp)!=data_len) goto fail; fclose(fp); if(argc == 3) base_addr=atoi(argv[2]); addr=base_addr; while((addr-base_addr) < data_len) { printf("%04X: ",addr); addr+=z80ex_dasm(buf,80,0,&t,&t2,readbyte_cb,addr,&base_addr); printf("%-15s t=%d",buf,t); if(t2) printf("/%d",t2); printf("\n"); } free(data); return(0); fail: fprintf(stderr,"ERROR\n"); if(data!=NULL) free(data); return(1); } ./z80ex-1.1.21/examples/version.c0000644000175000017500000000063111212063320014464 0ustar booboo#include #include int main(void) { Z80EX_VERSION *ver; printf("z80ex version info:\n-------------------\n"); ver = z80ex_get_version(); printf("API revision: %d\nmajor version number: %d\nminor version number: %d\nrelease type: %s\n", ver->API_revision, ver->major, ver->minor, ver->release_type); printf("full version number: %s\n", ver->as_string); return(0); } ./z80ex-1.1.21/Changelog0000644000175000017500000000526512175327577012671 0ustar booboo29.07.2013 - 1.1.21 - added API functions to set memory/port/int callbacks without resetting the virtual CPU - z80ex_get_version() was fixed to return the correct version string 19.01.2013 - 1.1.20rev1 - fixed library version mismatch between Makefile and CMakeLists.txt (thanks to John Paul Adrian Glaubitz) 02.01.2013 - 1.1.20 - cleanup of included build documentation - email adress change 01.09.2012 - TOOLS_PREFIX Makefile option, useful for cross-compiling [Stewart Kay] 21.01.2010 - 1.1.19 - removed IFF2=IFF1 on NMI. it's contrary to zilog z80 docs, but is true (proved by Restorer) 24.08.2010 - 1.1.19pre1 - cmake build support [mkoloberdin] - fixes for MSVC compilation [mkoloberdin] 12.09.2009 - 1.1.18 - HALT/NMI bugfix (by Kalvis) - some speed optimizations (by Mastermind) - RETI callback was implemented (by Torsten Paul) 04.06.2009 - 1.1.17 - ability to fetch z80ex version info at runtime, see z80ex_get_version() - makefile fixes and cleanups, OS X support - versioning scheme changed 28.09.2008 - 0.16.2 - made build for Symbian possible (and maybe for other environments which does not support the use of writable static data in DLL's) (thanks to ander) - build option for fast and rough opcode timings emulation, see README 31.07.2008 - 0.16.1 - added -fPIC option to compile flags (thanks to ander) 16.07.2008 - 0.16 - LD A,R / LD A,I quirk implemented (If a LD A,I or LD A,R (which copy IFF2 to the P/V flag) is interrupted, then the P/V flag is reset, even if interrupts were enabled beforehand)(thanks to Restorer) - NMI IFF2=IFF1 fix 03.04.2006 - 0.15 (major bugfix release) - nasty deadlock in IM0 mode was eliminated 29.03.2006 - 0.14 - full MEMPTR (BIT n,(HL) flags) support! it seems that all undocumented z80 features are emulated now. - undocumented flags were fixed for bit n,reg8 17.03.2006 - 0.14pre1 - massive code reorganisation - include files are now installed under include/z80ex - disassembler added 15.03.2006 - release 0.13 - more MEMPTR emulation - fixed nasty bug in DD/FD prefixes behavior 02.03.2006 - fixed IN A,(nn) (flags) 23.02.2006 - release 0.12 - fixed timings for LD IIh/IIl,nn (thanks to Restorer) 22.02.2006 - fixed timings for IIh/IIl undocumented opcodes 18.02.2006 - fixed undocumented flag effects for BIT n,(IX+d) - undocumented flag effects implemented for block I/O operations - undocumented internal register MEMPTR emulation (incomplete, more info needed) 16.02.2006 - fixed sized data types declaration for MSVC (thanks to SMT) 15.02.2006 - release 0.11 - added M1 signal state to memory read callback parameters - DAA emulation has been fixed (now uses table from SMT's UnrealSpeccy) 11.02.2006 - minor API changes 10.02.2006 - release 0.1 ./z80ex-1.1.21/INSTALL.gmake0000644000175000017500000000245012070652206013144 0ustar boobooBuilding with GNU toolset: -------------------------------------------------------- NB: Only GNU C (GCC, mingw, cygwin) is supported by the included Makefile Issue 'gmake' in the root of Z80Ex source tree. After a successful build the libraries could be found in "./lib". Alternatively you may do "gmake static" for building static libs only, or "gmake shared" for building shared libs only. You may change some build options by editing the Makefile or via gmake command line parameters (e.g. "gmake parameter=value") these are: * ENDIANNESS -- CPU endianness, one of WORDS_LITTLE_ENDIAN, WORDS_BIG_ENDIAN * OPSTEP_FAST_AND_ROUGH -- fast and rough opcode step emulation mode (0 - off, 1 - on) when this mode is on, timings of internal I/O operations are ignored, and tstate callback feature is disabled * INSTALL_PREFIX -- where to install the library * TOOLS_PREFIX -- useful for cross-compiling, e.g., when cross-compiling to mingw32 it should be set to something like "i586-mingw32msvc-" so "i586-mingw32msvc-gcc" and "i586-mingw32msvc-ar" will be used instead of regular "gcc" and "ar". Installing: -------------------------- issue "gmake install" as superuser. (default install prefix is /usr/local, which may be changed in Makefile.) then do "/sbin/ldconfig" as superuser to update DSO links and cache ./z80ex-1.1.21/lib/0000755000175000017500000000000012175327176011610 5ustar booboo./z80ex-1.1.21/README0000644000175000017500000000204512070645334011714 0ustar boobooZ80Ex ZiLOG Z80 CPU emulator ~~~~~~~~~~~~~~~~~~~~~~ Features: --------- - precise opcode emulation (documented & undocumented) - exact timings for each opcode (including I/O operations) - full support for all interrupt modes - any number of virtual CPUs may be created - portable: written in pure ANSI C - builds as a library with simple callback-based API - disassembler included Building and installing: -------------------------------------------------------- to build and install using CMake build system, refer to INSTALL.cmake to build and install using GNU Make, refer to INSTALL.gmake Usage intro: ------------ emulator: include in your sources, link with "libz80ex" (-lz80ex). for (rather subtle) API documentation see "z80ex.h". disassembler: include in your sources, link with "libz80ex_dasm" (-lz80ex_dasm). for API documentation see "z80ex_dasm.h". also you may look at "dasm.c" from the "examples" directory _____________________________ yours, Pigmaker57 aka Boo-boo pigmaker57@kahoh57.info ./z80ex-1.1.21/typedefs.h0000644000175000017500000000375612070654016013037 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #ifndef _Z80_TYPEDEFS_H_INCLUDED #define _Z80_TYPEDEFS_H_INCLUDED struct _z80_cpu_context; typedef struct _z80_cpu_context Z80EX_CONTEXT; #define __Z80EX_SELF_INCLUDE #include "z80ex.h" /* Union allowing a register pair to be accessed as bytes or as a word */ typedef union { #ifdef WORDS_BIG_ENDIAN struct { Z80EX_BYTE h,l; } b; #else struct { Z80EX_BYTE l,h; } b; #endif Z80EX_WORD w; } regpair; typedef enum {IM0=0,IM1=1,IM2=2} IM_MODE; struct _z80_cpu_context { regpair af,bc,de,hl; regpair af_,bc_,de_,hl_; regpair ix,iy; Z80EX_BYTE i; Z80EX_WORD r; Z80EX_BYTE r7; /* The high bit of the R register */ regpair sp,pc; Z80EX_BYTE iff1, iff2; /*interrupt flip-flops*/ regpair memptr; /*undocumented internal register*/ IM_MODE im; int halted; unsigned long tstate; /*t-state clock of current/last step*/ unsigned char op_tstate; /*clean (without WAITs and such) t-state of currently executing instruction*/ int noint_once; /*disable interrupts before next opcode?*/ int reset_PV_on_int; /*reset P/V flag on interrupt? (for LD A,R / LD A,I)*/ int doing_opcode; /*is there an opcode currently executing?*/ char int_vector_req; /*opcode must be fetched from IO device? (int vector read)*/ Z80EX_BYTE prefix; /*callbacks*/ z80ex_tstate_cb tstate_cb; void *tstate_cb_user_data; z80ex_pread_cb pread_cb; void *pread_cb_user_data; z80ex_pwrite_cb pwrite_cb; void *pwrite_cb_user_data; z80ex_mread_cb mread_cb; void *mread_cb_user_data; z80ex_mwrite_cb mwrite_cb; void *mwrite_cb_user_data; z80ex_intread_cb intread_cb; void *intread_cb_user_data; z80ex_reti_cb reti_cb; void *reti_cb_user_data; /*other stuff*/ regpair tmpword; regpair tmpaddr; Z80EX_BYTE tmpbyte; Z80EX_SIGNED_BYTE tmpbyte_s; }; typedef void (*z80ex_opcode_fn) (Z80EX_CONTEXT *cpu); #endif ./z80ex-1.1.21/INSTALL.cmake0000644000175000017500000000475112070651013013141 0ustar boobooBuilding with CMake: -------------------- CMake (http://www.cmake.org/) is required to build the library. If you use a popular Linux distribuion chances are that you already have it if not installed than in the stock repository. Out-of-source-tree building is recommended. To build on Unix and Unix-like environments (GCC,mingw,cygwin,DJGPP): mkdir build cd build cmake .. To build everything (static and shared z80ex and z80ex_dasm libraries): gmake To build only specific libraries and flavors: gmake z80ex (shared z80ex) gmake z80ex-static (static z80ex) gmake z80ex_dasm (shared dasm) gmake z80ex_dasm-static (static z80ex_dasm) To build using MSVC (Visual Studio): - create a folder inside the source tree (e.g. "build") - start cmd.exe and go to the created folder and issue: cmake .. - double-click z80ex.sln to open it in Visual Studio - build ALL_BUILD or only necessary target(s) in Visual Studio (choose Release/Debug configuration as required) You may override some build parameters by using ccmake or cmake-gui or other means CMake provides (see CMake documentation and relevant man pages): * OPSTEP_FAST_AND_ROUGH -- fast and rough opcode emulation mode (0 - off, 1 - on) when this mode is on, timings of internal I/O operations are ignored, and tstate callback feature is disabled Also, if you intend to use Z80Ex in your CMake-enabled project and you want to ship particular Z80Ex version with your project sources you may check "Shipping Z80Ex with CMake-enabled project" section. Installing (UNIX/MacOS X): -------------------------- issue "gmake install" as superuser. (default install prefix is /usr/local, which may be changed using ccmake or cmake-gui) then do "/sbin/ldconfig" as superuser to update DSO links and cache Shipping Z80Ex with CMake-enabled project: ----------------------------------------- Here's an example of what could be added to your project's CMakeLists.txt in order to use Z80Ex whose source tree is in the same directory as your project's source tree: set (Z80EX_PATH "${PROJECT_SOURCE_DIR}/../z80ex" CACHE PATH "Path to Z80Ex library") include_directories("${Z80EX_PATH}/include") set (Z80EX_BINARY_DIR "${PROJECT_BINARY_DIR}/lib_z80ex") make_directory (${Z80EX_BINARY_DIR}) set (Z80EX_STATIC_ONLY true) add_subdirectory (${Z80EX_PATH} ${Z80EX_BINARY_DIR}) link_directories (${Z80EX_BINARY_DIR}) target_link_libraries (my_app_exe_name z80ex-static z80ex_dasm-static) ./z80ex-1.1.21/CMakeLists.txt0000644000175000017500000000506012175326450013575 0ustar booboocmake_minimum_required (VERSION 2.8) project (z80ex) set (API_REVISION 1) set (VERSION_MAJOR 1) set (VERSION_MINOR 21) set (RELEASE_TYPE "") set (VERSION_STR "${API_REVISION}.${VERSION_MAJOR}.${VERSION_MINOR}${RELEASE_TYPE}") option (OPSTEP_FAST_AND_ROUGH "Fast and rough opcode step emulation mode" Off) #ALL_CFLAGS := -fPIC -fno-common -ansi -pedantic -Wall -pipe -O2 -I. -I./include if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "-fPIC -fno-common -ansi -pedantic -Wall -pipe -O2") endif () include_directories(BEFORE . include) include (TestBigEndian) test_big_endian(BIG_ENDIAN) #endianness (one of: WORDS_LITTLE_ENDIAN, WORDS_BIG_ENDIAN) if (BIG_ENDIAN) set (ENDIANNESS WORDS_BIG_ENDIAN) else () set (ENDIANNESS WORDS_LITTLE_ENDIAN) endif () add_definitions (-D${ENDIANNESS} -DZ80EX_VERSION_STR=${VERSION_STR} -DZ80EX_API_REVISION=${API_REVISION} -DZ80EX_VERSION_MAJOR=${VERSION_MAJOR} -DZ80EX_VERSION_MINOR=${VERSION_MINOR} -DZ80EX_RELEASE_TYPE=${RELEASE_TYPE}) if (OPSTEP_FAST_AND_ROUGH) add_definitions (-DZ80EX_OPSTEP_FAST_AND_ROUGH) endif () set (z80ex_sources z80ex.c) add_library (z80ex-static STATIC ${z80ex_sources}) set_target_properties (z80ex-static PROPERTIES OUTPUT_NAME z80ex) if (NOT DEFINED Z80EX_STATIC_ONLY) add_library (z80ex SHARED ${z80ex_sources}) # Affects Win32 only: avoid dynamic/static *.lib files naming conflict set_target_properties (z80ex-static PROPERTIES PREFIX "lib") endif () set (z80ex_dasm_sources z80ex_dasm.c) add_library (z80ex_dasm-static STATIC ${z80ex_dasm_sources}) set_target_properties (z80ex_dasm-static PROPERTIES OUTPUT_NAME z80ex_dasm) if (NOT DEFINED Z80EX_STATIC_ONLY) add_library (z80ex_dasm SHARED ${z80ex_dasm_sources}) # Affects Win32 only: avoid dynamic/static *.lib files naming conflict set_target_properties (z80ex_dasm-static PROPERTIES PREFIX "lib") endif () if (NOT DEFINED Z80EX_STATIC_ONLY) set_target_properties(z80ex z80ex_dasm PROPERTIES VERSION ${VERSION_STR} SOVERSION ${API_REVISION} ) endif () set_target_properties(z80ex-static z80ex_dasm-static PROPERTIES VERSION ${VERSION_STR} SOVERSION ${API_REVISION} ) if ("${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}" MATCHES "lib64") set (LIB_DIR "lib64") else () set (LIB_DIR "lib") endif () if (NOT DEFINED Z80EX_STATIC_ONLY) install (TARGETS z80ex z80ex_dasm LIBRARY DESTINATION ${LIB_DIR} ARCHIVE DESTINATION ${LIB_DIR}) endif () install (TARGETS z80ex-static z80ex_dasm-static LIBRARY DESTINATION ${LIB_DIR} ARCHIVE DESTINATION ${LIB_DIR}) install (DIRECTORY include/ DESTINATION include/z80ex PATTERN "*.h" ) ./z80ex-1.1.21/z80ex.c0000644000175000017500000002354612172737472012177 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #include #include #include #define __Z80EX_SELF_INCLUDE #include "typedefs.h" #include "z80ex.h" #include "macros.h" #define temp_byte cpu->tmpbyte #define temp_byte_s cpu->tmpbyte_s #define temp_addr cpu->tmpaddr #define temp_word cpu->tmpword #include "ptables.c" #include "opcodes/opcodes_base.c" #include "opcodes/opcodes_dd.c" #include "opcodes/opcodes_fd.c" #include "opcodes/opcodes_cb.c" #include "opcodes/opcodes_ed.c" #include "opcodes/opcodes_ddcb.c" #include "opcodes/opcodes_fdcb.c" #define DOQUOTE(x) #x #define TOSTRING(x) DOQUOTE(x) static char revision_type[]=TOSTRING(Z80EX_RELEASE_TYPE); static char ver_str[]=TOSTRING(Z80EX_VERSION_STR); static Z80EX_VERSION version = {Z80EX_API_REVISION, Z80EX_VERSION_MAJOR, Z80EX_VERSION_MINOR, revision_type, ver_str}; LIB_EXPORT Z80EX_VERSION *z80ex_get_version() { return(&version); } /* do one opcode (instruction or prefix) */ LIB_EXPORT int z80ex_step(Z80EX_CONTEXT *cpu) { Z80EX_BYTE opcode, d; z80ex_opcode_fn ofn=NULL; cpu->doing_opcode=1; cpu->noint_once=0; cpu->reset_PV_on_int=0; cpu->tstate=0; cpu->op_tstate=0; opcode=READ_OP_M1(); /*fetch opcode*/ if(cpu->int_vector_req) { TSTATES(2); /*interrupt eats two extra wait-states*/ } R++; /*R increased by one on every first M1 cycle*/ T_WAIT_UNTIL(4); /*M1 cycle eats min 4 t-states*/ if(!cpu->prefix) opcodes_base[opcode](cpu); else { if((cpu->prefix | 0x20) == 0xFD && ((opcode | 0x20) == 0xFD || opcode == 0xED)) { cpu->prefix=opcode; cpu->noint_once=1; /*interrupts are not accepted immediately after prefix*/ } else { switch(cpu->prefix) { case 0xDD: case 0xFD: if(opcode == 0xCB) { d=READ_OP(); /*displacement*/ temp_byte_s=(d & 0x80)? -(((~d) & 0x7f)+1): d; opcode=READ_OP(); ofn = (cpu->prefix == 0xDD)? opcodes_ddcb[opcode]: opcodes_fdcb[opcode]; } else { ofn = (cpu->prefix == 0xDD)? opcodes_dd[opcode]: opcodes_fd[opcode]; if(ofn == NULL) ofn=opcodes_base[opcode]; /*'mirrored' instructions*/ } break; case 0xED: ofn = opcodes_ed[opcode]; if(ofn == NULL) ofn=opcodes_base[0x00]; break; case 0xCB: ofn = opcodes_cb[opcode]; break; default: /*this must'nt happen!*/ assert(0); break; } ofn(cpu); cpu->prefix=0; } } cpu->doing_opcode=0; return(cpu->tstate); } LIB_EXPORT Z80EX_BYTE z80ex_last_op_type(Z80EX_CONTEXT *cpu) { return(cpu->prefix); } LIB_EXPORT void z80ex_reset(Z80EX_CONTEXT *cpu) { PC=0x0000; IFF1=IFF2=0; IM=IM0; AF=SP=BC=DE=HL=IX=IY=AF_=BC_=DE_=HL_=0xffff; I=R=R7=0; cpu->noint_once=0; cpu->reset_PV_on_int=0; cpu->halted=0; cpu->int_vector_req=0; cpu->doing_opcode=0; cpu->tstate=cpu->op_tstate=0; cpu->prefix=0; } /**/ LIB_EXPORT Z80EX_CONTEXT *z80ex_create( z80ex_mread_cb mrcb_fn, void *mrcb_data, z80ex_mwrite_cb mwcb_fn, void *mwcb_data, z80ex_pread_cb prcb_fn, void *prcb_data, z80ex_pwrite_cb pwcb_fn, void *pwcb_data, z80ex_intread_cb ircb_fn, void *ircb_data ) { Z80EX_CONTEXT *cpu; if((cpu=(Z80EX_CONTEXT *)malloc(sizeof(Z80EX_CONTEXT))) == NULL) return(NULL); memset(cpu,0x00,sizeof(Z80EX_CONTEXT)); z80ex_reset(cpu); cpu->mread_cb=mrcb_fn; cpu->mread_cb_user_data=mrcb_data; cpu->mwrite_cb=mwcb_fn; cpu->mwrite_cb_user_data=mwcb_data; cpu->pread_cb=prcb_fn; cpu->pread_cb_user_data=prcb_data; cpu->pwrite_cb=pwcb_fn; cpu->pwrite_cb_user_data=pwcb_data; cpu->intread_cb=ircb_fn; cpu->intread_cb_user_data=ircb_data; return(cpu); } LIB_EXPORT void z80ex_destroy(Z80EX_CONTEXT *cpu) { free(cpu); } LIB_EXPORT void z80ex_set_tstate_callback(Z80EX_CONTEXT *cpu, z80ex_tstate_cb cb_fn, void *user_data) { cpu->tstate_cb=cb_fn; cpu->tstate_cb_user_data=user_data; } LIB_EXPORT void z80ex_set_reti_callback(Z80EX_CONTEXT *cpu, z80ex_reti_cb cb_fn, void *user_data) { cpu->reti_cb=cb_fn; cpu->reti_cb_user_data=user_data; } LIB_EXPORT void z80ex_set_memread_callback(Z80EX_CONTEXT *cpu, z80ex_mread_cb mrcb_fn, void *mrcb_data) { cpu->mread_cb=mrcb_fn; cpu->mread_cb_user_data=mrcb_data; } LIB_EXPORT void z80ex_set_memwrite_callback(Z80EX_CONTEXT *cpu, z80ex_mwrite_cb mwcb_fn, void *mwcb_data) { cpu->mwrite_cb=mwcb_fn; cpu->mwrite_cb_user_data=mwcb_data; } LIB_EXPORT void z80ex_set_portread_callback(Z80EX_CONTEXT *cpu, z80ex_pread_cb prcb_fn, void *prcb_data) { cpu->pread_cb=prcb_fn; cpu->pread_cb_user_data=prcb_data; } LIB_EXPORT void z80ex_set_portwrite_callback(Z80EX_CONTEXT *cpu, z80ex_pwrite_cb pwcb_fn, void *pwcb_data) { cpu->pwrite_cb=pwcb_fn; cpu->pwrite_cb_user_data=pwcb_data; } LIB_EXPORT void z80ex_set_intread_callback(Z80EX_CONTEXT *cpu, z80ex_intread_cb ircb_fn, void *ircb_data) { cpu->intread_cb=ircb_fn; cpu->intread_cb_user_data=ircb_data; } /*non-maskable interrupt*/ LIB_EXPORT int z80ex_nmi(Z80EX_CONTEXT *cpu) { if(cpu->doing_opcode || cpu->noint_once || cpu->prefix) return(0); if(cpu->halted) { PC++; cpu->halted = 0; } /*so we met an interrupt... stop waiting*/ cpu->doing_opcode=1; R++; /*accepting interrupt increases R by one*/ /*IFF2=IFF1;*/ /*contrary to zilog z80 docs, IFF2 is not modified on NMI. proved by Slava Tretiak aka restorer*/ IFF1=0; TSTATES(5); cpu->mwrite_cb(cpu, --SP, cpu->pc.b.h, cpu->mwrite_cb_user_data); /*PUSH PC -- high byte */ TSTATES(3); cpu->mwrite_cb(cpu, --SP, cpu->pc.b.l, cpu->mwrite_cb_user_data); /*PUSH PC -- low byte */ TSTATES(3); PC=0x0066; MEMPTR=PC; /*FIXME: is that really so?*/ cpu->doing_opcode=0; return(11); /*NMI always takes 11 t-states*/ } /*maskable interrupt*/ LIB_EXPORT int z80ex_int(Z80EX_CONTEXT *cpu) { Z80EX_WORD inttemp; Z80EX_BYTE iv; unsigned long tt; /*If the INT line is low and IFF1 is set, and there's no opcode executing just now, a maskable interrupt is accepted, whether or not the last INT routine has finished*/ if(!IFF1 || cpu->noint_once || cpu->doing_opcode || cpu->prefix) return(0); cpu->tstate=0; cpu->op_tstate=0; if(cpu->halted) { PC++; cpu->halted = 0; } /*so we met an interrupt... stop waiting*/ /*When an INT is accepted, both IFF1 and IFF2 are cleared, preventing another interrupt from occurring which would end up as an infinite loop*/ IFF1=IFF2=0; /*original (NMOS) zilog z80 bug:*/ /*If a LD A,I or LD A,R (which copy IFF2 to the P/V flag) is interrupted, then the P/V flag is reset, even if interrupts were enabled beforehand.*/ /*(this bug was fixed in CMOS version of z80)*/ if(cpu->reset_PV_on_int) {F = (F & ~FLAG_P);} cpu->reset_PV_on_int=0; cpu->int_vector_req=1; cpu->doing_opcode=1; switch(IM) { case IM0: /*note: there's no need to do R++ and WAITs here, it'll be handled by z80ex_step*/ tt=z80ex_step(cpu); while(cpu->prefix) /*this is not the end?*/ { tt+=z80ex_step(cpu); } cpu->tstate=tt; break; case IM1: R++; TSTATES(2); /*two extra wait-states*/ /*An RST 38h is executed, no matter what value is put on the bus or what value the I register has. 13 t-states (2 extra + 11 for RST).*/ opcodes_base[0xff](cpu); /*RST38*/ break; case IM2: R++; /*takes 19 clock periods to complete (seven to fetch the lower eight bits from the interrupting device, six to save the program counter, and six to obtain the jump address)*/ iv=READ_OP(); T_WAIT_UNTIL(7); inttemp=(0x100*I)+iv; PUSH(PC,7,10); READ_MEM(PCL,inttemp++,13); READ_MEM(PCH,inttemp,16); MEMPTR=PC; T_WAIT_UNTIL(19); break; } cpu->doing_opcode=0; cpu->int_vector_req=0; return(cpu->tstate); } LIB_EXPORT void z80ex_w_states(Z80EX_CONTEXT *cpu, unsigned w_states) { TSTATES(w_states); } LIB_EXPORT void z80ex_next_t_state(Z80EX_CONTEXT *cpu) { if(cpu->tstate_cb != NULL) cpu->tstate_cb(cpu, cpu->tstate_cb_user_data); cpu->tstate++; cpu->op_tstate++; } LIB_EXPORT Z80EX_WORD z80ex_get_reg(Z80EX_CONTEXT *cpu, Z80_REG_T reg) { switch(reg) { case regAF: return(AF); case regBC: return(BC); case regDE: return(DE); case regHL: return(HL); case regAF_: return(AF_); case regBC_: return(BC_); case regDE_: return(DE_); case regHL_: return(HL_); case regIX: return(IX); case regIY: return(IY); case regPC: return(PC); case regSP: return(SP); case regI: return(I); case regR: return(R); case regR7: return(R7); case regIM: return(IM); case regIFF1: return(IFF1); case regIFF2: return(IFF2); } return(0); } LIB_EXPORT void z80ex_set_reg(Z80EX_CONTEXT *cpu, Z80_REG_T reg, Z80EX_WORD value) { switch(reg) { case regAF: AF=value; return; case regBC: BC=value; return; case regDE: DE=value; return; case regHL: HL=value; return; case regAF_: AF_=value; return; case regBC_: BC_=value; return; case regDE_: DE_=value; return; case regHL_: HL_=value; return; case regIX: IX=value; return; case regIY: IY=value; return; case regPC: PC=value; return; case regSP: SP=value; return; case regI: I=(value & 0xff); return; case regR: R=(value & 0xff); return; case regR7: R7=(value & 0xff); return; case regIM: switch(value & 0x03) { case 0: IM=IM0; return; case 1: IM=IM1; return; case 2: IM=IM2; return; } case regIFF1: IFF1=(value & 0x01); return; case regIFF2: IFF2=(value & 0x01); return; } } LIB_EXPORT int z80ex_op_tstate(Z80EX_CONTEXT *cpu) { return(cpu->tstate); } LIB_EXPORT int z80ex_doing_halt(Z80EX_CONTEXT *cpu) { return(cpu->halted); } /*LIB_EXPORT int z80ex_get_noint_once(Z80EX_CONTEXT *cpu) { return(cpu->noint_once); }*/ LIB_EXPORT int z80ex_int_possible(Z80EX_CONTEXT *cpu) { return((!IFF1 || cpu->noint_once || cpu->doing_opcode || cpu->prefix)? 0 : 1); } LIB_EXPORT int z80ex_nmi_possible(Z80EX_CONTEXT *cpu) { return((cpu->noint_once || cpu->doing_opcode || cpu->prefix)? 0 : 1); } ./z80ex-1.1.21/HOMEPAGE0000644000175000017500000000004710732252257012145 0ustar booboohttp://sourceforge.net/projects/z80ex/ ./z80ex-1.1.21/BUGS0000644000175000017500000000000010732252257011505 0ustar booboo./z80ex-1.1.21/COPYING0000644000175000017500000004311010732252257012066 0ustar booboo GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ./z80ex-1.1.21/z80ex_dasm.c0000644000175000017500000000714212070654057013167 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #include #include #define __USE_ISOC99 #include #include #define __Z80EX_SELF_INCLUDE #include "z80ex_dasm.h" #ifdef _MSC_VER #define snprintf _snprintf #endif typedef struct { const char *mnemonic; int t_states; int t_states2; } z80ex_opc_dasm; #include "opcodes/opcodes_dasm.c" static const char *formats[] = { "#%02X", /*bytes*/ "#%04X", /*words*/ "%d" /*WORDS_DEC, BYTES_DEC*/ }; #define STMP_SIZE 100 LIB_EXPORT int z80ex_dasm(char *output, int output_size, unsigned flags, int *t_states, int *t_states2, z80ex_dasm_readbyte_cb readbyte_cb, Z80EX_WORD addr, void *user_data) { Z80EX_BYTE opc=0, next=0, disp_u=0; Z80EX_SIGNED_BYTE disp; int have_disp=0; int out_len=0; int bytes=0; const char *bytes_format=formats[0]; const char *words_format=formats[1]; const z80ex_opc_dasm *dasm = NULL; static char stmp[STMP_SIZE]; if(flags & WORDS_DEC) words_format = formats[2]; if(flags & BYTES_DEC) bytes_format = formats[2]; *output='\0'; *t_states=0; *t_states2=0; opc = readbyte_cb(addr++,user_data); bytes++; switch(opc) { case 0xDD: case 0xFD: next = readbyte_cb(addr++,user_data); if((next | 0x20) == 0xFD || next == 0xED) { strncpy(output,"NOP*",output_size-1); *t_states=4; dasm=NULL; } else if(next == 0xCB) { disp_u = readbyte_cb(addr++,user_data); next = readbyte_cb(addr++,user_data); bytes+=3; dasm = (opc==0xDD)? &dasm_ddcb[next]: &dasm_fdcb[next]; have_disp=1; } else { bytes++; dasm = (opc==0xDD)? &dasm_dd[next]: &dasm_fd[next]; if(dasm->mnemonic == NULL) /*mirrored instructions*/ { dasm = &dasm_base[next]; *t_states=4; *t_states2=4; } } break; case 0xED: next = readbyte_cb(addr++,user_data); bytes++; dasm = &dasm_ed[next]; if(dasm->mnemonic == NULL) { strncpy(output,"NOP*",output_size-1); *t_states=8; dasm=NULL; } break; case 0xCB: next = readbyte_cb(addr++,user_data); bytes++; dasm = &dasm_cb[next]; break; default: dasm = &dasm_base[opc]; break; } if(dasm!=NULL) { const char *mpos; int arglen; Z80EX_BYTE hi,lo; char *outpos=output; for(mpos=(dasm->mnemonic); *mpos && out_len < output_size; mpos++) { *stmp='\0'; switch(*mpos) { case '@': lo=readbyte_cb(addr++,user_data); hi=readbyte_cb(addr++,user_data); bytes+=2; arglen=snprintf(stmp,STMP_SIZE,words_format,(int)(lo+hi*0x100)); break; case '$': case '%': if(!have_disp) disp_u = readbyte_cb(addr++,user_data); bytes++; disp = (disp_u & 0x80)? -(((~disp_u) & 0x7f)+1): disp_u; if(*mpos == '$') arglen=snprintf(stmp,STMP_SIZE,bytes_format,(int)disp); else arglen=snprintf(stmp,STMP_SIZE,words_format,(int)((Z80EX_WORD)(addr+disp))); break; case '#': lo = readbyte_cb(addr++,user_data); bytes++; arglen=snprintf(stmp,STMP_SIZE,bytes_format,(int)lo); break; default: *(outpos++) = *mpos; out_len++; arglen=0; break; } if(arglen) { if(out_len+arglen >= output_size) break; strcpy(outpos,stmp); out_len+=arglen; outpos+=arglen; } } *outpos = '\0'; *t_states+=dasm->t_states; *t_states2+=dasm->t_states2; } if(*t_states == *t_states2) *t_states2=0; return(bytes); } ./z80ex-1.1.21/include/0000755000175000017500000000000012172737433012463 5ustar booboo./z80ex-1.1.21/include/z80ex_dasm.h0000644000175000017500000000254212070653250014610 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #ifndef _Z80EX_DASM_H_INCLUDED #define _Z80EX_DASM_H_INCLUDED #include "z80ex_common.h" /*callback that returns byte for a given adress*/ typedef Z80EX_BYTE (*z80ex_dasm_readbyte_cb)(Z80EX_WORD addr, void *user_data); /*flags*/ enum Z80EX_DASM_FLAGS { WORDS_DEC = 1, BYTES_DEC = 2 }; #ifndef __Z80EX_SELF_INCLUDE #ifdef __cplusplus extern "C" { #endif /*z80ex_dasm: disassemble single instruction at the given adress output - text buffer to write disassembly to output_size - length of the text buffer flags - output format settings, or 0 for defaults t_states - will be set to T-states of the instruction t_states2 - for branching commands: T-states when PC is changed, for other commands: 0 readbyte_cb - callback function for reading byte at given adress addr - adress of the first byte of the instruction to disassemble user_data - will be passed to readbyte_cb callback returns: length of processed instruction in bytes */ extern int z80ex_dasm(char *output, int output_size, unsigned flags, int *t_states, int *t_states2, z80ex_dasm_readbyte_cb readbyte_cb, Z80EX_WORD addr, void *user_data); #ifdef __cplusplus } #endif #endif #endif ./z80ex-1.1.21/include/z80ex.h0000644000175000017500000001224112172737433013612 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #ifndef _Z80EX_H_INCLUDED #define _Z80EX_H_INCLUDED #include "z80ex_common.h" typedef enum {regAF,regBC,regDE,regHL,regAF_,regBC_,regDE_,regHL_,regIX,regIY,regPC,regSP,regI,regR,regR7,regIM/*0,1 or 2*/,regIFF1,regIFF2} Z80_REG_T; typedef struct { int API_revision; int major; int minor; char *release_type; /*e.g., "beta", "RC"*/ char *as_string; /*full version string, e.g., "0.16.7beta"*/ } Z80EX_VERSION; #ifndef __Z80EX_SELF_INCLUDE struct _z80_cpu_context; typedef struct _z80_cpu_context Z80EX_CONTEXT; #endif /*callback prototypes:*/ /*to be called on each T-State [optional]*/ typedef void (*z80ex_tstate_cb)(Z80EX_CONTEXT *cpu, void *user_data); /*read byte from memory -- called when RD & MREQ goes active. m1_state will be 1 if M1 signal is active*/ typedef Z80EX_BYTE (*z80ex_mread_cb)(Z80EX_CONTEXT *cpu, Z80EX_WORD addr, int m1_state, void *user_data); /*write to memory -- called when WR & MREQ goes active*/ typedef void (*z80ex_mwrite_cb)(Z80EX_CONTEXT *cpu, Z80EX_WORD addr, Z80EX_BYTE value, void *user_data); /*read byte from -- called when RD & IORQ goes active*/ typedef Z80EX_BYTE (*z80ex_pread_cb)(Z80EX_CONTEXT *cpu, Z80EX_WORD port, void *user_data); /*write to -- called when WR & IORQ goes active*/ typedef void (*z80ex_pwrite_cb)(Z80EX_CONTEXT *cpu, Z80EX_WORD port, Z80EX_BYTE value, void *user_data); /*read byte of interrupt vector -- called when M1 and IORQ goes active*/ typedef Z80EX_BYTE (*z80ex_intread_cb)(Z80EX_CONTEXT *cpu, void *user_data); /*called when the RETI instruction is executed (useful for emulating Z80 PIO/CTC and such)*/ typedef void (*z80ex_reti_cb)(Z80EX_CONTEXT *cpu, void *user_data); #ifndef __Z80EX_SELF_INCLUDE #ifdef __cplusplus extern "C" { #endif /*get version info*/ extern Z80EX_VERSION *z80ex_get_version(); /*create and initialize CPU*/ extern Z80EX_CONTEXT *z80ex_create(z80ex_mread_cb mrcb_fn, void *mrcb_data, z80ex_mwrite_cb mwcb_fn, void *mwcb_data, z80ex_pread_cb prcb_fn, void *prcb_data, z80ex_pwrite_cb pwcb_fn, void *pwcb_data, z80ex_intread_cb ircb_fn, void *ircb_data); /*destroy CPU*/ extern void z80ex_destroy(Z80EX_CONTEXT *cpu); /*do next opcode (instruction or prefix), return number of T-states*/ extern int z80ex_step(Z80EX_CONTEXT *cpu); /*returns type of the last opcode, processed with z80ex_step. type will be 0 for complete instruction, or dd/fd/cb/ed for opcode prefix.*/ extern Z80EX_BYTE z80ex_last_op_type(Z80EX_CONTEXT *cpu); /*set T-state callback*/ extern void z80ex_set_tstate_callback(Z80EX_CONTEXT *cpu, z80ex_tstate_cb cb_fn, void *user_data); /*set RETI callback*/ extern void z80ex_set_reti_callback(Z80EX_CONTEXT *cpu, z80ex_reti_cb cb_fn, void *user_data); /*set memory read callback*/ extern void z80ex_set_memread_callback(Z80EX_CONTEXT *cpu, z80ex_mread_cb mrcb_fn, void *mrcb_data); /*set memory write callback*/ extern void z80ex_set_memwrite_callback(Z80EX_CONTEXT *cpu, z80ex_mwrite_cb mwcb_fn, void *mwcb_data); /*set port read callback*/ extern void z80ex_set_portread_callback(Z80EX_CONTEXT *cpu, z80ex_pread_cb prcb_fn, void *prcb_data); /*set port write callback*/ extern void z80ex_set_portwrite_callback(Z80EX_CONTEXT *cpu, z80ex_pwrite_cb pwcb_fn, void *pwcb_data); /*set INT read callback*/ extern void z80ex_set_intread_callback(Z80EX_CONTEXT *cpu, z80ex_intread_cb ircb_fn, void *ircb_data); /*maskable interrupt*/ /*returns number of T-states if interrupt was accepted, otherwise 0*/ extern int z80ex_int(Z80EX_CONTEXT *cpu); /*non-maskable interrupt*/ /*returns number of T-states (11 if interrupt was accepted, or 0 if processor is doing an instruction right now)*/ extern int z80ex_nmi(Z80EX_CONTEXT *cpu); /*reset CPU*/ extern void z80ex_reset(Z80EX_CONTEXT *cpu); /*get register value*/ extern Z80EX_WORD z80ex_get_reg(Z80EX_CONTEXT *cpu, Z80_REG_T reg); /*set register value (for 1-byte registers lower byte of will be used)*/ extern void z80ex_set_reg(Z80EX_CONTEXT *cpu, Z80_REG_T reg, Z80EX_WORD value); /*returns 1 if CPU doing HALT instruction now*/ extern int z80ex_doing_halt(Z80EX_CONTEXT *cpu); /*when called from callbacks, returns current T-state of the executing opcode (instruction or prefix), else returns T-states taken by last opcode executed*/ extern int z80ex_op_tstate(Z80EX_CONTEXT *cpu); /*generate Wait-states. (T-state callback will be called times, when defined). should be used to simulate WAIT signal or disabled CLK*/ extern void z80ex_w_states(Z80EX_CONTEXT *cpu, unsigned w_states); /*spend one T-state doing nothing (often IO devices cannot handle data request on the first T-state at which RD/WR goes active). for I/O callbacks*/ extern void z80ex_next_t_state(Z80EX_CONTEXT *cpu); /*returns 1 if maskable interrupts are possible in current z80 state*/ extern int z80ex_int_possible(Z80EX_CONTEXT *cpu); /*returns 1 if non-maskable interrupts are possible in current z80 state*/ extern int z80ex_nmi_possible(Z80EX_CONTEXT *cpu); #ifdef __cplusplus } #endif #endif #endif ./z80ex-1.1.21/include/z80ex_common.h0000644000175000017500000000203012070653126015146 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #ifndef _Z80EX_COMMON_H_INCLUDED #define _Z80EX_COMMON_H_INCLUDED #ifdef _MSC_VER #define LIB_EXPORT __declspec(dllexport) #else #define LIB_EXPORT #endif #if defined(__SYMBIAN32__) typedef unsigned char Z80EX_BYTE; typedef signed char Z80EX_SIGNED_BYTE; typedef unsigned short Z80EX_WORD; typedef unsigned int Z80EX_DWORD; #elif defined(__GNUC__) #include typedef uint8_t Z80EX_BYTE; typedef int8_t Z80EX_SIGNED_BYTE; typedef uint16_t Z80EX_WORD; typedef uint32_t Z80EX_DWORD; #elif defined(_MSC_VER) typedef unsigned __int8 Z80EX_BYTE; typedef signed __int8 Z80EX_SIGNED_BYTE; typedef unsigned __int16 Z80EX_WORD; typedef unsigned __int32 Z80EX_DWORD; #else typedef unsigned char Z80EX_BYTE; typedef signed char Z80EX_SIGNED_BYTE; typedef unsigned short Z80EX_WORD; typedef unsigned int Z80EX_DWORD; #endif #endif ./z80ex-1.1.21/Makefile0000644000175000017500000000750712175332763012511 0ustar booboo# Z80ex Makefile # (for GNU make) # ################################################################# # You may tune these values to fit your setup: ################################################################# INSTALL_PREFIX := /usr/local TOOLS_PREFIX := CC := $(TOOLS_PREFIX)gcc LINKER := $(TOOLS_PREFIX)gcc AR := $(TOOLS_PREFIX)ar ALL_CFLAGS := -fPIC -fno-common -ansi -pedantic -Wall -pipe -O2 -I. -I./include #endianness (one of: WORDS_LITTLE_ENDIAN, WORDS_BIG_ENDIAN) ENDIANNESS := WORDS_LITTLE_ENDIAN #ENDIANNESS := WORDS_BIG_ENDIAN #fast and rough opcode step emulation mode (0 - off, 1 - on) OPSTEP_FAST_AND_ROUGH := 0 ################################################################# # Do not change these: ################################################################# PROJ := z80ex EMU := libz80ex DASM := libz80ex_dasm API_REVISION := 1 VERSION_MAJOR:=1 VERSION_MINOR:=21 RELEASE_TYPE := VERSION_STR:= ${API_REVISION}.${VERSION_MAJOR}.${VERSION_MINOR}${RELEASE_TYPE} OS=${shell uname -s} ALL_CFLAGS += -D${ENDIANNESS} -DZ80EX_VERSION_STR=${VERSION_STR} -DZ80EX_API_REVISION=${API_REVISION} -DZ80EX_VERSION_MAJOR=${VERSION_MAJOR} -DZ80EX_VERSION_MINOR=${VERSION_MINOR} -DZ80EX_RELEASE_TYPE=${RELEASE_TYPE} ifneq (${OPSTEP_FAST_AND_ROUGH},0) ALL_CFLAGS += -DZ80EX_OPSTEP_FAST_AND_ROUGH endif c_files := z80ex.c z80ex_dasm.c %.o : %.c ${CC} ${ALL_CFLAGS} ${CFLAGS} -c -o $@ $< .PHONY : all all:: static shared z80ex.o: include/z80ex.h include/z80ex_common.h ptables.c typedefs.h macros.h opcodes/opcodes_base.c\ opcodes/opcodes_dd.c opcodes/opcodes_fd.c opcodes/opcodes_cb.c\ opcodes/opcodes_ed.c opcodes/opcodes_ddcb.c opcodes/opcodes_fdcb.c z80ex_dasm.o: include/z80ex_dasm.h include/z80ex_common.h opcodes/opcodes_dasm.c clean: rm -f *.o rm -f ./lib/* rm -rf ./z80ex-${VERSION_STR}.tar.gz static: z80ex.o z80ex_dasm.o ${AR} rs ./lib/${EMU}.a z80ex.o ${AR} rs ./lib/${DASM}.a z80ex_dasm.o shared: z80ex.o z80ex_dasm.o ifeq (${OS},Darwin) ${LINKER} -dynamiclib -compatibility_version ${API_REVISION} -current_version ${VERSION_STR} -install_name ${INSTALL_PREFIX}/lib/${EMU}.${API_REVISION}.dylib -o ./lib/${EMU}.${VERSION_STR}.dylib z80ex.o ${LINKER} -dynamiclib -compatibility_version ${API_REVISION} -current_version ${VERSION_STR} -install_name ${INSTALL_PREFIX}/lib/${DASM}.${API_REVISION}.dylib -o ./lib/${DASM}.${VERSION_STR}.dylib z80ex_dasm.o else ${LINKER} -shared -Wl,-soname,${EMU}.so.${API_REVISION} -o ./lib/${EMU}.so.${VERSION_STR} z80ex.o ${LINKER} -shared -Wl,-soname,${DASM}.so.${API_REVISION} -o ./lib/${DASM}.so.${VERSION_STR} z80ex_dasm.o endif install: install -d ${INSTALL_PREFIX}/lib install ./lib/* ${INSTALL_PREFIX}/lib install -d ${INSTALL_PREFIX}/include/z80ex install -m 0664 ./include/* ${INSTALL_PREFIX}/include/z80ex ifeq (${OS},Darwin) ln -sf ${EMU}.${VERSION_STR}.dylib ${INSTALL_PREFIX}/lib/${EMU}.${API_REVISION}.dylib ln -sf ${EMU}.${VERSION_STR}.dylib ${INSTALL_PREFIX}/lib/${EMU}.dylib ln -sf ${DASM}.${VERSION_STR}.dylib ${INSTALL_PREFIX}/lib/${DASM}.${API_REVISION}.dylib ln -sf ${DASM}.${VERSION_STR}.dylib ${INSTALL_PREFIX}/lib/${DASM}.dylib else ln -sf ${EMU}.so.${VERSION_STR} ${INSTALL_PREFIX}/lib/${EMU}.so.${API_REVISION} ln -sf ${EMU}.so.${VERSION_STR} ${INSTALL_PREFIX}/lib/${EMU}.so ln -sf ${DASM}.so.${VERSION_STR} ${INSTALL_PREFIX}/lib/${DASM}.so.${API_REVISION} ln -sf ${DASM}.so.${VERSION_STR} ${INSTALL_PREFIX}/lib/${DASM}.so endif dist: clean rm -rf ./${PROJ}-${VERSION_STR} ln -s ./ ./${PROJ}-${VERSION_STR} tar --exclude-vcs --exclude obsolete --exclude ${PROJ}-${VERSION_STR}/${PROJ}-${VERSION_STR} --exclude ${PROJ}-${VERSION_STR}/${PROJ}-${VERSION_STR}.tar.gz -hcf - ./${PROJ}-${VERSION_STR}/ | gzip -f9 > ${PROJ}-${VERSION_STR}.tar.gz rm -rf ./${PROJ}-${VERSION_STR} #EOF ./z80ex-1.1.21/macros.h0000644000175000017500000005040312070653760012474 0ustar booboo/* * Z80Ex, ZILoG Z80 CPU emulator. * * by Pigmaker57 aka boo_boo [pigmaker57@kahoh57.info] * * contains some code from the FUSE project (http://fuse-emulator.sourceforge.net) * Released under GNU GPL v2 * */ #ifndef _Z80EX_MACROS_H_INCLUDED #define _Z80EX_MACROS_H_INCLUDED /* Macros used for accessing the registers */ #define A cpu->af.b.h #define F cpu->af.b.l #define AF cpu->af.w #define B cpu->bc.b.h #define C cpu->bc.b.l #define BC cpu->bc.w #define D cpu->de.b.h #define E cpu->de.b.l #define DE cpu->de.w #define H cpu->hl.b.h #define L cpu->hl.b.l #define HL cpu->hl.w #define A_ cpu->af_.b.h #define F_ cpu->af_.b.l #define AF_ cpu->af_.w #define B_ cpu->bc_.b.h #define C_ cpu->bc_.b.l #define BC_ cpu->bc_.w #define D_ cpu->de_.b.h #define E_ cpu->de_.b.l #define DE_ cpu->de_.w #define H_ cpu->hl_.b.h #define L_ cpu->hl_.b.l #define HL_ cpu->hl_.w #define IXH cpu->ix.b.h #define IXL cpu->ix.b.l #define IX cpu->ix.w #define IYH cpu->iy.b.h #define IYL cpu->iy.b.l #define IY cpu->iy.w #define SPH cpu->sp.b.h #define SPL cpu->sp.b.l #define SP cpu->sp.w #define PCH cpu->pc.b.h #define PCL cpu->pc.b.l #define PC cpu->pc.w #define I cpu->i #define R cpu->r #define R7 cpu->r7 #define IFF1 cpu->iff1 #define IFF2 cpu->iff2 #define IM cpu->im #define MEMPTRh cpu->memptr.b.h #define MEMPTRl cpu->memptr.b.l #define MEMPTR cpu->memptr.w /* The flags */ #define FLAG_C 0x01 #define FLAG_N 0x02 #define FLAG_P 0x04 #define FLAG_V FLAG_P #define FLAG_3 0x08 #define FLAG_H 0x10 #define FLAG_5 0x20 #define FLAG_Z 0x40 #define FLAG_S 0x80 /*read opcode*/ #define READ_OP_M1() (cpu->int_vector_req? cpu->intread_cb(cpu, cpu->intread_cb_user_data) : cpu->mread_cb(cpu, PC++, 1, cpu->mread_cb_user_data)) /*read opcode argument*/ #define READ_OP() (cpu->int_vector_req? cpu->intread_cb(cpu, cpu->intread_cb_user_data) : cpu->mread_cb(cpu, PC++, 0, cpu->mread_cb_user_data)) #ifndef Z80EX_OPSTEP_FAST_AND_ROUGH /*wait until end of opcode-tstate given (to be used on opcode execution).*/ #define T_WAIT_UNTIL(t_state) \ { \ unsigned nn; \ if(cpu->tstate_cb == NULL) { \ if (t_state > cpu->op_tstate) { \ cpu->tstate += t_state - cpu->op_tstate; \ cpu->op_tstate = t_state; \ } \ } \ else { \ for(nn=cpu->op_tstate;nn < t_state;nn++) { \ cpu->op_tstate++; \ cpu->tstate++; \ cpu->tstate_cb(cpu, cpu->tstate_cb_user_data); \ } \ } \ } /*spend t-states (not affecting opcode-tstate counter, for using outside of certain opcode execution)*/ #define TSTATES(amount) \ {\ int nn;\ if(cpu->tstate_cb == NULL) { \ cpu->tstate += amount; \ } \ else { \ for(nn=0; nn < amount; nn++) { \ cpu->tstate++; \ cpu->tstate_cb(cpu, cpu->tstate_cb_user_data); \ }\ } \ } /*read byte from memory*/ #define READ_MEM(result, addr, t_state) \ { \ T_WAIT_UNTIL(t_state); \ result=(cpu->mread_cb(cpu, (addr), 0, cpu->mread_cb_user_data)); \ } /*read byte from port*/ #define READ_PORT(result, port, t_state) \ { \ T_WAIT_UNTIL(t_state); \ result=(cpu->pread_cb(cpu, (port), cpu->pread_cb_user_data)); \ } /*write byte to memory*/ #define WRITE_MEM(addr, vbyte, t_state) \ { \ T_WAIT_UNTIL(t_state); \ cpu->mwrite_cb(cpu, addr, vbyte, cpu->mwrite_cb_user_data); \ } /*write byte to port*/ #define WRITE_PORT(port, vbyte, t_state) \ { \ T_WAIT_UNTIL(t_state); \ cpu->pwrite_cb(cpu, (port), vbyte, cpu->pwrite_cb_user_data); \ } #else /*Z80EX_OPSTEP_FAST_AND_ROUGH*/ #define T_WAIT_UNTIL(t_state) {cpu->tstate = t_state; cpu->op_tstate = t_state;} #define TSTATES(amount) {cpu->tstate += amount;} /*read byte from memory*/ #define READ_MEM(result, addr, t_state) \ { \ result=(cpu->mread_cb(cpu, (addr), 0, cpu->mread_cb_user_data)); \ } /*read byte from port*/ #define READ_PORT(result, port, t_state) \ { \ result=(cpu->pread_cb(cpu, (port), cpu->pread_cb_user_data)); \ } /*write byte to memory*/ #define WRITE_MEM(addr, vbyte, t_state) \ { \ cpu->mwrite_cb(cpu, addr, vbyte, cpu->mwrite_cb_user_data); \ } /*write byte to port*/ #define WRITE_PORT(port, vbyte, t_state) \ { \ cpu->pwrite_cb(cpu, (port), vbyte, cpu->pwrite_cb_user_data); \ } #endif /*<< #ifndef Z80EX_OPSTEP_FAST_AND_ROUGH*/ /* instructions */ #define AND(value)\ {\ A &= (value);\ F = FLAG_H | sz53p_table[A];\ } #define ADC(a, value)\ {\ Z80EX_WORD adctemp = A + (value) + ( F & FLAG_C ); \ Z80EX_BYTE lookup = ( ( A & 0x88 ) >> 3 ) | \ ( ( (value) & 0x88 ) >> 2 ) | \ ( ( adctemp & 0x88 ) >> 1 ); \ A=adctemp;\ F = ( adctemp & 0x100 ? FLAG_C : 0 ) |\ halfcarry_add_table[lookup & 0x07] | overflow_add_table[lookup >> 4] |\ sz53_table[A];\ } #define ADC16(hl, value)\ {\ Z80EX_DWORD add16temp= HL + (value) + ( F & FLAG_C ); \ Z80EX_BYTE lookup = ( ( HL & 0x8800 ) >> 11 ) | \ ( ( (value) & 0x8800 ) >> 10 ) | \ ( ( add16temp & 0x8800 ) >> 9 ); \ MEMPTR=hl+1;\ HL = add16temp;\ F = ( add16temp & 0x10000 ? FLAG_C : 0 )|\ overflow_add_table[lookup >> 4] |\ ( H & ( FLAG_3 | FLAG_5 | FLAG_S ) ) |\ halfcarry_add_table[lookup&0x07]|\ ( HL ? 0 : FLAG_Z );\ } #define ADD(a, value)\ {\ Z80EX_WORD addtemp = A + (value); \ Z80EX_BYTE lookup = ( ( A & 0x88 ) >> 3 ) | \ ( ( (value) & 0x88 ) >> 2 ) | \ ( ( addtemp & 0x88 ) >> 1 ); \ A=addtemp;\ F = ( addtemp & 0x100 ? FLAG_C : 0 ) |\ halfcarry_add_table[lookup & 0x07] | overflow_add_table[lookup >> 4] |\ sz53_table[A];\ } #define ADD16(value1,value2)\ {\ Z80EX_DWORD add16temp = (value1) + (value2); \ Z80EX_BYTE lookup = ( ( (value1) & 0x0800 ) >> 11 ) | \ ( ( (value2) & 0x0800 ) >> 10 ) | \ ( ( add16temp & 0x0800 ) >> 9 ); \ MEMPTR=value1+1;\ (value1) = add16temp;\ F = ( F & ( FLAG_V | FLAG_Z | FLAG_S ) ) |\ ( add16temp & 0x10000 ? FLAG_C : 0 )|\ ( ( add16temp >> 8 ) & ( FLAG_3 | FLAG_5 ) ) |\ halfcarry_add_table[lookup];\ } #define BIT( bit, value ) \ { \ F = ( F & FLAG_C ) | FLAG_H | sz53p_table[(value) & (0x01 << (bit))] | ((value) & 0x28); \ } /*BIT n,(IX+d/IY+d) and BIT n,(HL)*/ #define BIT_MPTR( bit, value) \ { \ F = ( F & FLAG_C ) | FLAG_H | (sz53p_table[(value) & (0x01 << (bit))] & 0xD7) | ((MEMPTRh) & 0x28); \ } #define CALL(addr, wr1, wr2) \ {\ PUSH(PC,wr1,wr2); \ PC=addr; \ MEMPTR=addr;\ } #define CP(value)\ {\ Z80EX_WORD cptemp = A - value; \ Z80EX_BYTE lookup = ( ( A & 0x88 ) >> 3 ) | \ ( ( (value) & 0x88 ) >> 2 ) | \ ( ( cptemp & 0x88 ) >> 1 ); \ F = ( cptemp & 0x100 ? FLAG_C : ( cptemp ? 0 : FLAG_Z ) ) | FLAG_N |\ halfcarry_sub_table[lookup & 0x07] |\ overflow_sub_table[lookup >> 4] |\ ( value & ( FLAG_3 | FLAG_5 ) ) |\ ( cptemp & FLAG_S );\ } #define DEC(value)\ {\ F = ( F & FLAG_C ) | ( (value)&0x0f ? 0 : FLAG_H ) | FLAG_N;\ (value)--;\ F |= ( (value)==0x7f ? FLAG_V : 0 ) | sz53_table[value];\ } #define DEC16(value)\ {\ (value)--;\ } #define INC(value)\ {\ (value)++;\ F = ( F & FLAG_C ) | ( (value)==0x80 ? FLAG_V : 0 ) |\ ( (value)&0x0f ? 0 : FLAG_H ) | sz53_table[(value)];\ } #define INC16(value)\ {\ (value)++;\ } #define LD(dst, src) \ {\ dst=src; \ } /*ld (nnnn|BC|DE), A*/ #define LD_A_TO_ADDR_MPTR(dst, src, addr) \ {\ dst=src; \ MEMPTRh=A;\ MEMPTRl=((addr+1) & 0xFF);\ } /*ld a,(BC|DE|nnnn)*/ #define LD_A_FROM_ADDR_MPTR(dst, src, addr) \ {\ dst=src; \ MEMPTR=addr+1;\ } #define LD16(dst, src) \ {\ dst=src; \ } /*ld (nnnn),BC|DE|SP|HL|IX|IY*/ #define LD_RP_TO_ADDR_MPTR_16(dst, src, addr) \ {\ dst=src; \ MEMPTR=addr+1;\ } /*ld BC|DE|SP|HL|IX|IY,(nnnn)*/ #define LD_RP_FROM_ADDR_MPTR_16(dst, src, addr) \ {\ dst=src; \ MEMPTR=addr+1;\ } #define JP_NO_MPTR(addr) \ { \ PC=addr; \ } #define JP(addr) \ { \ PC=addr; \ MEMPTR=addr;\ } #define JR(offset) \ {\ PC+=offset; \ MEMPTR=PC;\ } #define OR(value)\ {\ A |= (value);\ F = sz53p_table[A];\ } #define OUT(port,reg, wr) \ {\ WRITE_PORT(port,reg,wr); \ MEMPTR=port+1;\ } /*OUT (nn),A*/ #define OUT_A(port,reg, wr) \ {\ WRITE_PORT(port,reg,wr); \ MEMPTRl=((port+1) & 0xFF);\ MEMPTRh=A;\ } #define IN(reg,port,rd) \ {\ READ_PORT(reg,port,rd); \ F = ( F & FLAG_C) | sz53p_table[(reg)];\ MEMPTR=port+1;\ } /*IN A,(nn)*/ #define IN_A(reg,port,rd) \ {\ READ_PORT(reg,port,rd); \ MEMPTR=port+1;\ } #define IN_F(port, rd) \ {\ Z80EX_BYTE val; \ READ_PORT(val, port, rd); \ F = ( F & FLAG_C) | sz53p_table[(val)];\ MEMPTR=port+1;\ } #define POP(rp, rd1, rd2) \ {\ regpair tmp; \ READ_MEM(tmp.b.l,SP++,rd1);\ READ_MEM(tmp.b.h,SP++,rd2);\ rp=tmp.w;\ } /*wr1=t-states before first byte, wr2=t-states before second*/ #define PUSH(rp, wr1, wr2) \ {\ regpair tmp; \ tmp.w=rp; \ WRITE_MEM(--SP, tmp.b.h, wr1); \ WRITE_MEM(--SP, tmp.b.l, wr2); \ } #define RET(rd1, rd2) \ {\ POP(PC, rd1, rd2);\ MEMPTR=PC;\ } #define RL(value)\ {\ Z80EX_BYTE rltemp = (value); \ (value) = ( (value)<<1 ) | ( F & FLAG_C );\ F = ( rltemp >> 7 ) | sz53p_table[(value)];\ } #define RLC(value)\ {\ (value) = ( (value)<<1 ) | ( (value)>>7 );\ F = ( (value) & FLAG_C ) | sz53p_table[(value)];\ } #define RR(value)\ {\ Z80EX_BYTE rrtemp = (value); \ (value) = ( (value)>>1 ) | ( F << 7 );\ F = ( rrtemp & FLAG_C ) | sz53p_table[(value)];\ } #define RRC(value)\ {\ F = (value) & FLAG_C;\ (value) = ( (value)>>1 ) | ( (value)<<7 );\ F |= sz53p_table[(value)];\ } #define RST(value, w1, w2)\ {\ PUSH(PC, w1, w2);\ PC=(value);\ MEMPTR=PC;\ } #define SBC(a, value)\ {\ Z80EX_WORD sbctemp = A - (value) - ( F & FLAG_C ); \ Z80EX_BYTE lookup = ( ( A & 0x88 ) >> 3 ) | \ ( ( (value) & 0x88 ) >> 2 ) | \ ( ( sbctemp & 0x88 ) >> 1 ); \ A=sbctemp;\ F = ( sbctemp & 0x100 ? FLAG_C : 0 ) | FLAG_N |\ halfcarry_sub_table[lookup & 0x07] | overflow_sub_table[lookup >> 4] |\ sz53_table[A];\ } #define SBC16(hl, value)\ {\ Z80EX_DWORD sub16temp = HL - (value) - (F & FLAG_C); \ Z80EX_BYTE lookup = ( ( HL & 0x8800 ) >> 11 ) | \ ( ( (value) & 0x8800 ) >> 10 ) | \ ( ( sub16temp & 0x8800 ) >> 9 ); \ MEMPTR=hl+1;\ HL = sub16temp;\ F = ( sub16temp & 0x10000 ? FLAG_C : 0 ) |\ FLAG_N | overflow_sub_table[lookup >> 4] |\ ( H & ( FLAG_3 | FLAG_5 | FLAG_S ) ) |\ halfcarry_sub_table[lookup&0x07] |\ ( HL ? 0 : FLAG_Z) ;\ } #define SLA(value)\ {\ F = (value) >> 7;\ (value) <<= 1;\ F |= sz53p_table[(value)];\ } #define SLL(value)\ {\ F = (value) >> 7;\ (value) = ( (value) << 1 ) | 0x01;\ F |= sz53p_table[(value)];\ } #define SRA(value)\ {\ F = (value) & FLAG_C;\ (value) = ( (value) & 0x80 ) | ( (value) >> 1 );\ F |= sz53p_table[(value)];\ } #define SRL(value)\ {\ F = (value) & FLAG_C;\ (value) >>= 1;\ F |= sz53p_table[(value)];\ } #define SUB(value)\ {\ Z80EX_WORD subtemp = A - (value); \ Z80EX_BYTE lookup = ( ( A & 0x88 ) >> 3 ) | \ ( ( (value) & 0x88 ) >> 2 ) | \ ( (subtemp & 0x88 ) >> 1 ); \ A=subtemp;\ F = ( subtemp & 0x100 ? FLAG_C : 0 ) | FLAG_N |\ halfcarry_sub_table[lookup & 0x07] | overflow_sub_table[lookup >> 4] |\ sz53_table[A];\ } #define XOR(value)\ {\ A ^= (value);\ F = sz53p_table[A];\ } #define RRD(rd, wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ WRITE_MEM(HL, ( A << 4 ) | ( bytetemp >> 4 ) ,wr);\ A = ( A & 0xf0 ) | ( bytetemp & 0x0f );\ F = ( F & FLAG_C ) | sz53p_table[A];\ MEMPTR=HL+1;\ } #define RLD(rd, wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ WRITE_MEM(HL, (bytetemp << 4 ) | ( A & 0x0f ) ,wr);\ A = ( A & 0xf0 ) | ( bytetemp >> 4 );\ F = ( F & FLAG_C ) | sz53p_table[A];\ MEMPTR=HL+1;\ } #define IM_(mode)\ {\ IM=mode;\ } #define LD_A_R() \ {\ A=(R&0x7f) | (R7&0x80);\ F = ( F & FLAG_C ) | sz53_table[A] | ( IFF2 ? FLAG_V : 0 );\ cpu->reset_PV_on_int=1;\ } #define LD_R_A() \ {\ R=R7=A;\ } #define LD_A_I() \ {\ A=I;\ F = ( F & FLAG_C ) | sz53_table[A] | ( IFF2 ? FLAG_V : 0 );\ cpu->reset_PV_on_int=1;\ } #define NEG() \ {\ Z80EX_BYTE bytetemp=A;\ A=0;\ SUB(bytetemp);\ } #define RETI(rd1, rd2) \ {\ IFF1=IFF2;\ RET(rd1, rd2);\ if(cpu->reti_cb != NULL) cpu->reti_cb(cpu, cpu->reti_cb_user_data); \ } /*same as RETI, only opcode is different*/ #define RETN(rd1, rd2) \ {\ IFF1=IFF2;\ RET(rd1, rd2);\ } #define LDI(rd, wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ BC--;\ WRITE_MEM(DE,bytetemp,wr);\ DE++; HL++;\ bytetemp += A;\ F = ( F & ( FLAG_C | FLAG_Z | FLAG_S ) ) | ( BC ? FLAG_V : 0 ) |\ ( bytetemp & FLAG_3 ) | ( (bytetemp & 0x02) ? FLAG_5 : 0 );\ } #define CPI(rd) \ {\ Z80EX_BYTE value,bytetemp,lookup;\ READ_MEM(value, HL, rd);\ bytetemp = A - value;\ lookup = ( ( A & 0x08 ) >> 3 ) |\ ( ( (value) & 0x08 ) >> 2 ) |\ ( ( bytetemp & 0x08 ) >> 1 );\ HL++; BC--;\ F = ( F & FLAG_C ) | ( BC ? ( FLAG_V | FLAG_N ) : FLAG_N ) |\ halfcarry_sub_table[lookup] | ( bytetemp ? 0 : FLAG_Z ) |\ ( bytetemp & FLAG_S );\ if(F & FLAG_H) bytetemp--;\ F |= ( bytetemp & FLAG_3 ) | ( (bytetemp&0x02) ? FLAG_5 : 0 );\ MEMPTR=MEMPTR+1;\ } /*undocumented flag effects for block output operations*/ #define OUT_BL(pbyte) \ {\ Z80EX_BYTE kval;\ kval=pbyte+L;\ if((pbyte+L) > 255) F |= (FLAG_C | FLAG_H);\ F |= parity_table[((kval & 7) ^ B)];\ } /*undocumented flag effects for block input operations*/ #define IN_BL(pbyte, c_add) \ {\ Z80EX_BYTE kval;\ kval=pbyte+((C+(c_add)) & 0xff);\ if((pbyte+((C+(c_add)) & 0xff)) > 255) F |= (FLAG_C | FLAG_H);\ F |= parity_table[((kval & 7) ^ B)];\ } #define INI(rd, wr) \ {\ Z80EX_BYTE initemp;\ MEMPTR=BC+1;\ READ_PORT(initemp, BC, rd);\ WRITE_MEM( HL, initemp, wr );\ B--; HL++;\ F = ( initemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ IN_BL(initemp,1);\ } #define OUTI(rd, wr) \ {\ Z80EX_BYTE outitemp;\ READ_MEM(outitemp, HL, rd);\ B--; \ MEMPTR=BC+1;\ WRITE_PORT(BC,outitemp,wr);\ HL++;\ F = (outitemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ OUT_BL(outitemp);\ } #define LDD(rd, wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ BC--;\ WRITE_MEM(DE,bytetemp,wr);\ DE--; HL--;\ bytetemp += A;\ F = ( F & ( FLAG_C | FLAG_Z | FLAG_S ) ) | ( BC ? FLAG_V : 0 ) |\ ( bytetemp & FLAG_3 ) | ( (bytetemp & 0x02) ? FLAG_5 : 0 );\ } #define CPD(rd) \ {\ Z80EX_BYTE value,bytetemp,lookup;\ READ_MEM(value, HL, rd);\ bytetemp = A - value;\ lookup = ( ( A & 0x08 ) >> 3 ) |\ ( ( (value) & 0x08 ) >> 2 ) |\ ( ( bytetemp & 0x08 ) >> 1 );\ HL--; BC--;\ F = ( F & FLAG_C ) | ( BC ? ( FLAG_V | FLAG_N ) : FLAG_N ) |\ halfcarry_sub_table[lookup] | ( bytetemp ? 0 : FLAG_Z ) |\ ( bytetemp & FLAG_S );\ if(F & FLAG_H) bytetemp--;\ F |= ( bytetemp & FLAG_3 ) | ( (bytetemp&0x02) ? FLAG_5 : 0 );\ MEMPTR=MEMPTR-1;\ } #define IND(rd,wr) \ {\ Z80EX_BYTE initemp;\ MEMPTR=BC-1;\ READ_PORT(initemp, BC, rd);\ WRITE_MEM( HL, initemp, wr );\ B--; HL--;\ F = ( initemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ IN_BL(initemp,-1)\ } #define OUTD(rd, wr) \ {\ Z80EX_BYTE outitemp;\ READ_MEM(outitemp, HL, rd);\ B--;\ MEMPTR=BC-1;\ WRITE_PORT(BC,outitemp,wr);\ HL--;\ F = (outitemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ OUT_BL(outitemp);\ } #define LDIR(t1,t2,rd,wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ WRITE_MEM(DE,bytetemp,wr);\ HL++; DE++; BC--;\ bytetemp += A;\ F = ( F & ( FLAG_C | FLAG_Z | FLAG_S ) ) | ( BC ? FLAG_V : 0 ) |\ ( bytetemp & FLAG_3 ) | ( (bytetemp & 0x02) ? FLAG_5 : 0 );\ if(BC) {\ PC-=2;\ T_WAIT_UNTIL(t2);\ MEMPTR=PC+1;\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ } #define CPIR(t1, t2, rd) \ {\ Z80EX_BYTE value,bytetemp,lookup;\ READ_MEM(value, HL, rd);\ bytetemp = A - value;\ lookup = ( ( A & 0x08 ) >> 3 ) |\ ( ( (value) & 0x08 ) >> 2 ) |\ ( ( bytetemp & 0x08 ) >> 1 );\ HL++; BC--;\ F = ( F & FLAG_C ) | ( BC ? ( FLAG_V | FLAG_N ) : FLAG_N ) |\ halfcarry_sub_table[lookup] | ( bytetemp ? 0 : FLAG_Z ) |\ ( bytetemp & FLAG_S );\ if(F & FLAG_H) bytetemp--;\ F |= ( bytetemp & FLAG_3 ) | ( (bytetemp&0x02) ? FLAG_5 : 0 );\ if( ( F & ( FLAG_V | FLAG_Z ) ) == FLAG_V ) {\ PC-=2;\ MEMPTR=PC+1;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ MEMPTR=MEMPTR+1;\ T_WAIT_UNTIL(t1);\ }\ } #define INIR(t1,t2,rd,wr) \ {\ Z80EX_BYTE initemp;\ READ_PORT(initemp, BC, rd);\ WRITE_MEM( HL, initemp, wr);\ MEMPTR=BC+1;\ B--; HL++;\ F = ( initemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ if( B ) {\ PC -= 2;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ IN_BL(initemp,1)\ } #define OTIR(t1,t2,rd,wr) \ {\ Z80EX_BYTE outitemp;\ READ_MEM(outitemp, HL, rd);\ B--;\ MEMPTR=BC+1;\ WRITE_PORT(BC, outitemp, wr);\ HL++;\ F = (outitemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ if( B ) {\ PC -= 2;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ OUT_BL(outitemp);\ } #define LDDR(t1,t2,rd,wr) \ {\ Z80EX_BYTE bytetemp;\ READ_MEM(bytetemp, HL, rd);\ WRITE_MEM(DE,bytetemp,wr);\ HL--; DE--; BC--;\ bytetemp += A;\ F = ( F & ( FLAG_C | FLAG_Z | FLAG_S ) ) | ( BC ? FLAG_V : 0 ) |\ ( bytetemp & FLAG_3 ) | ( (bytetemp & 0x02) ? FLAG_5 : 0 );\ if(BC) {\ PC-=2;\ T_WAIT_UNTIL(t2);\ MEMPTR=PC+1;\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ } #define CPDR(t1,t2,rd) \ {\ Z80EX_BYTE value,bytetemp,lookup;\ READ_MEM(value, HL, rd);\ bytetemp = A - value;\ lookup = ( ( A & 0x08 ) >> 3 ) |\ ( ( (value) & 0x08 ) >> 2 ) |\ ( ( bytetemp & 0x08 ) >> 1 );\ HL--; BC--;\ F = ( F & FLAG_C ) | ( BC ? ( FLAG_V | FLAG_N ) : FLAG_N ) |\ halfcarry_sub_table[lookup] | ( bytetemp ? 0 : FLAG_Z ) |\ ( bytetemp & FLAG_S );\ if(F & FLAG_H) bytetemp--;\ F |= ( bytetemp & FLAG_3 ) | ( (bytetemp&0x02) ? FLAG_5 : 0 );\ if( ( F & ( FLAG_V | FLAG_Z ) ) == FLAG_V ) {\ PC-=2;\ MEMPTR=PC+1;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ MEMPTR=MEMPTR-1;\ T_WAIT_UNTIL(t1);\ }\ } #define INDR(t1,t2,rd,wr) \ {\ Z80EX_BYTE initemp;\ READ_PORT(initemp, BC, rd);\ WRITE_MEM( HL, initemp, wr );\ MEMPTR=BC-1;\ B--; HL--;\ F = ( initemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ if( B ) {\ PC -= 2;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ IN_BL(initemp,-1)\ } #define OTDR(t1,t2,rd,wr) \ {\ Z80EX_BYTE outitemp;\ READ_MEM(outitemp, HL, rd);\ B--;\ MEMPTR=BC-1;\ WRITE_PORT(BC,outitemp,wr);\ HL--;\ F = (outitemp & 0x80 ? FLAG_N : 0 ) | sz53_table[B];\ if( B ) {\ PC -= 2;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ OUT_BL(outitemp);\ } #define RLCA() \ {\ A = ( A << 1 ) | ( A >> 7 );\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( A & ( FLAG_C | FLAG_3 | FLAG_5 ) );\ } #define RRCA() \ {\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) | ( A & FLAG_C );\ A = ( A >> 1) | ( A << 7 );\ F |= ( A & ( FLAG_3 | FLAG_5 ) );\ } #define DJNZ(offset, t1, t2) \ {\ B--;\ if(B) {\ PC += offset;\ MEMPTR=PC;\ T_WAIT_UNTIL(t2);\ }\ else\ {\ T_WAIT_UNTIL(t1);\ }\ } #define RLA() \ {\ Z80EX_BYTE bytetemp = A;\ A = ( A << 1 ) | ( F & FLAG_C );\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( A & ( FLAG_3 | FLAG_5 ) ) | ( bytetemp >> 7 );\ } #define RRA() \ {\ Z80EX_BYTE bytetemp = A;\ A = ( A >> 1 ) | ( F << 7 );\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( A & ( FLAG_3 | FLAG_5 ) ) | ( bytetemp & FLAG_C ) ;\ } #define DAA() \ {\ const Z80EX_BYTE *tdaa = (daatab+(A+0x100*((F & 3) + ((F >> 2) & 4)))*2);\ F = *tdaa; A = *(tdaa + 1);\ } /* old, non-exact version, from FUSE #define DAA() \ {\ Z80EX_BYTE add = 0, carry = ( F & FLAG_C );\ if( ( F & FLAG_H ) || ( (A & 0x0f)>9 ) ) add=6;\ if( carry || (A > 0x9f ) ) add|=0x60;\ if( A > 0x99 ) carry=1;\ if ( F & FLAG_N ) {\ SUB(add);\ } else {\ if( (A>0x90) && ( (A & 0x0f)>9) ) add|=0x60;\ ADD(A, add);\ }\ F = ( F & ~( FLAG_C | FLAG_P) ) | carry | parity_table[A];\ } */ #define EX(rp1,rp2) \ {\ Z80EX_WORD wordtemp=rp1; rp1=rp2; rp2=wordtemp;\ } #define EX_MPTR(rp1,rp2) \ {\ Z80EX_WORD wordtemp=rp1; rp1=rp2; rp2=wordtemp;\ MEMPTR=wordtemp;\ } #define CPL() \ {\ A ^= 0xff;\ F = ( F & ( FLAG_C | FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( A & ( FLAG_3 | FLAG_5 ) ) | ( FLAG_N | FLAG_H );\ } #define SCF() \ {\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( A & ( FLAG_3 | FLAG_5 ) ) |\ FLAG_C;\ } #define CCF() \ {\ F = ( F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |\ ( ( F & FLAG_C ) ? FLAG_H : FLAG_C ) | ( A & ( FLAG_3 | FLAG_5 ) );\ } #define HALT() \ {\ cpu->halted=1;\ PC--;\ } #define EXX() \ {\ Z80EX_WORD wordtemp;\ wordtemp = BC; BC = BC_; BC_ = wordtemp;\ wordtemp = DE; DE = DE_; DE_ = wordtemp;\ wordtemp = HL; HL = HL_; HL_ = wordtemp;\ } #define DI() \ {\ IFF1=IFF2=0;\ } #define EI() \ {\ IFF1 = IFF2 = 1;\ cpu->noint_once=1;\ } #define SET(bit, val) \ {\ val |= (1 << bit);\ } #define RES(bit, val) \ {\ val &= ~(1 << bit);\ } #endif ./z80ex-1.1.21/opcodes/0000755000175000017500000000000012172630426012466 5ustar booboo./z80ex-1.1.21/opcodes/opcodes_ddcb.c0000644000175000017500000014654611061326375015263 0ustar booboo/* autogenerated from ./opcodes_ddfdcb.dat, do not edit */ /*LD B,RLC (IX+$)*/ static void op_DDCB_0x00(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RLC (IX+$)*/ static void op_DDCB_0x01(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RLC (IX+$)*/ static void op_DDCB_0x02(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RLC (IX+$)*/ static void op_DDCB_0x03(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RLC (IX+$)*/ static void op_DDCB_0x04(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RLC (IX+$)*/ static void op_DDCB_0x05(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RLC (IX+$)*/ static void op_DDCB_0x06(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RLC (IX+$)*/ static void op_DDCB_0x07(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RLC(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RRC (IX+$)*/ static void op_DDCB_0x08(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RRC (IX+$)*/ static void op_DDCB_0x09(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RRC (IX+$)*/ static void op_DDCB_0x0a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RRC (IX+$)*/ static void op_DDCB_0x0b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RRC (IX+$)*/ static void op_DDCB_0x0c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RRC (IX+$)*/ static void op_DDCB_0x0d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RRC (IX+$)*/ static void op_DDCB_0x0e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RRC (IX+$)*/ static void op_DDCB_0x0f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RRC(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RL (IX+$)*/ static void op_DDCB_0x10(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RL (IX+$)*/ static void op_DDCB_0x11(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RL (IX+$)*/ static void op_DDCB_0x12(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RL (IX+$)*/ static void op_DDCB_0x13(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RL (IX+$)*/ static void op_DDCB_0x14(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RL (IX+$)*/ static void op_DDCB_0x15(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RL (IX+$)*/ static void op_DDCB_0x16(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RL (IX+$)*/ static void op_DDCB_0x17(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RL(temp_byte); LD16(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RR (IX+$)*/ static void op_DDCB_0x18(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RR (IX+$)*/ static void op_DDCB_0x19(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RR (IX+$)*/ static void op_DDCB_0x1a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RR (IX+$)*/ static void op_DDCB_0x1b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RR (IX+$)*/ static void op_DDCB_0x1c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RR (IX+$)*/ static void op_DDCB_0x1d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RR (IX+$)*/ static void op_DDCB_0x1e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RR (IX+$)*/ static void op_DDCB_0x1f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RR(temp_byte); LD16(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SLA (IX+$)*/ static void op_DDCB_0x20(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SLA (IX+$)*/ static void op_DDCB_0x21(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SLA (IX+$)*/ static void op_DDCB_0x22(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SLA (IX+$)*/ static void op_DDCB_0x23(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SLA (IX+$)*/ static void op_DDCB_0x24(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SLA (IX+$)*/ static void op_DDCB_0x25(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SLA (IX+$)*/ static void op_DDCB_0x26(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SLA (IX+$)*/ static void op_DDCB_0x27(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLA(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SRA (IX+$)*/ static void op_DDCB_0x28(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SRA (IX+$)*/ static void op_DDCB_0x29(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SRA (IX+$)*/ static void op_DDCB_0x2a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SRA (IX+$)*/ static void op_DDCB_0x2b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SRA (IX+$)*/ static void op_DDCB_0x2c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SRA (IX+$)*/ static void op_DDCB_0x2d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SRA (IX+$)*/ static void op_DDCB_0x2e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SRA (IX+$)*/ static void op_DDCB_0x2f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRA(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SLL (IX+$)*/ static void op_DDCB_0x30(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SLL (IX+$)*/ static void op_DDCB_0x31(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SLL (IX+$)*/ static void op_DDCB_0x32(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SLL (IX+$)*/ static void op_DDCB_0x33(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SLL (IX+$)*/ static void op_DDCB_0x34(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SLL (IX+$)*/ static void op_DDCB_0x35(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SLL (IX+$)*/ static void op_DDCB_0x36(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SLL (IX+$)*/ static void op_DDCB_0x37(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SLL(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SRL (IX+$)*/ static void op_DDCB_0x38(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SRL (IX+$)*/ static void op_DDCB_0x39(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SRL (IX+$)*/ static void op_DDCB_0x3a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SRL (IX+$)*/ static void op_DDCB_0x3b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SRL (IX+$)*/ static void op_DDCB_0x3c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SRL (IX+$)*/ static void op_DDCB_0x3d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SRL (IX+$)*/ static void op_DDCB_0x3e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SRL (IX+$)*/ static void op_DDCB_0x3f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SRL(temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*BIT 0,(IX+$)*/ static void op_DDCB_0x47(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(0,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 1,(IX+$)*/ static void op_DDCB_0x4f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(1,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 2,(IX+$)*/ static void op_DDCB_0x57(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(2,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 3,(IX+$)*/ static void op_DDCB_0x5f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(3,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 4,(IX+$)*/ static void op_DDCB_0x67(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(4,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 5,(IX+$)*/ static void op_DDCB_0x6f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(5,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 6,(IX+$)*/ static void op_DDCB_0x77(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(6,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 7,(IX+$)*/ static void op_DDCB_0x7f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); BIT_MPTR(7,temp_byte); T_WAIT_UNTIL(16); return; } /*LD B,RES 0,(IX+$)*/ static void op_DDCB_0x80(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 0,(IX+$)*/ static void op_DDCB_0x81(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 0,(IX+$)*/ static void op_DDCB_0x82(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 0,(IX+$)*/ static void op_DDCB_0x83(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 0,(IX+$)*/ static void op_DDCB_0x84(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 0,(IX+$)*/ static void op_DDCB_0x85(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 0,(IX+$)*/ static void op_DDCB_0x86(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 0,(IX+$)*/ static void op_DDCB_0x87(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(0,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 1,(IX+$)*/ static void op_DDCB_0x88(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 1,(IX+$)*/ static void op_DDCB_0x89(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 1,(IX+$)*/ static void op_DDCB_0x8a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 1,(IX+$)*/ static void op_DDCB_0x8b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 1,(IX+$)*/ static void op_DDCB_0x8c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 1,(IX+$)*/ static void op_DDCB_0x8d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 1,(IX+$)*/ static void op_DDCB_0x8e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 1,(IX+$)*/ static void op_DDCB_0x8f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(1,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 2,(IX+$)*/ static void op_DDCB_0x90(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 2,(IX+$)*/ static void op_DDCB_0x91(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 2,(IX+$)*/ static void op_DDCB_0x92(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 2,(IX+$)*/ static void op_DDCB_0x93(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 2,(IX+$)*/ static void op_DDCB_0x94(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 2,(IX+$)*/ static void op_DDCB_0x95(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 2,(IX+$)*/ static void op_DDCB_0x96(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 2,(IX+$)*/ static void op_DDCB_0x97(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(2,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 3,(IX+$)*/ static void op_DDCB_0x98(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 3,(IX+$)*/ static void op_DDCB_0x99(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 3,(IX+$)*/ static void op_DDCB_0x9a(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 3,(IX+$)*/ static void op_DDCB_0x9b(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 3,(IX+$)*/ static void op_DDCB_0x9c(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 3,(IX+$)*/ static void op_DDCB_0x9d(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 3,(IX+$)*/ static void op_DDCB_0x9e(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 3,(IX+$)*/ static void op_DDCB_0x9f(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(3,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 4,(IX+$)*/ static void op_DDCB_0xa0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 4,(IX+$)*/ static void op_DDCB_0xa1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 4,(IX+$)*/ static void op_DDCB_0xa2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 4,(IX+$)*/ static void op_DDCB_0xa3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 4,(IX+$)*/ static void op_DDCB_0xa4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 4,(IX+$)*/ static void op_DDCB_0xa5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 4,(IX+$)*/ static void op_DDCB_0xa6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 4,(IX+$)*/ static void op_DDCB_0xa7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(4,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 5,(IX+$)*/ static void op_DDCB_0xa8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 5,(IX+$)*/ static void op_DDCB_0xa9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 5,(IX+$)*/ static void op_DDCB_0xaa(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 5,(IX+$)*/ static void op_DDCB_0xab(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 5,(IX+$)*/ static void op_DDCB_0xac(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 5,(IX+$)*/ static void op_DDCB_0xad(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 5,(IX+$)*/ static void op_DDCB_0xae(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 5,(IX+$)*/ static void op_DDCB_0xaf(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(5,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 6,(IX+$)*/ static void op_DDCB_0xb0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 6,(IX+$)*/ static void op_DDCB_0xb1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 6,(IX+$)*/ static void op_DDCB_0xb2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 6,(IX+$)*/ static void op_DDCB_0xb3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 6,(IX+$)*/ static void op_DDCB_0xb4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 6,(IX+$)*/ static void op_DDCB_0xb5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 6,(IX+$)*/ static void op_DDCB_0xb6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 6,(IX+$)*/ static void op_DDCB_0xb7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(6,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 7,(IX+$)*/ static void op_DDCB_0xb8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 7,(IX+$)*/ static void op_DDCB_0xb9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 7,(IX+$)*/ static void op_DDCB_0xba(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 7,(IX+$)*/ static void op_DDCB_0xbb(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 7,(IX+$)*/ static void op_DDCB_0xbc(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 7,(IX+$)*/ static void op_DDCB_0xbd(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 7,(IX+$)*/ static void op_DDCB_0xbe(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 7,(IX+$)*/ static void op_DDCB_0xbf(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); RES(7,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 0,(IX+$)*/ static void op_DDCB_0xc0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 0,(IX+$)*/ static void op_DDCB_0xc1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 0,(IX+$)*/ static void op_DDCB_0xc2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 0,(IX+$)*/ static void op_DDCB_0xc3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 0,(IX+$)*/ static void op_DDCB_0xc4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 0,(IX+$)*/ static void op_DDCB_0xc5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 0,(IX+$)*/ static void op_DDCB_0xc6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 0,(IX+$)*/ static void op_DDCB_0xc7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(0,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 1,(IX+$)*/ static void op_DDCB_0xc8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 1,(IX+$)*/ static void op_DDCB_0xc9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 1,(IX+$)*/ static void op_DDCB_0xca(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 1,(IX+$)*/ static void op_DDCB_0xcb(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 1,(IX+$)*/ static void op_DDCB_0xcc(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 1,(IX+$)*/ static void op_DDCB_0xcd(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 1,(IX+$)*/ static void op_DDCB_0xce(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 1,(IX+$)*/ static void op_DDCB_0xcf(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(1,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 2,(IX+$)*/ static void op_DDCB_0xd0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 2,(IX+$)*/ static void op_DDCB_0xd1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 2,(IX+$)*/ static void op_DDCB_0xd2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 2,(IX+$)*/ static void op_DDCB_0xd3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 2,(IX+$)*/ static void op_DDCB_0xd4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 2,(IX+$)*/ static void op_DDCB_0xd5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 2,(IX+$)*/ static void op_DDCB_0xd6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 2,(IX+$)*/ static void op_DDCB_0xd7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(2,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 3,(IX+$)*/ static void op_DDCB_0xd8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 3,(IX+$)*/ static void op_DDCB_0xd9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 3,(IX+$)*/ static void op_DDCB_0xda(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 3,(IX+$)*/ static void op_DDCB_0xdb(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 3,(IX+$)*/ static void op_DDCB_0xdc(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 3,(IX+$)*/ static void op_DDCB_0xdd(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 3,(IX+$)*/ static void op_DDCB_0xde(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 3,(IX+$)*/ static void op_DDCB_0xdf(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(3,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 4,(IX+$)*/ static void op_DDCB_0xe0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 4,(IX+$)*/ static void op_DDCB_0xe1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 4,(IX+$)*/ static void op_DDCB_0xe2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 4,(IX+$)*/ static void op_DDCB_0xe3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 4,(IX+$)*/ static void op_DDCB_0xe4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 4,(IX+$)*/ static void op_DDCB_0xe5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 4,(IX+$)*/ static void op_DDCB_0xe6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 4,(IX+$)*/ static void op_DDCB_0xe7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(4,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 5,(IX+$)*/ static void op_DDCB_0xe8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 5,(IX+$)*/ static void op_DDCB_0xe9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 5,(IX+$)*/ static void op_DDCB_0xea(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 5,(IX+$)*/ static void op_DDCB_0xeb(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 5,(IX+$)*/ static void op_DDCB_0xec(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 5,(IX+$)*/ static void op_DDCB_0xed(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 5,(IX+$)*/ static void op_DDCB_0xee(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 5,(IX+$)*/ static void op_DDCB_0xef(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(5,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 6,(IX+$)*/ static void op_DDCB_0xf0(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 6,(IX+$)*/ static void op_DDCB_0xf1(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 6,(IX+$)*/ static void op_DDCB_0xf2(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 6,(IX+$)*/ static void op_DDCB_0xf3(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 6,(IX+$)*/ static void op_DDCB_0xf4(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 6,(IX+$)*/ static void op_DDCB_0xf5(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 6,(IX+$)*/ static void op_DDCB_0xf6(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 6,(IX+$)*/ static void op_DDCB_0xf7(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(6,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 7,(IX+$)*/ static void op_DDCB_0xf8(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(B,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 7,(IX+$)*/ static void op_DDCB_0xf9(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(C,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 7,(IX+$)*/ static void op_DDCB_0xfa(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(D,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 7,(IX+$)*/ static void op_DDCB_0xfb(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(E,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 7,(IX+$)*/ static void op_DDCB_0xfc(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(H,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 7,(IX+$)*/ static void op_DDCB_0xfd(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(L,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 7,(IX+$)*/ static void op_DDCB_0xfe(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 7,(IX+$)*/ static void op_DDCB_0xff(Z80EX_CONTEXT *cpu) { MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SET(7,temp_byte); LD(A,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /**/ static const z80ex_opcode_fn opcodes_ddcb[0x100] = { op_DDCB_0x00 , op_DDCB_0x01 , op_DDCB_0x02 , op_DDCB_0x03 , op_DDCB_0x04 , op_DDCB_0x05 , op_DDCB_0x06 , op_DDCB_0x07 , op_DDCB_0x08 , op_DDCB_0x09 , op_DDCB_0x0a , op_DDCB_0x0b , op_DDCB_0x0c , op_DDCB_0x0d , op_DDCB_0x0e , op_DDCB_0x0f , op_DDCB_0x10 , op_DDCB_0x11 , op_DDCB_0x12 , op_DDCB_0x13 , op_DDCB_0x14 , op_DDCB_0x15 , op_DDCB_0x16 , op_DDCB_0x17 , op_DDCB_0x18 , op_DDCB_0x19 , op_DDCB_0x1a , op_DDCB_0x1b , op_DDCB_0x1c , op_DDCB_0x1d , op_DDCB_0x1e , op_DDCB_0x1f , op_DDCB_0x20 , op_DDCB_0x21 , op_DDCB_0x22 , op_DDCB_0x23 , op_DDCB_0x24 , op_DDCB_0x25 , op_DDCB_0x26 , op_DDCB_0x27 , op_DDCB_0x28 , op_DDCB_0x29 , op_DDCB_0x2a , op_DDCB_0x2b , op_DDCB_0x2c , op_DDCB_0x2d , op_DDCB_0x2e , op_DDCB_0x2f , op_DDCB_0x30 , op_DDCB_0x31 , op_DDCB_0x32 , op_DDCB_0x33 , op_DDCB_0x34 , op_DDCB_0x35 , op_DDCB_0x36 , op_DDCB_0x37 , op_DDCB_0x38 , op_DDCB_0x39 , op_DDCB_0x3a , op_DDCB_0x3b , op_DDCB_0x3c , op_DDCB_0x3d , op_DDCB_0x3e , op_DDCB_0x3f , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x47 , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x4f , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x57 , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x5f , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x67 , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x6f , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x77 , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x7f , op_DDCB_0x80 , op_DDCB_0x81 , op_DDCB_0x82 , op_DDCB_0x83 , op_DDCB_0x84 , op_DDCB_0x85 , op_DDCB_0x86 , op_DDCB_0x87 , op_DDCB_0x88 , op_DDCB_0x89 , op_DDCB_0x8a , op_DDCB_0x8b , op_DDCB_0x8c , op_DDCB_0x8d , op_DDCB_0x8e , op_DDCB_0x8f , op_DDCB_0x90 , op_DDCB_0x91 , op_DDCB_0x92 , op_DDCB_0x93 , op_DDCB_0x94 , op_DDCB_0x95 , op_DDCB_0x96 , op_DDCB_0x97 , op_DDCB_0x98 , op_DDCB_0x99 , op_DDCB_0x9a , op_DDCB_0x9b , op_DDCB_0x9c , op_DDCB_0x9d , op_DDCB_0x9e , op_DDCB_0x9f , op_DDCB_0xa0 , op_DDCB_0xa1 , op_DDCB_0xa2 , op_DDCB_0xa3 , op_DDCB_0xa4 , op_DDCB_0xa5 , op_DDCB_0xa6 , op_DDCB_0xa7 , op_DDCB_0xa8 , op_DDCB_0xa9 , op_DDCB_0xaa , op_DDCB_0xab , op_DDCB_0xac , op_DDCB_0xad , op_DDCB_0xae , op_DDCB_0xaf , op_DDCB_0xb0 , op_DDCB_0xb1 , op_DDCB_0xb2 , op_DDCB_0xb3 , op_DDCB_0xb4 , op_DDCB_0xb5 , op_DDCB_0xb6 , op_DDCB_0xb7 , op_DDCB_0xb8 , op_DDCB_0xb9 , op_DDCB_0xba , op_DDCB_0xbb , op_DDCB_0xbc , op_DDCB_0xbd , op_DDCB_0xbe , op_DDCB_0xbf , op_DDCB_0xc0 , op_DDCB_0xc1 , op_DDCB_0xc2 , op_DDCB_0xc3 , op_DDCB_0xc4 , op_DDCB_0xc5 , op_DDCB_0xc6 , op_DDCB_0xc7 , op_DDCB_0xc8 , op_DDCB_0xc9 , op_DDCB_0xca , op_DDCB_0xcb , op_DDCB_0xcc , op_DDCB_0xcd , op_DDCB_0xce , op_DDCB_0xcf , op_DDCB_0xd0 , op_DDCB_0xd1 , op_DDCB_0xd2 , op_DDCB_0xd3 , op_DDCB_0xd4 , op_DDCB_0xd5 , op_DDCB_0xd6 , op_DDCB_0xd7 , op_DDCB_0xd8 , op_DDCB_0xd9 , op_DDCB_0xda , op_DDCB_0xdb , op_DDCB_0xdc , op_DDCB_0xdd , op_DDCB_0xde , op_DDCB_0xdf , op_DDCB_0xe0 , op_DDCB_0xe1 , op_DDCB_0xe2 , op_DDCB_0xe3 , op_DDCB_0xe4 , op_DDCB_0xe5 , op_DDCB_0xe6 , op_DDCB_0xe7 , op_DDCB_0xe8 , op_DDCB_0xe9 , op_DDCB_0xea , op_DDCB_0xeb , op_DDCB_0xec , op_DDCB_0xed , op_DDCB_0xee , op_DDCB_0xef , op_DDCB_0xf0 , op_DDCB_0xf1 , op_DDCB_0xf2 , op_DDCB_0xf3 , op_DDCB_0xf4 , op_DDCB_0xf5 , op_DDCB_0xf6 , op_DDCB_0xf7 , op_DDCB_0xf8 , op_DDCB_0xf9 , op_DDCB_0xfa , op_DDCB_0xfb , op_DDCB_0xfc , op_DDCB_0xfd , op_DDCB_0xfe , op_DDCB_0xff }; ./z80ex-1.1.21/opcodes/opcodes_base.c0000644000175000017500000010375211061326375015271 0ustar booboo/* autogenerated from ./opcodes_base.dat, do not edit */ /*NOP*/ static void op_0x00(Z80EX_CONTEXT *cpu) { T_WAIT_UNTIL(4); return; } /*LD BC,@*/ static void op_0x01(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(BC,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (BC),A*/ static void op_0x02(Z80EX_CONTEXT *cpu) { LD_A_TO_ADDR_MPTR(temp_byte,A, (BC)); WRITE_MEM((BC),temp_byte,4); T_WAIT_UNTIL(7); return; } /*INC BC*/ static void op_0x03(Z80EX_CONTEXT *cpu) { INC16(BC); T_WAIT_UNTIL(6); return; } /*INC B*/ static void op_0x04(Z80EX_CONTEXT *cpu) { INC(B); T_WAIT_UNTIL(4); return; } /*DEC B*/ static void op_0x05(Z80EX_CONTEXT *cpu) { DEC(B); T_WAIT_UNTIL(4); return; } /*LD B,#*/ static void op_0x06(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(B,temp_byte); T_WAIT_UNTIL(7); return; } /*RLCA*/ static void op_0x07(Z80EX_CONTEXT *cpu) { RLCA(); T_WAIT_UNTIL(4); return; } /*EX AF,AF'*/ static void op_0x08(Z80EX_CONTEXT *cpu) { EX(AF,AF_); T_WAIT_UNTIL(4); return; } /*ADD HL,BC*/ static void op_0x09(Z80EX_CONTEXT *cpu) { ADD16(HL,BC); T_WAIT_UNTIL(11); return; } /*LD A,(BC)*/ static void op_0x0a(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(BC),4); LD_A_FROM_ADDR_MPTR(A,temp_byte, (BC)); T_WAIT_UNTIL(7); return; } /*DEC BC*/ static void op_0x0b(Z80EX_CONTEXT *cpu) { DEC16(BC); T_WAIT_UNTIL(6); return; } /*INC C*/ static void op_0x0c(Z80EX_CONTEXT *cpu) { INC(C); T_WAIT_UNTIL(4); return; } /*DEC C*/ static void op_0x0d(Z80EX_CONTEXT *cpu) { DEC(C); T_WAIT_UNTIL(4); return; } /*LD C,#*/ static void op_0x0e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(C,temp_byte); T_WAIT_UNTIL(7); return; } /*RRCA*/ static void op_0x0f(Z80EX_CONTEXT *cpu) { RRCA(); T_WAIT_UNTIL(4); return; } /*DJNZ %*/ static void op_0x10(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; DJNZ(temp_byte_s, /*t:*/ /*t1*/8,/*t2*/13); return; } /*LD DE,@*/ static void op_0x11(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(DE,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (DE),A*/ static void op_0x12(Z80EX_CONTEXT *cpu) { LD_A_TO_ADDR_MPTR(temp_byte,A, (DE)); WRITE_MEM((DE),temp_byte,4); T_WAIT_UNTIL(7); return; } /*INC DE*/ static void op_0x13(Z80EX_CONTEXT *cpu) { INC16(DE); T_WAIT_UNTIL(6); return; } /*INC D*/ static void op_0x14(Z80EX_CONTEXT *cpu) { INC(D); T_WAIT_UNTIL(4); return; } /*DEC D*/ static void op_0x15(Z80EX_CONTEXT *cpu) { DEC(D); T_WAIT_UNTIL(4); return; } /*LD D,#*/ static void op_0x16(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(D,temp_byte); T_WAIT_UNTIL(7); return; } /*RLA*/ static void op_0x17(Z80EX_CONTEXT *cpu) { RLA(); T_WAIT_UNTIL(4); return; } /*JR %*/ static void op_0x18(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; JR(temp_byte_s); T_WAIT_UNTIL(12); return; } /*ADD HL,DE*/ static void op_0x19(Z80EX_CONTEXT *cpu) { ADD16(HL,DE); T_WAIT_UNTIL(11); return; } /*LD A,(DE)*/ static void op_0x1a(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(DE),4); LD_A_FROM_ADDR_MPTR(A,temp_byte, (DE)); T_WAIT_UNTIL(7); return; } /*DEC DE*/ static void op_0x1b(Z80EX_CONTEXT *cpu) { DEC16(DE); T_WAIT_UNTIL(6); return; } /*INC E*/ static void op_0x1c(Z80EX_CONTEXT *cpu) { INC(E); T_WAIT_UNTIL(4); return; } /*DEC E*/ static void op_0x1d(Z80EX_CONTEXT *cpu) { DEC(E); T_WAIT_UNTIL(4); return; } /*LD E,#*/ static void op_0x1e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(E,temp_byte); T_WAIT_UNTIL(7); return; } /*RRA*/ static void op_0x1f(Z80EX_CONTEXT *cpu) { RRA(); T_WAIT_UNTIL(4); return; } /*JR NZ,%*/ static void op_0x20(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; if(!(F & FLAG_Z)) { JR(temp_byte_s); T_WAIT_UNTIL(12); } else { T_WAIT_UNTIL(7);} return; } /*LD HL,@*/ static void op_0x21(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(HL,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (@),HL*/ static void op_0x22(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,HL, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*INC HL*/ static void op_0x23(Z80EX_CONTEXT *cpu) { INC16(HL); T_WAIT_UNTIL(6); return; } /*INC H*/ static void op_0x24(Z80EX_CONTEXT *cpu) { INC(H); T_WAIT_UNTIL(4); return; } /*DEC H*/ static void op_0x25(Z80EX_CONTEXT *cpu) { DEC(H); T_WAIT_UNTIL(4); return; } /*LD H,#*/ static void op_0x26(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(H,temp_byte); T_WAIT_UNTIL(7); return; } /*DAA*/ static void op_0x27(Z80EX_CONTEXT *cpu) { DAA(); T_WAIT_UNTIL(4); return; } /*JR Z,%*/ static void op_0x28(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; if(F & FLAG_Z) { JR(temp_byte_s); T_WAIT_UNTIL(12); } else { T_WAIT_UNTIL(7);} return; } /*ADD HL,HL*/ static void op_0x29(Z80EX_CONTEXT *cpu) { ADD16(HL,HL); T_WAIT_UNTIL(11); return; } /*LD HL,(@)*/ static void op_0x2a(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(HL,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*DEC HL*/ static void op_0x2b(Z80EX_CONTEXT *cpu) { DEC16(HL); T_WAIT_UNTIL(6); return; } /*INC L*/ static void op_0x2c(Z80EX_CONTEXT *cpu) { INC(L); T_WAIT_UNTIL(4); return; } /*DEC L*/ static void op_0x2d(Z80EX_CONTEXT *cpu) { DEC(L); T_WAIT_UNTIL(4); return; } /*LD L,#*/ static void op_0x2e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(L,temp_byte); T_WAIT_UNTIL(7); return; } /*CPL*/ static void op_0x2f(Z80EX_CONTEXT *cpu) { CPL(); T_WAIT_UNTIL(4); return; } /*JR NC,%*/ static void op_0x30(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; if(!(F & FLAG_C)) { JR(temp_byte_s); T_WAIT_UNTIL(12); } else { T_WAIT_UNTIL(7);} return; } /*LD SP,@*/ static void op_0x31(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(SP,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (@),A*/ static void op_0x32(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_A_TO_ADDR_MPTR(temp_byte,A, temp_addr.w); WRITE_MEM(temp_addr.w,temp_byte,10); T_WAIT_UNTIL(13); return; } /*INC SP*/ static void op_0x33(Z80EX_CONTEXT *cpu) { INC16(SP); T_WAIT_UNTIL(6); return; } /*INC (HL)*/ static void op_0x34(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); INC(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*DEC (HL)*/ static void op_0x35(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); DEC(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*LD (HL),#*/ static void op_0x36(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(temp_byte,temp_byte); WRITE_MEM((HL),temp_byte,7); T_WAIT_UNTIL(10); return; } /*SCF*/ static void op_0x37(Z80EX_CONTEXT *cpu) { SCF(); T_WAIT_UNTIL(4); return; } /*JR C,%*/ static void op_0x38(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; if(F & FLAG_C) { JR(temp_byte_s); T_WAIT_UNTIL(12); } else { T_WAIT_UNTIL(7);} return; } /*ADD HL,SP*/ static void op_0x39(Z80EX_CONTEXT *cpu) { ADD16(HL,SP); T_WAIT_UNTIL(11); return; } /*LD A,(@)*/ static void op_0x3a(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_byte,temp_addr.w,10); LD_A_FROM_ADDR_MPTR(A,temp_byte, temp_addr.w); T_WAIT_UNTIL(13); return; } /*DEC SP*/ static void op_0x3b(Z80EX_CONTEXT *cpu) { DEC16(SP); T_WAIT_UNTIL(6); return; } /*INC A*/ static void op_0x3c(Z80EX_CONTEXT *cpu) { INC(A); T_WAIT_UNTIL(4); return; } /*DEC A*/ static void op_0x3d(Z80EX_CONTEXT *cpu) { DEC(A); T_WAIT_UNTIL(4); return; } /*LD A,#*/ static void op_0x3e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(A,temp_byte); T_WAIT_UNTIL(7); return; } /*CCF*/ static void op_0x3f(Z80EX_CONTEXT *cpu) { CCF(); T_WAIT_UNTIL(4); return; } /*LD B,B*/ static void op_0x40(Z80EX_CONTEXT *cpu) { LD(B,B); T_WAIT_UNTIL(4); return; } /*LD B,C*/ static void op_0x41(Z80EX_CONTEXT *cpu) { LD(B,C); T_WAIT_UNTIL(4); return; } /*LD B,D*/ static void op_0x42(Z80EX_CONTEXT *cpu) { LD(B,D); T_WAIT_UNTIL(4); return; } /*LD B,E*/ static void op_0x43(Z80EX_CONTEXT *cpu) { LD(B,E); T_WAIT_UNTIL(4); return; } /*LD B,H*/ static void op_0x44(Z80EX_CONTEXT *cpu) { LD(B,H); T_WAIT_UNTIL(4); return; } /*LD B,L*/ static void op_0x45(Z80EX_CONTEXT *cpu) { LD(B,L); T_WAIT_UNTIL(4); return; } /*LD B,(HL)*/ static void op_0x46(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(B,temp_byte); T_WAIT_UNTIL(7); return; } /*LD B,A*/ static void op_0x47(Z80EX_CONTEXT *cpu) { LD(B,A); T_WAIT_UNTIL(4); return; } /*LD C,B*/ static void op_0x48(Z80EX_CONTEXT *cpu) { LD(C,B); T_WAIT_UNTIL(4); return; } /*LD C,C*/ static void op_0x49(Z80EX_CONTEXT *cpu) { LD(C,C); T_WAIT_UNTIL(4); return; } /*LD C,D*/ static void op_0x4a(Z80EX_CONTEXT *cpu) { LD(C,D); T_WAIT_UNTIL(4); return; } /*LD C,E*/ static void op_0x4b(Z80EX_CONTEXT *cpu) { LD(C,E); T_WAIT_UNTIL(4); return; } /*LD C,H*/ static void op_0x4c(Z80EX_CONTEXT *cpu) { LD(C,H); T_WAIT_UNTIL(4); return; } /*LD C,L*/ static void op_0x4d(Z80EX_CONTEXT *cpu) { LD(C,L); T_WAIT_UNTIL(4); return; } /*LD C,(HL)*/ static void op_0x4e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(C,temp_byte); T_WAIT_UNTIL(7); return; } /*LD C,A*/ static void op_0x4f(Z80EX_CONTEXT *cpu) { LD(C,A); T_WAIT_UNTIL(4); return; } /*LD D,B*/ static void op_0x50(Z80EX_CONTEXT *cpu) { LD(D,B); T_WAIT_UNTIL(4); return; } /*LD D,C*/ static void op_0x51(Z80EX_CONTEXT *cpu) { LD(D,C); T_WAIT_UNTIL(4); return; } /*LD D,D*/ static void op_0x52(Z80EX_CONTEXT *cpu) { LD(D,D); T_WAIT_UNTIL(4); return; } /*LD D,E*/ static void op_0x53(Z80EX_CONTEXT *cpu) { LD(D,E); T_WAIT_UNTIL(4); return; } /*LD D,H*/ static void op_0x54(Z80EX_CONTEXT *cpu) { LD(D,H); T_WAIT_UNTIL(4); return; } /*LD D,L*/ static void op_0x55(Z80EX_CONTEXT *cpu) { LD(D,L); T_WAIT_UNTIL(4); return; } /*LD D,(HL)*/ static void op_0x56(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(D,temp_byte); T_WAIT_UNTIL(7); return; } /*LD D,A*/ static void op_0x57(Z80EX_CONTEXT *cpu) { LD(D,A); T_WAIT_UNTIL(4); return; } /*LD E,B*/ static void op_0x58(Z80EX_CONTEXT *cpu) { LD(E,B); T_WAIT_UNTIL(4); return; } /*LD E,C*/ static void op_0x59(Z80EX_CONTEXT *cpu) { LD(E,C); T_WAIT_UNTIL(4); return; } /*LD E,D*/ static void op_0x5a(Z80EX_CONTEXT *cpu) { LD(E,D); T_WAIT_UNTIL(4); return; } /*LD E,E*/ static void op_0x5b(Z80EX_CONTEXT *cpu) { LD(E,E); T_WAIT_UNTIL(4); return; } /*LD E,H*/ static void op_0x5c(Z80EX_CONTEXT *cpu) { LD(E,H); T_WAIT_UNTIL(4); return; } /*LD E,L*/ static void op_0x5d(Z80EX_CONTEXT *cpu) { LD(E,L); T_WAIT_UNTIL(4); return; } /*LD E,(HL)*/ static void op_0x5e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(E,temp_byte); T_WAIT_UNTIL(7); return; } /*LD E,A*/ static void op_0x5f(Z80EX_CONTEXT *cpu) { LD(E,A); T_WAIT_UNTIL(4); return; } /*LD H,B*/ static void op_0x60(Z80EX_CONTEXT *cpu) { LD(H,B); T_WAIT_UNTIL(4); return; } /*LD H,C*/ static void op_0x61(Z80EX_CONTEXT *cpu) { LD(H,C); T_WAIT_UNTIL(4); return; } /*LD H,D*/ static void op_0x62(Z80EX_CONTEXT *cpu) { LD(H,D); T_WAIT_UNTIL(4); return; } /*LD H,E*/ static void op_0x63(Z80EX_CONTEXT *cpu) { LD(H,E); T_WAIT_UNTIL(4); return; } /*LD H,H*/ static void op_0x64(Z80EX_CONTEXT *cpu) { LD(H,H); T_WAIT_UNTIL(4); return; } /*LD H,L*/ static void op_0x65(Z80EX_CONTEXT *cpu) { LD(H,L); T_WAIT_UNTIL(4); return; } /*LD H,(HL)*/ static void op_0x66(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(H,temp_byte); T_WAIT_UNTIL(7); return; } /*LD H,A*/ static void op_0x67(Z80EX_CONTEXT *cpu) { LD(H,A); T_WAIT_UNTIL(4); return; } /*LD L,B*/ static void op_0x68(Z80EX_CONTEXT *cpu) { LD(L,B); T_WAIT_UNTIL(4); return; } /*LD L,C*/ static void op_0x69(Z80EX_CONTEXT *cpu) { LD(L,C); T_WAIT_UNTIL(4); return; } /*LD L,D*/ static void op_0x6a(Z80EX_CONTEXT *cpu) { LD(L,D); T_WAIT_UNTIL(4); return; } /*LD L,E*/ static void op_0x6b(Z80EX_CONTEXT *cpu) { LD(L,E); T_WAIT_UNTIL(4); return; } /*LD L,H*/ static void op_0x6c(Z80EX_CONTEXT *cpu) { LD(L,H); T_WAIT_UNTIL(4); return; } /*LD L,L*/ static void op_0x6d(Z80EX_CONTEXT *cpu) { LD(L,L); T_WAIT_UNTIL(4); return; } /*LD L,(HL)*/ static void op_0x6e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(L,temp_byte); T_WAIT_UNTIL(7); return; } /*LD L,A*/ static void op_0x6f(Z80EX_CONTEXT *cpu) { LD(L,A); T_WAIT_UNTIL(4); return; } /*LD (HL),B*/ static void op_0x70(Z80EX_CONTEXT *cpu) { LD(temp_byte,B); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD (HL),C*/ static void op_0x71(Z80EX_CONTEXT *cpu) { LD(temp_byte,C); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD (HL),D*/ static void op_0x72(Z80EX_CONTEXT *cpu) { LD(temp_byte,D); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD (HL),E*/ static void op_0x73(Z80EX_CONTEXT *cpu) { LD(temp_byte,E); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD (HL),H*/ static void op_0x74(Z80EX_CONTEXT *cpu) { LD(temp_byte,H); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD (HL),L*/ static void op_0x75(Z80EX_CONTEXT *cpu) { LD(temp_byte,L); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*HALT*/ static void op_0x76(Z80EX_CONTEXT *cpu) { HALT(); T_WAIT_UNTIL(4); return; } /*LD (HL),A*/ static void op_0x77(Z80EX_CONTEXT *cpu) { LD(temp_byte,A); WRITE_MEM((HL),temp_byte,4); T_WAIT_UNTIL(7); return; } /*LD A,B*/ static void op_0x78(Z80EX_CONTEXT *cpu) { LD(A,B); T_WAIT_UNTIL(4); return; } /*LD A,C*/ static void op_0x79(Z80EX_CONTEXT *cpu) { LD(A,C); T_WAIT_UNTIL(4); return; } /*LD A,D*/ static void op_0x7a(Z80EX_CONTEXT *cpu) { LD(A,D); T_WAIT_UNTIL(4); return; } /*LD A,E*/ static void op_0x7b(Z80EX_CONTEXT *cpu) { LD(A,E); T_WAIT_UNTIL(4); return; } /*LD A,H*/ static void op_0x7c(Z80EX_CONTEXT *cpu) { LD(A,H); T_WAIT_UNTIL(4); return; } /*LD A,L*/ static void op_0x7d(Z80EX_CONTEXT *cpu) { LD(A,L); T_WAIT_UNTIL(4); return; } /*LD A,(HL)*/ static void op_0x7e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); LD(A,temp_byte); T_WAIT_UNTIL(7); return; } /*LD A,A*/ static void op_0x7f(Z80EX_CONTEXT *cpu) { LD(A,A); T_WAIT_UNTIL(4); return; } /*ADD A,B*/ static void op_0x80(Z80EX_CONTEXT *cpu) { ADD(A,B); T_WAIT_UNTIL(4); return; } /*ADD A,C*/ static void op_0x81(Z80EX_CONTEXT *cpu) { ADD(A,C); T_WAIT_UNTIL(4); return; } /*ADD A,D*/ static void op_0x82(Z80EX_CONTEXT *cpu) { ADD(A,D); T_WAIT_UNTIL(4); return; } /*ADD A,E*/ static void op_0x83(Z80EX_CONTEXT *cpu) { ADD(A,E); T_WAIT_UNTIL(4); return; } /*ADD A,H*/ static void op_0x84(Z80EX_CONTEXT *cpu) { ADD(A,H); T_WAIT_UNTIL(4); return; } /*ADD A,L*/ static void op_0x85(Z80EX_CONTEXT *cpu) { ADD(A,L); T_WAIT_UNTIL(4); return; } /*ADD A,(HL)*/ static void op_0x86(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); ADD(A,temp_byte); T_WAIT_UNTIL(7); return; } /*ADD A,A*/ static void op_0x87(Z80EX_CONTEXT *cpu) { ADD(A,A); T_WAIT_UNTIL(4); return; } /*ADC A,B*/ static void op_0x88(Z80EX_CONTEXT *cpu) { ADC(A,B); T_WAIT_UNTIL(4); return; } /*ADC A,C*/ static void op_0x89(Z80EX_CONTEXT *cpu) { ADC(A,C); T_WAIT_UNTIL(4); return; } /*ADC A,D*/ static void op_0x8a(Z80EX_CONTEXT *cpu) { ADC(A,D); T_WAIT_UNTIL(4); return; } /*ADC A,E*/ static void op_0x8b(Z80EX_CONTEXT *cpu) { ADC(A,E); T_WAIT_UNTIL(4); return; } /*ADC A,H*/ static void op_0x8c(Z80EX_CONTEXT *cpu) { ADC(A,H); T_WAIT_UNTIL(4); return; } /*ADC A,L*/ static void op_0x8d(Z80EX_CONTEXT *cpu) { ADC(A,L); T_WAIT_UNTIL(4); return; } /*ADC A,(HL)*/ static void op_0x8e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); ADC(A,temp_byte); T_WAIT_UNTIL(7); return; } /*ADC A,A*/ static void op_0x8f(Z80EX_CONTEXT *cpu) { ADC(A,A); T_WAIT_UNTIL(4); return; } /*SUB B*/ static void op_0x90(Z80EX_CONTEXT *cpu) { SUB(B); T_WAIT_UNTIL(4); return; } /*SUB C*/ static void op_0x91(Z80EX_CONTEXT *cpu) { SUB(C); T_WAIT_UNTIL(4); return; } /*SUB D*/ static void op_0x92(Z80EX_CONTEXT *cpu) { SUB(D); T_WAIT_UNTIL(4); return; } /*SUB E*/ static void op_0x93(Z80EX_CONTEXT *cpu) { SUB(E); T_WAIT_UNTIL(4); return; } /*SUB H*/ static void op_0x94(Z80EX_CONTEXT *cpu) { SUB(H); T_WAIT_UNTIL(4); return; } /*SUB L*/ static void op_0x95(Z80EX_CONTEXT *cpu) { SUB(L); T_WAIT_UNTIL(4); return; } /*SUB (HL)*/ static void op_0x96(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SUB(temp_byte); T_WAIT_UNTIL(7); return; } /*SUB A*/ static void op_0x97(Z80EX_CONTEXT *cpu) { SUB(A); T_WAIT_UNTIL(4); return; } /*SBC A,B*/ static void op_0x98(Z80EX_CONTEXT *cpu) { SBC(A,B); T_WAIT_UNTIL(4); return; } /*SBC A,C*/ static void op_0x99(Z80EX_CONTEXT *cpu) { SBC(A,C); T_WAIT_UNTIL(4); return; } /*SBC A,D*/ static void op_0x9a(Z80EX_CONTEXT *cpu) { SBC(A,D); T_WAIT_UNTIL(4); return; } /*SBC A,E*/ static void op_0x9b(Z80EX_CONTEXT *cpu) { SBC(A,E); T_WAIT_UNTIL(4); return; } /*SBC A,H*/ static void op_0x9c(Z80EX_CONTEXT *cpu) { SBC(A,H); T_WAIT_UNTIL(4); return; } /*SBC A,L*/ static void op_0x9d(Z80EX_CONTEXT *cpu) { SBC(A,L); T_WAIT_UNTIL(4); return; } /*SBC A,(HL)*/ static void op_0x9e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SBC(A,temp_byte); T_WAIT_UNTIL(7); return; } /*SBC A,A*/ static void op_0x9f(Z80EX_CONTEXT *cpu) { SBC(A,A); T_WAIT_UNTIL(4); return; } /*AND B*/ static void op_0xa0(Z80EX_CONTEXT *cpu) { AND(B); T_WAIT_UNTIL(4); return; } /*AND C*/ static void op_0xa1(Z80EX_CONTEXT *cpu) { AND(C); T_WAIT_UNTIL(4); return; } /*AND D*/ static void op_0xa2(Z80EX_CONTEXT *cpu) { AND(D); T_WAIT_UNTIL(4); return; } /*AND E*/ static void op_0xa3(Z80EX_CONTEXT *cpu) { AND(E); T_WAIT_UNTIL(4); return; } /*AND H*/ static void op_0xa4(Z80EX_CONTEXT *cpu) { AND(H); T_WAIT_UNTIL(4); return; } /*AND L*/ static void op_0xa5(Z80EX_CONTEXT *cpu) { AND(L); T_WAIT_UNTIL(4); return; } /*AND (HL)*/ static void op_0xa6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); AND(temp_byte); T_WAIT_UNTIL(7); return; } /*AND A*/ static void op_0xa7(Z80EX_CONTEXT *cpu) { AND(A); T_WAIT_UNTIL(4); return; } /*XOR B*/ static void op_0xa8(Z80EX_CONTEXT *cpu) { XOR(B); T_WAIT_UNTIL(4); return; } /*XOR C*/ static void op_0xa9(Z80EX_CONTEXT *cpu) { XOR(C); T_WAIT_UNTIL(4); return; } /*XOR D*/ static void op_0xaa(Z80EX_CONTEXT *cpu) { XOR(D); T_WAIT_UNTIL(4); return; } /*XOR E*/ static void op_0xab(Z80EX_CONTEXT *cpu) { XOR(E); T_WAIT_UNTIL(4); return; } /*XOR H*/ static void op_0xac(Z80EX_CONTEXT *cpu) { XOR(H); T_WAIT_UNTIL(4); return; } /*XOR L*/ static void op_0xad(Z80EX_CONTEXT *cpu) { XOR(L); T_WAIT_UNTIL(4); return; } /*XOR (HL)*/ static void op_0xae(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); XOR(temp_byte); T_WAIT_UNTIL(7); return; } /*XOR A*/ static void op_0xaf(Z80EX_CONTEXT *cpu) { XOR(A); T_WAIT_UNTIL(4); return; } /*OR B*/ static void op_0xb0(Z80EX_CONTEXT *cpu) { OR(B); T_WAIT_UNTIL(4); return; } /*OR C*/ static void op_0xb1(Z80EX_CONTEXT *cpu) { OR(C); T_WAIT_UNTIL(4); return; } /*OR D*/ static void op_0xb2(Z80EX_CONTEXT *cpu) { OR(D); T_WAIT_UNTIL(4); return; } /*OR E*/ static void op_0xb3(Z80EX_CONTEXT *cpu) { OR(E); T_WAIT_UNTIL(4); return; } /*OR H*/ static void op_0xb4(Z80EX_CONTEXT *cpu) { OR(H); T_WAIT_UNTIL(4); return; } /*OR L*/ static void op_0xb5(Z80EX_CONTEXT *cpu) { OR(L); T_WAIT_UNTIL(4); return; } /*OR (HL)*/ static void op_0xb6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); OR(temp_byte); T_WAIT_UNTIL(7); return; } /*OR A*/ static void op_0xb7(Z80EX_CONTEXT *cpu) { OR(A); T_WAIT_UNTIL(4); return; } /*CP B*/ static void op_0xb8(Z80EX_CONTEXT *cpu) { CP(B); T_WAIT_UNTIL(4); return; } /*CP C*/ static void op_0xb9(Z80EX_CONTEXT *cpu) { CP(C); T_WAIT_UNTIL(4); return; } /*CP D*/ static void op_0xba(Z80EX_CONTEXT *cpu) { CP(D); T_WAIT_UNTIL(4); return; } /*CP E*/ static void op_0xbb(Z80EX_CONTEXT *cpu) { CP(E); T_WAIT_UNTIL(4); return; } /*CP H*/ static void op_0xbc(Z80EX_CONTEXT *cpu) { CP(H); T_WAIT_UNTIL(4); return; } /*CP L*/ static void op_0xbd(Z80EX_CONTEXT *cpu) { CP(L); T_WAIT_UNTIL(4); return; } /*CP (HL)*/ static void op_0xbe(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); CP(temp_byte); T_WAIT_UNTIL(7); return; } /*CP A*/ static void op_0xbf(Z80EX_CONTEXT *cpu) { CP(A); T_WAIT_UNTIL(4); return; } /*RET NZ*/ static void op_0xc0(Z80EX_CONTEXT *cpu) { if(!(F & FLAG_Z)) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*POP BC*/ static void op_0xc1(Z80EX_CONTEXT *cpu) { POP(BC, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*JP NZ,@*/ static void op_0xc2(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_Z)) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*JP @*/ static void op_0xc3(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); JP(temp_word.w); T_WAIT_UNTIL(10); return; } /*CALL NZ,@*/ static void op_0xc4(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_Z)) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*PUSH BC*/ static void op_0xc5(Z80EX_CONTEXT *cpu) { PUSH(BC, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*ADD A,#*/ static void op_0xc6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); ADD(A,temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x00*/ static void op_0xc7(Z80EX_CONTEXT *cpu) { RST(0x00, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET Z*/ static void op_0xc8(Z80EX_CONTEXT *cpu) { if(F & FLAG_Z) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*RET*/ static void op_0xc9(Z80EX_CONTEXT *cpu) { RET(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*JP Z,@*/ static void op_0xca(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_Z) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } static void op_p_CB(Z80EX_CONTEXT *cpu) { cpu->prefix=0xCB; cpu->noint_once=1; } /*CALL Z,@*/ static void op_0xcc(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_Z) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*CALL @*/ static void op_0xcd(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); return; } /*ADC A,#*/ static void op_0xce(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); ADC(A,temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x08*/ static void op_0xcf(Z80EX_CONTEXT *cpu) { RST(0x08, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET NC*/ static void op_0xd0(Z80EX_CONTEXT *cpu) { if(!(F & FLAG_C)) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*POP DE*/ static void op_0xd1(Z80EX_CONTEXT *cpu) { POP(DE, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*JP NC,@*/ static void op_0xd2(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_C)) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*OUT (#),A*/ static void op_0xd3(Z80EX_CONTEXT *cpu) { temp_word.w=(READ_OP() + ( A << 8 )); OUT_A(temp_word.w,A, /*wr*/8); T_WAIT_UNTIL(11); return; } /*CALL NC,@*/ static void op_0xd4(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_C)) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*PUSH DE*/ static void op_0xd5(Z80EX_CONTEXT *cpu) { PUSH(DE, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*SUB #*/ static void op_0xd6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); SUB(temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x10*/ static void op_0xd7(Z80EX_CONTEXT *cpu) { RST(0x10, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET C*/ static void op_0xd8(Z80EX_CONTEXT *cpu) { if(F & FLAG_C) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*EXX*/ static void op_0xd9(Z80EX_CONTEXT *cpu) { EXX(); T_WAIT_UNTIL(4); return; } /*JP C,@*/ static void op_0xda(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_C) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*IN A,(#)*/ static void op_0xdb(Z80EX_CONTEXT *cpu) { temp_word.w=(READ_OP() + ( A << 8 )); IN_A(A,temp_word.w, /*rd*/8); T_WAIT_UNTIL(11); return; } /*CALL C,@*/ static void op_0xdc(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_C) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } static void op_p_DD(Z80EX_CONTEXT *cpu) { cpu->prefix=0xDD; cpu->noint_once=1; } /*SBC A,#*/ static void op_0xde(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); SBC(A,temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x18*/ static void op_0xdf(Z80EX_CONTEXT *cpu) { RST(0x18, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET PO*/ static void op_0xe0(Z80EX_CONTEXT *cpu) { if(!(F & FLAG_P)) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*POP HL*/ static void op_0xe1(Z80EX_CONTEXT *cpu) { POP(HL, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*JP PO,@*/ static void op_0xe2(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_P)) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*EX (SP),HL*/ static void op_0xe3(Z80EX_CONTEXT *cpu) { READ_MEM(temp_word.b.l,(SP),4); READ_MEM(temp_word.b.h,(SP+1),7); EX_MPTR(temp_word.w,HL); WRITE_MEM((SP),temp_word.b.l,11); WRITE_MEM((SP+1),temp_word.b.h,14); T_WAIT_UNTIL(19); return; } /*CALL PO,@*/ static void op_0xe4(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_P)) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*PUSH HL*/ static void op_0xe5(Z80EX_CONTEXT *cpu) { PUSH(HL, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*AND #*/ static void op_0xe6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); AND(temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x20*/ static void op_0xe7(Z80EX_CONTEXT *cpu) { RST(0x20, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET PE*/ static void op_0xe8(Z80EX_CONTEXT *cpu) { if(F & FLAG_P) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*JP HL*/ static void op_0xe9(Z80EX_CONTEXT *cpu) { JP_NO_MPTR(HL); T_WAIT_UNTIL(4); return; } /*JP PE,@*/ static void op_0xea(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_P) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*EX DE,HL*/ static void op_0xeb(Z80EX_CONTEXT *cpu) { EX(DE,HL); T_WAIT_UNTIL(4); return; } /*CALL PE,@*/ static void op_0xec(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_P) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } static void op_p_ED(Z80EX_CONTEXT *cpu) { cpu->prefix=0xED; cpu->noint_once=1; } /*XOR #*/ static void op_0xee(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); XOR(temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x28*/ static void op_0xef(Z80EX_CONTEXT *cpu) { RST(0x28, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET P*/ static void op_0xf0(Z80EX_CONTEXT *cpu) { if(!(F & FLAG_S)) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*POP AF*/ static void op_0xf1(Z80EX_CONTEXT *cpu) { POP(AF, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*JP P,@*/ static void op_0xf2(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_S)) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*DI*/ static void op_0xf3(Z80EX_CONTEXT *cpu) { DI(); T_WAIT_UNTIL(4); return; } /*CALL P,@*/ static void op_0xf4(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(!(F & FLAG_S)) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*PUSH AF*/ static void op_0xf5(Z80EX_CONTEXT *cpu) { PUSH(AF, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*OR #*/ static void op_0xf6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); OR(temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x30*/ static void op_0xf7(Z80EX_CONTEXT *cpu) { RST(0x30, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*RET M*/ static void op_0xf8(Z80EX_CONTEXT *cpu) { if(F & FLAG_S) { RET(/*rd*/5,8); T_WAIT_UNTIL(11); } else { T_WAIT_UNTIL(5);} return; } /*LD SP,HL*/ static void op_0xf9(Z80EX_CONTEXT *cpu) { LD16(SP,HL); T_WAIT_UNTIL(6); return; } /*JP M,@*/ static void op_0xfa(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_S) { JP(temp_word.w); T_WAIT_UNTIL(10); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } /*EI*/ static void op_0xfb(Z80EX_CONTEXT *cpu) { EI(); T_WAIT_UNTIL(4); return; } /*CALL M,@*/ static void op_0xfc(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); if(F & FLAG_S) { CALL(temp_word.w, /*wr*/11,14); T_WAIT_UNTIL(17); } else { T_WAIT_UNTIL(10);MEMPTR=temp_word.w;} return; } static void op_p_FD(Z80EX_CONTEXT *cpu) { cpu->prefix=0xFD; cpu->noint_once=1; } /*CP #*/ static void op_0xfe(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); CP(temp_byte); T_WAIT_UNTIL(7); return; } /*RST 0x38*/ static void op_0xff(Z80EX_CONTEXT *cpu) { RST(0x38, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /**/ static const z80ex_opcode_fn opcodes_base[0x100] = { op_0x00 , op_0x01 , op_0x02 , op_0x03 , op_0x04 , op_0x05 , op_0x06 , op_0x07 , op_0x08 , op_0x09 , op_0x0a , op_0x0b , op_0x0c , op_0x0d , op_0x0e , op_0x0f , op_0x10 , op_0x11 , op_0x12 , op_0x13 , op_0x14 , op_0x15 , op_0x16 , op_0x17 , op_0x18 , op_0x19 , op_0x1a , op_0x1b , op_0x1c , op_0x1d , op_0x1e , op_0x1f , op_0x20 , op_0x21 , op_0x22 , op_0x23 , op_0x24 , op_0x25 , op_0x26 , op_0x27 , op_0x28 , op_0x29 , op_0x2a , op_0x2b , op_0x2c , op_0x2d , op_0x2e , op_0x2f , op_0x30 , op_0x31 , op_0x32 , op_0x33 , op_0x34 , op_0x35 , op_0x36 , op_0x37 , op_0x38 , op_0x39 , op_0x3a , op_0x3b , op_0x3c , op_0x3d , op_0x3e , op_0x3f , op_0x40 , op_0x41 , op_0x42 , op_0x43 , op_0x44 , op_0x45 , op_0x46 , op_0x47 , op_0x48 , op_0x49 , op_0x4a , op_0x4b , op_0x4c , op_0x4d , op_0x4e , op_0x4f , op_0x50 , op_0x51 , op_0x52 , op_0x53 , op_0x54 , op_0x55 , op_0x56 , op_0x57 , op_0x58 , op_0x59 , op_0x5a , op_0x5b , op_0x5c , op_0x5d , op_0x5e , op_0x5f , op_0x60 , op_0x61 , op_0x62 , op_0x63 , op_0x64 , op_0x65 , op_0x66 , op_0x67 , op_0x68 , op_0x69 , op_0x6a , op_0x6b , op_0x6c , op_0x6d , op_0x6e , op_0x6f , op_0x70 , op_0x71 , op_0x72 , op_0x73 , op_0x74 , op_0x75 , op_0x76 , op_0x77 , op_0x78 , op_0x79 , op_0x7a , op_0x7b , op_0x7c , op_0x7d , op_0x7e , op_0x7f , op_0x80 , op_0x81 , op_0x82 , op_0x83 , op_0x84 , op_0x85 , op_0x86 , op_0x87 , op_0x88 , op_0x89 , op_0x8a , op_0x8b , op_0x8c , op_0x8d , op_0x8e , op_0x8f , op_0x90 , op_0x91 , op_0x92 , op_0x93 , op_0x94 , op_0x95 , op_0x96 , op_0x97 , op_0x98 , op_0x99 , op_0x9a , op_0x9b , op_0x9c , op_0x9d , op_0x9e , op_0x9f , op_0xa0 , op_0xa1 , op_0xa2 , op_0xa3 , op_0xa4 , op_0xa5 , op_0xa6 , op_0xa7 , op_0xa8 , op_0xa9 , op_0xaa , op_0xab , op_0xac , op_0xad , op_0xae , op_0xaf , op_0xb0 , op_0xb1 , op_0xb2 , op_0xb3 , op_0xb4 , op_0xb5 , op_0xb6 , op_0xb7 , op_0xb8 , op_0xb9 , op_0xba , op_0xbb , op_0xbc , op_0xbd , op_0xbe , op_0xbf , op_0xc0 , op_0xc1 , op_0xc2 , op_0xc3 , op_0xc4 , op_0xc5 , op_0xc6 , op_0xc7 , op_0xc8 , op_0xc9 , op_0xca , op_p_CB , op_0xcc , op_0xcd , op_0xce , op_0xcf , op_0xd0 , op_0xd1 , op_0xd2 , op_0xd3 , op_0xd4 , op_0xd5 , op_0xd6 , op_0xd7 , op_0xd8 , op_0xd9 , op_0xda , op_0xdb , op_0xdc , op_p_DD , op_0xde , op_0xdf , op_0xe0 , op_0xe1 , op_0xe2 , op_0xe3 , op_0xe4 , op_0xe5 , op_0xe6 , op_0xe7 , op_0xe8 , op_0xe9 , op_0xea , op_0xeb , op_0xec , op_p_ED , op_0xee , op_0xef , op_0xf0 , op_0xf1 , op_0xf2 , op_0xf3 , op_0xf4 , op_0xf5 , op_0xf6 , op_0xf7 , op_0xf8 , op_0xf9 , op_0xfa , op_0xfb , op_0xfc , op_p_FD , op_0xfe , op_0xff }; ./z80ex-1.1.21/opcodes/opcodes_ed.c0000644000175000017500000003274111061326375014746 0ustar booboo/* autogenerated from ./opcodes_ed.dat, do not edit */ /*IN B,(C)*/ static void op_ED_0x40(Z80EX_CONTEXT *cpu) { IN(B,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),B*/ static void op_ED_0x41(Z80EX_CONTEXT *cpu) { OUT(BC,B, /*wr*/5); T_WAIT_UNTIL(8); return; } /*SBC HL,BC*/ static void op_ED_0x42(Z80EX_CONTEXT *cpu) { SBC16(HL,BC); T_WAIT_UNTIL(11); return; } /*LD (@),BC*/ static void op_ED_0x43(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,BC, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x44(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETN*/ static void op_ED_0x45(Z80EX_CONTEXT *cpu) { RETN(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 0*/ static void op_ED_0x46(Z80EX_CONTEXT *cpu) { IM_(IM0); T_WAIT_UNTIL(4); return; } /*LD I,A*/ static void op_ED_0x47(Z80EX_CONTEXT *cpu) { LD(I,A); T_WAIT_UNTIL(5); return; } /*IN C,(C)*/ static void op_ED_0x48(Z80EX_CONTEXT *cpu) { IN(C,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),C*/ static void op_ED_0x49(Z80EX_CONTEXT *cpu) { OUT(BC,C, /*wr*/5); T_WAIT_UNTIL(8); return; } /*ADC HL,BC*/ static void op_ED_0x4a(Z80EX_CONTEXT *cpu) { ADC16(HL,BC); T_WAIT_UNTIL(11); return; } /*LD BC,(@)*/ static void op_ED_0x4b(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(BC,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x4c(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETI*/ static void op_ED_0x4d(Z80EX_CONTEXT *cpu) { RETI(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 0*/ static void op_ED_0x4e(Z80EX_CONTEXT *cpu) { IM_(IM0); T_WAIT_UNTIL(4); return; } /*LD R,A*/ static void op_ED_0x4f(Z80EX_CONTEXT *cpu) { LD_R_A(); T_WAIT_UNTIL(5); return; } /*IN D,(C)*/ static void op_ED_0x50(Z80EX_CONTEXT *cpu) { IN(D,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),D*/ static void op_ED_0x51(Z80EX_CONTEXT *cpu) { OUT(BC,D, /*wr*/5); T_WAIT_UNTIL(8); return; } /*SBC HL,DE*/ static void op_ED_0x52(Z80EX_CONTEXT *cpu) { SBC16(HL,DE); T_WAIT_UNTIL(11); return; } /*LD (@),DE*/ static void op_ED_0x53(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,DE, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x54(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETN*/ static void op_ED_0x55(Z80EX_CONTEXT *cpu) { RETN(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 1*/ static void op_ED_0x56(Z80EX_CONTEXT *cpu) { IM_(IM1); T_WAIT_UNTIL(4); return; } /*LD A,I*/ static void op_ED_0x57(Z80EX_CONTEXT *cpu) { LD_A_I(); T_WAIT_UNTIL(5); return; } /*IN E,(C)*/ static void op_ED_0x58(Z80EX_CONTEXT *cpu) { IN(E,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),E*/ static void op_ED_0x59(Z80EX_CONTEXT *cpu) { OUT(BC,E, /*wr*/5); T_WAIT_UNTIL(8); return; } /*ADC HL,DE*/ static void op_ED_0x5a(Z80EX_CONTEXT *cpu) { ADC16(HL,DE); T_WAIT_UNTIL(11); return; } /*LD DE,(@)*/ static void op_ED_0x5b(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(DE,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x5c(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETI*/ static void op_ED_0x5d(Z80EX_CONTEXT *cpu) { RETI(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 2*/ static void op_ED_0x5e(Z80EX_CONTEXT *cpu) { IM_(IM2); T_WAIT_UNTIL(4); return; } /*LD A,R*/ static void op_ED_0x5f(Z80EX_CONTEXT *cpu) { LD_A_R(); T_WAIT_UNTIL(5); return; } /*IN H,(C)*/ static void op_ED_0x60(Z80EX_CONTEXT *cpu) { IN(H,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),H*/ static void op_ED_0x61(Z80EX_CONTEXT *cpu) { OUT(BC,H, /*wr*/5); T_WAIT_UNTIL(8); return; } /*SBC HL,HL*/ static void op_ED_0x62(Z80EX_CONTEXT *cpu) { SBC16(HL,HL); T_WAIT_UNTIL(11); return; } /*LD (@),HL*/ static void op_ED_0x63(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,HL, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x64(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETN*/ static void op_ED_0x65(Z80EX_CONTEXT *cpu) { RETN(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 0*/ static void op_ED_0x66(Z80EX_CONTEXT *cpu) { IM_(IM0); T_WAIT_UNTIL(4); return; } /*RRD*/ static void op_ED_0x67(Z80EX_CONTEXT *cpu) { RRD(/*rd*/4, /*wr*/11); T_WAIT_UNTIL(14); return; } /*IN L,(C)*/ static void op_ED_0x68(Z80EX_CONTEXT *cpu) { IN(L,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),L*/ static void op_ED_0x69(Z80EX_CONTEXT *cpu) { OUT(BC,L, /*wr*/5); T_WAIT_UNTIL(8); return; } /*ADC HL,HL*/ static void op_ED_0x6a(Z80EX_CONTEXT *cpu) { ADC16(HL,HL); T_WAIT_UNTIL(11); return; } /*LD HL,(@)*/ static void op_ED_0x6b(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(HL,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x6c(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETI*/ static void op_ED_0x6d(Z80EX_CONTEXT *cpu) { RETI(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 0*/ static void op_ED_0x6e(Z80EX_CONTEXT *cpu) { IM_(IM0); T_WAIT_UNTIL(4); return; } /*RLD*/ static void op_ED_0x6f(Z80EX_CONTEXT *cpu) { RLD(/*rd*/4, /*wr*/11); T_WAIT_UNTIL(14); return; } /*IN_F (C)*/ static void op_ED_0x70(Z80EX_CONTEXT *cpu) { IN_F(BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),0*/ static void op_ED_0x71(Z80EX_CONTEXT *cpu) { OUT(BC,0, /*wr*/5); T_WAIT_UNTIL(8); return; } /*SBC HL,SP*/ static void op_ED_0x72(Z80EX_CONTEXT *cpu) { SBC16(HL,SP); T_WAIT_UNTIL(11); return; } /*LD (@),SP*/ static void op_ED_0x73(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,SP, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x74(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETN*/ static void op_ED_0x75(Z80EX_CONTEXT *cpu) { RETN(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 1*/ static void op_ED_0x76(Z80EX_CONTEXT *cpu) { IM_(IM1); T_WAIT_UNTIL(4); return; } /*IN A,(C)*/ static void op_ED_0x78(Z80EX_CONTEXT *cpu) { IN(A,BC, /*rd*/5); T_WAIT_UNTIL(8); return; } /*OUT (C),A*/ static void op_ED_0x79(Z80EX_CONTEXT *cpu) { OUT(BC,A, /*wr*/5); T_WAIT_UNTIL(8); return; } /*ADC HL,SP*/ static void op_ED_0x7a(Z80EX_CONTEXT *cpu) { ADC16(HL,SP); T_WAIT_UNTIL(11); return; } /*LD SP,(@)*/ static void op_ED_0x7b(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(SP,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*NEG*/ static void op_ED_0x7c(Z80EX_CONTEXT *cpu) { NEG(); T_WAIT_UNTIL(4); return; } /*RETI*/ static void op_ED_0x7d(Z80EX_CONTEXT *cpu) { RETI(/*rd*/4,7); T_WAIT_UNTIL(10); return; } /*IM 2*/ static void op_ED_0x7e(Z80EX_CONTEXT *cpu) { IM_(IM2); T_WAIT_UNTIL(4); return; } /*LDI*/ static void op_ED_0xa0(Z80EX_CONTEXT *cpu) { LDI(/*rd*/4, /*wr*/7); T_WAIT_UNTIL(12); return; } /*CPI*/ static void op_ED_0xa1(Z80EX_CONTEXT *cpu) { CPI(/*rd*/4); T_WAIT_UNTIL(12); return; } /*INI*/ static void op_ED_0xa2(Z80EX_CONTEXT *cpu) { INI(/*rd*/6, /*wr*/9); T_WAIT_UNTIL(12); return; } /*OUTI*/ static void op_ED_0xa3(Z80EX_CONTEXT *cpu) { OUTI(/*rd*/5, /*wr*/9); T_WAIT_UNTIL(12); return; } /*LDD*/ static void op_ED_0xa8(Z80EX_CONTEXT *cpu) { LDD(/*rd*/4, /*wr*/7); T_WAIT_UNTIL(12); return; } /*CPD*/ static void op_ED_0xa9(Z80EX_CONTEXT *cpu) { CPD(/*rd*/4); T_WAIT_UNTIL(12); return; } /*IND*/ static void op_ED_0xaa(Z80EX_CONTEXT *cpu) { IND(/*rd*/6, /*wr*/9); T_WAIT_UNTIL(12); return; } /*OUTD*/ static void op_ED_0xab(Z80EX_CONTEXT *cpu) { OUTD(/*rd*/5, /*wr*/9); T_WAIT_UNTIL(12); return; } /*LDIR*/ static void op_ED_0xb0(Z80EX_CONTEXT *cpu) { LDIR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/4, /*wr*/7); return; } /*CPIR*/ static void op_ED_0xb1(Z80EX_CONTEXT *cpu) { CPIR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/4); return; } /*INIR*/ static void op_ED_0xb2(Z80EX_CONTEXT *cpu) { INIR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/6, /*wr*/9); return; } /*OTIR*/ static void op_ED_0xb3(Z80EX_CONTEXT *cpu) { OTIR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/5, /*wr*/9); return; } /*LDDR*/ static void op_ED_0xb8(Z80EX_CONTEXT *cpu) { LDDR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/4, /*wr*/7); return; } /*CPDR*/ static void op_ED_0xb9(Z80EX_CONTEXT *cpu) { CPDR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/4); return; } /*INDR*/ static void op_ED_0xba(Z80EX_CONTEXT *cpu) { INDR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/6, /*wr*/9); return; } /*OTDR*/ static void op_ED_0xbb(Z80EX_CONTEXT *cpu) { OTDR(/*t:*/ /*t1*/12,/*t2*/17, /*rd*/5, /*wr*/9); return; } /**/ static const z80ex_opcode_fn opcodes_ed[0x100] = { NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_ED_0x40 , op_ED_0x41 , op_ED_0x42 , op_ED_0x43 , op_ED_0x44 , op_ED_0x45 , op_ED_0x46 , op_ED_0x47 , op_ED_0x48 , op_ED_0x49 , op_ED_0x4a , op_ED_0x4b , op_ED_0x4c , op_ED_0x4d , op_ED_0x4e , op_ED_0x4f , op_ED_0x50 , op_ED_0x51 , op_ED_0x52 , op_ED_0x53 , op_ED_0x54 , op_ED_0x55 , op_ED_0x56 , op_ED_0x57 , op_ED_0x58 , op_ED_0x59 , op_ED_0x5a , op_ED_0x5b , op_ED_0x5c , op_ED_0x5d , op_ED_0x5e , op_ED_0x5f , op_ED_0x60 , op_ED_0x61 , op_ED_0x62 , op_ED_0x63 , op_ED_0x64 , op_ED_0x65 , op_ED_0x66 , op_ED_0x67 , op_ED_0x68 , op_ED_0x69 , op_ED_0x6a , op_ED_0x6b , op_ED_0x6c , op_ED_0x6d , op_ED_0x6e , op_ED_0x6f , op_ED_0x70 , op_ED_0x71 , op_ED_0x72 , op_ED_0x73 , op_ED_0x74 , op_ED_0x75 , op_ED_0x76 , NULL , op_ED_0x78 , op_ED_0x79 , op_ED_0x7a , op_ED_0x7b , op_ED_0x7c , op_ED_0x7d , op_ED_0x7e , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_ED_0xa0 , op_ED_0xa1 , op_ED_0xa2 , op_ED_0xa3 , NULL , NULL , NULL , NULL , op_ED_0xa8 , op_ED_0xa9 , op_ED_0xaa , op_ED_0xab , NULL , NULL , NULL , NULL , op_ED_0xb0 , op_ED_0xb1 , op_ED_0xb2 , op_ED_0xb3 , NULL , NULL , NULL , NULL , op_ED_0xb8 , op_ED_0xb9 , op_ED_0xba , op_ED_0xbb , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL }; ./z80ex-1.1.21/opcodes/opcodes_base.dat0000644000175000017500000002607110732252257015616 0ustar booboo# opcodes.base: unshifted Z80 opcodes -- 256 0x00="NOP" t="4" 0x01="LD BC,@" t="10" 0x02="LD (BC),A" t="7" wr="4" 0x03="INC BC" t="6" 0x04="INC B" t="4" 0x05="DEC B" t="4" 0x06="LD B,#" t="7" 0x07="RLCA" t="4" 0x08="EX AF,AF'" t="4" 0x09="ADD HL,BC" t="11" 0x0a="LD A,(BC)" t="7" rd="4" 0x0b="DEC BC" t="6" 0x0c="INC C" t="4" 0x0d="DEC C" t="4" 0x0e="LD C,#" t="7" 0x0f="RRCA" t="4" 0x10="DJNZ %" t="8/13" 0x11="LD DE,@" t="10" 0x12="LD (DE),A" t="7" wr="4" 0x13="INC DE" t="6" 0x14="INC D" t="4" 0x15="DEC D" t="4" 0x16="LD D,#" t="7" 0x17="RLA" t="4" 0x18="JR %" t="12" 0x19="ADD HL,DE" t="11" 0x1a="LD A,(DE)" t="7" rd="4" 0x1b="DEC DE" t="6" 0x1c="INC E" t="4" 0x1d="DEC E" t="4" 0x1e="LD E,#" t="7" 0x1f="RRA" t="4" 0x20="JR NZ,%" t="7/12" 0x21="LD HL,@" t="10" 0x22="LD (@),HL" t="16" wr="10,13" 0x23="INC HL" t="6" 0x24="INC H" t="4" 0x25="DEC H" t="4" 0x26="LD H,#" t="7" 0x27="DAA" t="4" 0x28="JR Z,%" t="7/12" 0x29="ADD HL,HL" t="11" 0x2a="LD HL,(@)" t="16" rd="10,13" 0x2b="DEC HL" t="6" 0x2c="INC L" t="4" 0x2d="DEC L" t="4" 0x2e="LD L,#" t="7" 0x2f="CPL" t="4" 0x30="JR NC,%" t="7/12" 0x31="LD SP,@" t="10" 0x32="LD (@),A" t="13" wr="10" 0x33="INC SP" t="6" 0x34="INC (HL)" t="11" rd="4" wr="8" 0x35="DEC (HL)" t="11" rd="4" wr="8" 0x36="LD (HL),#" t="10" wr="7" 0x37="SCF" t="4" 0x38="JR C,%" t="7/12" 0x39="ADD HL,SP" t="11" 0x3a="LD A,(@)" t="13" rd="10" 0x3b="DEC SP" t="6" 0x3c="INC A" t="4" 0x3d="DEC A" t="4" 0x3e="LD A,#" t="7" 0x3f="CCF" t="4" 0x40="LD B,B" t="4" 0x41="LD B,C" t="4" 0x42="LD B,D" t="4" 0x43="LD B,E" t="4" 0x44="LD B,H" t="4" 0x45="LD B,L" t="4" 0x46="LD B,(HL)" t="7" rd="4" 0x47="LD B,A" t="4" 0x48="LD C,B" t="4" 0x49="LD C,C" t="4" 0x4a="LD C,D" t="4" 0x4b="LD C,E" t="4" 0x4c="LD C,H" t="4" 0x4d="LD C,L" t="4" 0x4e="LD C,(HL)" t="7" rd="4" 0x4f="LD C,A" t="4" 0x50="LD D,B" t="4" 0x51="LD D,C" t="4" 0x52="LD D,D" t="4" 0x53="LD D,E" t="4" 0x54="LD D,H" t="4" 0x55="LD D,L" t="4" 0x56="LD D,(HL)" t="7" rd="4" 0x57="LD D,A" t="4" 0x58="LD E,B" t="4" 0x59="LD E,C" t="4" 0x5a="LD E,D" t="4" 0x5b="LD E,E" t="4" 0x5c="LD E,H" t="4" 0x5d="LD E,L" t="4" 0x5e="LD E,(HL)" t="7" rd="4" 0x5f="LD E,A" t="4" 0x60="LD H,B" t="4" 0x61="LD H,C" t="4" 0x62="LD H,D" t="4" 0x63="LD H,E" t="4" 0x64="LD H,H" t="4" 0x65="LD H,L" t="4" 0x66="LD H,(HL)" t="7" rd="4" 0x67="LD H,A" t="4" 0x68="LD L,B" t="4" 0x69="LD L,C" t="4" 0x6a="LD L,D" t="4" 0x6b="LD L,E" t="4" 0x6c="LD L,H" t="4" 0x6d="LD L,L" t="4" 0x6e="LD L,(HL)" t="7" rd="4" 0x6f="LD L,A" t="4" 0x70="LD (HL),B" t="7" wr="4" 0x71="LD (HL),C" t="7" wr="4" 0x72="LD (HL),D" t="7" wr="4" 0x73="LD (HL),E" t="7" wr="4" 0x74="LD (HL),H" t="7" wr="4" 0x75="LD (HL),L" t="7" wr="4" 0x76="HALT" t="4" 0x77="LD (HL),A" t="7" wr="4" 0x78="LD A,B" t="4" 0x79="LD A,C" t="4" 0x7a="LD A,D" t="4" 0x7b="LD A,E" t="4" 0x7c="LD A,H" t="4" 0x7d="LD A,L" t="4" 0x7e="LD A,(HL)" t="7" rd="4" 0x7f="LD A,A" t="4" 0x80="ADD A,B" t="4" 0x81="ADD A,C" t="4" 0x82="ADD A,D" t="4" 0x83="ADD A,E" t="4" 0x84="ADD A,H" t="4" 0x85="ADD A,L" t="4" 0x86="ADD A,(HL)" t="7" rd="4" 0x87="ADD A,A" t="4" 0x88="ADC A,B" t="4" 0x89="ADC A,C" t="4" 0x8a="ADC A,D" t="4" 0x8b="ADC A,E" t="4" 0x8c="ADC A,H" t="4" 0x8d="ADC A,L" t="4" 0x8e="ADC A,(HL)" t="7" rd="4" 0x8f="ADC A,A" t="4" 0x90="SUB B" t="4" 0x91="SUB C" t="4" 0x92="SUB D" t="4" 0x93="SUB E" t="4" 0x94="SUB H" t="4" 0x95="SUB L" t="4" 0x96="SUB (HL)" t="7" rd="4" 0x97="SUB A" t="4" 0x98="SBC A,B" t="4" 0x99="SBC A,C" t="4" 0x9a="SBC A,D" t="4" 0x9b="SBC A,E" t="4" 0x9c="SBC A,H" t="4" 0x9d="SBC A,L" t="4" 0x9e="SBC A,(HL)" t="7" rd="4" 0x9f="SBC A,A" t="4" 0xa0="AND B" t="4" 0xa1="AND C" t="4" 0xa2="AND D" t="4" 0xa3="AND E" t="4" 0xa4="AND H" t="4" 0xa5="AND L" t="4" 0xa6="AND (HL)" t="7" rd="4" 0xa7="AND A" t="4" 0xa8="XOR B" t="4" 0xa9="XOR C" t="4" 0xaa="XOR D" t="4" 0xab="XOR E" t="4" 0xac="XOR H" t="4" 0xad="XOR L" t="4" 0xae="XOR (HL)" t="7" rd="4" 0xaf="XOR A" t="4" 0xb0="OR B" t="4" 0xb1="OR C" t="4" 0xb2="OR D" t="4" 0xb3="OR E" t="4" 0xb4="OR H" t="4" 0xb5="OR L" t="4" 0xb6="OR (HL)" t="7" rd="4" 0xb7="OR A" t="4" 0xb8="CP B" t="4" 0xb9="CP C" t="4" 0xba="CP D" t="4" 0xbb="CP E" t="4" 0xbc="CP H" t="4" 0xbd="CP L" t="4" 0xbe="CP (HL)" t="7" rd="4" 0xbf="CP A" t="4" 0xc0="RET NZ" t="5/11" rd="5,8" 0xc1="POP BC" t="10" rd="4,7" 0xc2="JP NZ,@" t="10/10" 0xc3="JP @" t="10" 0xc4="CALL NZ,@" t="10/17" wr="11,14" 0xc5="PUSH BC" t="11" wr="5,8" 0xc6="ADD A,#" t="7" 0xc7="RST 0x00" t="11" wr="5,8" 0xc8="RET Z" t="5/11" rd="5,8" 0xc9="RET" t="10" rd="4,7" 0xca="JP Z,@" t="10/10" 0xcb="shift CB" t="4" 0xcc="CALL Z,@" t="10/17" wr="11,14" 0xcd="CALL @" t="17" wr="11,14" 0xce="ADC A,#" t="7" 0xcf="RST 0x08" t="11" wr="5,8" 0xd0="RET NC" t="5/11" rd="5,8" 0xd1="POP DE" t="10" rd="4,7" 0xd2="JP NC,@" t="10/10" 0xd3="OUT (#),A" t="11" wr="8" 0xd4="CALL NC,@" t="10/17" wr="11,14" 0xd5="PUSH DE" t="11" wr="5,8" 0xd6="SUB #" t="7" 0xd7="RST 0x10" t="11" wr="5,8" 0xd8="RET C" t="5/11" rd="5,8" 0xd9="EXX" t="4" 0xda="JP C,@" t="10/10" 0xdb="IN A,(#)" t="11" rd="8" 0xdc="CALL C,@" t="10/17" wr="11,14" 0xdd="shift DD" t="0" 0xde="SBC A,#" t="7" 0xdf="RST 0x18" t="11" wr="5,8" 0xe0="RET PO" t="5/11" rd="5,8" 0xe1="POP HL" t="10" rd="4,7" 0xe2="JP PO,@" t="10/10" 0xe3="EX (SP),HL" t="19" rd="4,7" wr="11,14" 0xe4="CALL PO,@" t="10/17" wr="11,14" 0xe5="PUSH HL" t="11" wr="5,8" 0xe6="AND #" t="7" 0xe7="RST 0x20" t="11" wr="5,8" 0xe8="RET PE" t="5/11" rd="5,8" 0xe9="JP HL" t="4" 0xea="JP PE,@" t="10/10" 0xeb="EX DE,HL" t="4" 0xec="CALL PE,@" t="10/17" wr="11,14" 0xed="shift ED" t="0" 0xee="XOR #" t="7" 0xef="RST 0x28" t="11" wr="5,8" 0xf0="RET P" t="5/11" rd="5,8" 0xf1="POP AF" t="10" rd="4,7" 0xf2="JP P,@" t="10/10" 0xf3="DI" t="4" 0xf4="CALL P,@" t="10/17" wr="11,14" 0xf5="PUSH AF" t="11" wr="5,8" 0xf6="OR #" t="7" 0xf7="RST 0x30" t="11" wr="5,8" 0xf8="RET M" t="5/11" rd="5,8" 0xf9="LD SP,HL" t="6" 0xfa="JP M,@" t="10/10" 0xfb="EI" t="4" 0xfc="CALL M,@" t="10/17" wr="11,14" 0xfd="shift FD" t="4" 0xfe="CP #" t="7" 0xff="RST 0x38" t="11" wr="5,8" ./z80ex-1.1.21/opcodes/opcodes_fd.c0000644000175000017500000004270711061326375014752 0ustar booboo/* autogenerated from ./opcodes_ddfd.dat, do not edit */ /*ADD IY,BC*/ static void op_FD_0x09(Z80EX_CONTEXT *cpu) { ADD16(IY,BC); T_WAIT_UNTIL(11); return; } /*ADD IY,DE*/ static void op_FD_0x19(Z80EX_CONTEXT *cpu) { ADD16(IY,DE); T_WAIT_UNTIL(11); return; } /*LD IY,@*/ static void op_FD_0x21(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(IY,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (@),IY*/ static void op_FD_0x22(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,IY, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*INC IY*/ static void op_FD_0x23(Z80EX_CONTEXT *cpu) { INC16(IY); T_WAIT_UNTIL(6); return; } /*INC IYH*/ static void op_FD_0x24(Z80EX_CONTEXT *cpu) { INC(IYH); T_WAIT_UNTIL(4); return; } /*DEC IYH*/ static void op_FD_0x25(Z80EX_CONTEXT *cpu) { DEC(IYH); T_WAIT_UNTIL(4); return; } /*LD IYH,#*/ static void op_FD_0x26(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(IYH,temp_byte); T_WAIT_UNTIL(7); return; } /*ADD IY,IY*/ static void op_FD_0x29(Z80EX_CONTEXT *cpu) { ADD16(IY,IY); T_WAIT_UNTIL(11); return; } /*LD IY,(@)*/ static void op_FD_0x2a(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(IY,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*DEC IY*/ static void op_FD_0x2b(Z80EX_CONTEXT *cpu) { DEC16(IY); T_WAIT_UNTIL(6); return; } /*INC IYL*/ static void op_FD_0x2c(Z80EX_CONTEXT *cpu) { INC(IYL); T_WAIT_UNTIL(4); return; } /*DEC IYL*/ static void op_FD_0x2d(Z80EX_CONTEXT *cpu) { DEC(IYL); T_WAIT_UNTIL(4); return; } /*LD IYL,#*/ static void op_FD_0x2e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(IYL,temp_byte); T_WAIT_UNTIL(7); return; } /*INC (IY+$)*/ static void op_FD_0x34(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); INC(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*DEC (IY+$)*/ static void op_FD_0x35(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); DEC(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD (IY+$),#*/ static void op_FD_0x36(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); temp_byte=READ_OP(); LD(temp_byte,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*ADD IY,SP*/ static void op_FD_0x39(Z80EX_CONTEXT *cpu) { ADD16(IY,SP); T_WAIT_UNTIL(11); return; } /*LD B,IYH*/ static void op_FD_0x44(Z80EX_CONTEXT *cpu) { LD(B,IYH); T_WAIT_UNTIL(4); return; } /*LD B,IYL*/ static void op_FD_0x45(Z80EX_CONTEXT *cpu) { LD(B,IYL); T_WAIT_UNTIL(4); return; } /*LD B,(IY+$)*/ static void op_FD_0x46(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(B,temp_byte); T_WAIT_UNTIL(15); return; } /*LD C,IYH*/ static void op_FD_0x4c(Z80EX_CONTEXT *cpu) { LD(C,IYH); T_WAIT_UNTIL(4); return; } /*LD C,IYL*/ static void op_FD_0x4d(Z80EX_CONTEXT *cpu) { LD(C,IYL); T_WAIT_UNTIL(4); return; } /*LD C,(IY+$)*/ static void op_FD_0x4e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(C,temp_byte); T_WAIT_UNTIL(15); return; } /*LD D,IYH*/ static void op_FD_0x54(Z80EX_CONTEXT *cpu) { LD(D,IYH); T_WAIT_UNTIL(4); return; } /*LD D,IYL*/ static void op_FD_0x55(Z80EX_CONTEXT *cpu) { LD(D,IYL); T_WAIT_UNTIL(4); return; } /*LD D,(IY+$)*/ static void op_FD_0x56(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(D,temp_byte); T_WAIT_UNTIL(15); return; } /*LD E,IYH*/ static void op_FD_0x5c(Z80EX_CONTEXT *cpu) { LD(E,IYH); T_WAIT_UNTIL(4); return; } /*LD E,IYL*/ static void op_FD_0x5d(Z80EX_CONTEXT *cpu) { LD(E,IYL); T_WAIT_UNTIL(4); return; } /*LD E,(IY+$)*/ static void op_FD_0x5e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(E,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IYH,B*/ static void op_FD_0x60(Z80EX_CONTEXT *cpu) { LD(IYH,B); T_WAIT_UNTIL(4); return; } /*LD IYH,C*/ static void op_FD_0x61(Z80EX_CONTEXT *cpu) { LD(IYH,C); T_WAIT_UNTIL(4); return; } /*LD IYH,D*/ static void op_FD_0x62(Z80EX_CONTEXT *cpu) { LD(IYH,D); T_WAIT_UNTIL(4); return; } /*LD IYH,E*/ static void op_FD_0x63(Z80EX_CONTEXT *cpu) { LD(IYH,E); T_WAIT_UNTIL(4); return; } /*LD IYH,IYH*/ static void op_FD_0x64(Z80EX_CONTEXT *cpu) { LD(IYH,IYH); T_WAIT_UNTIL(4); return; } /*LD IYH,IYL*/ static void op_FD_0x65(Z80EX_CONTEXT *cpu) { LD(IYH,IYL); T_WAIT_UNTIL(4); return; } /*LD H,(IY+$)*/ static void op_FD_0x66(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(H,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IYH,A*/ static void op_FD_0x67(Z80EX_CONTEXT *cpu) { LD(IYH,A); T_WAIT_UNTIL(4); return; } /*LD IYL,B*/ static void op_FD_0x68(Z80EX_CONTEXT *cpu) { LD(IYL,B); T_WAIT_UNTIL(4); return; } /*LD IYL,C*/ static void op_FD_0x69(Z80EX_CONTEXT *cpu) { LD(IYL,C); T_WAIT_UNTIL(4); return; } /*LD IYL,D*/ static void op_FD_0x6a(Z80EX_CONTEXT *cpu) { LD(IYL,D); T_WAIT_UNTIL(4); return; } /*LD IYL,E*/ static void op_FD_0x6b(Z80EX_CONTEXT *cpu) { LD(IYL,E); T_WAIT_UNTIL(4); return; } /*LD IYL,IYH*/ static void op_FD_0x6c(Z80EX_CONTEXT *cpu) { LD(IYL,IYH); T_WAIT_UNTIL(4); return; } /*LD IYL,IYL*/ static void op_FD_0x6d(Z80EX_CONTEXT *cpu) { LD(IYL,IYL); T_WAIT_UNTIL(4); return; } /*LD L,(IY+$)*/ static void op_FD_0x6e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(L,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IYL,A*/ static void op_FD_0x6f(Z80EX_CONTEXT *cpu) { LD(IYL,A); T_WAIT_UNTIL(4); return; } /*LD (IY+$),B*/ static void op_FD_0x70(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,B); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),C*/ static void op_FD_0x71(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,C); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),D*/ static void op_FD_0x72(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,D); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),E*/ static void op_FD_0x73(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,E); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),H*/ static void op_FD_0x74(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,H); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),L*/ static void op_FD_0x75(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,L); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IY+$),A*/ static void op_FD_0x77(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); LD(temp_byte,A); WRITE_MEM((IY+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD A,IYH*/ static void op_FD_0x7c(Z80EX_CONTEXT *cpu) { LD(A,IYH); T_WAIT_UNTIL(4); return; } /*LD A,IYL*/ static void op_FD_0x7d(Z80EX_CONTEXT *cpu) { LD(A,IYL); T_WAIT_UNTIL(4); return; } /*LD A,(IY+$)*/ static void op_FD_0x7e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); LD(A,temp_byte); T_WAIT_UNTIL(15); return; } /*ADD A,IYH*/ static void op_FD_0x84(Z80EX_CONTEXT *cpu) { ADD(A,IYH); T_WAIT_UNTIL(4); return; } /*ADD A,IYL*/ static void op_FD_0x85(Z80EX_CONTEXT *cpu) { ADD(A,IYL); T_WAIT_UNTIL(4); return; } /*ADD A,(IY+$)*/ static void op_FD_0x86(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); ADD(A,temp_byte); T_WAIT_UNTIL(15); return; } /*ADC A,IYH*/ static void op_FD_0x8c(Z80EX_CONTEXT *cpu) { ADC(A,IYH); T_WAIT_UNTIL(4); return; } /*ADC A,IYL*/ static void op_FD_0x8d(Z80EX_CONTEXT *cpu) { ADC(A,IYL); T_WAIT_UNTIL(4); return; } /*ADC A,(IY+$)*/ static void op_FD_0x8e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); ADC(A,temp_byte); T_WAIT_UNTIL(15); return; } /*SUB IYH*/ static void op_FD_0x94(Z80EX_CONTEXT *cpu) { SUB(IYH); T_WAIT_UNTIL(4); return; } /*SUB IYL*/ static void op_FD_0x95(Z80EX_CONTEXT *cpu) { SUB(IYL); T_WAIT_UNTIL(4); return; } /*SUB (IY+$)*/ static void op_FD_0x96(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SUB(temp_byte); T_WAIT_UNTIL(15); return; } /*SBC A,IYH*/ static void op_FD_0x9c(Z80EX_CONTEXT *cpu) { SBC(A,IYH); T_WAIT_UNTIL(4); return; } /*SBC A,IYL*/ static void op_FD_0x9d(Z80EX_CONTEXT *cpu) { SBC(A,IYL); T_WAIT_UNTIL(4); return; } /*SBC A,(IY+$)*/ static void op_FD_0x9e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SBC(A,temp_byte); T_WAIT_UNTIL(15); return; } /*AND IYH*/ static void op_FD_0xa4(Z80EX_CONTEXT *cpu) { AND(IYH); T_WAIT_UNTIL(4); return; } /*AND IYL*/ static void op_FD_0xa5(Z80EX_CONTEXT *cpu) { AND(IYL); T_WAIT_UNTIL(4); return; } /*AND (IY+$)*/ static void op_FD_0xa6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); AND(temp_byte); T_WAIT_UNTIL(15); return; } /*XOR IYH*/ static void op_FD_0xac(Z80EX_CONTEXT *cpu) { XOR(IYH); T_WAIT_UNTIL(4); return; } /*XOR IYL*/ static void op_FD_0xad(Z80EX_CONTEXT *cpu) { XOR(IYL); T_WAIT_UNTIL(4); return; } /*XOR (IY+$)*/ static void op_FD_0xae(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); XOR(temp_byte); T_WAIT_UNTIL(15); return; } /*OR IYH*/ static void op_FD_0xb4(Z80EX_CONTEXT *cpu) { OR(IYH); T_WAIT_UNTIL(4); return; } /*OR IYL*/ static void op_FD_0xb5(Z80EX_CONTEXT *cpu) { OR(IYL); T_WAIT_UNTIL(4); return; } /*OR (IY+$)*/ static void op_FD_0xb6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); OR(temp_byte); T_WAIT_UNTIL(15); return; } /*CP IYH*/ static void op_FD_0xbc(Z80EX_CONTEXT *cpu) { CP(IYH); T_WAIT_UNTIL(4); return; } /*CP IYL*/ static void op_FD_0xbd(Z80EX_CONTEXT *cpu) { CP(IYL); T_WAIT_UNTIL(4); return; } /*CP (IY+$)*/ static void op_FD_0xbe(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); CP(temp_byte); T_WAIT_UNTIL(15); return; } /*POP IY*/ static void op_FD_0xe1(Z80EX_CONTEXT *cpu) { POP(IY, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*EX (SP),IY*/ static void op_FD_0xe3(Z80EX_CONTEXT *cpu) { READ_MEM(temp_word.b.l,(SP),4); READ_MEM(temp_word.b.h,(SP+1),7); EX_MPTR(temp_word.w,IY); WRITE_MEM((SP),temp_word.b.l,11); WRITE_MEM((SP+1),temp_word.b.h,14); T_WAIT_UNTIL(19); return; } /*PUSH IY*/ static void op_FD_0xe5(Z80EX_CONTEXT *cpu) { PUSH(IY, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*JP IY*/ static void op_FD_0xe9(Z80EX_CONTEXT *cpu) { JP_NO_MPTR(IY); T_WAIT_UNTIL(4); return; } /*LD SP,IY*/ static void op_FD_0xf9(Z80EX_CONTEXT *cpu) { LD16(SP,IY); T_WAIT_UNTIL(6); return; } /**/ static const z80ex_opcode_fn opcodes_fd[0x100] = { NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0x09 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0x19 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0x21 , op_FD_0x22 , op_FD_0x23 , op_FD_0x24 , op_FD_0x25 , op_FD_0x26 , NULL , NULL , op_FD_0x29 , op_FD_0x2a , op_FD_0x2b , op_FD_0x2c , op_FD_0x2d , op_FD_0x2e , NULL , NULL , NULL , NULL , NULL , op_FD_0x34 , op_FD_0x35 , op_FD_0x36 , NULL , NULL , op_FD_0x39 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0x44 , op_FD_0x45 , op_FD_0x46 , NULL , NULL , NULL , NULL , NULL , op_FD_0x4c , op_FD_0x4d , op_FD_0x4e , NULL , NULL , NULL , NULL , NULL , op_FD_0x54 , op_FD_0x55 , op_FD_0x56 , NULL , NULL , NULL , NULL , NULL , op_FD_0x5c , op_FD_0x5d , op_FD_0x5e , NULL , op_FD_0x60 , op_FD_0x61 , op_FD_0x62 , op_FD_0x63 , op_FD_0x64 , op_FD_0x65 , op_FD_0x66 , op_FD_0x67 , op_FD_0x68 , op_FD_0x69 , op_FD_0x6a , op_FD_0x6b , op_FD_0x6c , op_FD_0x6d , op_FD_0x6e , op_FD_0x6f , op_FD_0x70 , op_FD_0x71 , op_FD_0x72 , op_FD_0x73 , op_FD_0x74 , op_FD_0x75 , NULL , op_FD_0x77 , NULL , NULL , NULL , NULL , op_FD_0x7c , op_FD_0x7d , op_FD_0x7e , NULL , NULL , NULL , NULL , NULL , op_FD_0x84 , op_FD_0x85 , op_FD_0x86 , NULL , NULL , NULL , NULL , NULL , op_FD_0x8c , op_FD_0x8d , op_FD_0x8e , NULL , NULL , NULL , NULL , NULL , op_FD_0x94 , op_FD_0x95 , op_FD_0x96 , NULL , NULL , NULL , NULL , NULL , op_FD_0x9c , op_FD_0x9d , op_FD_0x9e , NULL , NULL , NULL , NULL , NULL , op_FD_0xa4 , op_FD_0xa5 , op_FD_0xa6 , NULL , NULL , NULL , NULL , NULL , op_FD_0xac , op_FD_0xad , op_FD_0xae , NULL , NULL , NULL , NULL , NULL , op_FD_0xb4 , op_FD_0xb5 , op_FD_0xb6 , NULL , NULL , NULL , NULL , NULL , op_FD_0xbc , op_FD_0xbd , op_FD_0xbe , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0xe1 , NULL , op_FD_0xe3 , NULL , op_FD_0xe5 , NULL , NULL , NULL , op_FD_0xe9 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_FD_0xf9 , NULL , NULL , NULL , NULL , NULL , NULL }; ./z80ex-1.1.21/opcodes/opcode.dat.format0000644000175000017500000000060010732252257015716 0ustar boobooopcode="asm" t="t-states[/t-states for branching/cyclic cmd, if it succeded (changes PC)]" [rd="delay in t-states before RD goes active for memory/port operation (first byte)"[, -//- second byte]] [wr="delay in t-states before WR goes active for memory/port operation (first byte)"[,-//- second byte]] in mnemonics: @ - word # - byte $ - displacement for IX/IY+d % - jump offset ./z80ex-1.1.21/opcodes/build_opcodes.pl0000755000175000017500000004221511061326370015641 0ustar booboo#!/usr/bin/perl -w use strict; sub next_t { my $arref = shift; my $val = splice @$arref,0,1; die "No more timings available!" if(!defined($val)); return($val); } sub get_flag_co { my $fl = shift; my $out=""; my $is_n=0; if($fl eq 'P') {$fl = 'NS';} elsif($fl eq 'M') {$fl = 'S';} elsif($fl eq 'PE') {$fl = 'P';} elsif($fl eq 'PO') {$fl = 'NP';} $is_n=1 if(substr($fl,0,1) eq 'N'); $out.=" if("; $out.="!(" if($is_n); $out.="F & FLAG_"; if($is_n) {$out.=substr($fl,1,1);} else {$out.=$fl;} $out.=")" if($is_n); $out.=")"; return($out); } sub is_arg_16bit { my $arg = shift; my $res=0; $res=1 if((length($arg) == 2) and ($arg !~ /^\w+[Hh]/) and ($arg ne '#')); #print "checking $arg gives $res\n"; return($res); } # convert one command to C code sub convert_to_c { my $readbyte="READ_MEM("; my $writebyte="WRITE_MEM("; my $opc = shift; my $def = shift; my $fnname = shift; my $out = ''; my $head = ''; my $foot = ''; my $arg_str = ''; my @arguments =(); my @ww=(); my @rr=(); ###### # for commands that writes to memory or port my $cmd_mwrite = 0; #cmd writes to memory thru (regpair[+d]) or (adress) my $cmd_pwrite = 0; #cmd writes to port thru (port) my $cmd_memmod = 0; #cmd modifyes data in memory, ie read-modify-write my $cmd_is_16bit = 0; my $cmd_cyclic = 0; my $cmd_branch = 0; my $cmd_memptr = 0; ###### my $addr_mptr=0; ###### if(!$$opc{'asm'}) {return("");} if($def eq 'base') { $$fnname = 'op_'.$$opc{'opcode'}; } else { $$fnname = 'op_'.uc($def).'_'.$$opc{'opcode'}; } #$$fnname = 'opc_'.$$opc{'asm'}.'_'.$def; #$$fnname =~ s/\s/_/g; #$$fnname =~ s/\(/_bR_/g; #$$fnname =~ s/\)/_Rb_/g; #$$fnname =~ s/\+/_plus_/g; #$$fnname =~ s/\,/_cm_/g; $head.="/*$$opc{asm}*/\n" if($$opc{asm}); $$opc{'asm'} =~ s/\'/_/g; $head.="static void $$fnname(Z80EX_CONTEXT *cpu)\n{\n"; if($$opc{'asm'} =~ /^(LD\sA,R|LD\sR,A|LD\sA,I)$/) { $$opc{'asm'} =~ s/\s/_/g; $$opc{'asm'} =~ s/,/_/g; } if($$opc{rd}) { @rr=split /,/,$$opc{rd}; if($def ne 'base') { #for prefixed ops: min. time used to fetch the prefix (4) must be substracted for(my $i = 0;$i <= $#rr;++$i) { $rr[$i]-=4; } } } if($$opc{wr}) { @ww=split /,/,$$opc{wr}; if($def ne 'base') { #for prefixed ops: min. time used to fetch the prefix (4) must be substracted for(my $i = 0;$i <= $#ww;++$i) { $ww[$i]-=4; } } } my @pair = split /\s/,$$opc{'asm'}; #$pair[0] == command name now... $pair[0]='IM_' if($pair[0] eq 'IM'); $cmd_cyclic=1 if($pair[0] =~ /^(LDIR|LDDR|OTIR|OTDR|INIR|INDR|CPDR|CPIR|DJNZ)$/); if($pair[0] eq 'shift') { if($def ne 'base') { $$fnname = "NULL"; #"opc_".uc($def).$pair[1]; return(""); } $$fnname = "op_p_".$pair[1]; return("static void ".$$fnname."(Z80EX_CONTEXT *cpu)\n{\n cpu->prefix=0x".$pair[1].";\n cpu->noint_once=1;\n}\n"); } elsif($pair[0] eq 'ignore' or $pair[0] eq 'reset') { $$fnname = "NULL"; return(""); } my @tst = split /\//,$$opc{t}; #t-states if($def ne 'base') { #for prefixed ops: min. time used to fetch the prefix (4) must be substracted $tst[0]-=4; $tst[1]-=4 if($tst[1]); } if(defined($pair[1])) #mnemonic with args { my $dbus_arg=0; #number of argument that references memory, or 0 @arguments = split /,/,$pair[1]; #split args if(($pair[0] eq 'JP') and ($arguments[0] =~ /^(HL|IX|IY)$/)) { $pair[0] = 'JP_NO_MPTR'; } #support for ld a, rlc(ix+d) -alike constructs if($pair[2]) { splice @arguments,$#arguments+1,1,(split /,/,$pair[2]); } die "err1" if($#arguments > 1 and !$pair[2]); my $nnn=1; foreach my $argg (@arguments) { #print "$arg--"; $dbus_arg = $nnn if($argg =~ /^\([\w\+\@\#\$]+\)$/); $nnn++; } #print "\n"; $cmd_branch=1 if(($#arguments && $pair[0] =~ /^(CALL|JP|JR)$/) || $pair[0] =~ /^RET$/); #command works with port or memory data... clarify its type if($dbus_arg) { if($pair[0] eq 'LD') { if($arguments[1] =~ /^(RLC|RRC|RL|RR|SLA|SRA|SLL|SRL|SET|RES)$/) { $cmd_mwrite = 1; } elsif($dbus_arg == 1) #first arg is (ptr) { die ("LD with one arg!") if(!$arguments[1]); $cmd_mwrite = 1; $cmd_is_16bit=is_arg_16bit($arguments[1]); if(($arguments[0] =~ /^\((BC|DE|\@)\)$/) and ($arguments[1] eq 'A')) { #ld (nnnn|BC|DE), A $pair[0]='LD_A_TO_ADDR_MPTR'; $cmd_memptr=1; } elsif($arguments[0] =~ /^\(\@\)$/) { #ld (nnnn),rp $pair[0]='LD_RP_TO_ADDR_MPTR_'; $cmd_memptr=1; } } else { $cmd_is_16bit=is_arg_16bit($arguments[0]); if(($arguments[0] eq 'A') and ($arguments[1] =~ /^\((BC|DE|\@)\)$/)) { #ld a,(BC|DE|nnnn) $pair[0]='LD_A_FROM_ADDR_MPTR'; $cmd_memptr=1; } elsif($arguments[1] =~ /^\(\@\)$/) { #ld rp,(nnnn) $pair[0]='LD_RP_FROM_ADDR_MPTR_'; $cmd_memptr=1; } } } elsif($pair[0] eq 'EX') { die("no such EX") if ($dbus_arg == 2); $cmd_mwrite = 1; $cmd_is_16bit = 1; $cmd_memmod = 1; $pair[0]='EX_MPTR'; } elsif($pair[0] =~ /^(ADD|SUB|ADC|SBC)$/) { $cmd_mwrite = 0; } elsif($pair[0] eq 'INC' or $pair[0] eq 'DEC') { die("no such inc/dec") if ($dbus_arg == 2 or $arguments[1]); $cmd_mwrite = 1; $cmd_memmod = 1; } elsif($pair[0] =~ /^(RLC|RRC|RR|RL|SLA|SRA|SLL|SRL)$/) { die("no such rotate cmd") if ($dbus_arg == 2 or $arguments[1]); $cmd_mwrite = 1; $cmd_memmod = 1; } elsif($pair[0] eq 'BIT') { die("no such bit cmd") if ($dbus_arg == 1); $cmd_mwrite = 0; } elsif($pair[0] eq 'RES' or $pair[0] eq 'SET') { die("no such set/res cmd") if ($dbus_arg == 1); $cmd_mwrite = 1; $cmd_memmod = 1; } elsif($pair[0] eq 'JP') { $cmd_is_16bit = 1; $cmd_mwrite = 0; } elsif($pair[0] =~ /^(OR|XOR|AND)$/) { $cmd_mwrite = 0; } elsif($pair[0] eq 'CP') { $cmd_mwrite = 0; } elsif($pair[0] eq 'SUB') { $cmd_mwrite = 0; } elsif($pair[0] eq 'IN' or $pair[0] eq 'IN_F') { $cmd_pwrite = 0; } elsif($pair[0] eq 'OUT') { $cmd_pwrite = 1; } else { die("unknown cmd that references mem adress or port: $pair[0]\n") } } die "not all timings given for $$opc{'asm'}!" if((!defined($$opc{rd}) or !defined($$opc{wr})) and $cmd_memmod); #branching if($cmd_branch) { $out.= get_flag_co($arguments[0])." {\n"; splice(@arguments,0,1); } #process the rest args (numbers or registers) my $nn=1; my $add_op=0; my $add_op_arg=''; my $skip_next=0; #print "-- cmd_mwrite=$cmd_mwrite, dbus_arg=$dbus_arg --\n"; foreach my $arg (@arguments) { if($skip_next) { $skip_next=0; $nn++; next; } if($pair[0] eq 'IM_') { $arg='IM'.$arg; } if($arg =~ /^(RLC|RRC|RL|RR|SLA|SRA|SLL|SRL)$/) { $add_op = $arg; $nn++; next; } elsif($arg =~ /^(SET|RES)$/) { $add_op = $arg; die "jopa" if(!$arguments[$nn] && !$arguments[$nn+1]); $add_op_arg = $arguments[$nn].','; $nn++; $skip_next=1; next; } elsif($arg eq '%') #offset { $head.=" temp_byte=READ_OP();\n"; $head.=" temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte;\n"; $arg_str.="temp_byte_s"; } elsif($arg =~ /^\#$/) #byte { $head.=" temp_byte=READ_OP();\n"; $arg_str.="temp_byte"; } elsif($arg =~ /^\@$/) #word { $head.=" temp_word.b.l=READ_OP();\n"; $head.=" temp_word.b.h=READ_OP();\n"; $arg_str.="temp_word.w"; $addr_mptr="temp_word.w" if($pair[0] =~/^(JP|JR|CALL)$/); } elsif($arg =~ /^\(\@\)$/) #memory referenced by word { die "err22" if(!$dbus_arg or $dbus_arg!=$nn); $head.=" temp_addr.b.l=READ_OP();\n"; $head.=" temp_addr.b.h=READ_OP();\n"; $addr_mptr = "temp_addr.w"; if($cmd_is_16bit) { $arg_str.="temp_word.w"; if(!$cmd_mwrite or $cmd_memmod) { die "2nd shift-op for 16bit cmd" if($add_op); $head.=" ".$readbyte."temp_word.b.l,temp_addr.w,".next_t(\@rr).");\n"; $head.=" ".$readbyte."temp_word.b.h,temp_addr.w+1,".next_t(\@rr).");\n"; } if($cmd_mwrite) { die "wr isnt given for 16bit memory-write op" if(!$$opc{wr}); $foot.=" ".$writebyte."temp_addr.w,temp_word.b.l,".next_t(\@ww).");\n"; $foot.=" ".$writebyte."temp_addr.w+1,temp_word.b.h,".next_t(\@ww).");\n"; } } else { $arg_str.="temp_byte"; if(!$cmd_mwrite or $cmd_memmod) { $head.=" ".$readbyte."temp_byte,temp_addr.w,".next_t(\@rr).");\n"; $head.=" $add_op(".$add_op_arg."temp_byte,".next_t(\@rr).");\n" if($add_op); } if($cmd_mwrite) { if($add_op) { $head.=" ".$readbyte."temp_byte,temp_addr.w,".next_t(\@rr).");\n"; $head.=" $add_op(".$add_op_arg."temp_byte);\n" if($add_op); } $foot.=" ".$writebyte."temp_addr.w,temp_byte,".next_t(\@ww).");\n"; } } } elsif($arg =~ /^\(\#\)$/) #dealing with port { die "err22" if(!$dbus_arg or $dbus_arg!=$nn); die ("(\#) notation, but it isnt 'out' or 'in' command -- $pair[0]") if(!$cmd_pwrite and ($pair[0] !~ /^(IN|IN_F)$/)); $head.=" temp_word.w=(READ_OP() + ( A << 8 ));\n"; $arg_str.="temp_word.w"; $pair[0].='_A'; # IN A,(nn) and OUT (nn),A behaves somewhat differently } elsif($arg eq '(C)') #dealing with port { die "err22" if(!$dbus_arg or $dbus_arg!=$nn); die ("(C) notation, but it isnt 'out' or 'in' command -- $pair[0]") if(!$cmd_pwrite and ($pair[0] !~ /^(IN|IN_F)$/)); $arg_str.= "BC"; } elsif($arg =~ /^\([\w\+\$]+\)$/) #memory adressing by regpair (or regpair+d) { die "err22: dbus_arg=$dbus_arg" if(!$dbus_arg or $dbus_arg!=$nn); (my $ref) = $arg =~ /^\(([\w\+\$]+)\)$/; die "err66" if(!$ref); if($ref =~ /\+/) # (IX/IY + $) { #×ÚÑÔØ ÞÉÓÌÏ É ÐÒÉÐÉÓÁÔØ ÅÇÏ Ë ref ×ÍÅÓÔÏ $ if(($def ne 'ddcb') and ($def ne 'fdcb')) { $head.=" temp_byte=READ_OP();\n"; $head.=" temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte;\n"; } (my $regg) = $ref =~ /^(\w+)\+\$$/; die "err 889 (ref=$ref)" if(!$regg); $ref = $regg.'+temp_byte_s'; if($pair[0] eq 'BIT') #BIT n,(INDEX+$) is a special case... { $pair[0]="BIT_MPTR"; } $head.=" MEMPTR=($ref);\n"; } else { if(($ref eq 'HL') and ($pair[0] eq 'BIT')) #BIT n,(HL) is a special case... { $pair[0]="BIT_MPTR"; } } $addr_mptr = "($ref)"; #$head.=" temp_addr.w=$ref;\n"; if($cmd_is_16bit) { $arg_str.="temp_word.w"; if(!$cmd_mwrite or $cmd_memmod) { die "2nd shift-op for 16bit cmd" if($add_op); $head.=" ".$readbyte."temp_word.b.l,($ref),".next_t(\@rr).");\n"; $head.=" ".$readbyte."temp_word.b.h,($ref+1),".next_t(\@rr).");\n"; } if($cmd_mwrite) { die "wr isnt given for 16bit memory-write op" if(!$$opc{wr}); $foot.=" ".$writebyte."($ref),temp_word.b.l,".next_t(\@ww).");\n"; $foot.=" ".$writebyte."($ref+1),temp_word.b.h,".next_t(\@ww).");\n"; } } else { $arg_str.="temp_byte"; if(!$cmd_mwrite or $cmd_memmod) { $head.=" ".$readbyte."temp_byte,($ref),".next_t(\@rr).");\n"; $head.=" $add_op(".$add_op_arg."temp_byte);\n" if($add_op); } if($cmd_mwrite) { if($add_op) { $head.=" ".$readbyte."temp_byte,($ref),".next_t(\@rr).");\n"; $head.=" $add_op(".$add_op_arg."temp_byte);\n" if($add_op); } $foot.=" ".$writebyte."($ref),temp_byte,".next_t(\@ww).");\n"; } } } else { $arg_str.=$arg; } $arg_str.=',' if($nn-1 < $#arguments); $nn++; } } if($cmd_memptr) #pass adress to commands that modifyes MEMPTR register { $arg_str.= ', ' if($arg_str ne ''); $arg_str.= $addr_mptr; } if(($pair[0] =~ /^(LD|ADD|ADC|SBC|INC|DEC)$/) or ($pair[0] =~ /^LD_/)) { foreach my $aa (@arguments) { if(is_arg_16bit($aa)) { $pair[0] = $pair[0].'16'; last; } } } ######## give timing info for some cmds if($cmd_cyclic) #give ciclyc commands full timing info { die("block/cycle command, but only one timing given!") if(!$tst[0] or !$tst[0]); $arg_str.= ', ' if($arg_str ne ''); $arg_str.= "/*t:*/ /*t1*/$tst[0],/*t2*/$tst[1]"; } ######## if($#rr >= 0) { $arg_str.= ', ' if($arg_str ne ''); $arg_str.= '/*rd*/'; my $nnum=0; foreach my $rarg (@rr) #it there's rd-timings left, pass them as arguments { $arg_str.=',' if($nnum); $arg_str.=$rarg; $nnum++; } } if($#ww >= 0) { $arg_str.= ', ' if($arg_str ne ''); $arg_str.= '/*wr*/'; my $nnum=0; foreach my $warg (@ww) #it there's wr-timings left, pass them as arguments { $arg_str.=',' if($nnum); $arg_str.=$warg; $nnum++; } } $out.=" $pair[0]".'('.$arg_str.");\n" if($pair[0] ne 'NOP'); if($cmd_branch) { die "branching cmd, two timings must be given!" if(!$tst[0] or !$tst[1]); $foot.=" T_WAIT_UNTIL($tst[1]);\n }\n else { T_WAIT_UNTIL($tst[0]);"; if($cmd_branch and $pair[0] =~ /^(JP|CALL)$/) { $foot.="MEMPTR=$addr_mptr;" } $foot.="}\n"; } else { $foot.=" T_WAIT_UNTIL($tst[0]);\n" if(!$cmd_cyclic); } $foot.=" return;"; return($head.$out.$foot."\n}\n"); } sub convert_to_c_disasm { } sub process_ofile { my $fname = shift; my $def = shift; my $disasmt = shift; my $to_file = shift; my $fnname; my $pair; my @tbl=(); my @tbl_dasm=(); my %nm_hash=(); print "/*processing $fname.dat...*/\n\n"; open(NP,"<$fname.dat") or die ("cannot open $fname"); open(OFILE,'>./opcodes_'.$def.'.c') or die ("cannot create ".'./'.$fname.'.c.inc') if($to_file); select(OFILE) if($to_file); my $header = "/* autogenerated from $fname.dat, do not edit */\n\n"; print $header; while() { my $out = ""; chomp; next if(/^\s*$/); next if(/^#/); my %opc; if(lc($def) eq 'dd' or lc($def) eq 'ddcb') { $_ =~ s/REGISTER/IX/g; } elsif(lc($def) eq 'fd' or lc($def) eq 'fdcb') { $_ =~ s/REGISTER/IY/g; } #my($opcode, $mnemonic, $tstates, $w) = $_ =~ /^(\w+)=\"(.*)\"/; foreach $pair (split /\s\s+/) { die("wrong format -- tab detected") if($pair =~ /\t/); $pair =~ s/^\s*//; $pair =~ s/\s*$//; #print "pair = [$pair]\n"; if($pair =~ /^0x\w\w$/) { $opc{"opcode"}=$pair; } else { my($nm,$val) = $pair =~ /^(\w+)=\"(.*)\"$/; die "parse error for $pair" if(!$nm or !defined($val)); if($nm =~ /^(t|wr|rd)$/) { $opc{"$nm"}=$val; } else { $opc{"opcode"}=$nm; $opc{"asm"}=$val; } } } my $c = &convert_to_c(\%opc, $def, \$fnname); print "$c\n" if(!$nm_hash{$fnname} && $opc{"asm"}); #add to tables if($opc{"asm"}) { $tbl[hex($opc{"opcode"})]=$fnname; $nm_hash{$fnname}=1; if($opc{"t"} =~ /\//) { my @tts = split /\//,$opc{"t"}; die "bad t format" if($#tts != 1); $tts[1]=0 if($tts[1] == $tts[0]); $tbl_dasm[hex($opc{"opcode"})]=[($opc{"asm"} =~ /^(ignore|reset)\s/)? '#': $opc{"asm"},$tts[0],$tts[1]]; } else { $tbl_dasm[hex($opc{"opcode"})]=[($opc{"asm"} =~ /^(ignore|reset)\s/)? '#': $opc{"asm"},$opc{"t"},0]; } } else { $tbl[hex($opc{"opcode"})]='#'; } undef(%opc); } my$ii; #empty fields means NULL for($ii=0;$ii < 256;$ii++) { if(!defined($tbl[$ii])) { $tbl[$ii]='NULL'; $tbl_dasm[$ii] = ['#',0,0]; } } # for cloned BIT ddcb/fdcb opcodes my $last; for($ii=255;$ii >= 0;$ii--) { if($tbl[$ii] eq '#') { $tbl[$ii]=$tbl[$last]; $tbl_dasm[$ii]=$tbl_dasm[$last]; } $last=$ii; } $$disasmt="\n\n/**/\nstatic const z80ex_opc_dasm dasm_".$def."[0x100] = {\n"; my $footer="\n\n/**/\n"; $footer .= "static const z80ex_opcode_fn opcodes_".$def."[0x100] = {\n"; for($ii=0;$ii < 256;$ii++) { $footer.= sprintf(' %-14s',$tbl[$ii]); my $ddasm = ($tbl_dasm[$ii]->[0] eq '#')? 'NULL': '"'.$tbl_dasm[$ii]->[0].'"'; $ddasm =~ s/AF_/AF'/g; $$disasmt.=sprintf('{ %-20s, %2d , %2d } /* %02X */',$ddasm,$tbl_dasm[$ii]->[1],$tbl_dasm[$ii]->[2],$ii); if($ii != 255) { $footer.=','; $$disasmt.=','; } $$disasmt.="\n"; $footer.= "\n" if(($ii+1)/4 == int(($ii+1)/4)); } chop $footer; $footer.="\n};\n"; $$disasmt.="\n};\n"; print $footer; close(OFILE) if($to_file); select(STDOUT); close(NP); } my $to_file = 1; my $disasmt; open(DFILE,'>./opcodes_dasm.c') or die ("cannot open dasm.c for writing\n"); print DFILE "/* autogenerated, do not edit */"; &process_ofile('./opcodes_base','base',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_cb','cb',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_ed','ed',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_ddfd','dd',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_ddfd','fd',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_ddfdcb','ddcb',\$disasmt,$to_file); print DFILE $disasmt; &process_ofile('./opcodes_ddfdcb','fdcb',\$disasmt,$to_file); print DFILE $disasmt; close(DFILE); ./z80ex-1.1.21/opcodes/opcodes_dd.c0000644000175000017500000004270711061326375014750 0ustar booboo/* autogenerated from ./opcodes_ddfd.dat, do not edit */ /*ADD IX,BC*/ static void op_DD_0x09(Z80EX_CONTEXT *cpu) { ADD16(IX,BC); T_WAIT_UNTIL(11); return; } /*ADD IX,DE*/ static void op_DD_0x19(Z80EX_CONTEXT *cpu) { ADD16(IX,DE); T_WAIT_UNTIL(11); return; } /*LD IX,@*/ static void op_DD_0x21(Z80EX_CONTEXT *cpu) { temp_word.b.l=READ_OP(); temp_word.b.h=READ_OP(); LD16(IX,temp_word.w); T_WAIT_UNTIL(10); return; } /*LD (@),IX*/ static void op_DD_0x22(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); LD_RP_TO_ADDR_MPTR_16(temp_word.w,IX, temp_addr.w); WRITE_MEM(temp_addr.w,temp_word.b.l,10); WRITE_MEM(temp_addr.w+1,temp_word.b.h,13); T_WAIT_UNTIL(16); return; } /*INC IX*/ static void op_DD_0x23(Z80EX_CONTEXT *cpu) { INC16(IX); T_WAIT_UNTIL(6); return; } /*INC IXH*/ static void op_DD_0x24(Z80EX_CONTEXT *cpu) { INC(IXH); T_WAIT_UNTIL(4); return; } /*DEC IXH*/ static void op_DD_0x25(Z80EX_CONTEXT *cpu) { DEC(IXH); T_WAIT_UNTIL(4); return; } /*LD IXH,#*/ static void op_DD_0x26(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(IXH,temp_byte); T_WAIT_UNTIL(7); return; } /*ADD IX,IX*/ static void op_DD_0x29(Z80EX_CONTEXT *cpu) { ADD16(IX,IX); T_WAIT_UNTIL(11); return; } /*LD IX,(@)*/ static void op_DD_0x2a(Z80EX_CONTEXT *cpu) { temp_addr.b.l=READ_OP(); temp_addr.b.h=READ_OP(); READ_MEM(temp_word.b.l,temp_addr.w,10); READ_MEM(temp_word.b.h,temp_addr.w+1,13); LD_RP_FROM_ADDR_MPTR_16(IX,temp_word.w, temp_addr.w); T_WAIT_UNTIL(16); return; } /*DEC IX*/ static void op_DD_0x2b(Z80EX_CONTEXT *cpu) { DEC16(IX); T_WAIT_UNTIL(6); return; } /*INC IXL*/ static void op_DD_0x2c(Z80EX_CONTEXT *cpu) { INC(IXL); T_WAIT_UNTIL(4); return; } /*DEC IXL*/ static void op_DD_0x2d(Z80EX_CONTEXT *cpu) { DEC(IXL); T_WAIT_UNTIL(4); return; } /*LD IXL,#*/ static void op_DD_0x2e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); LD(IXL,temp_byte); T_WAIT_UNTIL(7); return; } /*INC (IX+$)*/ static void op_DD_0x34(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); INC(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*DEC (IX+$)*/ static void op_DD_0x35(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); DEC(temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD (IX+$),#*/ static void op_DD_0x36(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); temp_byte=READ_OP(); LD(temp_byte,temp_byte); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*ADD IX,SP*/ static void op_DD_0x39(Z80EX_CONTEXT *cpu) { ADD16(IX,SP); T_WAIT_UNTIL(11); return; } /*LD B,IXH*/ static void op_DD_0x44(Z80EX_CONTEXT *cpu) { LD(B,IXH); T_WAIT_UNTIL(4); return; } /*LD B,IXL*/ static void op_DD_0x45(Z80EX_CONTEXT *cpu) { LD(B,IXL); T_WAIT_UNTIL(4); return; } /*LD B,(IX+$)*/ static void op_DD_0x46(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(B,temp_byte); T_WAIT_UNTIL(15); return; } /*LD C,IXH*/ static void op_DD_0x4c(Z80EX_CONTEXT *cpu) { LD(C,IXH); T_WAIT_UNTIL(4); return; } /*LD C,IXL*/ static void op_DD_0x4d(Z80EX_CONTEXT *cpu) { LD(C,IXL); T_WAIT_UNTIL(4); return; } /*LD C,(IX+$)*/ static void op_DD_0x4e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(C,temp_byte); T_WAIT_UNTIL(15); return; } /*LD D,IXH*/ static void op_DD_0x54(Z80EX_CONTEXT *cpu) { LD(D,IXH); T_WAIT_UNTIL(4); return; } /*LD D,IXL*/ static void op_DD_0x55(Z80EX_CONTEXT *cpu) { LD(D,IXL); T_WAIT_UNTIL(4); return; } /*LD D,(IX+$)*/ static void op_DD_0x56(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(D,temp_byte); T_WAIT_UNTIL(15); return; } /*LD E,IXH*/ static void op_DD_0x5c(Z80EX_CONTEXT *cpu) { LD(E,IXH); T_WAIT_UNTIL(4); return; } /*LD E,IXL*/ static void op_DD_0x5d(Z80EX_CONTEXT *cpu) { LD(E,IXL); T_WAIT_UNTIL(4); return; } /*LD E,(IX+$)*/ static void op_DD_0x5e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(E,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IXH,B*/ static void op_DD_0x60(Z80EX_CONTEXT *cpu) { LD(IXH,B); T_WAIT_UNTIL(4); return; } /*LD IXH,C*/ static void op_DD_0x61(Z80EX_CONTEXT *cpu) { LD(IXH,C); T_WAIT_UNTIL(4); return; } /*LD IXH,D*/ static void op_DD_0x62(Z80EX_CONTEXT *cpu) { LD(IXH,D); T_WAIT_UNTIL(4); return; } /*LD IXH,E*/ static void op_DD_0x63(Z80EX_CONTEXT *cpu) { LD(IXH,E); T_WAIT_UNTIL(4); return; } /*LD IXH,IXH*/ static void op_DD_0x64(Z80EX_CONTEXT *cpu) { LD(IXH,IXH); T_WAIT_UNTIL(4); return; } /*LD IXH,IXL*/ static void op_DD_0x65(Z80EX_CONTEXT *cpu) { LD(IXH,IXL); T_WAIT_UNTIL(4); return; } /*LD H,(IX+$)*/ static void op_DD_0x66(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(H,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IXH,A*/ static void op_DD_0x67(Z80EX_CONTEXT *cpu) { LD(IXH,A); T_WAIT_UNTIL(4); return; } /*LD IXL,B*/ static void op_DD_0x68(Z80EX_CONTEXT *cpu) { LD(IXL,B); T_WAIT_UNTIL(4); return; } /*LD IXL,C*/ static void op_DD_0x69(Z80EX_CONTEXT *cpu) { LD(IXL,C); T_WAIT_UNTIL(4); return; } /*LD IXL,D*/ static void op_DD_0x6a(Z80EX_CONTEXT *cpu) { LD(IXL,D); T_WAIT_UNTIL(4); return; } /*LD IXL,E*/ static void op_DD_0x6b(Z80EX_CONTEXT *cpu) { LD(IXL,E); T_WAIT_UNTIL(4); return; } /*LD IXL,IXH*/ static void op_DD_0x6c(Z80EX_CONTEXT *cpu) { LD(IXL,IXH); T_WAIT_UNTIL(4); return; } /*LD IXL,IXL*/ static void op_DD_0x6d(Z80EX_CONTEXT *cpu) { LD(IXL,IXL); T_WAIT_UNTIL(4); return; } /*LD L,(IX+$)*/ static void op_DD_0x6e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(L,temp_byte); T_WAIT_UNTIL(15); return; } /*LD IXL,A*/ static void op_DD_0x6f(Z80EX_CONTEXT *cpu) { LD(IXL,A); T_WAIT_UNTIL(4); return; } /*LD (IX+$),B*/ static void op_DD_0x70(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,B); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),C*/ static void op_DD_0x71(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,C); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),D*/ static void op_DD_0x72(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,D); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),E*/ static void op_DD_0x73(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,E); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),H*/ static void op_DD_0x74(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,H); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),L*/ static void op_DD_0x75(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,L); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD (IX+$),A*/ static void op_DD_0x77(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); LD(temp_byte,A); WRITE_MEM((IX+temp_byte_s),temp_byte,12); T_WAIT_UNTIL(15); return; } /*LD A,IXH*/ static void op_DD_0x7c(Z80EX_CONTEXT *cpu) { LD(A,IXH); T_WAIT_UNTIL(4); return; } /*LD A,IXL*/ static void op_DD_0x7d(Z80EX_CONTEXT *cpu) { LD(A,IXL); T_WAIT_UNTIL(4); return; } /*LD A,(IX+$)*/ static void op_DD_0x7e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); LD(A,temp_byte); T_WAIT_UNTIL(15); return; } /*ADD A,IXH*/ static void op_DD_0x84(Z80EX_CONTEXT *cpu) { ADD(A,IXH); T_WAIT_UNTIL(4); return; } /*ADD A,IXL*/ static void op_DD_0x85(Z80EX_CONTEXT *cpu) { ADD(A,IXL); T_WAIT_UNTIL(4); return; } /*ADD A,(IX+$)*/ static void op_DD_0x86(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); ADD(A,temp_byte); T_WAIT_UNTIL(15); return; } /*ADC A,IXH*/ static void op_DD_0x8c(Z80EX_CONTEXT *cpu) { ADC(A,IXH); T_WAIT_UNTIL(4); return; } /*ADC A,IXL*/ static void op_DD_0x8d(Z80EX_CONTEXT *cpu) { ADC(A,IXL); T_WAIT_UNTIL(4); return; } /*ADC A,(IX+$)*/ static void op_DD_0x8e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); ADC(A,temp_byte); T_WAIT_UNTIL(15); return; } /*SUB IXH*/ static void op_DD_0x94(Z80EX_CONTEXT *cpu) { SUB(IXH); T_WAIT_UNTIL(4); return; } /*SUB IXL*/ static void op_DD_0x95(Z80EX_CONTEXT *cpu) { SUB(IXL); T_WAIT_UNTIL(4); return; } /*SUB (IX+$)*/ static void op_DD_0x96(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SUB(temp_byte); T_WAIT_UNTIL(15); return; } /*SBC A,IXH*/ static void op_DD_0x9c(Z80EX_CONTEXT *cpu) { SBC(A,IXH); T_WAIT_UNTIL(4); return; } /*SBC A,IXL*/ static void op_DD_0x9d(Z80EX_CONTEXT *cpu) { SBC(A,IXL); T_WAIT_UNTIL(4); return; } /*SBC A,(IX+$)*/ static void op_DD_0x9e(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); SBC(A,temp_byte); T_WAIT_UNTIL(15); return; } /*AND IXH*/ static void op_DD_0xa4(Z80EX_CONTEXT *cpu) { AND(IXH); T_WAIT_UNTIL(4); return; } /*AND IXL*/ static void op_DD_0xa5(Z80EX_CONTEXT *cpu) { AND(IXL); T_WAIT_UNTIL(4); return; } /*AND (IX+$)*/ static void op_DD_0xa6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); AND(temp_byte); T_WAIT_UNTIL(15); return; } /*XOR IXH*/ static void op_DD_0xac(Z80EX_CONTEXT *cpu) { XOR(IXH); T_WAIT_UNTIL(4); return; } /*XOR IXL*/ static void op_DD_0xad(Z80EX_CONTEXT *cpu) { XOR(IXL); T_WAIT_UNTIL(4); return; } /*XOR (IX+$)*/ static void op_DD_0xae(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); XOR(temp_byte); T_WAIT_UNTIL(15); return; } /*OR IXH*/ static void op_DD_0xb4(Z80EX_CONTEXT *cpu) { OR(IXH); T_WAIT_UNTIL(4); return; } /*OR IXL*/ static void op_DD_0xb5(Z80EX_CONTEXT *cpu) { OR(IXL); T_WAIT_UNTIL(4); return; } /*OR (IX+$)*/ static void op_DD_0xb6(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); OR(temp_byte); T_WAIT_UNTIL(15); return; } /*CP IXH*/ static void op_DD_0xbc(Z80EX_CONTEXT *cpu) { CP(IXH); T_WAIT_UNTIL(4); return; } /*CP IXL*/ static void op_DD_0xbd(Z80EX_CONTEXT *cpu) { CP(IXL); T_WAIT_UNTIL(4); return; } /*CP (IX+$)*/ static void op_DD_0xbe(Z80EX_CONTEXT *cpu) { temp_byte=READ_OP(); temp_byte_s=(temp_byte & 0x80)? -(((~temp_byte) & 0x7f)+1): temp_byte; MEMPTR=(IX+temp_byte_s); READ_MEM(temp_byte,(IX+temp_byte_s),12); CP(temp_byte); T_WAIT_UNTIL(15); return; } /*POP IX*/ static void op_DD_0xe1(Z80EX_CONTEXT *cpu) { POP(IX, /*rd*/4,7); T_WAIT_UNTIL(10); return; } /*EX (SP),IX*/ static void op_DD_0xe3(Z80EX_CONTEXT *cpu) { READ_MEM(temp_word.b.l,(SP),4); READ_MEM(temp_word.b.h,(SP+1),7); EX_MPTR(temp_word.w,IX); WRITE_MEM((SP),temp_word.b.l,11); WRITE_MEM((SP+1),temp_word.b.h,14); T_WAIT_UNTIL(19); return; } /*PUSH IX*/ static void op_DD_0xe5(Z80EX_CONTEXT *cpu) { PUSH(IX, /*wr*/5,8); T_WAIT_UNTIL(11); return; } /*JP IX*/ static void op_DD_0xe9(Z80EX_CONTEXT *cpu) { JP_NO_MPTR(IX); T_WAIT_UNTIL(4); return; } /*LD SP,IX*/ static void op_DD_0xf9(Z80EX_CONTEXT *cpu) { LD16(SP,IX); T_WAIT_UNTIL(6); return; } /**/ static const z80ex_opcode_fn opcodes_dd[0x100] = { NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0x09 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0x19 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0x21 , op_DD_0x22 , op_DD_0x23 , op_DD_0x24 , op_DD_0x25 , op_DD_0x26 , NULL , NULL , op_DD_0x29 , op_DD_0x2a , op_DD_0x2b , op_DD_0x2c , op_DD_0x2d , op_DD_0x2e , NULL , NULL , NULL , NULL , NULL , op_DD_0x34 , op_DD_0x35 , op_DD_0x36 , NULL , NULL , op_DD_0x39 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0x44 , op_DD_0x45 , op_DD_0x46 , NULL , NULL , NULL , NULL , NULL , op_DD_0x4c , op_DD_0x4d , op_DD_0x4e , NULL , NULL , NULL , NULL , NULL , op_DD_0x54 , op_DD_0x55 , op_DD_0x56 , NULL , NULL , NULL , NULL , NULL , op_DD_0x5c , op_DD_0x5d , op_DD_0x5e , NULL , op_DD_0x60 , op_DD_0x61 , op_DD_0x62 , op_DD_0x63 , op_DD_0x64 , op_DD_0x65 , op_DD_0x66 , op_DD_0x67 , op_DD_0x68 , op_DD_0x69 , op_DD_0x6a , op_DD_0x6b , op_DD_0x6c , op_DD_0x6d , op_DD_0x6e , op_DD_0x6f , op_DD_0x70 , op_DD_0x71 , op_DD_0x72 , op_DD_0x73 , op_DD_0x74 , op_DD_0x75 , NULL , op_DD_0x77 , NULL , NULL , NULL , NULL , op_DD_0x7c , op_DD_0x7d , op_DD_0x7e , NULL , NULL , NULL , NULL , NULL , op_DD_0x84 , op_DD_0x85 , op_DD_0x86 , NULL , NULL , NULL , NULL , NULL , op_DD_0x8c , op_DD_0x8d , op_DD_0x8e , NULL , NULL , NULL , NULL , NULL , op_DD_0x94 , op_DD_0x95 , op_DD_0x96 , NULL , NULL , NULL , NULL , NULL , op_DD_0x9c , op_DD_0x9d , op_DD_0x9e , NULL , NULL , NULL , NULL , NULL , op_DD_0xa4 , op_DD_0xa5 , op_DD_0xa6 , NULL , NULL , NULL , NULL , NULL , op_DD_0xac , op_DD_0xad , op_DD_0xae , NULL , NULL , NULL , NULL , NULL , op_DD_0xb4 , op_DD_0xb5 , op_DD_0xb6 , NULL , NULL , NULL , NULL , NULL , op_DD_0xbc , op_DD_0xbd , op_DD_0xbe , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0xe1 , NULL , op_DD_0xe3 , NULL , op_DD_0xe5 , NULL , NULL , NULL , op_DD_0xe9 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , op_DD_0xf9 , NULL , NULL , NULL , NULL , NULL , NULL }; ./z80ex-1.1.21/opcodes/opcodes_ddfdcb.dat0000644000175000017500000003040110732252257016102 0ustar booboo# ddcb & fdcb, (for ddcb REGISTER=IX, for fdcb REGISTER=IY) 256 # empty lines with opcode around 0x40 means "same as the next non-blank opcode" 0x00="LD B,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x01="LD C,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x02="LD D,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x03="LD E,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x04="LD H,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x05="LD L,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x06="RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x07="LD A,RLC (REGISTER+$)" t="23" rd="16" wr="20" 0x08="LD B,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x09="LD C,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0a="LD D,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0b="LD E,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0c="LD H,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0d="LD L,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0e="RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x0f="LD A,RRC (REGISTER+$)" t="23" rd="16" wr="20" 0x10="LD B,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x11="LD C,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x12="LD D,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x13="LD E,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x14="LD H,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x15="LD L,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x16="RL (REGISTER+$)" t="23" rd="16" wr="20" 0x17="LD A,RL (REGISTER+$)" t="23" rd="16" wr="20" 0x18="LD B,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x19="LD C,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1a="LD D,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1b="LD E,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1c="LD H,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1d="LD L,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1e="RR (REGISTER+$)" t="23" rd="16" wr="20" 0x1f="LD A,RR (REGISTER+$)" t="23" rd="16" wr="20" 0x20="LD B,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x21="LD C,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x22="LD D,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x23="LD E,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x24="LD H,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x25="LD L,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x26="SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x27="LD A,SLA (REGISTER+$)" t="23" rd="16" wr="20" 0x28="LD B,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x29="LD C,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2a="LD D,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2b="LD E,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2c="LD H,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2d="LD L,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2e="SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x2f="LD A,SRA (REGISTER+$)" t="23" rd="16" wr="20" 0x30="LD B,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x31="LD C,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x32="LD D,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x33="LD E,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x34="LD H,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x35="LD L,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x36="SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x37="LD A,SLL (REGISTER+$)" t="23" rd="16" wr="20" 0x38="LD B,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x39="LD C,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3a="LD D,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3b="LD E,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3c="LD H,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3d="LD L,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3e="SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x3f="LD A,SRL (REGISTER+$)" t="23" rd="16" wr="20" 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47="BIT 0,(REGISTER+$)" t="20" rd="16" 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f="BIT 1,(REGISTER+$)" t="20" rd="16" 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57="BIT 2,(REGISTER+$)" t="20" rd="16" 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e 0x5f="BIT 3,(REGISTER+$)" t="20" rd="16" 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67="BIT 4,(REGISTER+$)" t="20" rd="16" 0x68 0x69 0x6a 0x6b 0x6c 0x6d 0x6e 0x6f="BIT 5,(REGISTER+$)" t="20" rd="16" 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77="BIT 6,(REGISTER+$)" t="20" rd="16" 0x78 0x79 0x7a 0x7b 0x7c 0x7d 0x7e 0x7f="BIT 7,(REGISTER+$)" t="20" rd="16" 0x80="LD B,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x81="LD C,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x82="LD D,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x83="LD E,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x84="LD H,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x85="LD L,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x86="RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x87="LD A,RES 0,(REGISTER+$)" t="23" rd="16" wr="20" 0x88="LD B,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x89="LD C,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8a="LD D,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8b="LD E,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8c="LD H,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8d="LD L,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8e="RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x8f="LD A,RES 1,(REGISTER+$)" t="23" rd="16" wr="20" 0x90="LD B,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x91="LD C,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x92="LD D,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x93="LD E,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x94="LD H,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x95="LD L,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x96="RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x97="LD A,RES 2,(REGISTER+$)" t="23" rd="16" wr="20" 0x98="LD B,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x99="LD C,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9a="LD D,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9b="LD E,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9c="LD H,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9d="LD L,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9e="RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0x9f="LD A,RES 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xa0="LD B,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa1="LD C,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa2="LD D,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa3="LD E,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa4="LD H,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa5="LD L,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa6="RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa7="LD A,RES 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xa8="LD B,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xa9="LD C,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xaa="LD D,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xab="LD E,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xac="LD H,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xad="LD L,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xae="RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xaf="LD A,RES 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xb0="LD B,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb1="LD C,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb2="LD D,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb3="LD E,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb4="LD H,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb5="LD L,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb6="RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb7="LD A,RES 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xb8="LD B,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xb9="LD C,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xba="LD D,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xbb="LD E,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xbc="LD H,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xbd="LD L,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xbe="RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xbf="LD A,RES 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xc0="LD B,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc1="LD C,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc2="LD D,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc3="LD E,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc4="LD H,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc5="LD L,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc6="SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc7="LD A,SET 0,(REGISTER+$)" t="23" rd="16" wr="20" 0xc8="LD B,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xc9="LD C,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xca="LD D,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xcb="LD E,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xcc="LD H,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xcd="LD L,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xce="SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xcf="LD A,SET 1,(REGISTER+$)" t="23" rd="16" wr="20" 0xd0="LD B,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd1="LD C,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd2="LD D,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd3="LD E,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd4="LD H,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd5="LD L,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd6="SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd7="LD A,SET 2,(REGISTER+$)" t="23" rd="16" wr="20" 0xd8="LD B,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xd9="LD C,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xda="LD D,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xdb="LD E,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xdc="LD H,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xdd="LD L,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xde="SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xdf="LD A,SET 3,(REGISTER+$)" t="23" rd="16" wr="20" 0xe0="LD B,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe1="LD C,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe2="LD D,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe3="LD E,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe4="LD H,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe5="LD L,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe6="SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe7="LD A,SET 4,(REGISTER+$)" t="23" rd="16" wr="20" 0xe8="LD B,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xe9="LD C,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xea="LD D,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xeb="LD E,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xec="LD H,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xed="LD L,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xee="SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xef="LD A,SET 5,(REGISTER+$)" t="23" rd="16" wr="20" 0xf0="LD B,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf1="LD C,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf2="LD D,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf3="LD E,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf4="LD H,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf5="LD L,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf6="SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf7="LD A,SET 6,(REGISTER+$)" t="23" rd="16" wr="20" 0xf8="LD B,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xf9="LD C,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xfa="LD D,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xfb="LD E,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xfc="LD H,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xfd="LD L,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xfe="SET 7,(REGISTER+$)" t="23" rd="16" wr="20" 0xff="LD A,SET 7,(REGISTER+$)" t="23" rd="16" wr="20" ./z80ex-1.1.21/opcodes/opcodes_ddfd.dat0000644000175000017500000001003110732252257015572 0ustar booboo# dd or fd prefixed. (for dd REGISTER=IX, for fd REGISTER=IY) # all codes that dont shown here are mirrored from not prefixed codes (ie dd01=01=ld bc,@) 0x09="ADD REGISTER,BC" t="15" 0x19="ADD REGISTER,DE" t="15" 0x21="LD REGISTER,@" t="14" 0x22="LD (@),REGISTER" t="20" wr="14,17" 0x23="INC REGISTER" t="10" 0x24="INC REGISTERH" t="8" 0x25="DEC REGISTERH" t="8" 0x26="LD REGISTERH,#" t="11" 0x29="ADD REGISTER,REGISTER" t="15" 0x2a="LD REGISTER,(@)" t="20" rd="14,17" 0x2b="DEC REGISTER" t="10" 0x2c="INC REGISTERL" t="8" 0x2d="DEC REGISTERL" t="8" 0x2e="LD REGISTERL,#" t="11" 0x34="INC (REGISTER+$)" t="23" rd="16" wr="20" 0x35="DEC (REGISTER+$)" t="23" rd="16" wr="20" 0x36="LD (REGISTER+$),#" t="19" wr="16" 0x39="ADD REGISTER,SP" t="15" 0x44="LD B,REGISTERH" t="8" 0x45="LD B,REGISTERL" t="8" 0x46="LD B,(REGISTER+$)" t="19" rd="16" 0x4c="LD C,REGISTERH" t="8" 0x4d="LD C,REGISTERL" t="8" 0x4e="LD C,(REGISTER+$)" t="19" rd="16" 0x54="LD D,REGISTERH" t="8" 0x55="LD D,REGISTERL" t="8" 0x56="LD D,(REGISTER+$)" t="19" rd="16" 0x5c="LD E,REGISTERH" t="8" 0x5d="LD E,REGISTERL" t="8" 0x5e="LD E,(REGISTER+$)" t="19" rd="16" 0x60="LD REGISTERH,B" t="8" 0x61="LD REGISTERH,C" t="8" 0x62="LD REGISTERH,D" t="8" 0x63="LD REGISTERH,E" t="8" 0x64="LD REGISTERH,REGISTERH" t="8" 0x65="LD REGISTERH,REGISTERL" t="8" 0x66="LD H,(REGISTER+$)" t="19" rd="16" 0x67="LD REGISTERH,A" t="8" 0x68="LD REGISTERL,B" t="8" 0x69="LD REGISTERL,C" t="8" 0x6a="LD REGISTERL,D" t="8" 0x6b="LD REGISTERL,E" t="8" 0x6c="LD REGISTERL,REGISTERH" t="8" 0x6d="LD REGISTERL,REGISTERL" t="8" 0x6e="LD L,(REGISTER+$)" t="19" rd="16" 0x6f="LD REGISTERL,A" t="8" 0x70="LD (REGISTER+$),B" t="19" wr="16" 0x71="LD (REGISTER+$),C" t="19" wr="16" 0x72="LD (REGISTER+$),D" t="19" wr="16" 0x73="LD (REGISTER+$),E" t="19" wr="16" 0x74="LD (REGISTER+$),H" t="19" wr="16" 0x75="LD (REGISTER+$),L" t="19" wr="16" 0x77="LD (REGISTER+$),A" t="19" wr="16" 0x7c="LD A,REGISTERH" t="8" 0x7d="LD A,REGISTERL" t="8" 0x7e="LD A,(REGISTER+$)" t="19" rd="16" 0x84="ADD A,REGISTERH" t="8" 0x85="ADD A,REGISTERL" t="8" 0x86="ADD A,(REGISTER+$)" t="19" rd="16" 0x8c="ADC A,REGISTERH" t="8" 0x8d="ADC A,REGISTERL" t="8" 0x8e="ADC A,(REGISTER+$)" t="19" rd="16" 0x94="SUB REGISTERH" t="8" 0x95="SUB REGISTERL" t="8" 0x96="SUB (REGISTER+$)" t="19" rd="16" 0x9c="SBC A,REGISTERH" t="8" 0x9d="SBC A,REGISTERL" t="8" 0x9e="SBC A,(REGISTER+$)" t="19" rd="16" 0xa4="AND REGISTERH" t="8" 0xa5="AND REGISTERL" t="8" 0xa6="AND (REGISTER+$)" t="19" rd="16" 0xac="XOR REGISTERH" t="8" 0xad="XOR REGISTERL" t="8" 0xae="XOR (REGISTER+$)" t="19" rd="16" 0xb4="OR REGISTERH" t="8" 0xb5="OR REGISTERL" t="8" 0xb6="OR (REGISTER+$)" t="19" rd="16" 0xbc="CP REGISTERH" t="8" 0xbd="CP REGISTERL" t="8" 0xbe="CP (REGISTER+$)" t="19" rd="16" 0xcb="shift CB" t="0" 0xdd="ignore" t="4" 0xe1="POP REGISTER" t="14" rd="8,11" 0xe3="EX (SP),REGISTER" t="23" rd="8,11" wr="15,18" 0xe5="PUSH REGISTER" t="15" wr="9,12" 0xe9="JP REGISTER" t="8" 0xed="reset ED" t="4" 0xf9="LD SP,REGISTER" t="10" 0xfd="ignore" t="4" ./z80ex-1.1.21/opcodes/opcodes_cb.c0000644000175000017500000007464411061326375014752 0ustar booboo/* autogenerated from ./opcodes_cb.dat, do not edit */ /*RLC B*/ static void op_CB_0x00(Z80EX_CONTEXT *cpu) { RLC(B); T_WAIT_UNTIL(4); return; } /*RLC C*/ static void op_CB_0x01(Z80EX_CONTEXT *cpu) { RLC(C); T_WAIT_UNTIL(4); return; } /*RLC D*/ static void op_CB_0x02(Z80EX_CONTEXT *cpu) { RLC(D); T_WAIT_UNTIL(4); return; } /*RLC E*/ static void op_CB_0x03(Z80EX_CONTEXT *cpu) { RLC(E); T_WAIT_UNTIL(4); return; } /*RLC H*/ static void op_CB_0x04(Z80EX_CONTEXT *cpu) { RLC(H); T_WAIT_UNTIL(4); return; } /*RLC L*/ static void op_CB_0x05(Z80EX_CONTEXT *cpu) { RLC(L); T_WAIT_UNTIL(4); return; } /*RLC (HL)*/ static void op_CB_0x06(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RLC(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RLC A*/ static void op_CB_0x07(Z80EX_CONTEXT *cpu) { RLC(A); T_WAIT_UNTIL(4); return; } /*RRC B*/ static void op_CB_0x08(Z80EX_CONTEXT *cpu) { RRC(B); T_WAIT_UNTIL(4); return; } /*RRC C*/ static void op_CB_0x09(Z80EX_CONTEXT *cpu) { RRC(C); T_WAIT_UNTIL(4); return; } /*RRC D*/ static void op_CB_0x0a(Z80EX_CONTEXT *cpu) { RRC(D); T_WAIT_UNTIL(4); return; } /*RRC E*/ static void op_CB_0x0b(Z80EX_CONTEXT *cpu) { RRC(E); T_WAIT_UNTIL(4); return; } /*RRC H*/ static void op_CB_0x0c(Z80EX_CONTEXT *cpu) { RRC(H); T_WAIT_UNTIL(4); return; } /*RRC L*/ static void op_CB_0x0d(Z80EX_CONTEXT *cpu) { RRC(L); T_WAIT_UNTIL(4); return; } /*RRC (HL)*/ static void op_CB_0x0e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RRC(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RRC A*/ static void op_CB_0x0f(Z80EX_CONTEXT *cpu) { RRC(A); T_WAIT_UNTIL(4); return; } /*RL B*/ static void op_CB_0x10(Z80EX_CONTEXT *cpu) { RL(B); T_WAIT_UNTIL(4); return; } /*RL C*/ static void op_CB_0x11(Z80EX_CONTEXT *cpu) { RL(C); T_WAIT_UNTIL(4); return; } /*RL D*/ static void op_CB_0x12(Z80EX_CONTEXT *cpu) { RL(D); T_WAIT_UNTIL(4); return; } /*RL E*/ static void op_CB_0x13(Z80EX_CONTEXT *cpu) { RL(E); T_WAIT_UNTIL(4); return; } /*RL H*/ static void op_CB_0x14(Z80EX_CONTEXT *cpu) { RL(H); T_WAIT_UNTIL(4); return; } /*RL L*/ static void op_CB_0x15(Z80EX_CONTEXT *cpu) { RL(L); T_WAIT_UNTIL(4); return; } /*RL (HL)*/ static void op_CB_0x16(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RL(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RL A*/ static void op_CB_0x17(Z80EX_CONTEXT *cpu) { RL(A); T_WAIT_UNTIL(4); return; } /*RR B*/ static void op_CB_0x18(Z80EX_CONTEXT *cpu) { RR(B); T_WAIT_UNTIL(4); return; } /*RR C*/ static void op_CB_0x19(Z80EX_CONTEXT *cpu) { RR(C); T_WAIT_UNTIL(4); return; } /*RR D*/ static void op_CB_0x1a(Z80EX_CONTEXT *cpu) { RR(D); T_WAIT_UNTIL(4); return; } /*RR E*/ static void op_CB_0x1b(Z80EX_CONTEXT *cpu) { RR(E); T_WAIT_UNTIL(4); return; } /*RR H*/ static void op_CB_0x1c(Z80EX_CONTEXT *cpu) { RR(H); T_WAIT_UNTIL(4); return; } /*RR L*/ static void op_CB_0x1d(Z80EX_CONTEXT *cpu) { RR(L); T_WAIT_UNTIL(4); return; } /*RR (HL)*/ static void op_CB_0x1e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RR(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RR A*/ static void op_CB_0x1f(Z80EX_CONTEXT *cpu) { RR(A); T_WAIT_UNTIL(4); return; } /*SLA B*/ static void op_CB_0x20(Z80EX_CONTEXT *cpu) { SLA(B); T_WAIT_UNTIL(4); return; } /*SLA C*/ static void op_CB_0x21(Z80EX_CONTEXT *cpu) { SLA(C); T_WAIT_UNTIL(4); return; } /*SLA D*/ static void op_CB_0x22(Z80EX_CONTEXT *cpu) { SLA(D); T_WAIT_UNTIL(4); return; } /*SLA E*/ static void op_CB_0x23(Z80EX_CONTEXT *cpu) { SLA(E); T_WAIT_UNTIL(4); return; } /*SLA H*/ static void op_CB_0x24(Z80EX_CONTEXT *cpu) { SLA(H); T_WAIT_UNTIL(4); return; } /*SLA L*/ static void op_CB_0x25(Z80EX_CONTEXT *cpu) { SLA(L); T_WAIT_UNTIL(4); return; } /*SLA (HL)*/ static void op_CB_0x26(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SLA(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SLA A*/ static void op_CB_0x27(Z80EX_CONTEXT *cpu) { SLA(A); T_WAIT_UNTIL(4); return; } /*SRA B*/ static void op_CB_0x28(Z80EX_CONTEXT *cpu) { SRA(B); T_WAIT_UNTIL(4); return; } /*SRA C*/ static void op_CB_0x29(Z80EX_CONTEXT *cpu) { SRA(C); T_WAIT_UNTIL(4); return; } /*SRA D*/ static void op_CB_0x2a(Z80EX_CONTEXT *cpu) { SRA(D); T_WAIT_UNTIL(4); return; } /*SRA E*/ static void op_CB_0x2b(Z80EX_CONTEXT *cpu) { SRA(E); T_WAIT_UNTIL(4); return; } /*SRA H*/ static void op_CB_0x2c(Z80EX_CONTEXT *cpu) { SRA(H); T_WAIT_UNTIL(4); return; } /*SRA L*/ static void op_CB_0x2d(Z80EX_CONTEXT *cpu) { SRA(L); T_WAIT_UNTIL(4); return; } /*SRA (HL)*/ static void op_CB_0x2e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SRA(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SRA A*/ static void op_CB_0x2f(Z80EX_CONTEXT *cpu) { SRA(A); T_WAIT_UNTIL(4); return; } /*SLL B*/ static void op_CB_0x30(Z80EX_CONTEXT *cpu) { SLL(B); T_WAIT_UNTIL(4); return; } /*SLL C*/ static void op_CB_0x31(Z80EX_CONTEXT *cpu) { SLL(C); T_WAIT_UNTIL(4); return; } /*SLL D*/ static void op_CB_0x32(Z80EX_CONTEXT *cpu) { SLL(D); T_WAIT_UNTIL(4); return; } /*SLL E*/ static void op_CB_0x33(Z80EX_CONTEXT *cpu) { SLL(E); T_WAIT_UNTIL(4); return; } /*SLL H*/ static void op_CB_0x34(Z80EX_CONTEXT *cpu) { SLL(H); T_WAIT_UNTIL(4); return; } /*SLL L*/ static void op_CB_0x35(Z80EX_CONTEXT *cpu) { SLL(L); T_WAIT_UNTIL(4); return; } /*SLL (HL)*/ static void op_CB_0x36(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SLL(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SLL A*/ static void op_CB_0x37(Z80EX_CONTEXT *cpu) { SLL(A); T_WAIT_UNTIL(4); return; } /*SRL B*/ static void op_CB_0x38(Z80EX_CONTEXT *cpu) { SRL(B); T_WAIT_UNTIL(4); return; } /*SRL C*/ static void op_CB_0x39(Z80EX_CONTEXT *cpu) { SRL(C); T_WAIT_UNTIL(4); return; } /*SRL D*/ static void op_CB_0x3a(Z80EX_CONTEXT *cpu) { SRL(D); T_WAIT_UNTIL(4); return; } /*SRL E*/ static void op_CB_0x3b(Z80EX_CONTEXT *cpu) { SRL(E); T_WAIT_UNTIL(4); return; } /*SRL H*/ static void op_CB_0x3c(Z80EX_CONTEXT *cpu) { SRL(H); T_WAIT_UNTIL(4); return; } /*SRL L*/ static void op_CB_0x3d(Z80EX_CONTEXT *cpu) { SRL(L); T_WAIT_UNTIL(4); return; } /*SRL (HL)*/ static void op_CB_0x3e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SRL(temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SRL A*/ static void op_CB_0x3f(Z80EX_CONTEXT *cpu) { SRL(A); T_WAIT_UNTIL(4); return; } /*BIT 0,B*/ static void op_CB_0x40(Z80EX_CONTEXT *cpu) { BIT(0,B); T_WAIT_UNTIL(4); return; } /*BIT 0,C*/ static void op_CB_0x41(Z80EX_CONTEXT *cpu) { BIT(0,C); T_WAIT_UNTIL(4); return; } /*BIT 0,D*/ static void op_CB_0x42(Z80EX_CONTEXT *cpu) { BIT(0,D); T_WAIT_UNTIL(4); return; } /*BIT 0,E*/ static void op_CB_0x43(Z80EX_CONTEXT *cpu) { BIT(0,E); T_WAIT_UNTIL(4); return; } /*BIT 0,H*/ static void op_CB_0x44(Z80EX_CONTEXT *cpu) { BIT(0,H); T_WAIT_UNTIL(4); return; } /*BIT 0,L*/ static void op_CB_0x45(Z80EX_CONTEXT *cpu) { BIT(0,L); T_WAIT_UNTIL(4); return; } /*BIT 0,(HL)*/ static void op_CB_0x46(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(0,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 0,A*/ static void op_CB_0x47(Z80EX_CONTEXT *cpu) { BIT(0,A); T_WAIT_UNTIL(4); return; } /*BIT 1,B*/ static void op_CB_0x48(Z80EX_CONTEXT *cpu) { BIT(1,B); T_WAIT_UNTIL(4); return; } /*BIT 1,C*/ static void op_CB_0x49(Z80EX_CONTEXT *cpu) { BIT(1,C); T_WAIT_UNTIL(4); return; } /*BIT 1,D*/ static void op_CB_0x4a(Z80EX_CONTEXT *cpu) { BIT(1,D); T_WAIT_UNTIL(4); return; } /*BIT 1,E*/ static void op_CB_0x4b(Z80EX_CONTEXT *cpu) { BIT(1,E); T_WAIT_UNTIL(4); return; } /*BIT 1,H*/ static void op_CB_0x4c(Z80EX_CONTEXT *cpu) { BIT(1,H); T_WAIT_UNTIL(4); return; } /*BIT 1,L*/ static void op_CB_0x4d(Z80EX_CONTEXT *cpu) { BIT(1,L); T_WAIT_UNTIL(4); return; } /*BIT 1,(HL)*/ static void op_CB_0x4e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(1,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 1,A*/ static void op_CB_0x4f(Z80EX_CONTEXT *cpu) { BIT(1,A); T_WAIT_UNTIL(4); return; } /*BIT 2,B*/ static void op_CB_0x50(Z80EX_CONTEXT *cpu) { BIT(2,B); T_WAIT_UNTIL(4); return; } /*BIT 2,C*/ static void op_CB_0x51(Z80EX_CONTEXT *cpu) { BIT(2,C); T_WAIT_UNTIL(4); return; } /*BIT 2,D*/ static void op_CB_0x52(Z80EX_CONTEXT *cpu) { BIT(2,D); T_WAIT_UNTIL(4); return; } /*BIT 2,E*/ static void op_CB_0x53(Z80EX_CONTEXT *cpu) { BIT(2,E); T_WAIT_UNTIL(4); return; } /*BIT 2,H*/ static void op_CB_0x54(Z80EX_CONTEXT *cpu) { BIT(2,H); T_WAIT_UNTIL(4); return; } /*BIT 2,L*/ static void op_CB_0x55(Z80EX_CONTEXT *cpu) { BIT(2,L); T_WAIT_UNTIL(4); return; } /*BIT 2,(HL)*/ static void op_CB_0x56(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(2,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 2,A*/ static void op_CB_0x57(Z80EX_CONTEXT *cpu) { BIT(2,A); T_WAIT_UNTIL(4); return; } /*BIT 3,B*/ static void op_CB_0x58(Z80EX_CONTEXT *cpu) { BIT(3,B); T_WAIT_UNTIL(4); return; } /*BIT 3,C*/ static void op_CB_0x59(Z80EX_CONTEXT *cpu) { BIT(3,C); T_WAIT_UNTIL(4); return; } /*BIT 3,D*/ static void op_CB_0x5a(Z80EX_CONTEXT *cpu) { BIT(3,D); T_WAIT_UNTIL(4); return; } /*BIT 3,E*/ static void op_CB_0x5b(Z80EX_CONTEXT *cpu) { BIT(3,E); T_WAIT_UNTIL(4); return; } /*BIT 3,H*/ static void op_CB_0x5c(Z80EX_CONTEXT *cpu) { BIT(3,H); T_WAIT_UNTIL(4); return; } /*BIT 3,L*/ static void op_CB_0x5d(Z80EX_CONTEXT *cpu) { BIT(3,L); T_WAIT_UNTIL(4); return; } /*BIT 3,(HL)*/ static void op_CB_0x5e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(3,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 3,A*/ static void op_CB_0x5f(Z80EX_CONTEXT *cpu) { BIT(3,A); T_WAIT_UNTIL(4); return; } /*BIT 4,B*/ static void op_CB_0x60(Z80EX_CONTEXT *cpu) { BIT(4,B); T_WAIT_UNTIL(4); return; } /*BIT 4,C*/ static void op_CB_0x61(Z80EX_CONTEXT *cpu) { BIT(4,C); T_WAIT_UNTIL(4); return; } /*BIT 4,D*/ static void op_CB_0x62(Z80EX_CONTEXT *cpu) { BIT(4,D); T_WAIT_UNTIL(4); return; } /*BIT 4,E*/ static void op_CB_0x63(Z80EX_CONTEXT *cpu) { BIT(4,E); T_WAIT_UNTIL(4); return; } /*BIT 4,H*/ static void op_CB_0x64(Z80EX_CONTEXT *cpu) { BIT(4,H); T_WAIT_UNTIL(4); return; } /*BIT 4,L*/ static void op_CB_0x65(Z80EX_CONTEXT *cpu) { BIT(4,L); T_WAIT_UNTIL(4); return; } /*BIT 4,(HL)*/ static void op_CB_0x66(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(4,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 4,A*/ static void op_CB_0x67(Z80EX_CONTEXT *cpu) { BIT(4,A); T_WAIT_UNTIL(4); return; } /*BIT 5,B*/ static void op_CB_0x68(Z80EX_CONTEXT *cpu) { BIT(5,B); T_WAIT_UNTIL(4); return; } /*BIT 5,C*/ static void op_CB_0x69(Z80EX_CONTEXT *cpu) { BIT(5,C); T_WAIT_UNTIL(4); return; } /*BIT 5,D*/ static void op_CB_0x6a(Z80EX_CONTEXT *cpu) { BIT(5,D); T_WAIT_UNTIL(4); return; } /*BIT 5,E*/ static void op_CB_0x6b(Z80EX_CONTEXT *cpu) { BIT(5,E); T_WAIT_UNTIL(4); return; } /*BIT 5,H*/ static void op_CB_0x6c(Z80EX_CONTEXT *cpu) { BIT(5,H); T_WAIT_UNTIL(4); return; } /*BIT 5,L*/ static void op_CB_0x6d(Z80EX_CONTEXT *cpu) { BIT(5,L); T_WAIT_UNTIL(4); return; } /*BIT 5,(HL)*/ static void op_CB_0x6e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(5,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 5,A*/ static void op_CB_0x6f(Z80EX_CONTEXT *cpu) { BIT(5,A); T_WAIT_UNTIL(4); return; } /*BIT 6,B*/ static void op_CB_0x70(Z80EX_CONTEXT *cpu) { BIT(6,B); T_WAIT_UNTIL(4); return; } /*BIT 6,C*/ static void op_CB_0x71(Z80EX_CONTEXT *cpu) { BIT(6,C); T_WAIT_UNTIL(4); return; } /*BIT 6,D*/ static void op_CB_0x72(Z80EX_CONTEXT *cpu) { BIT(6,D); T_WAIT_UNTIL(4); return; } /*BIT 6,E*/ static void op_CB_0x73(Z80EX_CONTEXT *cpu) { BIT(6,E); T_WAIT_UNTIL(4); return; } /*BIT 6,H*/ static void op_CB_0x74(Z80EX_CONTEXT *cpu) { BIT(6,H); T_WAIT_UNTIL(4); return; } /*BIT 6,L*/ static void op_CB_0x75(Z80EX_CONTEXT *cpu) { BIT(6,L); T_WAIT_UNTIL(4); return; } /*BIT 6,(HL)*/ static void op_CB_0x76(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(6,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 6,A*/ static void op_CB_0x77(Z80EX_CONTEXT *cpu) { BIT(6,A); T_WAIT_UNTIL(4); return; } /*BIT 7,B*/ static void op_CB_0x78(Z80EX_CONTEXT *cpu) { BIT(7,B); T_WAIT_UNTIL(4); return; } /*BIT 7,C*/ static void op_CB_0x79(Z80EX_CONTEXT *cpu) { BIT(7,C); T_WAIT_UNTIL(4); return; } /*BIT 7,D*/ static void op_CB_0x7a(Z80EX_CONTEXT *cpu) { BIT(7,D); T_WAIT_UNTIL(4); return; } /*BIT 7,E*/ static void op_CB_0x7b(Z80EX_CONTEXT *cpu) { BIT(7,E); T_WAIT_UNTIL(4); return; } /*BIT 7,H*/ static void op_CB_0x7c(Z80EX_CONTEXT *cpu) { BIT(7,H); T_WAIT_UNTIL(4); return; } /*BIT 7,L*/ static void op_CB_0x7d(Z80EX_CONTEXT *cpu) { BIT(7,L); T_WAIT_UNTIL(4); return; } /*BIT 7,(HL)*/ static void op_CB_0x7e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); BIT_MPTR(7,temp_byte); T_WAIT_UNTIL(8); return; } /*BIT 7,A*/ static void op_CB_0x7f(Z80EX_CONTEXT *cpu) { BIT(7,A); T_WAIT_UNTIL(4); return; } /*RES 0,B*/ static void op_CB_0x80(Z80EX_CONTEXT *cpu) { RES(0,B); T_WAIT_UNTIL(4); return; } /*RES 0,C*/ static void op_CB_0x81(Z80EX_CONTEXT *cpu) { RES(0,C); T_WAIT_UNTIL(4); return; } /*RES 0,D*/ static void op_CB_0x82(Z80EX_CONTEXT *cpu) { RES(0,D); T_WAIT_UNTIL(4); return; } /*RES 0,E*/ static void op_CB_0x83(Z80EX_CONTEXT *cpu) { RES(0,E); T_WAIT_UNTIL(4); return; } /*RES 0,H*/ static void op_CB_0x84(Z80EX_CONTEXT *cpu) { RES(0,H); T_WAIT_UNTIL(4); return; } /*RES 0,L*/ static void op_CB_0x85(Z80EX_CONTEXT *cpu) { RES(0,L); T_WAIT_UNTIL(4); return; } /*RES 0,(HL)*/ static void op_CB_0x86(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(0,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 0,A*/ static void op_CB_0x87(Z80EX_CONTEXT *cpu) { RES(0,A); T_WAIT_UNTIL(4); return; } /*RES 1,B*/ static void op_CB_0x88(Z80EX_CONTEXT *cpu) { RES(1,B); T_WAIT_UNTIL(4); return; } /*RES 1,C*/ static void op_CB_0x89(Z80EX_CONTEXT *cpu) { RES(1,C); T_WAIT_UNTIL(4); return; } /*RES 1,D*/ static void op_CB_0x8a(Z80EX_CONTEXT *cpu) { RES(1,D); T_WAIT_UNTIL(4); return; } /*RES 1,E*/ static void op_CB_0x8b(Z80EX_CONTEXT *cpu) { RES(1,E); T_WAIT_UNTIL(4); return; } /*RES 1,H*/ static void op_CB_0x8c(Z80EX_CONTEXT *cpu) { RES(1,H); T_WAIT_UNTIL(4); return; } /*RES 1,L*/ static void op_CB_0x8d(Z80EX_CONTEXT *cpu) { RES(1,L); T_WAIT_UNTIL(4); return; } /*RES 1,(HL)*/ static void op_CB_0x8e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(1,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 1,A*/ static void op_CB_0x8f(Z80EX_CONTEXT *cpu) { RES(1,A); T_WAIT_UNTIL(4); return; } /*RES 2,B*/ static void op_CB_0x90(Z80EX_CONTEXT *cpu) { RES(2,B); T_WAIT_UNTIL(4); return; } /*RES 2,C*/ static void op_CB_0x91(Z80EX_CONTEXT *cpu) { RES(2,C); T_WAIT_UNTIL(4); return; } /*RES 2,D*/ static void op_CB_0x92(Z80EX_CONTEXT *cpu) { RES(2,D); T_WAIT_UNTIL(4); return; } /*RES 2,E*/ static void op_CB_0x93(Z80EX_CONTEXT *cpu) { RES(2,E); T_WAIT_UNTIL(4); return; } /*RES 2,H*/ static void op_CB_0x94(Z80EX_CONTEXT *cpu) { RES(2,H); T_WAIT_UNTIL(4); return; } /*RES 2,L*/ static void op_CB_0x95(Z80EX_CONTEXT *cpu) { RES(2,L); T_WAIT_UNTIL(4); return; } /*RES 2,(HL)*/ static void op_CB_0x96(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(2,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 2,A*/ static void op_CB_0x97(Z80EX_CONTEXT *cpu) { RES(2,A); T_WAIT_UNTIL(4); return; } /*RES 3,B*/ static void op_CB_0x98(Z80EX_CONTEXT *cpu) { RES(3,B); T_WAIT_UNTIL(4); return; } /*RES 3,C*/ static void op_CB_0x99(Z80EX_CONTEXT *cpu) { RES(3,C); T_WAIT_UNTIL(4); return; } /*RES 3,D*/ static void op_CB_0x9a(Z80EX_CONTEXT *cpu) { RES(3,D); T_WAIT_UNTIL(4); return; } /*RES 3,E*/ static void op_CB_0x9b(Z80EX_CONTEXT *cpu) { RES(3,E); T_WAIT_UNTIL(4); return; } /*RES 3,H*/ static void op_CB_0x9c(Z80EX_CONTEXT *cpu) { RES(3,H); T_WAIT_UNTIL(4); return; } /*RES 3,L*/ static void op_CB_0x9d(Z80EX_CONTEXT *cpu) { RES(3,L); T_WAIT_UNTIL(4); return; } /*RES 3,(HL)*/ static void op_CB_0x9e(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(3,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 3,A*/ static void op_CB_0x9f(Z80EX_CONTEXT *cpu) { RES(3,A); T_WAIT_UNTIL(4); return; } /*RES 4,B*/ static void op_CB_0xa0(Z80EX_CONTEXT *cpu) { RES(4,B); T_WAIT_UNTIL(4); return; } /*RES 4,C*/ static void op_CB_0xa1(Z80EX_CONTEXT *cpu) { RES(4,C); T_WAIT_UNTIL(4); return; } /*RES 4,D*/ static void op_CB_0xa2(Z80EX_CONTEXT *cpu) { RES(4,D); T_WAIT_UNTIL(4); return; } /*RES 4,E*/ static void op_CB_0xa3(Z80EX_CONTEXT *cpu) { RES(4,E); T_WAIT_UNTIL(4); return; } /*RES 4,H*/ static void op_CB_0xa4(Z80EX_CONTEXT *cpu) { RES(4,H); T_WAIT_UNTIL(4); return; } /*RES 4,L*/ static void op_CB_0xa5(Z80EX_CONTEXT *cpu) { RES(4,L); T_WAIT_UNTIL(4); return; } /*RES 4,(HL)*/ static void op_CB_0xa6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(4,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 4,A*/ static void op_CB_0xa7(Z80EX_CONTEXT *cpu) { RES(4,A); T_WAIT_UNTIL(4); return; } /*RES 5,B*/ static void op_CB_0xa8(Z80EX_CONTEXT *cpu) { RES(5,B); T_WAIT_UNTIL(4); return; } /*RES 5,C*/ static void op_CB_0xa9(Z80EX_CONTEXT *cpu) { RES(5,C); T_WAIT_UNTIL(4); return; } /*RES 5,D*/ static void op_CB_0xaa(Z80EX_CONTEXT *cpu) { RES(5,D); T_WAIT_UNTIL(4); return; } /*RES 5,E*/ static void op_CB_0xab(Z80EX_CONTEXT *cpu) { RES(5,E); T_WAIT_UNTIL(4); return; } /*RES 5,H*/ static void op_CB_0xac(Z80EX_CONTEXT *cpu) { RES(5,H); T_WAIT_UNTIL(4); return; } /*RES 5,L*/ static void op_CB_0xad(Z80EX_CONTEXT *cpu) { RES(5,L); T_WAIT_UNTIL(4); return; } /*RES 5,(HL)*/ static void op_CB_0xae(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(5,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 5,A*/ static void op_CB_0xaf(Z80EX_CONTEXT *cpu) { RES(5,A); T_WAIT_UNTIL(4); return; } /*RES 6,B*/ static void op_CB_0xb0(Z80EX_CONTEXT *cpu) { RES(6,B); T_WAIT_UNTIL(4); return; } /*RES 6,C*/ static void op_CB_0xb1(Z80EX_CONTEXT *cpu) { RES(6,C); T_WAIT_UNTIL(4); return; } /*RES 6,D*/ static void op_CB_0xb2(Z80EX_CONTEXT *cpu) { RES(6,D); T_WAIT_UNTIL(4); return; } /*RES 6,E*/ static void op_CB_0xb3(Z80EX_CONTEXT *cpu) { RES(6,E); T_WAIT_UNTIL(4); return; } /*RES 6,H*/ static void op_CB_0xb4(Z80EX_CONTEXT *cpu) { RES(6,H); T_WAIT_UNTIL(4); return; } /*RES 6,L*/ static void op_CB_0xb5(Z80EX_CONTEXT *cpu) { RES(6,L); T_WAIT_UNTIL(4); return; } /*RES 6,(HL)*/ static void op_CB_0xb6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(6,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 6,A*/ static void op_CB_0xb7(Z80EX_CONTEXT *cpu) { RES(6,A); T_WAIT_UNTIL(4); return; } /*RES 7,B*/ static void op_CB_0xb8(Z80EX_CONTEXT *cpu) { RES(7,B); T_WAIT_UNTIL(4); return; } /*RES 7,C*/ static void op_CB_0xb9(Z80EX_CONTEXT *cpu) { RES(7,C); T_WAIT_UNTIL(4); return; } /*RES 7,D*/ static void op_CB_0xba(Z80EX_CONTEXT *cpu) { RES(7,D); T_WAIT_UNTIL(4); return; } /*RES 7,E*/ static void op_CB_0xbb(Z80EX_CONTEXT *cpu) { RES(7,E); T_WAIT_UNTIL(4); return; } /*RES 7,H*/ static void op_CB_0xbc(Z80EX_CONTEXT *cpu) { RES(7,H); T_WAIT_UNTIL(4); return; } /*RES 7,L*/ static void op_CB_0xbd(Z80EX_CONTEXT *cpu) { RES(7,L); T_WAIT_UNTIL(4); return; } /*RES 7,(HL)*/ static void op_CB_0xbe(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); RES(7,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*RES 7,A*/ static void op_CB_0xbf(Z80EX_CONTEXT *cpu) { RES(7,A); T_WAIT_UNTIL(4); return; } /*SET 0,B*/ static void op_CB_0xc0(Z80EX_CONTEXT *cpu) { SET(0,B); T_WAIT_UNTIL(4); return; } /*SET 0,C*/ static void op_CB_0xc1(Z80EX_CONTEXT *cpu) { SET(0,C); T_WAIT_UNTIL(4); return; } /*SET 0,D*/ static void op_CB_0xc2(Z80EX_CONTEXT *cpu) { SET(0,D); T_WAIT_UNTIL(4); return; } /*SET 0,E*/ static void op_CB_0xc3(Z80EX_CONTEXT *cpu) { SET(0,E); T_WAIT_UNTIL(4); return; } /*SET 0,H*/ static void op_CB_0xc4(Z80EX_CONTEXT *cpu) { SET(0,H); T_WAIT_UNTIL(4); return; } /*SET 0,L*/ static void op_CB_0xc5(Z80EX_CONTEXT *cpu) { SET(0,L); T_WAIT_UNTIL(4); return; } /*SET 0,(HL)*/ static void op_CB_0xc6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(0,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 0,A*/ static void op_CB_0xc7(Z80EX_CONTEXT *cpu) { SET(0,A); T_WAIT_UNTIL(4); return; } /*SET 1,B*/ static void op_CB_0xc8(Z80EX_CONTEXT *cpu) { SET(1,B); T_WAIT_UNTIL(4); return; } /*SET 1,C*/ static void op_CB_0xc9(Z80EX_CONTEXT *cpu) { SET(1,C); T_WAIT_UNTIL(4); return; } /*SET 1,D*/ static void op_CB_0xca(Z80EX_CONTEXT *cpu) { SET(1,D); T_WAIT_UNTIL(4); return; } /*SET 1,E*/ static void op_CB_0xcb(Z80EX_CONTEXT *cpu) { SET(1,E); T_WAIT_UNTIL(4); return; } /*SET 1,H*/ static void op_CB_0xcc(Z80EX_CONTEXT *cpu) { SET(1,H); T_WAIT_UNTIL(4); return; } /*SET 1,L*/ static void op_CB_0xcd(Z80EX_CONTEXT *cpu) { SET(1,L); T_WAIT_UNTIL(4); return; } /*SET 1,(HL)*/ static void op_CB_0xce(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(1,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 1,A*/ static void op_CB_0xcf(Z80EX_CONTEXT *cpu) { SET(1,A); T_WAIT_UNTIL(4); return; } /*SET 2,B*/ static void op_CB_0xd0(Z80EX_CONTEXT *cpu) { SET(2,B); T_WAIT_UNTIL(4); return; } /*SET 2,C*/ static void op_CB_0xd1(Z80EX_CONTEXT *cpu) { SET(2,C); T_WAIT_UNTIL(4); return; } /*SET 2,D*/ static void op_CB_0xd2(Z80EX_CONTEXT *cpu) { SET(2,D); T_WAIT_UNTIL(4); return; } /*SET 2,E*/ static void op_CB_0xd3(Z80EX_CONTEXT *cpu) { SET(2,E); T_WAIT_UNTIL(4); return; } /*SET 2,H*/ static void op_CB_0xd4(Z80EX_CONTEXT *cpu) { SET(2,H); T_WAIT_UNTIL(4); return; } /*SET 2,L*/ static void op_CB_0xd5(Z80EX_CONTEXT *cpu) { SET(2,L); T_WAIT_UNTIL(4); return; } /*SET 2,(HL)*/ static void op_CB_0xd6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(2,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 2,A*/ static void op_CB_0xd7(Z80EX_CONTEXT *cpu) { SET(2,A); T_WAIT_UNTIL(4); return; } /*SET 3,B*/ static void op_CB_0xd8(Z80EX_CONTEXT *cpu) { SET(3,B); T_WAIT_UNTIL(4); return; } /*SET 3,C*/ static void op_CB_0xd9(Z80EX_CONTEXT *cpu) { SET(3,C); T_WAIT_UNTIL(4); return; } /*SET 3,D*/ static void op_CB_0xda(Z80EX_CONTEXT *cpu) { SET(3,D); T_WAIT_UNTIL(4); return; } /*SET 3,E*/ static void op_CB_0xdb(Z80EX_CONTEXT *cpu) { SET(3,E); T_WAIT_UNTIL(4); return; } /*SET 3,H*/ static void op_CB_0xdc(Z80EX_CONTEXT *cpu) { SET(3,H); T_WAIT_UNTIL(4); return; } /*SET 3,L*/ static void op_CB_0xdd(Z80EX_CONTEXT *cpu) { SET(3,L); T_WAIT_UNTIL(4); return; } /*SET 3,(HL)*/ static void op_CB_0xde(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(3,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 3,A*/ static void op_CB_0xdf(Z80EX_CONTEXT *cpu) { SET(3,A); T_WAIT_UNTIL(4); return; } /*SET 4,B*/ static void op_CB_0xe0(Z80EX_CONTEXT *cpu) { SET(4,B); T_WAIT_UNTIL(4); return; } /*SET 4,C*/ static void op_CB_0xe1(Z80EX_CONTEXT *cpu) { SET(4,C); T_WAIT_UNTIL(4); return; } /*SET 4,D*/ static void op_CB_0xe2(Z80EX_CONTEXT *cpu) { SET(4,D); T_WAIT_UNTIL(4); return; } /*SET 4,E*/ static void op_CB_0xe3(Z80EX_CONTEXT *cpu) { SET(4,E); T_WAIT_UNTIL(4); return; } /*SET 4,H*/ static void op_CB_0xe4(Z80EX_CONTEXT *cpu) { SET(4,H); T_WAIT_UNTIL(4); return; } /*SET 4,L*/ static void op_CB_0xe5(Z80EX_CONTEXT *cpu) { SET(4,L); T_WAIT_UNTIL(4); return; } /*SET 4,(HL)*/ static void op_CB_0xe6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(4,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 4,A*/ static void op_CB_0xe7(Z80EX_CONTEXT *cpu) { SET(4,A); T_WAIT_UNTIL(4); return; } /*SET 5,B*/ static void op_CB_0xe8(Z80EX_CONTEXT *cpu) { SET(5,B); T_WAIT_UNTIL(4); return; } /*SET 5,C*/ static void op_CB_0xe9(Z80EX_CONTEXT *cpu) { SET(5,C); T_WAIT_UNTIL(4); return; } /*SET 5,D*/ static void op_CB_0xea(Z80EX_CONTEXT *cpu) { SET(5,D); T_WAIT_UNTIL(4); return; } /*SET 5,E*/ static void op_CB_0xeb(Z80EX_CONTEXT *cpu) { SET(5,E); T_WAIT_UNTIL(4); return; } /*SET 5,H*/ static void op_CB_0xec(Z80EX_CONTEXT *cpu) { SET(5,H); T_WAIT_UNTIL(4); return; } /*SET 5,L*/ static void op_CB_0xed(Z80EX_CONTEXT *cpu) { SET(5,L); T_WAIT_UNTIL(4); return; } /*SET 5,(HL)*/ static void op_CB_0xee(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(5,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 5,A*/ static void op_CB_0xef(Z80EX_CONTEXT *cpu) { SET(5,A); T_WAIT_UNTIL(4); return; } /*SET 6,B*/ static void op_CB_0xf0(Z80EX_CONTEXT *cpu) { SET(6,B); T_WAIT_UNTIL(4); return; } /*SET 6,C*/ static void op_CB_0xf1(Z80EX_CONTEXT *cpu) { SET(6,C); T_WAIT_UNTIL(4); return; } /*SET 6,D*/ static void op_CB_0xf2(Z80EX_CONTEXT *cpu) { SET(6,D); T_WAIT_UNTIL(4); return; } /*SET 6,E*/ static void op_CB_0xf3(Z80EX_CONTEXT *cpu) { SET(6,E); T_WAIT_UNTIL(4); return; } /*SET 6,H*/ static void op_CB_0xf4(Z80EX_CONTEXT *cpu) { SET(6,H); T_WAIT_UNTIL(4); return; } /*SET 6,L*/ static void op_CB_0xf5(Z80EX_CONTEXT *cpu) { SET(6,L); T_WAIT_UNTIL(4); return; } /*SET 6,(HL)*/ static void op_CB_0xf6(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(6,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 6,A*/ static void op_CB_0xf7(Z80EX_CONTEXT *cpu) { SET(6,A); T_WAIT_UNTIL(4); return; } /*SET 7,B*/ static void op_CB_0xf8(Z80EX_CONTEXT *cpu) { SET(7,B); T_WAIT_UNTIL(4); return; } /*SET 7,C*/ static void op_CB_0xf9(Z80EX_CONTEXT *cpu) { SET(7,C); T_WAIT_UNTIL(4); return; } /*SET 7,D*/ static void op_CB_0xfa(Z80EX_CONTEXT *cpu) { SET(7,D); T_WAIT_UNTIL(4); return; } /*SET 7,E*/ static void op_CB_0xfb(Z80EX_CONTEXT *cpu) { SET(7,E); T_WAIT_UNTIL(4); return; } /*SET 7,H*/ static void op_CB_0xfc(Z80EX_CONTEXT *cpu) { SET(7,H); T_WAIT_UNTIL(4); return; } /*SET 7,L*/ static void op_CB_0xfd(Z80EX_CONTEXT *cpu) { SET(7,L); T_WAIT_UNTIL(4); return; } /*SET 7,(HL)*/ static void op_CB_0xfe(Z80EX_CONTEXT *cpu) { READ_MEM(temp_byte,(HL),4); SET(7,temp_byte); WRITE_MEM((HL),temp_byte,8); T_WAIT_UNTIL(11); return; } /*SET 7,A*/ static void op_CB_0xff(Z80EX_CONTEXT *cpu) { SET(7,A); T_WAIT_UNTIL(4); return; } /**/ static const z80ex_opcode_fn opcodes_cb[0x100] = { op_CB_0x00 , op_CB_0x01 , op_CB_0x02 , op_CB_0x03 , op_CB_0x04 , op_CB_0x05 , op_CB_0x06 , op_CB_0x07 , op_CB_0x08 , op_CB_0x09 , op_CB_0x0a , op_CB_0x0b , op_CB_0x0c , op_CB_0x0d , op_CB_0x0e , op_CB_0x0f , op_CB_0x10 , op_CB_0x11 , op_CB_0x12 , op_CB_0x13 , op_CB_0x14 , op_CB_0x15 , op_CB_0x16 , op_CB_0x17 , op_CB_0x18 , op_CB_0x19 , op_CB_0x1a , op_CB_0x1b , op_CB_0x1c , op_CB_0x1d , op_CB_0x1e , op_CB_0x1f , op_CB_0x20 , op_CB_0x21 , op_CB_0x22 , op_CB_0x23 , op_CB_0x24 , op_CB_0x25 , op_CB_0x26 , op_CB_0x27 , op_CB_0x28 , op_CB_0x29 , op_CB_0x2a , op_CB_0x2b , op_CB_0x2c , op_CB_0x2d , op_CB_0x2e , op_CB_0x2f , op_CB_0x30 , op_CB_0x31 , op_CB_0x32 , op_CB_0x33 , op_CB_0x34 , op_CB_0x35 , op_CB_0x36 , op_CB_0x37 , op_CB_0x38 , op_CB_0x39 , op_CB_0x3a , op_CB_0x3b , op_CB_0x3c , op_CB_0x3d , op_CB_0x3e , op_CB_0x3f , op_CB_0x40 , op_CB_0x41 , op_CB_0x42 , op_CB_0x43 , op_CB_0x44 , op_CB_0x45 , op_CB_0x46 , op_CB_0x47 , op_CB_0x48 , op_CB_0x49 , op_CB_0x4a , op_CB_0x4b , op_CB_0x4c , op_CB_0x4d , op_CB_0x4e , op_CB_0x4f , op_CB_0x50 , op_CB_0x51 , op_CB_0x52 , op_CB_0x53 , op_CB_0x54 , op_CB_0x55 , op_CB_0x56 , op_CB_0x57 , op_CB_0x58 , op_CB_0x59 , op_CB_0x5a , op_CB_0x5b , op_CB_0x5c , op_CB_0x5d , op_CB_0x5e , op_CB_0x5f , op_CB_0x60 , op_CB_0x61 , op_CB_0x62 , op_CB_0x63 , op_CB_0x64 , op_CB_0x65 , op_CB_0x66 , op_CB_0x67 , op_CB_0x68 , op_CB_0x69 , op_CB_0x6a , op_CB_0x6b , op_CB_0x6c , op_CB_0x6d , op_CB_0x6e , op_CB_0x6f , op_CB_0x70 , op_CB_0x71 , op_CB_0x72 , op_CB_0x73 , op_CB_0x74 , op_CB_0x75 , op_CB_0x76 , op_CB_0x77 , op_CB_0x78 , op_CB_0x79 , op_CB_0x7a , op_CB_0x7b , op_CB_0x7c , op_CB_0x7d , op_CB_0x7e , op_CB_0x7f , op_CB_0x80 , op_CB_0x81 , op_CB_0x82 , op_CB_0x83 , op_CB_0x84 , op_CB_0x85 , op_CB_0x86 , op_CB_0x87 , op_CB_0x88 , op_CB_0x89 , op_CB_0x8a , op_CB_0x8b , op_CB_0x8c , op_CB_0x8d , op_CB_0x8e , op_CB_0x8f , op_CB_0x90 , op_CB_0x91 , op_CB_0x92 , op_CB_0x93 , op_CB_0x94 , op_CB_0x95 , op_CB_0x96 , op_CB_0x97 , op_CB_0x98 , op_CB_0x99 , op_CB_0x9a , op_CB_0x9b , op_CB_0x9c , op_CB_0x9d , op_CB_0x9e , op_CB_0x9f , op_CB_0xa0 , op_CB_0xa1 , op_CB_0xa2 , op_CB_0xa3 , op_CB_0xa4 , op_CB_0xa5 , op_CB_0xa6 , op_CB_0xa7 , op_CB_0xa8 , op_CB_0xa9 , op_CB_0xaa , op_CB_0xab , op_CB_0xac , op_CB_0xad , op_CB_0xae , op_CB_0xaf , op_CB_0xb0 , op_CB_0xb1 , op_CB_0xb2 , op_CB_0xb3 , op_CB_0xb4 , op_CB_0xb5 , op_CB_0xb6 , op_CB_0xb7 , op_CB_0xb8 , op_CB_0xb9 , op_CB_0xba , op_CB_0xbb , op_CB_0xbc , op_CB_0xbd , op_CB_0xbe , op_CB_0xbf , op_CB_0xc0 , op_CB_0xc1 , op_CB_0xc2 , op_CB_0xc3 , op_CB_0xc4 , op_CB_0xc5 , op_CB_0xc6 , op_CB_0xc7 , op_CB_0xc8 , op_CB_0xc9 , op_CB_0xca , op_CB_0xcb , op_CB_0xcc , op_CB_0xcd , op_CB_0xce , op_CB_0xcf , op_CB_0xd0 , op_CB_0xd1 , op_CB_0xd2 , op_CB_0xd3 , op_CB_0xd4 , op_CB_0xd5 , op_CB_0xd6 , op_CB_0xd7 , op_CB_0xd8 , op_CB_0xd9 , op_CB_0xda , op_CB_0xdb , op_CB_0xdc , op_CB_0xdd , op_CB_0xde , op_CB_0xdf , op_CB_0xe0 , op_CB_0xe1 , op_CB_0xe2 , op_CB_0xe3 , op_CB_0xe4 , op_CB_0xe5 , op_CB_0xe6 , op_CB_0xe7 , op_CB_0xe8 , op_CB_0xe9 , op_CB_0xea , op_CB_0xeb , op_CB_0xec , op_CB_0xed , op_CB_0xee , op_CB_0xef , op_CB_0xf0 , op_CB_0xf1 , op_CB_0xf2 , op_CB_0xf3 , op_CB_0xf4 , op_CB_0xf5 , op_CB_0xf6 , op_CB_0xf7 , op_CB_0xf8 , op_CB_0xf9 , op_CB_0xfa , op_CB_0xfb , op_CB_0xfc , op_CB_0xfd , op_CB_0xfe , op_CB_0xff }; ./z80ex-1.1.21/opcodes/opcodes_fdcb.c0000644000175000017500000014654611061326375015265 0ustar booboo/* autogenerated from ./opcodes_ddfdcb.dat, do not edit */ /*LD B,RLC (IY+$)*/ static void op_FDCB_0x00(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RLC (IY+$)*/ static void op_FDCB_0x01(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RLC (IY+$)*/ static void op_FDCB_0x02(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RLC (IY+$)*/ static void op_FDCB_0x03(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RLC (IY+$)*/ static void op_FDCB_0x04(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RLC (IY+$)*/ static void op_FDCB_0x05(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RLC (IY+$)*/ static void op_FDCB_0x06(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RLC (IY+$)*/ static void op_FDCB_0x07(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RLC(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RRC (IY+$)*/ static void op_FDCB_0x08(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RRC (IY+$)*/ static void op_FDCB_0x09(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RRC (IY+$)*/ static void op_FDCB_0x0a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RRC (IY+$)*/ static void op_FDCB_0x0b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RRC (IY+$)*/ static void op_FDCB_0x0c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RRC (IY+$)*/ static void op_FDCB_0x0d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RRC (IY+$)*/ static void op_FDCB_0x0e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RRC (IY+$)*/ static void op_FDCB_0x0f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RRC(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RL (IY+$)*/ static void op_FDCB_0x10(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RL (IY+$)*/ static void op_FDCB_0x11(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RL (IY+$)*/ static void op_FDCB_0x12(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RL (IY+$)*/ static void op_FDCB_0x13(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RL (IY+$)*/ static void op_FDCB_0x14(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RL (IY+$)*/ static void op_FDCB_0x15(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RL (IY+$)*/ static void op_FDCB_0x16(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RL (IY+$)*/ static void op_FDCB_0x17(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RL(temp_byte); LD16(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RR (IY+$)*/ static void op_FDCB_0x18(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RR (IY+$)*/ static void op_FDCB_0x19(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RR (IY+$)*/ static void op_FDCB_0x1a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RR (IY+$)*/ static void op_FDCB_0x1b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RR (IY+$)*/ static void op_FDCB_0x1c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RR (IY+$)*/ static void op_FDCB_0x1d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RR (IY+$)*/ static void op_FDCB_0x1e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RR (IY+$)*/ static void op_FDCB_0x1f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RR(temp_byte); LD16(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SLA (IY+$)*/ static void op_FDCB_0x20(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SLA (IY+$)*/ static void op_FDCB_0x21(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SLA (IY+$)*/ static void op_FDCB_0x22(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SLA (IY+$)*/ static void op_FDCB_0x23(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SLA (IY+$)*/ static void op_FDCB_0x24(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SLA (IY+$)*/ static void op_FDCB_0x25(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SLA (IY+$)*/ static void op_FDCB_0x26(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SLA (IY+$)*/ static void op_FDCB_0x27(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLA(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SRA (IY+$)*/ static void op_FDCB_0x28(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SRA (IY+$)*/ static void op_FDCB_0x29(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SRA (IY+$)*/ static void op_FDCB_0x2a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SRA (IY+$)*/ static void op_FDCB_0x2b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SRA (IY+$)*/ static void op_FDCB_0x2c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SRA (IY+$)*/ static void op_FDCB_0x2d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SRA (IY+$)*/ static void op_FDCB_0x2e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SRA (IY+$)*/ static void op_FDCB_0x2f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRA(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SLL (IY+$)*/ static void op_FDCB_0x30(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SLL (IY+$)*/ static void op_FDCB_0x31(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SLL (IY+$)*/ static void op_FDCB_0x32(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SLL (IY+$)*/ static void op_FDCB_0x33(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SLL (IY+$)*/ static void op_FDCB_0x34(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SLL (IY+$)*/ static void op_FDCB_0x35(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SLL (IY+$)*/ static void op_FDCB_0x36(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SLL (IY+$)*/ static void op_FDCB_0x37(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SLL(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SRL (IY+$)*/ static void op_FDCB_0x38(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SRL (IY+$)*/ static void op_FDCB_0x39(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SRL (IY+$)*/ static void op_FDCB_0x3a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SRL (IY+$)*/ static void op_FDCB_0x3b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SRL (IY+$)*/ static void op_FDCB_0x3c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SRL (IY+$)*/ static void op_FDCB_0x3d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SRL (IY+$)*/ static void op_FDCB_0x3e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SRL (IY+$)*/ static void op_FDCB_0x3f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SRL(temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*BIT 0,(IY+$)*/ static void op_FDCB_0x47(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(0,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 1,(IY+$)*/ static void op_FDCB_0x4f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(1,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 2,(IY+$)*/ static void op_FDCB_0x57(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(2,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 3,(IY+$)*/ static void op_FDCB_0x5f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(3,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 4,(IY+$)*/ static void op_FDCB_0x67(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(4,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 5,(IY+$)*/ static void op_FDCB_0x6f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(5,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 6,(IY+$)*/ static void op_FDCB_0x77(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(6,temp_byte); T_WAIT_UNTIL(16); return; } /*BIT 7,(IY+$)*/ static void op_FDCB_0x7f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); BIT_MPTR(7,temp_byte); T_WAIT_UNTIL(16); return; } /*LD B,RES 0,(IY+$)*/ static void op_FDCB_0x80(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 0,(IY+$)*/ static void op_FDCB_0x81(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 0,(IY+$)*/ static void op_FDCB_0x82(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 0,(IY+$)*/ static void op_FDCB_0x83(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 0,(IY+$)*/ static void op_FDCB_0x84(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 0,(IY+$)*/ static void op_FDCB_0x85(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 0,(IY+$)*/ static void op_FDCB_0x86(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 0,(IY+$)*/ static void op_FDCB_0x87(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(0,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 1,(IY+$)*/ static void op_FDCB_0x88(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 1,(IY+$)*/ static void op_FDCB_0x89(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 1,(IY+$)*/ static void op_FDCB_0x8a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 1,(IY+$)*/ static void op_FDCB_0x8b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 1,(IY+$)*/ static void op_FDCB_0x8c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 1,(IY+$)*/ static void op_FDCB_0x8d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 1,(IY+$)*/ static void op_FDCB_0x8e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 1,(IY+$)*/ static void op_FDCB_0x8f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(1,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 2,(IY+$)*/ static void op_FDCB_0x90(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 2,(IY+$)*/ static void op_FDCB_0x91(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 2,(IY+$)*/ static void op_FDCB_0x92(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 2,(IY+$)*/ static void op_FDCB_0x93(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 2,(IY+$)*/ static void op_FDCB_0x94(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 2,(IY+$)*/ static void op_FDCB_0x95(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 2,(IY+$)*/ static void op_FDCB_0x96(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 2,(IY+$)*/ static void op_FDCB_0x97(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(2,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 3,(IY+$)*/ static void op_FDCB_0x98(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 3,(IY+$)*/ static void op_FDCB_0x99(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 3,(IY+$)*/ static void op_FDCB_0x9a(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 3,(IY+$)*/ static void op_FDCB_0x9b(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 3,(IY+$)*/ static void op_FDCB_0x9c(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 3,(IY+$)*/ static void op_FDCB_0x9d(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 3,(IY+$)*/ static void op_FDCB_0x9e(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 3,(IY+$)*/ static void op_FDCB_0x9f(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(3,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 4,(IY+$)*/ static void op_FDCB_0xa0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 4,(IY+$)*/ static void op_FDCB_0xa1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 4,(IY+$)*/ static void op_FDCB_0xa2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 4,(IY+$)*/ static void op_FDCB_0xa3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 4,(IY+$)*/ static void op_FDCB_0xa4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 4,(IY+$)*/ static void op_FDCB_0xa5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 4,(IY+$)*/ static void op_FDCB_0xa6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 4,(IY+$)*/ static void op_FDCB_0xa7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(4,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 5,(IY+$)*/ static void op_FDCB_0xa8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 5,(IY+$)*/ static void op_FDCB_0xa9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 5,(IY+$)*/ static void op_FDCB_0xaa(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 5,(IY+$)*/ static void op_FDCB_0xab(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 5,(IY+$)*/ static void op_FDCB_0xac(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 5,(IY+$)*/ static void op_FDCB_0xad(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 5,(IY+$)*/ static void op_FDCB_0xae(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 5,(IY+$)*/ static void op_FDCB_0xaf(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(5,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 6,(IY+$)*/ static void op_FDCB_0xb0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 6,(IY+$)*/ static void op_FDCB_0xb1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 6,(IY+$)*/ static void op_FDCB_0xb2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 6,(IY+$)*/ static void op_FDCB_0xb3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 6,(IY+$)*/ static void op_FDCB_0xb4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 6,(IY+$)*/ static void op_FDCB_0xb5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 6,(IY+$)*/ static void op_FDCB_0xb6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 6,(IY+$)*/ static void op_FDCB_0xb7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(6,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,RES 7,(IY+$)*/ static void op_FDCB_0xb8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,RES 7,(IY+$)*/ static void op_FDCB_0xb9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,RES 7,(IY+$)*/ static void op_FDCB_0xba(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,RES 7,(IY+$)*/ static void op_FDCB_0xbb(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,RES 7,(IY+$)*/ static void op_FDCB_0xbc(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,RES 7,(IY+$)*/ static void op_FDCB_0xbd(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*RES 7,(IY+$)*/ static void op_FDCB_0xbe(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,RES 7,(IY+$)*/ static void op_FDCB_0xbf(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); RES(7,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 0,(IY+$)*/ static void op_FDCB_0xc0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 0,(IY+$)*/ static void op_FDCB_0xc1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 0,(IY+$)*/ static void op_FDCB_0xc2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 0,(IY+$)*/ static void op_FDCB_0xc3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 0,(IY+$)*/ static void op_FDCB_0xc4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 0,(IY+$)*/ static void op_FDCB_0xc5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 0,(IY+$)*/ static void op_FDCB_0xc6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 0,(IY+$)*/ static void op_FDCB_0xc7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(0,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 1,(IY+$)*/ static void op_FDCB_0xc8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 1,(IY+$)*/ static void op_FDCB_0xc9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 1,(IY+$)*/ static void op_FDCB_0xca(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 1,(IY+$)*/ static void op_FDCB_0xcb(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 1,(IY+$)*/ static void op_FDCB_0xcc(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 1,(IY+$)*/ static void op_FDCB_0xcd(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 1,(IY+$)*/ static void op_FDCB_0xce(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 1,(IY+$)*/ static void op_FDCB_0xcf(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(1,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 2,(IY+$)*/ static void op_FDCB_0xd0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 2,(IY+$)*/ static void op_FDCB_0xd1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 2,(IY+$)*/ static void op_FDCB_0xd2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 2,(IY+$)*/ static void op_FDCB_0xd3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 2,(IY+$)*/ static void op_FDCB_0xd4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 2,(IY+$)*/ static void op_FDCB_0xd5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 2,(IY+$)*/ static void op_FDCB_0xd6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 2,(IY+$)*/ static void op_FDCB_0xd7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(2,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 3,(IY+$)*/ static void op_FDCB_0xd8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 3,(IY+$)*/ static void op_FDCB_0xd9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 3,(IY+$)*/ static void op_FDCB_0xda(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 3,(IY+$)*/ static void op_FDCB_0xdb(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 3,(IY+$)*/ static void op_FDCB_0xdc(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 3,(IY+$)*/ static void op_FDCB_0xdd(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 3,(IY+$)*/ static void op_FDCB_0xde(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 3,(IY+$)*/ static void op_FDCB_0xdf(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(3,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 4,(IY+$)*/ static void op_FDCB_0xe0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 4,(IY+$)*/ static void op_FDCB_0xe1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 4,(IY+$)*/ static void op_FDCB_0xe2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 4,(IY+$)*/ static void op_FDCB_0xe3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 4,(IY+$)*/ static void op_FDCB_0xe4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 4,(IY+$)*/ static void op_FDCB_0xe5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 4,(IY+$)*/ static void op_FDCB_0xe6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 4,(IY+$)*/ static void op_FDCB_0xe7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(4,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 5,(IY+$)*/ static void op_FDCB_0xe8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 5,(IY+$)*/ static void op_FDCB_0xe9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 5,(IY+$)*/ static void op_FDCB_0xea(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 5,(IY+$)*/ static void op_FDCB_0xeb(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 5,(IY+$)*/ static void op_FDCB_0xec(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 5,(IY+$)*/ static void op_FDCB_0xed(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 5,(IY+$)*/ static void op_FDCB_0xee(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 5,(IY+$)*/ static void op_FDCB_0xef(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(5,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 6,(IY+$)*/ static void op_FDCB_0xf0(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 6,(IY+$)*/ static void op_FDCB_0xf1(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 6,(IY+$)*/ static void op_FDCB_0xf2(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 6,(IY+$)*/ static void op_FDCB_0xf3(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 6,(IY+$)*/ static void op_FDCB_0xf4(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 6,(IY+$)*/ static void op_FDCB_0xf5(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 6,(IY+$)*/ static void op_FDCB_0xf6(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 6,(IY+$)*/ static void op_FDCB_0xf7(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(6,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD B,SET 7,(IY+$)*/ static void op_FDCB_0xf8(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(B,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD C,SET 7,(IY+$)*/ static void op_FDCB_0xf9(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(C,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD D,SET 7,(IY+$)*/ static void op_FDCB_0xfa(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(D,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD E,SET 7,(IY+$)*/ static void op_FDCB_0xfb(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(E,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD H,SET 7,(IY+$)*/ static void op_FDCB_0xfc(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(H,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD L,SET 7,(IY+$)*/ static void op_FDCB_0xfd(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(L,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*SET 7,(IY+$)*/ static void op_FDCB_0xfe(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /*LD A,SET 7,(IY+$)*/ static void op_FDCB_0xff(Z80EX_CONTEXT *cpu) { MEMPTR=(IY+temp_byte_s); READ_MEM(temp_byte,(IY+temp_byte_s),12); SET(7,temp_byte); LD(A,temp_byte); WRITE_MEM((IY+temp_byte_s),temp_byte,16); T_WAIT_UNTIL(19); return; } /**/ static const z80ex_opcode_fn opcodes_fdcb[0x100] = { op_FDCB_0x00 , op_FDCB_0x01 , op_FDCB_0x02 , op_FDCB_0x03 , op_FDCB_0x04 , op_FDCB_0x05 , op_FDCB_0x06 , op_FDCB_0x07 , op_FDCB_0x08 , op_FDCB_0x09 , op_FDCB_0x0a , op_FDCB_0x0b , op_FDCB_0x0c , op_FDCB_0x0d , op_FDCB_0x0e , op_FDCB_0x0f , op_FDCB_0x10 , op_FDCB_0x11 , op_FDCB_0x12 , op_FDCB_0x13 , op_FDCB_0x14 , op_FDCB_0x15 , op_FDCB_0x16 , op_FDCB_0x17 , op_FDCB_0x18 , op_FDCB_0x19 , op_FDCB_0x1a , op_FDCB_0x1b , op_FDCB_0x1c , op_FDCB_0x1d , op_FDCB_0x1e , op_FDCB_0x1f , op_FDCB_0x20 , op_FDCB_0x21 , op_FDCB_0x22 , op_FDCB_0x23 , op_FDCB_0x24 , op_FDCB_0x25 , op_FDCB_0x26 , op_FDCB_0x27 , op_FDCB_0x28 , op_FDCB_0x29 , op_FDCB_0x2a , op_FDCB_0x2b , op_FDCB_0x2c , op_FDCB_0x2d , op_FDCB_0x2e , op_FDCB_0x2f , op_FDCB_0x30 , op_FDCB_0x31 , op_FDCB_0x32 , op_FDCB_0x33 , op_FDCB_0x34 , op_FDCB_0x35 , op_FDCB_0x36 , op_FDCB_0x37 , op_FDCB_0x38 , op_FDCB_0x39 , op_FDCB_0x3a , op_FDCB_0x3b , op_FDCB_0x3c , op_FDCB_0x3d , op_FDCB_0x3e , op_FDCB_0x3f , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x47 , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x4f , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x57 , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x5f , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x67 , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x6f , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x77 , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x7f , op_FDCB_0x80 , op_FDCB_0x81 , op_FDCB_0x82 , op_FDCB_0x83 , op_FDCB_0x84 , op_FDCB_0x85 , op_FDCB_0x86 , op_FDCB_0x87 , op_FDCB_0x88 , op_FDCB_0x89 , op_FDCB_0x8a , op_FDCB_0x8b , op_FDCB_0x8c , op_FDCB_0x8d , op_FDCB_0x8e , op_FDCB_0x8f , op_FDCB_0x90 , op_FDCB_0x91 , op_FDCB_0x92 , op_FDCB_0x93 , op_FDCB_0x94 , op_FDCB_0x95 , op_FDCB_0x96 , op_FDCB_0x97 , op_FDCB_0x98 , op_FDCB_0x99 , op_FDCB_0x9a , op_FDCB_0x9b , op_FDCB_0x9c , op_FDCB_0x9d , op_FDCB_0x9e , op_FDCB_0x9f , op_FDCB_0xa0 , op_FDCB_0xa1 , op_FDCB_0xa2 , op_FDCB_0xa3 , op_FDCB_0xa4 , op_FDCB_0xa5 , op_FDCB_0xa6 , op_FDCB_0xa7 , op_FDCB_0xa8 , op_FDCB_0xa9 , op_FDCB_0xaa , op_FDCB_0xab , op_FDCB_0xac , op_FDCB_0xad , op_FDCB_0xae , op_FDCB_0xaf , op_FDCB_0xb0 , op_FDCB_0xb1 , op_FDCB_0xb2 , op_FDCB_0xb3 , op_FDCB_0xb4 , op_FDCB_0xb5 , op_FDCB_0xb6 , op_FDCB_0xb7 , op_FDCB_0xb8 , op_FDCB_0xb9 , op_FDCB_0xba , op_FDCB_0xbb , op_FDCB_0xbc , op_FDCB_0xbd , op_FDCB_0xbe , op_FDCB_0xbf , op_FDCB_0xc0 , op_FDCB_0xc1 , op_FDCB_0xc2 , op_FDCB_0xc3 , op_FDCB_0xc4 , op_FDCB_0xc5 , op_FDCB_0xc6 , op_FDCB_0xc7 , op_FDCB_0xc8 , op_FDCB_0xc9 , op_FDCB_0xca , op_FDCB_0xcb , op_FDCB_0xcc , op_FDCB_0xcd , op_FDCB_0xce , op_FDCB_0xcf , op_FDCB_0xd0 , op_FDCB_0xd1 , op_FDCB_0xd2 , op_FDCB_0xd3 , op_FDCB_0xd4 , op_FDCB_0xd5 , op_FDCB_0xd6 , op_FDCB_0xd7 , op_FDCB_0xd8 , op_FDCB_0xd9 , op_FDCB_0xda , op_FDCB_0xdb , op_FDCB_0xdc , op_FDCB_0xdd , op_FDCB_0xde , op_FDCB_0xdf , op_FDCB_0xe0 , op_FDCB_0xe1 , op_FDCB_0xe2 , op_FDCB_0xe3 , op_FDCB_0xe4 , op_FDCB_0xe5 , op_FDCB_0xe6 , op_FDCB_0xe7 , op_FDCB_0xe8 , op_FDCB_0xe9 , op_FDCB_0xea , op_FDCB_0xeb , op_FDCB_0xec , op_FDCB_0xed , op_FDCB_0xee , op_FDCB_0xef , op_FDCB_0xf0 , op_FDCB_0xf1 , op_FDCB_0xf2 , op_FDCB_0xf3 , op_FDCB_0xf4 , op_FDCB_0xf5 , op_FDCB_0xf6 , op_FDCB_0xf7 , op_FDCB_0xf8 , op_FDCB_0xf9 , op_FDCB_0xfa , op_FDCB_0xfb , op_FDCB_0xfc , op_FDCB_0xfd , op_FDCB_0xfe , op_FDCB_0xff }; ./z80ex-1.1.21/opcodes/opcodes_cb.dat0000644000175000017500000002552610732252257015274 0ustar booboo# opcodes_cb: Z80 CBxx opcodes - 256 0x00="RLC B" t="8" 0x01="RLC C" t="8" 0x02="RLC D" t="8" 0x03="RLC E" t="8" 0x04="RLC H" t="8" 0x05="RLC L" t="8" 0x06="RLC (HL)" t="15" rd="8" wr="12" 0x07="RLC A" t="8" 0x08="RRC B" t="8" 0x09="RRC C" t="8" 0x0a="RRC D" t="8" 0x0b="RRC E" t="8" 0x0c="RRC H" t="8" 0x0d="RRC L" t="8" 0x0e="RRC (HL)" t="15" rd="8" wr="12" 0x0f="RRC A" t="8" 0x10="RL B" t="8" 0x11="RL C" t="8" 0x12="RL D" t="8" 0x13="RL E" t="8" 0x14="RL H" t="8" 0x15="RL L" t="8" 0x16="RL (HL)" t="15" rd="8" wr="12" 0x17="RL A" t="8" 0x18="RR B" t="8" 0x19="RR C" t="8" 0x1a="RR D" t="8" 0x1b="RR E" t="8" 0x1c="RR H" t="8" 0x1d="RR L" t="8" 0x1e="RR (HL)" t="15" rd="8" wr="12" 0x1f="RR A" t="8" 0x20="SLA B" t="8" 0x21="SLA C" t="8" 0x22="SLA D" t="8" 0x23="SLA E" t="8" 0x24="SLA H" t="8" 0x25="SLA L" t="8" 0x26="SLA (HL)" t="15" rd="8" wr="12" 0x27="SLA A" t="8" 0x28="SRA B" t="8" 0x29="SRA C" t="8" 0x2a="SRA D" t="8" 0x2b="SRA E" t="8" 0x2c="SRA H" t="8" 0x2d="SRA L" t="8" 0x2e="SRA (HL)" t="15" rd="8" wr="12" 0x2f="SRA A" t="8" 0x30="SLL B" t="8" 0x31="SLL C" t="8" 0x32="SLL D" t="8" 0x33="SLL E" t="8" 0x34="SLL H" t="8" 0x35="SLL L" t="8" 0x36="SLL (HL)" t="15" rd="8" wr="12" 0x37="SLL A" t="8" 0x38="SRL B" t="8" 0x39="SRL C" t="8" 0x3a="SRL D" t="8" 0x3b="SRL E" t="8" 0x3c="SRL H" t="8" 0x3d="SRL L" t="8" 0x3e="SRL (HL)" t="15" rd="8" wr="12" 0x3f="SRL A" t="8" 0x40="BIT 0,B" t="8" 0x41="BIT 0,C" t="8" 0x42="BIT 0,D" t="8" 0x43="BIT 0,E" t="8" 0x44="BIT 0,H" t="8" 0x45="BIT 0,L" t="8" 0x46="BIT 0,(HL)" t="12" rd="8" 0x47="BIT 0,A" t="8" 0x48="BIT 1,B" t="8" 0x49="BIT 1,C" t="8" 0x4a="BIT 1,D" t="8" 0x4b="BIT 1,E" t="8" 0x4c="BIT 1,H" t="8" 0x4d="BIT 1,L" t="8" 0x4e="BIT 1,(HL)" t="12" rd="8" 0x4f="BIT 1,A" t="8" 0x50="BIT 2,B" t="8" 0x51="BIT 2,C" t="8" 0x52="BIT 2,D" t="8" 0x53="BIT 2,E" t="8" 0x54="BIT 2,H" t="8" 0x55="BIT 2,L" t="8" 0x56="BIT 2,(HL)" t="12" rd="8" 0x57="BIT 2,A" t="8" 0x58="BIT 3,B" t="8" 0x59="BIT 3,C" t="8" 0x5a="BIT 3,D" t="8" 0x5b="BIT 3,E" t="8" 0x5c="BIT 3,H" t="8" 0x5d="BIT 3,L" t="8" 0x5e="BIT 3,(HL)" t="12" rd="8" 0x5f="BIT 3,A" t="8" 0x60="BIT 4,B" t="8" 0x61="BIT 4,C" t="8" 0x62="BIT 4,D" t="8" 0x63="BIT 4,E" t="8" 0x64="BIT 4,H" t="8" 0x65="BIT 4,L" t="8" 0x66="BIT 4,(HL)" t="12" rd="8" 0x67="BIT 4,A" t="8" 0x68="BIT 5,B" t="8" 0x69="BIT 5,C" t="8" 0x6a="BIT 5,D" t="8" 0x6b="BIT 5,E" t="8" 0x6c="BIT 5,H" t="8" 0x6d="BIT 5,L" t="8" 0x6e="BIT 5,(HL)" t="12" rd="8" 0x6f="BIT 5,A" t="8" 0x70="BIT 6,B" t="8" 0x71="BIT 6,C" t="8" 0x72="BIT 6,D" t="8" 0x73="BIT 6,E" t="8" 0x74="BIT 6,H" t="8" 0x75="BIT 6,L" t="8" 0x76="BIT 6,(HL)" t="12" rd="8" 0x77="BIT 6,A" t="8" 0x78="BIT 7,B" t="8" 0x79="BIT 7,C" t="8" 0x7a="BIT 7,D" t="8" 0x7b="BIT 7,E" t="8" 0x7c="BIT 7,H" t="8" 0x7d="BIT 7,L" t="8" 0x7e="BIT 7,(HL)" t="12" rd="8" 0x7f="BIT 7,A" t="8" 0x80="RES 0,B" t="8" 0x81="RES 0,C" t="8" 0x82="RES 0,D" t="8" 0x83="RES 0,E" t="8" 0x84="RES 0,H" t="8" 0x85="RES 0,L" t="8" 0x86="RES 0,(HL)" t="15" rd="8" wr="12" 0x87="RES 0,A" t="8" 0x88="RES 1,B" t="8" 0x89="RES 1,C" t="8" 0x8a="RES 1,D" t="8" 0x8b="RES 1,E" t="8" 0x8c="RES 1,H" t="8" 0x8d="RES 1,L" t="8" 0x8e="RES 1,(HL)" t="15" rd="8" wr="12" 0x8f="RES 1,A" t="8" 0x90="RES 2,B" t="8" 0x91="RES 2,C" t="8" 0x92="RES 2,D" t="8" 0x93="RES 2,E" t="8" 0x94="RES 2,H" t="8" 0x95="RES 2,L" t="8" 0x96="RES 2,(HL)" t="15" rd="8" wr="12" 0x97="RES 2,A" t="8" 0x98="RES 3,B" t="8" 0x99="RES 3,C" t="8" 0x9a="RES 3,D" t="8" 0x9b="RES 3,E" t="8" 0x9c="RES 3,H" t="8" 0x9d="RES 3,L" t="8" 0x9e="RES 3,(HL)" t="15" rd="8" wr="12" 0x9f="RES 3,A" t="8" 0xa0="RES 4,B" t="8" 0xa1="RES 4,C" t="8" 0xa2="RES 4,D" t="8" 0xa3="RES 4,E" t="8" 0xa4="RES 4,H" t="8" 0xa5="RES 4,L" t="8" 0xa6="RES 4,(HL)" t="15" rd="8" wr="12" 0xa7="RES 4,A" t="8" 0xa8="RES 5,B" t="8" 0xa9="RES 5,C" t="8" 0xaa="RES 5,D" t="8" 0xab="RES 5,E" t="8" 0xac="RES 5,H" t="8" 0xad="RES 5,L" t="8" 0xae="RES 5,(HL)" t="15" rd="8" wr="12" 0xaf="RES 5,A" t="8" 0xb0="RES 6,B" t="8" 0xb1="RES 6,C" t="8" 0xb2="RES 6,D" t="8" 0xb3="RES 6,E" t="8" 0xb4="RES 6,H" t="8" 0xb5="RES 6,L" t="8" 0xb6="RES 6,(HL)" t="15" rd="8" wr="12" 0xb7="RES 6,A" t="8" 0xb8="RES 7,B" t="8" 0xb9="RES 7,C" t="8" 0xba="RES 7,D" t="8" 0xbb="RES 7,E" t="8" 0xbc="RES 7,H" t="8" 0xbd="RES 7,L" t="8" 0xbe="RES 7,(HL)" t="15" rd="8" wr="12" 0xbf="RES 7,A" t="8" 0xc0="SET 0,B" t="8" 0xc1="SET 0,C" t="8" 0xc2="SET 0,D" t="8" 0xc3="SET 0,E" t="8" 0xc4="SET 0,H" t="8" 0xc5="SET 0,L" t="8" 0xc6="SET 0,(HL)" t="15" rd="8" wr="12" 0xc7="SET 0,A" t="8" 0xc8="SET 1,B" t="8" 0xc9="SET 1,C" t="8" 0xca="SET 1,D" t="8" 0xcb="SET 1,E" t="8" 0xcc="SET 1,H" t="8" 0xcd="SET 1,L" t="8" 0xce="SET 1,(HL)" t="15" rd="8" wr="12" 0xcf="SET 1,A" t="8" 0xd0="SET 2,B" t="8" 0xd1="SET 2,C" t="8" 0xd2="SET 2,D" t="8" 0xd3="SET 2,E" t="8" 0xd4="SET 2,H" t="8" 0xd5="SET 2,L" t="8" 0xd6="SET 2,(HL)" t="15" rd="8" wr="12" 0xd7="SET 2,A" t="8" 0xd8="SET 3,B" t="8" 0xd9="SET 3,C" t="8" 0xda="SET 3,D" t="8" 0xdb="SET 3,E" t="8" 0xdc="SET 3,H" t="8" 0xdd="SET 3,L" t="8" 0xde="SET 3,(HL)" t="15" rd="8" wr="12" 0xdf="SET 3,A" t="8" 0xe0="SET 4,B" t="8" 0xe1="SET 4,C" t="8" 0xe2="SET 4,D" t="8" 0xe3="SET 4,E" t="8" 0xe4="SET 4,H" t="8" 0xe5="SET 4,L" t="8" 0xe6="SET 4,(HL)" t="15" rd="8" wr="12" 0xe7="SET 4,A" t="8" 0xe8="SET 5,B" t="8" 0xe9="SET 5,C" t="8" 0xea="SET 5,D" t="8" 0xeb="SET 5,E" t="8" 0xec="SET 5,H" t="8" 0xed="SET 5,L" t="8" 0xee="SET 5,(HL)" t="15" rd="8" wr="12" 0xef="SET 5,A" t="8" 0xf0="SET 6,B" t="8" 0xf1="SET 6,C" t="8" 0xf2="SET 6,D" t="8" 0xf3="SET 6,E" t="8" 0xf4="SET 6,H" t="8" 0xf5="SET 6,L" t="8" 0xf6="SET 6,(HL)" t="15" rd="8" wr="12" 0xf7="SET 6,A" t="8" 0xf8="SET 7,B" t="8" 0xf9="SET 7,C" t="8" 0xfa="SET 7,D" t="8" 0xfb="SET 7,E" t="8" 0xfc="SET 7,H" t="8" 0xfd="SET 7,L" t="8" 0xfe="SET 7,(HL)" t="15" rd="8" wr="12" 0xff="SET 7,A" t="8" ./z80ex-1.1.21/opcodes/opcodes_ed.dat0000644000175000017500000000764310732252257015300 0ustar booboo#ED opcodes #all codes not listed here is NOP (NOP that eats 8 t-states instead of 4) 0x40="IN B,(C)" t="12" rd="9" 0x41="OUT (C),B" t="12" wr="9" 0x42="SBC HL,BC" t="15" 0x43="LD (@),BC" t="20" wr="14,17" 0x44="NEG" t="8" 0x45="RETN" t="14" rd="8,11" 0x46="IM 0" t="8" 0x47="LD I,A" t="9" 0x48="IN C,(C)" t="12" rd="9" 0x49="OUT (C),C" t="12" wr="9" 0x4a="ADC HL,BC" t="15" 0x4b="LD BC,(@)" t="20" rd="14,17" 0x4c="NEG" t="8" 0x4d="RETI" t="14" rd="8,11" 0x4e="IM 0" t="8" 0x4f="LD R,A" t="9" 0x50="IN D,(C)" t="12" rd="9" 0x51="OUT (C),D" t="12" wr="9" 0x52="SBC HL,DE" t="15" 0x53="LD (@),DE" t="20" wr="14,17" 0x54="NEG" t="8" 0x55="RETN" t="14" rd="8,11" 0x56="IM 1" t="8" 0x57="LD A,I" t="9" 0x58="IN E,(C)" t="12" rd="9" 0x59="OUT (C),E" t="12" wr="9" 0x5a="ADC HL,DE" t="15" 0x5b="LD DE,(@)" t="20" rd="14,17" 0x5c="NEG" t="8" 0x5d="RETI" t="14" rd="8,11" 0x5e="IM 2" t="8" 0x5f="LD A,R" t="9" 0x60="IN H,(C)" t="12" rd="9" 0x61="OUT (C),H" t="12" wr="9" 0x62="SBC HL,HL" t="15" 0x63="LD (@),HL" t="20" wr="14,17" 0x64="NEG" t="8" 0x65="RETN" t="14" rd="8,11" 0x66="IM 0" t="8" 0x67="RRD" t="18" rd="8" wr="15" 0x68="IN L,(C)" t="12" rd="9" 0x69="OUT (C),L" t="12" wr="9" 0x6a="ADC HL,HL" t="15" 0x6b="LD HL,(@)" t="20" rd="14,17" 0x6c="NEG" t="8" 0x6d="RETI" t="14" rd="8,11" 0x6e="IM 0" t="8" 0x6f="RLD" t="18" rd="8" wr="15" 0x70="IN_F (C)" t="12" rd="9" 0x71="OUT (C),0" t="12" wr="9" 0x72="SBC HL,SP" t="15" 0x73="LD (@),SP" t="20" wr="14,17" 0x74="NEG" t="8" 0x75="RETN" t="14" rd="8,11" 0x76="IM 1" t="8" 0x78="IN A,(C)" t="12" rd="9" 0x79="OUT (C),A" t="12" wr="9" 0x7a="ADC HL,SP" t="15" 0x7b="LD SP,(@)" t="20" rd="14,17" 0x7c="NEG" t="8" 0x7d="RETI" t="14" rd="8,11" 0x7e="IM 2" t="8" 0xa0="LDI" t="16" rd="8" wr="11" 0xa1="CPI" t="16" rd="8" 0xa2="INI" t="16" rd="10" wr="13" 0xa3="OUTI" t="16" rd="9" wr="13" 0xa8="LDD" t="16" rd="8" wr="11" 0xa9="CPD" t="16" rd="8" 0xaa="IND" t="16" rd="10" wr="13" 0xab="OUTD" t="16" rd="9" wr="13" 0xb0="LDIR" t="16/21" rd="8" wr="11" 0xb1="CPIR" t="16/21" rd="8" 0xb2="INIR" t="16/21" rd="10" wr="13" 0xb3="OTIR" t="16/21" rd="9" wr="13" 0xb8="LDDR" t="16/21" rd="8" wr="11" 0xb9="CPDR" t="16/21" rd="8" 0xba="INDR" t="16/21" rd="10" wr="13" 0xbb="OTDR" t="16/21" rd="9" wr="13" ./z80ex-1.1.21/opcodes/opcodes_dasm.c0000644000175000017500000023266511061326375015311 0ustar booboo/* autogenerated, do not edit */ /**/ static const z80ex_opc_dasm dasm_base[0x100] = { { "NOP" , 4 , 0 } /* 00 */, { "LD BC,@" , 10 , 0 } /* 01 */, { "LD (BC),A" , 7 , 0 } /* 02 */, { "INC BC" , 6 , 0 } /* 03 */, { "INC B" , 4 , 0 } /* 04 */, { "DEC B" , 4 , 0 } /* 05 */, { "LD B,#" , 7 , 0 } /* 06 */, { "RLCA" , 4 , 0 } /* 07 */, { "EX AF,AF'" , 4 , 0 } /* 08 */, { "ADD HL,BC" , 11 , 0 } /* 09 */, { "LD A,(BC)" , 7 , 0 } /* 0A */, { "DEC BC" , 6 , 0 } /* 0B */, { "INC C" , 4 , 0 } /* 0C */, { "DEC C" , 4 , 0 } /* 0D */, { "LD C,#" , 7 , 0 } /* 0E */, { "RRCA" , 4 , 0 } /* 0F */, { "DJNZ %" , 8 , 13 } /* 10 */, { "LD DE,@" , 10 , 0 } /* 11 */, { "LD (DE),A" , 7 , 0 } /* 12 */, { "INC DE" , 6 , 0 } /* 13 */, { "INC D" , 4 , 0 } /* 14 */, { "DEC D" , 4 , 0 } /* 15 */, { "LD D,#" , 7 , 0 } /* 16 */, { "RLA" , 4 , 0 } /* 17 */, { "JR %" , 12 , 0 } /* 18 */, { "ADD HL,DE" , 11 , 0 } /* 19 */, { "LD A,(DE)" , 7 , 0 } /* 1A */, { "DEC DE" , 6 , 0 } /* 1B */, { "INC E" , 4 , 0 } /* 1C */, { "DEC E" , 4 , 0 } /* 1D */, { "LD E,#" , 7 , 0 } /* 1E */, { "RRA" , 4 , 0 } /* 1F */, { "JR NZ,%" , 7 , 12 } /* 20 */, { "LD HL,@" , 10 , 0 } /* 21 */, { "LD (@),HL" , 16 , 0 } /* 22 */, { "INC HL" , 6 , 0 } /* 23 */, { "INC H" , 4 , 0 } /* 24 */, { "DEC H" , 4 , 0 } /* 25 */, { "LD H,#" , 7 , 0 } /* 26 */, { "DAA" , 4 , 0 } /* 27 */, { "JR Z,%" , 7 , 12 } /* 28 */, { "ADD HL,HL" , 11 , 0 } /* 29 */, { "LD HL,(@)" , 16 , 0 } /* 2A */, { "DEC HL" , 6 , 0 } /* 2B */, { "INC L" , 4 , 0 } /* 2C */, { "DEC L" , 4 , 0 } /* 2D */, { "LD L,#" , 7 , 0 } /* 2E */, { "CPL" , 4 , 0 } /* 2F */, { "JR NC,%" , 7 , 12 } /* 30 */, { "LD SP,@" , 10 , 0 } /* 31 */, { "LD (@),A" , 13 , 0 } /* 32 */, { "INC SP" , 6 , 0 } /* 33 */, { "INC (HL)" , 11 , 0 } /* 34 */, { "DEC (HL)" , 11 , 0 } /* 35 */, { "LD (HL),#" , 10 , 0 } /* 36 */, { "SCF" , 4 , 0 } /* 37 */, { "JR C,%" , 7 , 12 } /* 38 */, { "ADD HL,SP" , 11 , 0 } /* 39 */, { "LD A,(@)" , 13 , 0 } /* 3A */, { "DEC SP" , 6 , 0 } /* 3B */, { "INC A" , 4 , 0 } /* 3C */, { "DEC A" , 4 , 0 } /* 3D */, { "LD A,#" , 7 , 0 } /* 3E */, { "CCF" , 4 , 0 } /* 3F */, { "LD B,B" , 4 , 0 } /* 40 */, { "LD B,C" , 4 , 0 } /* 41 */, { "LD B,D" , 4 , 0 } /* 42 */, { "LD B,E" , 4 , 0 } /* 43 */, { "LD B,H" , 4 , 0 } /* 44 */, { "LD B,L" , 4 , 0 } /* 45 */, { "LD B,(HL)" , 7 , 0 } /* 46 */, { "LD B,A" , 4 , 0 } /* 47 */, { "LD C,B" , 4 , 0 } /* 48 */, { "LD C,C" , 4 , 0 } /* 49 */, { "LD C,D" , 4 , 0 } /* 4A */, { "LD C,E" , 4 , 0 } /* 4B */, { "LD C,H" , 4 , 0 } /* 4C */, { "LD C,L" , 4 , 0 } /* 4D */, { "LD C,(HL)" , 7 , 0 } /* 4E */, { "LD C,A" , 4 , 0 } /* 4F */, { "LD D,B" , 4 , 0 } /* 50 */, { "LD D,C" , 4 , 0 } /* 51 */, { "LD D,D" , 4 , 0 } /* 52 */, { "LD D,E" , 4 , 0 } /* 53 */, { "LD D,H" , 4 , 0 } /* 54 */, { "LD D,L" , 4 , 0 } /* 55 */, { "LD D,(HL)" , 7 , 0 } /* 56 */, { "LD D,A" , 4 , 0 } /* 57 */, { "LD E,B" , 4 , 0 } /* 58 */, { "LD E,C" , 4 , 0 } /* 59 */, { "LD E,D" , 4 , 0 } /* 5A */, { "LD E,E" , 4 , 0 } /* 5B */, { "LD E,H" , 4 , 0 } /* 5C */, { "LD E,L" , 4 , 0 } /* 5D */, { "LD E,(HL)" , 7 , 0 } /* 5E */, { "LD E,A" , 4 , 0 } /* 5F */, { "LD H,B" , 4 , 0 } /* 60 */, { "LD H,C" , 4 , 0 } /* 61 */, { "LD H,D" , 4 , 0 } /* 62 */, { "LD H,E" , 4 , 0 } /* 63 */, { "LD H,H" , 4 , 0 } /* 64 */, { "LD H,L" , 4 , 0 } /* 65 */, { "LD H,(HL)" , 7 , 0 } /* 66 */, { "LD H,A" , 4 , 0 } /* 67 */, { "LD L,B" , 4 , 0 } /* 68 */, { "LD L,C" , 4 , 0 } /* 69 */, { "LD L,D" , 4 , 0 } /* 6A */, { "LD L,E" , 4 , 0 } /* 6B */, { "LD L,H" , 4 , 0 } /* 6C */, { "LD L,L" , 4 , 0 } /* 6D */, { "LD L,(HL)" , 7 , 0 } /* 6E */, { "LD L,A" , 4 , 0 } /* 6F */, { "LD (HL),B" , 7 , 0 } /* 70 */, { "LD (HL),C" , 7 , 0 } /* 71 */, { "LD (HL),D" , 7 , 0 } /* 72 */, { "LD (HL),E" , 7 , 0 } /* 73 */, { "LD (HL),H" , 7 , 0 } /* 74 */, { "LD (HL),L" , 7 , 0 } /* 75 */, { "HALT" , 4 , 0 } /* 76 */, { "LD (HL),A" , 7 , 0 } /* 77 */, { "LD A,B" , 4 , 0 } /* 78 */, { "LD A,C" , 4 , 0 } /* 79 */, { "LD A,D" , 4 , 0 } /* 7A */, { "LD A,E" , 4 , 0 } /* 7B */, { "LD A,H" , 4 , 0 } /* 7C */, { "LD A,L" , 4 , 0 } /* 7D */, { "LD A,(HL)" , 7 , 0 } /* 7E */, { "LD A,A" , 4 , 0 } /* 7F */, { "ADD A,B" , 4 , 0 } /* 80 */, { "ADD A,C" , 4 , 0 } /* 81 */, { "ADD A,D" , 4 , 0 } /* 82 */, { "ADD A,E" , 4 , 0 } /* 83 */, { "ADD A,H" , 4 , 0 } /* 84 */, { "ADD A,L" , 4 , 0 } /* 85 */, { "ADD A,(HL)" , 7 , 0 } /* 86 */, { "ADD A,A" , 4 , 0 } /* 87 */, { "ADC A,B" , 4 , 0 } /* 88 */, { "ADC A,C" , 4 , 0 } /* 89 */, { "ADC A,D" , 4 , 0 } /* 8A */, { "ADC A,E" , 4 , 0 } /* 8B */, { "ADC A,H" , 4 , 0 } /* 8C */, { "ADC A,L" , 4 , 0 } /* 8D */, { "ADC A,(HL)" , 7 , 0 } /* 8E */, { "ADC A,A" , 4 , 0 } /* 8F */, { "SUB B" , 4 , 0 } /* 90 */, { "SUB C" , 4 , 0 } /* 91 */, { "SUB D" , 4 , 0 } /* 92 */, { "SUB E" , 4 , 0 } /* 93 */, { "SUB H" , 4 , 0 } /* 94 */, { "SUB L" , 4 , 0 } /* 95 */, { "SUB (HL)" , 7 , 0 } /* 96 */, { "SUB A" , 4 , 0 } /* 97 */, { "SBC A,B" , 4 , 0 } /* 98 */, { "SBC A,C" , 4 , 0 } /* 99 */, { "SBC A,D" , 4 , 0 } /* 9A */, { "SBC A,E" , 4 , 0 } /* 9B */, { "SBC A,H" , 4 , 0 } /* 9C */, { "SBC A,L" , 4 , 0 } /* 9D */, { "SBC A,(HL)" , 7 , 0 } /* 9E */, { "SBC A,A" , 4 , 0 } /* 9F */, { "AND B" , 4 , 0 } /* A0 */, { "AND C" , 4 , 0 } /* A1 */, { "AND D" , 4 , 0 } /* A2 */, { "AND E" , 4 , 0 } /* A3 */, { "AND H" , 4 , 0 } /* A4 */, { "AND L" , 4 , 0 } /* A5 */, { "AND (HL)" , 7 , 0 } /* A6 */, { "AND A" , 4 , 0 } /* A7 */, { "XOR B" , 4 , 0 } /* A8 */, { "XOR C" , 4 , 0 } /* A9 */, { "XOR D" , 4 , 0 } /* AA */, { "XOR E" , 4 , 0 } /* AB */, { "XOR H" , 4 , 0 } /* AC */, { "XOR L" , 4 , 0 } /* AD */, { "XOR (HL)" , 7 , 0 } /* AE */, { "XOR A" , 4 , 0 } /* AF */, { "OR B" , 4 , 0 } /* B0 */, { "OR C" , 4 , 0 } /* B1 */, { "OR D" , 4 , 0 } /* B2 */, { "OR E" , 4 , 0 } /* B3 */, { "OR H" , 4 , 0 } /* B4 */, { "OR L" , 4 , 0 } /* B5 */, { "OR (HL)" , 7 , 0 } /* B6 */, { "OR A" , 4 , 0 } /* B7 */, { "CP B" , 4 , 0 } /* B8 */, { "CP C" , 4 , 0 } /* B9 */, { "CP D" , 4 , 0 } /* BA */, { "CP E" , 4 , 0 } /* BB */, { "CP H" , 4 , 0 } /* BC */, { "CP L" , 4 , 0 } /* BD */, { "CP (HL)" , 7 , 0 } /* BE */, { "CP A" , 4 , 0 } /* BF */, { "RET NZ" , 5 , 11 } /* C0 */, { "POP BC" , 10 , 0 } /* C1 */, { "JP NZ,@" , 10 , 0 } /* C2 */, { "JP @" , 10 , 0 } /* C3 */, { "CALL NZ,@" , 10 , 17 } /* C4 */, { "PUSH BC" , 11 , 0 } /* C5 */, { "ADD A,#" , 7 , 0 } /* C6 */, { "RST 0x00" , 11 , 0 } /* C7 */, { "RET Z" , 5 , 11 } /* C8 */, { "RET" , 10 , 0 } /* C9 */, { "JP Z,@" , 10 , 0 } /* CA */, { "shift CB" , 4 , 0 } /* CB */, { "CALL Z,@" , 10 , 17 } /* CC */, { "CALL @" , 17 , 0 } /* CD */, { "ADC A,#" , 7 , 0 } /* CE */, { "RST 0x08" , 11 , 0 } /* CF */, { "RET NC" , 5 , 11 } /* D0 */, { "POP DE" , 10 , 0 } /* D1 */, { "JP NC,@" , 10 , 0 } /* D2 */, { "OUT (#),A" , 11 , 0 } /* D3 */, { "CALL NC,@" , 10 , 17 } /* D4 */, { "PUSH DE" , 11 , 0 } /* D5 */, { "SUB #" , 7 , 0 } /* D6 */, { "RST 0x10" , 11 , 0 } /* D7 */, { "RET C" , 5 , 11 } /* D8 */, { "EXX" , 4 , 0 } /* D9 */, { "JP C,@" , 10 , 0 } /* DA */, { "IN A,(#)" , 11 , 0 } /* DB */, { "CALL C,@" , 10 , 17 } /* DC */, { "shift DD" , 0 , 0 } /* DD */, { "SBC A,#" , 7 , 0 } /* DE */, { "RST 0x18" , 11 , 0 } /* DF */, { "RET PO" , 5 , 11 } /* E0 */, { "POP HL" , 10 , 0 } /* E1 */, { "JP PO,@" , 10 , 0 } /* E2 */, { "EX (SP),HL" , 19 , 0 } /* E3 */, { "CALL PO,@" , 10 , 17 } /* E4 */, { "PUSH HL" , 11 , 0 } /* E5 */, { "AND #" , 7 , 0 } /* E6 */, { "RST 0x20" , 11 , 0 } /* E7 */, { "RET PE" , 5 , 11 } /* E8 */, { "JP HL" , 4 , 0 } /* E9 */, { "JP PE,@" , 10 , 0 } /* EA */, { "EX DE,HL" , 4 , 0 } /* EB */, { "CALL PE,@" , 10 , 17 } /* EC */, { "shift ED" , 0 , 0 } /* ED */, { "XOR #" , 7 , 0 } /* EE */, { "RST 0x28" , 11 , 0 } /* EF */, { "RET P" , 5 , 11 } /* F0 */, { "POP AF" , 10 , 0 } /* F1 */, { "JP P,@" , 10 , 0 } /* F2 */, { "DI" , 4 , 0 } /* F3 */, { "CALL P,@" , 10 , 17 } /* F4 */, { "PUSH AF" , 11 , 0 } /* F5 */, { "OR #" , 7 , 0 } /* F6 */, { "RST 0x30" , 11 , 0 } /* F7 */, { "RET M" , 5 , 11 } /* F8 */, { "LD SP,HL" , 6 , 0 } /* F9 */, { "JP M,@" , 10 , 0 } /* FA */, { "EI" , 4 , 0 } /* FB */, { "CALL M,@" , 10 , 17 } /* FC */, { "shift FD" , 4 , 0 } /* FD */, { "CP #" , 7 , 0 } /* FE */, { "RST 0x38" , 11 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_cb[0x100] = { { "RLC B" , 8 , 0 } /* 00 */, { "RLC C" , 8 , 0 } /* 01 */, { "RLC D" , 8 , 0 } /* 02 */, { "RLC E" , 8 , 0 } /* 03 */, { "RLC H" , 8 , 0 } /* 04 */, { "RLC L" , 8 , 0 } /* 05 */, { "RLC (HL)" , 15 , 0 } /* 06 */, { "RLC A" , 8 , 0 } /* 07 */, { "RRC B" , 8 , 0 } /* 08 */, { "RRC C" , 8 , 0 } /* 09 */, { "RRC D" , 8 , 0 } /* 0A */, { "RRC E" , 8 , 0 } /* 0B */, { "RRC H" , 8 , 0 } /* 0C */, { "RRC L" , 8 , 0 } /* 0D */, { "RRC (HL)" , 15 , 0 } /* 0E */, { "RRC A" , 8 , 0 } /* 0F */, { "RL B" , 8 , 0 } /* 10 */, { "RL C" , 8 , 0 } /* 11 */, { "RL D" , 8 , 0 } /* 12 */, { "RL E" , 8 , 0 } /* 13 */, { "RL H" , 8 , 0 } /* 14 */, { "RL L" , 8 , 0 } /* 15 */, { "RL (HL)" , 15 , 0 } /* 16 */, { "RL A" , 8 , 0 } /* 17 */, { "RR B" , 8 , 0 } /* 18 */, { "RR C" , 8 , 0 } /* 19 */, { "RR D" , 8 , 0 } /* 1A */, { "RR E" , 8 , 0 } /* 1B */, { "RR H" , 8 , 0 } /* 1C */, { "RR L" , 8 , 0 } /* 1D */, { "RR (HL)" , 15 , 0 } /* 1E */, { "RR A" , 8 , 0 } /* 1F */, { "SLA B" , 8 , 0 } /* 20 */, { "SLA C" , 8 , 0 } /* 21 */, { "SLA D" , 8 , 0 } /* 22 */, { "SLA E" , 8 , 0 } /* 23 */, { "SLA H" , 8 , 0 } /* 24 */, { "SLA L" , 8 , 0 } /* 25 */, { "SLA (HL)" , 15 , 0 } /* 26 */, { "SLA A" , 8 , 0 } /* 27 */, { "SRA B" , 8 , 0 } /* 28 */, { "SRA C" , 8 , 0 } /* 29 */, { "SRA D" , 8 , 0 } /* 2A */, { "SRA E" , 8 , 0 } /* 2B */, { "SRA H" , 8 , 0 } /* 2C */, { "SRA L" , 8 , 0 } /* 2D */, { "SRA (HL)" , 15 , 0 } /* 2E */, { "SRA A" , 8 , 0 } /* 2F */, { "SLL B" , 8 , 0 } /* 30 */, { "SLL C" , 8 , 0 } /* 31 */, { "SLL D" , 8 , 0 } /* 32 */, { "SLL E" , 8 , 0 } /* 33 */, { "SLL H" , 8 , 0 } /* 34 */, { "SLL L" , 8 , 0 } /* 35 */, { "SLL (HL)" , 15 , 0 } /* 36 */, { "SLL A" , 8 , 0 } /* 37 */, { "SRL B" , 8 , 0 } /* 38 */, { "SRL C" , 8 , 0 } /* 39 */, { "SRL D" , 8 , 0 } /* 3A */, { "SRL E" , 8 , 0 } /* 3B */, { "SRL H" , 8 , 0 } /* 3C */, { "SRL L" , 8 , 0 } /* 3D */, { "SRL (HL)" , 15 , 0 } /* 3E */, { "SRL A" , 8 , 0 } /* 3F */, { "BIT 0,B" , 8 , 0 } /* 40 */, { "BIT 0,C" , 8 , 0 } /* 41 */, { "BIT 0,D" , 8 , 0 } /* 42 */, { "BIT 0,E" , 8 , 0 } /* 43 */, { "BIT 0,H" , 8 , 0 } /* 44 */, { "BIT 0,L" , 8 , 0 } /* 45 */, { "BIT 0,(HL)" , 12 , 0 } /* 46 */, { "BIT 0,A" , 8 , 0 } /* 47 */, { "BIT 1,B" , 8 , 0 } /* 48 */, { "BIT 1,C" , 8 , 0 } /* 49 */, { "BIT 1,D" , 8 , 0 } /* 4A */, { "BIT 1,E" , 8 , 0 } /* 4B */, { "BIT 1,H" , 8 , 0 } /* 4C */, { "BIT 1,L" , 8 , 0 } /* 4D */, { "BIT 1,(HL)" , 12 , 0 } /* 4E */, { "BIT 1,A" , 8 , 0 } /* 4F */, { "BIT 2,B" , 8 , 0 } /* 50 */, { "BIT 2,C" , 8 , 0 } /* 51 */, { "BIT 2,D" , 8 , 0 } /* 52 */, { "BIT 2,E" , 8 , 0 } /* 53 */, { "BIT 2,H" , 8 , 0 } /* 54 */, { "BIT 2,L" , 8 , 0 } /* 55 */, { "BIT 2,(HL)" , 12 , 0 } /* 56 */, { "BIT 2,A" , 8 , 0 } /* 57 */, { "BIT 3,B" , 8 , 0 } /* 58 */, { "BIT 3,C" , 8 , 0 } /* 59 */, { "BIT 3,D" , 8 , 0 } /* 5A */, { "BIT 3,E" , 8 , 0 } /* 5B */, { "BIT 3,H" , 8 , 0 } /* 5C */, { "BIT 3,L" , 8 , 0 } /* 5D */, { "BIT 3,(HL)" , 12 , 0 } /* 5E */, { "BIT 3,A" , 8 , 0 } /* 5F */, { "BIT 4,B" , 8 , 0 } /* 60 */, { "BIT 4,C" , 8 , 0 } /* 61 */, { "BIT 4,D" , 8 , 0 } /* 62 */, { "BIT 4,E" , 8 , 0 } /* 63 */, { "BIT 4,H" , 8 , 0 } /* 64 */, { "BIT 4,L" , 8 , 0 } /* 65 */, { "BIT 4,(HL)" , 12 , 0 } /* 66 */, { "BIT 4,A" , 8 , 0 } /* 67 */, { "BIT 5,B" , 8 , 0 } /* 68 */, { "BIT 5,C" , 8 , 0 } /* 69 */, { "BIT 5,D" , 8 , 0 } /* 6A */, { "BIT 5,E" , 8 , 0 } /* 6B */, { "BIT 5,H" , 8 , 0 } /* 6C */, { "BIT 5,L" , 8 , 0 } /* 6D */, { "BIT 5,(HL)" , 12 , 0 } /* 6E */, { "BIT 5,A" , 8 , 0 } /* 6F */, { "BIT 6,B" , 8 , 0 } /* 70 */, { "BIT 6,C" , 8 , 0 } /* 71 */, { "BIT 6,D" , 8 , 0 } /* 72 */, { "BIT 6,E" , 8 , 0 } /* 73 */, { "BIT 6,H" , 8 , 0 } /* 74 */, { "BIT 6,L" , 8 , 0 } /* 75 */, { "BIT 6,(HL)" , 12 , 0 } /* 76 */, { "BIT 6,A" , 8 , 0 } /* 77 */, { "BIT 7,B" , 8 , 0 } /* 78 */, { "BIT 7,C" , 8 , 0 } /* 79 */, { "BIT 7,D" , 8 , 0 } /* 7A */, { "BIT 7,E" , 8 , 0 } /* 7B */, { "BIT 7,H" , 8 , 0 } /* 7C */, { "BIT 7,L" , 8 , 0 } /* 7D */, { "BIT 7,(HL)" , 12 , 0 } /* 7E */, { "BIT 7,A" , 8 , 0 } /* 7F */, { "RES 0,B" , 8 , 0 } /* 80 */, { "RES 0,C" , 8 , 0 } /* 81 */, { "RES 0,D" , 8 , 0 } /* 82 */, { "RES 0,E" , 8 , 0 } /* 83 */, { "RES 0,H" , 8 , 0 } /* 84 */, { "RES 0,L" , 8 , 0 } /* 85 */, { "RES 0,(HL)" , 15 , 0 } /* 86 */, { "RES 0,A" , 8 , 0 } /* 87 */, { "RES 1,B" , 8 , 0 } /* 88 */, { "RES 1,C" , 8 , 0 } /* 89 */, { "RES 1,D" , 8 , 0 } /* 8A */, { "RES 1,E" , 8 , 0 } /* 8B */, { "RES 1,H" , 8 , 0 } /* 8C */, { "RES 1,L" , 8 , 0 } /* 8D */, { "RES 1,(HL)" , 15 , 0 } /* 8E */, { "RES 1,A" , 8 , 0 } /* 8F */, { "RES 2,B" , 8 , 0 } /* 90 */, { "RES 2,C" , 8 , 0 } /* 91 */, { "RES 2,D" , 8 , 0 } /* 92 */, { "RES 2,E" , 8 , 0 } /* 93 */, { "RES 2,H" , 8 , 0 } /* 94 */, { "RES 2,L" , 8 , 0 } /* 95 */, { "RES 2,(HL)" , 15 , 0 } /* 96 */, { "RES 2,A" , 8 , 0 } /* 97 */, { "RES 3,B" , 8 , 0 } /* 98 */, { "RES 3,C" , 8 , 0 } /* 99 */, { "RES 3,D" , 8 , 0 } /* 9A */, { "RES 3,E" , 8 , 0 } /* 9B */, { "RES 3,H" , 8 , 0 } /* 9C */, { "RES 3,L" , 8 , 0 } /* 9D */, { "RES 3,(HL)" , 15 , 0 } /* 9E */, { "RES 3,A" , 8 , 0 } /* 9F */, { "RES 4,B" , 8 , 0 } /* A0 */, { "RES 4,C" , 8 , 0 } /* A1 */, { "RES 4,D" , 8 , 0 } /* A2 */, { "RES 4,E" , 8 , 0 } /* A3 */, { "RES 4,H" , 8 , 0 } /* A4 */, { "RES 4,L" , 8 , 0 } /* A5 */, { "RES 4,(HL)" , 15 , 0 } /* A6 */, { "RES 4,A" , 8 , 0 } /* A7 */, { "RES 5,B" , 8 , 0 } /* A8 */, { "RES 5,C" , 8 , 0 } /* A9 */, { "RES 5,D" , 8 , 0 } /* AA */, { "RES 5,E" , 8 , 0 } /* AB */, { "RES 5,H" , 8 , 0 } /* AC */, { "RES 5,L" , 8 , 0 } /* AD */, { "RES 5,(HL)" , 15 , 0 } /* AE */, { "RES 5,A" , 8 , 0 } /* AF */, { "RES 6,B" , 8 , 0 } /* B0 */, { "RES 6,C" , 8 , 0 } /* B1 */, { "RES 6,D" , 8 , 0 } /* B2 */, { "RES 6,E" , 8 , 0 } /* B3 */, { "RES 6,H" , 8 , 0 } /* B4 */, { "RES 6,L" , 8 , 0 } /* B5 */, { "RES 6,(HL)" , 15 , 0 } /* B6 */, { "RES 6,A" , 8 , 0 } /* B7 */, { "RES 7,B" , 8 , 0 } /* B8 */, { "RES 7,C" , 8 , 0 } /* B9 */, { "RES 7,D" , 8 , 0 } /* BA */, { "RES 7,E" , 8 , 0 } /* BB */, { "RES 7,H" , 8 , 0 } /* BC */, { "RES 7,L" , 8 , 0 } /* BD */, { "RES 7,(HL)" , 15 , 0 } /* BE */, { "RES 7,A" , 8 , 0 } /* BF */, { "SET 0,B" , 8 , 0 } /* C0 */, { "SET 0,C" , 8 , 0 } /* C1 */, { "SET 0,D" , 8 , 0 } /* C2 */, { "SET 0,E" , 8 , 0 } /* C3 */, { "SET 0,H" , 8 , 0 } /* C4 */, { "SET 0,L" , 8 , 0 } /* C5 */, { "SET 0,(HL)" , 15 , 0 } /* C6 */, { "SET 0,A" , 8 , 0 } /* C7 */, { "SET 1,B" , 8 , 0 } /* C8 */, { "SET 1,C" , 8 , 0 } /* C9 */, { "SET 1,D" , 8 , 0 } /* CA */, { "SET 1,E" , 8 , 0 } /* CB */, { "SET 1,H" , 8 , 0 } /* CC */, { "SET 1,L" , 8 , 0 } /* CD */, { "SET 1,(HL)" , 15 , 0 } /* CE */, { "SET 1,A" , 8 , 0 } /* CF */, { "SET 2,B" , 8 , 0 } /* D0 */, { "SET 2,C" , 8 , 0 } /* D1 */, { "SET 2,D" , 8 , 0 } /* D2 */, { "SET 2,E" , 8 , 0 } /* D3 */, { "SET 2,H" , 8 , 0 } /* D4 */, { "SET 2,L" , 8 , 0 } /* D5 */, { "SET 2,(HL)" , 15 , 0 } /* D6 */, { "SET 2,A" , 8 , 0 } /* D7 */, { "SET 3,B" , 8 , 0 } /* D8 */, { "SET 3,C" , 8 , 0 } /* D9 */, { "SET 3,D" , 8 , 0 } /* DA */, { "SET 3,E" , 8 , 0 } /* DB */, { "SET 3,H" , 8 , 0 } /* DC */, { "SET 3,L" , 8 , 0 } /* DD */, { "SET 3,(HL)" , 15 , 0 } /* DE */, { "SET 3,A" , 8 , 0 } /* DF */, { "SET 4,B" , 8 , 0 } /* E0 */, { "SET 4,C" , 8 , 0 } /* E1 */, { "SET 4,D" , 8 , 0 } /* E2 */, { "SET 4,E" , 8 , 0 } /* E3 */, { "SET 4,H" , 8 , 0 } /* E4 */, { "SET 4,L" , 8 , 0 } /* E5 */, { "SET 4,(HL)" , 15 , 0 } /* E6 */, { "SET 4,A" , 8 , 0 } /* E7 */, { "SET 5,B" , 8 , 0 } /* E8 */, { "SET 5,C" , 8 , 0 } /* E9 */, { "SET 5,D" , 8 , 0 } /* EA */, { "SET 5,E" , 8 , 0 } /* EB */, { "SET 5,H" , 8 , 0 } /* EC */, { "SET 5,L" , 8 , 0 } /* ED */, { "SET 5,(HL)" , 15 , 0 } /* EE */, { "SET 5,A" , 8 , 0 } /* EF */, { "SET 6,B" , 8 , 0 } /* F0 */, { "SET 6,C" , 8 , 0 } /* F1 */, { "SET 6,D" , 8 , 0 } /* F2 */, { "SET 6,E" , 8 , 0 } /* F3 */, { "SET 6,H" , 8 , 0 } /* F4 */, { "SET 6,L" , 8 , 0 } /* F5 */, { "SET 6,(HL)" , 15 , 0 } /* F6 */, { "SET 6,A" , 8 , 0 } /* F7 */, { "SET 7,B" , 8 , 0 } /* F8 */, { "SET 7,C" , 8 , 0 } /* F9 */, { "SET 7,D" , 8 , 0 } /* FA */, { "SET 7,E" , 8 , 0 } /* FB */, { "SET 7,H" , 8 , 0 } /* FC */, { "SET 7,L" , 8 , 0 } /* FD */, { "SET 7,(HL)" , 15 , 0 } /* FE */, { "SET 7,A" , 8 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_ed[0x100] = { { NULL , 0 , 0 } /* 00 */, { NULL , 0 , 0 } /* 01 */, { NULL , 0 , 0 } /* 02 */, { NULL , 0 , 0 } /* 03 */, { NULL , 0 , 0 } /* 04 */, { NULL , 0 , 0 } /* 05 */, { NULL , 0 , 0 } /* 06 */, { NULL , 0 , 0 } /* 07 */, { NULL , 0 , 0 } /* 08 */, { NULL , 0 , 0 } /* 09 */, { NULL , 0 , 0 } /* 0A */, { NULL , 0 , 0 } /* 0B */, { NULL , 0 , 0 } /* 0C */, { NULL , 0 , 0 } /* 0D */, { NULL , 0 , 0 } /* 0E */, { NULL , 0 , 0 } /* 0F */, { NULL , 0 , 0 } /* 10 */, { NULL , 0 , 0 } /* 11 */, { NULL , 0 , 0 } /* 12 */, { NULL , 0 , 0 } /* 13 */, { NULL , 0 , 0 } /* 14 */, { NULL , 0 , 0 } /* 15 */, { NULL , 0 , 0 } /* 16 */, { NULL , 0 , 0 } /* 17 */, { NULL , 0 , 0 } /* 18 */, { NULL , 0 , 0 } /* 19 */, { NULL , 0 , 0 } /* 1A */, { NULL , 0 , 0 } /* 1B */, { NULL , 0 , 0 } /* 1C */, { NULL , 0 , 0 } /* 1D */, { NULL , 0 , 0 } /* 1E */, { NULL , 0 , 0 } /* 1F */, { NULL , 0 , 0 } /* 20 */, { NULL , 0 , 0 } /* 21 */, { NULL , 0 , 0 } /* 22 */, { NULL , 0 , 0 } /* 23 */, { NULL , 0 , 0 } /* 24 */, { NULL , 0 , 0 } /* 25 */, { NULL , 0 , 0 } /* 26 */, { NULL , 0 , 0 } /* 27 */, { NULL , 0 , 0 } /* 28 */, { NULL , 0 , 0 } /* 29 */, { NULL , 0 , 0 } /* 2A */, { NULL , 0 , 0 } /* 2B */, { NULL , 0 , 0 } /* 2C */, { NULL , 0 , 0 } /* 2D */, { NULL , 0 , 0 } /* 2E */, { NULL , 0 , 0 } /* 2F */, { NULL , 0 , 0 } /* 30 */, { NULL , 0 , 0 } /* 31 */, { NULL , 0 , 0 } /* 32 */, { NULL , 0 , 0 } /* 33 */, { NULL , 0 , 0 } /* 34 */, { NULL , 0 , 0 } /* 35 */, { NULL , 0 , 0 } /* 36 */, { NULL , 0 , 0 } /* 37 */, { NULL , 0 , 0 } /* 38 */, { NULL , 0 , 0 } /* 39 */, { NULL , 0 , 0 } /* 3A */, { NULL , 0 , 0 } /* 3B */, { NULL , 0 , 0 } /* 3C */, { NULL , 0 , 0 } /* 3D */, { NULL , 0 , 0 } /* 3E */, { NULL , 0 , 0 } /* 3F */, { "IN B,(C)" , 12 , 0 } /* 40 */, { "OUT (C),B" , 12 , 0 } /* 41 */, { "SBC HL,BC" , 15 , 0 } /* 42 */, { "LD (@),BC" , 20 , 0 } /* 43 */, { "NEG" , 8 , 0 } /* 44 */, { "RETN" , 14 , 0 } /* 45 */, { "IM 0" , 8 , 0 } /* 46 */, { "LD I,A" , 9 , 0 } /* 47 */, { "IN C,(C)" , 12 , 0 } /* 48 */, { "OUT (C),C" , 12 , 0 } /* 49 */, { "ADC HL,BC" , 15 , 0 } /* 4A */, { "LD BC,(@)" , 20 , 0 } /* 4B */, { "NEG" , 8 , 0 } /* 4C */, { "RETI" , 14 , 0 } /* 4D */, { "IM 0" , 8 , 0 } /* 4E */, { "LD_R_A" , 9 , 0 } /* 4F */, { "IN D,(C)" , 12 , 0 } /* 50 */, { "OUT (C),D" , 12 , 0 } /* 51 */, { "SBC HL,DE" , 15 , 0 } /* 52 */, { "LD (@),DE" , 20 , 0 } /* 53 */, { "NEG" , 8 , 0 } /* 54 */, { "RETN" , 14 , 0 } /* 55 */, { "IM 1" , 8 , 0 } /* 56 */, { "LD_A_I" , 9 , 0 } /* 57 */, { "IN E,(C)" , 12 , 0 } /* 58 */, { "OUT (C),E" , 12 , 0 } /* 59 */, { "ADC HL,DE" , 15 , 0 } /* 5A */, { "LD DE,(@)" , 20 , 0 } /* 5B */, { "NEG" , 8 , 0 } /* 5C */, { "RETI" , 14 , 0 } /* 5D */, { "IM 2" , 8 , 0 } /* 5E */, { "LD_A_R" , 9 , 0 } /* 5F */, { "IN H,(C)" , 12 , 0 } /* 60 */, { "OUT (C),H" , 12 , 0 } /* 61 */, { "SBC HL,HL" , 15 , 0 } /* 62 */, { "LD (@),HL" , 20 , 0 } /* 63 */, { "NEG" , 8 , 0 } /* 64 */, { "RETN" , 14 , 0 } /* 65 */, { "IM 0" , 8 , 0 } /* 66 */, { "RRD" , 18 , 0 } /* 67 */, { "IN L,(C)" , 12 , 0 } /* 68 */, { "OUT (C),L" , 12 , 0 } /* 69 */, { "ADC HL,HL" , 15 , 0 } /* 6A */, { "LD HL,(@)" , 20 , 0 } /* 6B */, { "NEG" , 8 , 0 } /* 6C */, { "RETI" , 14 , 0 } /* 6D */, { "IM 0" , 8 , 0 } /* 6E */, { "RLD" , 18 , 0 } /* 6F */, { "IN_F (C)" , 12 , 0 } /* 70 */, { "OUT (C),0" , 12 , 0 } /* 71 */, { "SBC HL,SP" , 15 , 0 } /* 72 */, { "LD (@),SP" , 20 , 0 } /* 73 */, { "NEG" , 8 , 0 } /* 74 */, { "RETN" , 14 , 0 } /* 75 */, { "IM 1" , 8 , 0 } /* 76 */, { NULL , 0 , 0 } /* 77 */, { "IN A,(C)" , 12 , 0 } /* 78 */, { "OUT (C),A" , 12 , 0 } /* 79 */, { "ADC HL,SP" , 15 , 0 } /* 7A */, { "LD SP,(@)" , 20 , 0 } /* 7B */, { "NEG" , 8 , 0 } /* 7C */, { "RETI" , 14 , 0 } /* 7D */, { "IM 2" , 8 , 0 } /* 7E */, { NULL , 0 , 0 } /* 7F */, { NULL , 0 , 0 } /* 80 */, { NULL , 0 , 0 } /* 81 */, { NULL , 0 , 0 } /* 82 */, { NULL , 0 , 0 } /* 83 */, { NULL , 0 , 0 } /* 84 */, { NULL , 0 , 0 } /* 85 */, { NULL , 0 , 0 } /* 86 */, { NULL , 0 , 0 } /* 87 */, { NULL , 0 , 0 } /* 88 */, { NULL , 0 , 0 } /* 89 */, { NULL , 0 , 0 } /* 8A */, { NULL , 0 , 0 } /* 8B */, { NULL , 0 , 0 } /* 8C */, { NULL , 0 , 0 } /* 8D */, { NULL , 0 , 0 } /* 8E */, { NULL , 0 , 0 } /* 8F */, { NULL , 0 , 0 } /* 90 */, { NULL , 0 , 0 } /* 91 */, { NULL , 0 , 0 } /* 92 */, { NULL , 0 , 0 } /* 93 */, { NULL , 0 , 0 } /* 94 */, { NULL , 0 , 0 } /* 95 */, { NULL , 0 , 0 } /* 96 */, { NULL , 0 , 0 } /* 97 */, { NULL , 0 , 0 } /* 98 */, { NULL , 0 , 0 } /* 99 */, { NULL , 0 , 0 } /* 9A */, { NULL , 0 , 0 } /* 9B */, { NULL , 0 , 0 } /* 9C */, { NULL , 0 , 0 } /* 9D */, { NULL , 0 , 0 } /* 9E */, { NULL , 0 , 0 } /* 9F */, { "LDI" , 16 , 0 } /* A0 */, { "CPI" , 16 , 0 } /* A1 */, { "INI" , 16 , 0 } /* A2 */, { "OUTI" , 16 , 0 } /* A3 */, { NULL , 0 , 0 } /* A4 */, { NULL , 0 , 0 } /* A5 */, { NULL , 0 , 0 } /* A6 */, { NULL , 0 , 0 } /* A7 */, { "LDD" , 16 , 0 } /* A8 */, { "CPD" , 16 , 0 } /* A9 */, { "IND" , 16 , 0 } /* AA */, { "OUTD" , 16 , 0 } /* AB */, { NULL , 0 , 0 } /* AC */, { NULL , 0 , 0 } /* AD */, { NULL , 0 , 0 } /* AE */, { NULL , 0 , 0 } /* AF */, { "LDIR" , 16 , 21 } /* B0 */, { "CPIR" , 16 , 21 } /* B1 */, { "INIR" , 16 , 21 } /* B2 */, { "OTIR" , 16 , 21 } /* B3 */, { NULL , 0 , 0 } /* B4 */, { NULL , 0 , 0 } /* B5 */, { NULL , 0 , 0 } /* B6 */, { NULL , 0 , 0 } /* B7 */, { "LDDR" , 16 , 21 } /* B8 */, { "CPDR" , 16 , 21 } /* B9 */, { "INDR" , 16 , 21 } /* BA */, { "OTDR" , 16 , 21 } /* BB */, { NULL , 0 , 0 } /* BC */, { NULL , 0 , 0 } /* BD */, { NULL , 0 , 0 } /* BE */, { NULL , 0 , 0 } /* BF */, { NULL , 0 , 0 } /* C0 */, { NULL , 0 , 0 } /* C1 */, { NULL , 0 , 0 } /* C2 */, { NULL , 0 , 0 } /* C3 */, { NULL , 0 , 0 } /* C4 */, { NULL , 0 , 0 } /* C5 */, { NULL , 0 , 0 } /* C6 */, { NULL , 0 , 0 } /* C7 */, { NULL , 0 , 0 } /* C8 */, { NULL , 0 , 0 } /* C9 */, { NULL , 0 , 0 } /* CA */, { NULL , 0 , 0 } /* CB */, { NULL , 0 , 0 } /* CC */, { NULL , 0 , 0 } /* CD */, { NULL , 0 , 0 } /* CE */, { NULL , 0 , 0 } /* CF */, { NULL , 0 , 0 } /* D0 */, { NULL , 0 , 0 } /* D1 */, { NULL , 0 , 0 } /* D2 */, { NULL , 0 , 0 } /* D3 */, { NULL , 0 , 0 } /* D4 */, { NULL , 0 , 0 } /* D5 */, { NULL , 0 , 0 } /* D6 */, { NULL , 0 , 0 } /* D7 */, { NULL , 0 , 0 } /* D8 */, { NULL , 0 , 0 } /* D9 */, { NULL , 0 , 0 } /* DA */, { NULL , 0 , 0 } /* DB */, { NULL , 0 , 0 } /* DC */, { NULL , 0 , 0 } /* DD */, { NULL , 0 , 0 } /* DE */, { NULL , 0 , 0 } /* DF */, { NULL , 0 , 0 } /* E0 */, { NULL , 0 , 0 } /* E1 */, { NULL , 0 , 0 } /* E2 */, { NULL , 0 , 0 } /* E3 */, { NULL , 0 , 0 } /* E4 */, { NULL , 0 , 0 } /* E5 */, { NULL , 0 , 0 } /* E6 */, { NULL , 0 , 0 } /* E7 */, { NULL , 0 , 0 } /* E8 */, { NULL , 0 , 0 } /* E9 */, { NULL , 0 , 0 } /* EA */, { NULL , 0 , 0 } /* EB */, { NULL , 0 , 0 } /* EC */, { NULL , 0 , 0 } /* ED */, { NULL , 0 , 0 } /* EE */, { NULL , 0 , 0 } /* EF */, { NULL , 0 , 0 } /* F0 */, { NULL , 0 , 0 } /* F1 */, { NULL , 0 , 0 } /* F2 */, { NULL , 0 , 0 } /* F3 */, { NULL , 0 , 0 } /* F4 */, { NULL , 0 , 0 } /* F5 */, { NULL , 0 , 0 } /* F6 */, { NULL , 0 , 0 } /* F7 */, { NULL , 0 , 0 } /* F8 */, { NULL , 0 , 0 } /* F9 */, { NULL , 0 , 0 } /* FA */, { NULL , 0 , 0 } /* FB */, { NULL , 0 , 0 } /* FC */, { NULL , 0 , 0 } /* FD */, { NULL , 0 , 0 } /* FE */, { NULL , 0 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_dd[0x100] = { { NULL , 0 , 0 } /* 00 */, { NULL , 0 , 0 } /* 01 */, { NULL , 0 , 0 } /* 02 */, { NULL , 0 , 0 } /* 03 */, { NULL , 0 , 0 } /* 04 */, { NULL , 0 , 0 } /* 05 */, { NULL , 0 , 0 } /* 06 */, { NULL , 0 , 0 } /* 07 */, { NULL , 0 , 0 } /* 08 */, { "ADD IX,BC" , 15 , 0 } /* 09 */, { NULL , 0 , 0 } /* 0A */, { NULL , 0 , 0 } /* 0B */, { NULL , 0 , 0 } /* 0C */, { NULL , 0 , 0 } /* 0D */, { NULL , 0 , 0 } /* 0E */, { NULL , 0 , 0 } /* 0F */, { NULL , 0 , 0 } /* 10 */, { NULL , 0 , 0 } /* 11 */, { NULL , 0 , 0 } /* 12 */, { NULL , 0 , 0 } /* 13 */, { NULL , 0 , 0 } /* 14 */, { NULL , 0 , 0 } /* 15 */, { NULL , 0 , 0 } /* 16 */, { NULL , 0 , 0 } /* 17 */, { NULL , 0 , 0 } /* 18 */, { "ADD IX,DE" , 15 , 0 } /* 19 */, { NULL , 0 , 0 } /* 1A */, { NULL , 0 , 0 } /* 1B */, { NULL , 0 , 0 } /* 1C */, { NULL , 0 , 0 } /* 1D */, { NULL , 0 , 0 } /* 1E */, { NULL , 0 , 0 } /* 1F */, { NULL , 0 , 0 } /* 20 */, { "LD IX,@" , 14 , 0 } /* 21 */, { "LD (@),IX" , 20 , 0 } /* 22 */, { "INC IX" , 10 , 0 } /* 23 */, { "INC IXH" , 8 , 0 } /* 24 */, { "DEC IXH" , 8 , 0 } /* 25 */, { "LD IXH,#" , 11 , 0 } /* 26 */, { NULL , 0 , 0 } /* 27 */, { NULL , 0 , 0 } /* 28 */, { "ADD IX,IX" , 15 , 0 } /* 29 */, { "LD IX,(@)" , 20 , 0 } /* 2A */, { "DEC IX" , 10 , 0 } /* 2B */, { "INC IXL" , 8 , 0 } /* 2C */, { "DEC IXL" , 8 , 0 } /* 2D */, { "LD IXL,#" , 11 , 0 } /* 2E */, { NULL , 0 , 0 } /* 2F */, { NULL , 0 , 0 } /* 30 */, { NULL , 0 , 0 } /* 31 */, { NULL , 0 , 0 } /* 32 */, { NULL , 0 , 0 } /* 33 */, { "INC (IX+$)" , 23 , 0 } /* 34 */, { "DEC (IX+$)" , 23 , 0 } /* 35 */, { "LD (IX+$),#" , 19 , 0 } /* 36 */, { NULL , 0 , 0 } /* 37 */, { NULL , 0 , 0 } /* 38 */, { "ADD IX,SP" , 15 , 0 } /* 39 */, { NULL , 0 , 0 } /* 3A */, { NULL , 0 , 0 } /* 3B */, { NULL , 0 , 0 } /* 3C */, { NULL , 0 , 0 } /* 3D */, { NULL , 0 , 0 } /* 3E */, { NULL , 0 , 0 } /* 3F */, { NULL , 0 , 0 } /* 40 */, { NULL , 0 , 0 } /* 41 */, { NULL , 0 , 0 } /* 42 */, { NULL , 0 , 0 } /* 43 */, { "LD B,IXH" , 8 , 0 } /* 44 */, { "LD B,IXL" , 8 , 0 } /* 45 */, { "LD B,(IX+$)" , 19 , 0 } /* 46 */, { NULL , 0 , 0 } /* 47 */, { NULL , 0 , 0 } /* 48 */, { NULL , 0 , 0 } /* 49 */, { NULL , 0 , 0 } /* 4A */, { NULL , 0 , 0 } /* 4B */, { "LD C,IXH" , 8 , 0 } /* 4C */, { "LD C,IXL" , 8 , 0 } /* 4D */, { "LD C,(IX+$)" , 19 , 0 } /* 4E */, { NULL , 0 , 0 } /* 4F */, { NULL , 0 , 0 } /* 50 */, { NULL , 0 , 0 } /* 51 */, { NULL , 0 , 0 } /* 52 */, { NULL , 0 , 0 } /* 53 */, { "LD D,IXH" , 8 , 0 } /* 54 */, { "LD D,IXL" , 8 , 0 } /* 55 */, { "LD D,(IX+$)" , 19 , 0 } /* 56 */, { NULL , 0 , 0 } /* 57 */, { NULL , 0 , 0 } /* 58 */, { NULL , 0 , 0 } /* 59 */, { NULL , 0 , 0 } /* 5A */, { NULL , 0 , 0 } /* 5B */, { "LD E,IXH" , 8 , 0 } /* 5C */, { "LD E,IXL" , 8 , 0 } /* 5D */, { "LD E,(IX+$)" , 19 , 0 } /* 5E */, { NULL , 0 , 0 } /* 5F */, { "LD IXH,B" , 8 , 0 } /* 60 */, { "LD IXH,C" , 8 , 0 } /* 61 */, { "LD IXH,D" , 8 , 0 } /* 62 */, { "LD IXH,E" , 8 , 0 } /* 63 */, { "LD IXH,IXH" , 8 , 0 } /* 64 */, { "LD IXH,IXL" , 8 , 0 } /* 65 */, { "LD H,(IX+$)" , 19 , 0 } /* 66 */, { "LD IXH,A" , 8 , 0 } /* 67 */, { "LD IXL,B" , 8 , 0 } /* 68 */, { "LD IXL,C" , 8 , 0 } /* 69 */, { "LD IXL,D" , 8 , 0 } /* 6A */, { "LD IXL,E" , 8 , 0 } /* 6B */, { "LD IXL,IXH" , 8 , 0 } /* 6C */, { "LD IXL,IXL" , 8 , 0 } /* 6D */, { "LD L,(IX+$)" , 19 , 0 } /* 6E */, { "LD IXL,A" , 8 , 0 } /* 6F */, { "LD (IX+$),B" , 19 , 0 } /* 70 */, { "LD (IX+$),C" , 19 , 0 } /* 71 */, { "LD (IX+$),D" , 19 , 0 } /* 72 */, { "LD (IX+$),E" , 19 , 0 } /* 73 */, { "LD (IX+$),H" , 19 , 0 } /* 74 */, { "LD (IX+$),L" , 19 , 0 } /* 75 */, { NULL , 0 , 0 } /* 76 */, { "LD (IX+$),A" , 19 , 0 } /* 77 */, { NULL , 0 , 0 } /* 78 */, { NULL , 0 , 0 } /* 79 */, { NULL , 0 , 0 } /* 7A */, { NULL , 0 , 0 } /* 7B */, { "LD A,IXH" , 8 , 0 } /* 7C */, { "LD A,IXL" , 8 , 0 } /* 7D */, { "LD A,(IX+$)" , 19 , 0 } /* 7E */, { NULL , 0 , 0 } /* 7F */, { NULL , 0 , 0 } /* 80 */, { NULL , 0 , 0 } /* 81 */, { NULL , 0 , 0 } /* 82 */, { NULL , 0 , 0 } /* 83 */, { "ADD A,IXH" , 8 , 0 } /* 84 */, { "ADD A,IXL" , 8 , 0 } /* 85 */, { "ADD A,(IX+$)" , 19 , 0 } /* 86 */, { NULL , 0 , 0 } /* 87 */, { NULL , 0 , 0 } /* 88 */, { NULL , 0 , 0 } /* 89 */, { NULL , 0 , 0 } /* 8A */, { NULL , 0 , 0 } /* 8B */, { "ADC A,IXH" , 8 , 0 } /* 8C */, { "ADC A,IXL" , 8 , 0 } /* 8D */, { "ADC A,(IX+$)" , 19 , 0 } /* 8E */, { NULL , 0 , 0 } /* 8F */, { NULL , 0 , 0 } /* 90 */, { NULL , 0 , 0 } /* 91 */, { NULL , 0 , 0 } /* 92 */, { NULL , 0 , 0 } /* 93 */, { "SUB IXH" , 8 , 0 } /* 94 */, { "SUB IXL" , 8 , 0 } /* 95 */, { "SUB (IX+$)" , 19 , 0 } /* 96 */, { NULL , 0 , 0 } /* 97 */, { NULL , 0 , 0 } /* 98 */, { NULL , 0 , 0 } /* 99 */, { NULL , 0 , 0 } /* 9A */, { NULL , 0 , 0 } /* 9B */, { "SBC A,IXH" , 8 , 0 } /* 9C */, { "SBC A,IXL" , 8 , 0 } /* 9D */, { "SBC A,(IX+$)" , 19 , 0 } /* 9E */, { NULL , 0 , 0 } /* 9F */, { NULL , 0 , 0 } /* A0 */, { NULL , 0 , 0 } /* A1 */, { NULL , 0 , 0 } /* A2 */, { NULL , 0 , 0 } /* A3 */, { "AND IXH" , 8 , 0 } /* A4 */, { "AND IXL" , 8 , 0 } /* A5 */, { "AND (IX+$)" , 19 , 0 } /* A6 */, { NULL , 0 , 0 } /* A7 */, { NULL , 0 , 0 } /* A8 */, { NULL , 0 , 0 } /* A9 */, { NULL , 0 , 0 } /* AA */, { NULL , 0 , 0 } /* AB */, { "XOR IXH" , 8 , 0 } /* AC */, { "XOR IXL" , 8 , 0 } /* AD */, { "XOR (IX+$)" , 19 , 0 } /* AE */, { NULL , 0 , 0 } /* AF */, { NULL , 0 , 0 } /* B0 */, { NULL , 0 , 0 } /* B1 */, { NULL , 0 , 0 } /* B2 */, { NULL , 0 , 0 } /* B3 */, { "OR IXH" , 8 , 0 } /* B4 */, { "OR IXL" , 8 , 0 } /* B5 */, { "OR (IX+$)" , 19 , 0 } /* B6 */, { NULL , 0 , 0 } /* B7 */, { NULL , 0 , 0 } /* B8 */, { NULL , 0 , 0 } /* B9 */, { NULL , 0 , 0 } /* BA */, { NULL , 0 , 0 } /* BB */, { "CP IXH" , 8 , 0 } /* BC */, { "CP IXL" , 8 , 0 } /* BD */, { "CP (IX+$)" , 19 , 0 } /* BE */, { NULL , 0 , 0 } /* BF */, { NULL , 0 , 0 } /* C0 */, { NULL , 0 , 0 } /* C1 */, { NULL , 0 , 0 } /* C2 */, { NULL , 0 , 0 } /* C3 */, { NULL , 0 , 0 } /* C4 */, { NULL , 0 , 0 } /* C5 */, { NULL , 0 , 0 } /* C6 */, { NULL , 0 , 0 } /* C7 */, { NULL , 0 , 0 } /* C8 */, { NULL , 0 , 0 } /* C9 */, { NULL , 0 , 0 } /* CA */, { "shift CB" , 0 , 0 } /* CB */, { NULL , 0 , 0 } /* CC */, { NULL , 0 , 0 } /* CD */, { NULL , 0 , 0 } /* CE */, { NULL , 0 , 0 } /* CF */, { NULL , 0 , 0 } /* D0 */, { NULL , 0 , 0 } /* D1 */, { NULL , 0 , 0 } /* D2 */, { NULL , 0 , 0 } /* D3 */, { NULL , 0 , 0 } /* D4 */, { NULL , 0 , 0 } /* D5 */, { NULL , 0 , 0 } /* D6 */, { NULL , 0 , 0 } /* D7 */, { NULL , 0 , 0 } /* D8 */, { NULL , 0 , 0 } /* D9 */, { NULL , 0 , 0 } /* DA */, { NULL , 0 , 0 } /* DB */, { NULL , 0 , 0 } /* DC */, { "ignore" , 4 , 0 } /* DD */, { NULL , 0 , 0 } /* DE */, { NULL , 0 , 0 } /* DF */, { NULL , 0 , 0 } /* E0 */, { "POP IX" , 14 , 0 } /* E1 */, { NULL , 0 , 0 } /* E2 */, { "EX (SP),IX" , 23 , 0 } /* E3 */, { NULL , 0 , 0 } /* E4 */, { "PUSH IX" , 15 , 0 } /* E5 */, { NULL , 0 , 0 } /* E6 */, { NULL , 0 , 0 } /* E7 */, { NULL , 0 , 0 } /* E8 */, { "JP IX" , 8 , 0 } /* E9 */, { NULL , 0 , 0 } /* EA */, { NULL , 0 , 0 } /* EB */, { NULL , 0 , 0 } /* EC */, { NULL , 4 , 0 } /* ED */, { NULL , 0 , 0 } /* EE */, { NULL , 0 , 0 } /* EF */, { NULL , 0 , 0 } /* F0 */, { NULL , 0 , 0 } /* F1 */, { NULL , 0 , 0 } /* F2 */, { NULL , 0 , 0 } /* F3 */, { NULL , 0 , 0 } /* F4 */, { NULL , 0 , 0 } /* F5 */, { NULL , 0 , 0 } /* F6 */, { NULL , 0 , 0 } /* F7 */, { NULL , 0 , 0 } /* F8 */, { "LD SP,IX" , 10 , 0 } /* F9 */, { NULL , 0 , 0 } /* FA */, { NULL , 0 , 0 } /* FB */, { NULL , 0 , 0 } /* FC */, { "ignore" , 4 , 0 } /* FD */, { NULL , 0 , 0 } /* FE */, { NULL , 0 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_fd[0x100] = { { NULL , 0 , 0 } /* 00 */, { NULL , 0 , 0 } /* 01 */, { NULL , 0 , 0 } /* 02 */, { NULL , 0 , 0 } /* 03 */, { NULL , 0 , 0 } /* 04 */, { NULL , 0 , 0 } /* 05 */, { NULL , 0 , 0 } /* 06 */, { NULL , 0 , 0 } /* 07 */, { NULL , 0 , 0 } /* 08 */, { "ADD IY,BC" , 15 , 0 } /* 09 */, { NULL , 0 , 0 } /* 0A */, { NULL , 0 , 0 } /* 0B */, { NULL , 0 , 0 } /* 0C */, { NULL , 0 , 0 } /* 0D */, { NULL , 0 , 0 } /* 0E */, { NULL , 0 , 0 } /* 0F */, { NULL , 0 , 0 } /* 10 */, { NULL , 0 , 0 } /* 11 */, { NULL , 0 , 0 } /* 12 */, { NULL , 0 , 0 } /* 13 */, { NULL , 0 , 0 } /* 14 */, { NULL , 0 , 0 } /* 15 */, { NULL , 0 , 0 } /* 16 */, { NULL , 0 , 0 } /* 17 */, { NULL , 0 , 0 } /* 18 */, { "ADD IY,DE" , 15 , 0 } /* 19 */, { NULL , 0 , 0 } /* 1A */, { NULL , 0 , 0 } /* 1B */, { NULL , 0 , 0 } /* 1C */, { NULL , 0 , 0 } /* 1D */, { NULL , 0 , 0 } /* 1E */, { NULL , 0 , 0 } /* 1F */, { NULL , 0 , 0 } /* 20 */, { "LD IY,@" , 14 , 0 } /* 21 */, { "LD (@),IY" , 20 , 0 } /* 22 */, { "INC IY" , 10 , 0 } /* 23 */, { "INC IYH" , 8 , 0 } /* 24 */, { "DEC IYH" , 8 , 0 } /* 25 */, { "LD IYH,#" , 11 , 0 } /* 26 */, { NULL , 0 , 0 } /* 27 */, { NULL , 0 , 0 } /* 28 */, { "ADD IY,IY" , 15 , 0 } /* 29 */, { "LD IY,(@)" , 20 , 0 } /* 2A */, { "DEC IY" , 10 , 0 } /* 2B */, { "INC IYL" , 8 , 0 } /* 2C */, { "DEC IYL" , 8 , 0 } /* 2D */, { "LD IYL,#" , 11 , 0 } /* 2E */, { NULL , 0 , 0 } /* 2F */, { NULL , 0 , 0 } /* 30 */, { NULL , 0 , 0 } /* 31 */, { NULL , 0 , 0 } /* 32 */, { NULL , 0 , 0 } /* 33 */, { "INC (IY+$)" , 23 , 0 } /* 34 */, { "DEC (IY+$)" , 23 , 0 } /* 35 */, { "LD (IY+$),#" , 19 , 0 } /* 36 */, { NULL , 0 , 0 } /* 37 */, { NULL , 0 , 0 } /* 38 */, { "ADD IY,SP" , 15 , 0 } /* 39 */, { NULL , 0 , 0 } /* 3A */, { NULL , 0 , 0 } /* 3B */, { NULL , 0 , 0 } /* 3C */, { NULL , 0 , 0 } /* 3D */, { NULL , 0 , 0 } /* 3E */, { NULL , 0 , 0 } /* 3F */, { NULL , 0 , 0 } /* 40 */, { NULL , 0 , 0 } /* 41 */, { NULL , 0 , 0 } /* 42 */, { NULL , 0 , 0 } /* 43 */, { "LD B,IYH" , 8 , 0 } /* 44 */, { "LD B,IYL" , 8 , 0 } /* 45 */, { "LD B,(IY+$)" , 19 , 0 } /* 46 */, { NULL , 0 , 0 } /* 47 */, { NULL , 0 , 0 } /* 48 */, { NULL , 0 , 0 } /* 49 */, { NULL , 0 , 0 } /* 4A */, { NULL , 0 , 0 } /* 4B */, { "LD C,IYH" , 8 , 0 } /* 4C */, { "LD C,IYL" , 8 , 0 } /* 4D */, { "LD C,(IY+$)" , 19 , 0 } /* 4E */, { NULL , 0 , 0 } /* 4F */, { NULL , 0 , 0 } /* 50 */, { NULL , 0 , 0 } /* 51 */, { NULL , 0 , 0 } /* 52 */, { NULL , 0 , 0 } /* 53 */, { "LD D,IYH" , 8 , 0 } /* 54 */, { "LD D,IYL" , 8 , 0 } /* 55 */, { "LD D,(IY+$)" , 19 , 0 } /* 56 */, { NULL , 0 , 0 } /* 57 */, { NULL , 0 , 0 } /* 58 */, { NULL , 0 , 0 } /* 59 */, { NULL , 0 , 0 } /* 5A */, { NULL , 0 , 0 } /* 5B */, { "LD E,IYH" , 8 , 0 } /* 5C */, { "LD E,IYL" , 8 , 0 } /* 5D */, { "LD E,(IY+$)" , 19 , 0 } /* 5E */, { NULL , 0 , 0 } /* 5F */, { "LD IYH,B" , 8 , 0 } /* 60 */, { "LD IYH,C" , 8 , 0 } /* 61 */, { "LD IYH,D" , 8 , 0 } /* 62 */, { "LD IYH,E" , 8 , 0 } /* 63 */, { "LD IYH,IYH" , 8 , 0 } /* 64 */, { "LD IYH,IYL" , 8 , 0 } /* 65 */, { "LD H,(IY+$)" , 19 , 0 } /* 66 */, { "LD IYH,A" , 8 , 0 } /* 67 */, { "LD IYL,B" , 8 , 0 } /* 68 */, { "LD IYL,C" , 8 , 0 } /* 69 */, { "LD IYL,D" , 8 , 0 } /* 6A */, { "LD IYL,E" , 8 , 0 } /* 6B */, { "LD IYL,IYH" , 8 , 0 } /* 6C */, { "LD IYL,IYL" , 8 , 0 } /* 6D */, { "LD L,(IY+$)" , 19 , 0 } /* 6E */, { "LD IYL,A" , 8 , 0 } /* 6F */, { "LD (IY+$),B" , 19 , 0 } /* 70 */, { "LD (IY+$),C" , 19 , 0 } /* 71 */, { "LD (IY+$),D" , 19 , 0 } /* 72 */, { "LD (IY+$),E" , 19 , 0 } /* 73 */, { "LD (IY+$),H" , 19 , 0 } /* 74 */, { "LD (IY+$),L" , 19 , 0 } /* 75 */, { NULL , 0 , 0 } /* 76 */, { "LD (IY+$),A" , 19 , 0 } /* 77 */, { NULL , 0 , 0 } /* 78 */, { NULL , 0 , 0 } /* 79 */, { NULL , 0 , 0 } /* 7A */, { NULL , 0 , 0 } /* 7B */, { "LD A,IYH" , 8 , 0 } /* 7C */, { "LD A,IYL" , 8 , 0 } /* 7D */, { "LD A,(IY+$)" , 19 , 0 } /* 7E */, { NULL , 0 , 0 } /* 7F */, { NULL , 0 , 0 } /* 80 */, { NULL , 0 , 0 } /* 81 */, { NULL , 0 , 0 } /* 82 */, { NULL , 0 , 0 } /* 83 */, { "ADD A,IYH" , 8 , 0 } /* 84 */, { "ADD A,IYL" , 8 , 0 } /* 85 */, { "ADD A,(IY+$)" , 19 , 0 } /* 86 */, { NULL , 0 , 0 } /* 87 */, { NULL , 0 , 0 } /* 88 */, { NULL , 0 , 0 } /* 89 */, { NULL , 0 , 0 } /* 8A */, { NULL , 0 , 0 } /* 8B */, { "ADC A,IYH" , 8 , 0 } /* 8C */, { "ADC A,IYL" , 8 , 0 } /* 8D */, { "ADC A,(IY+$)" , 19 , 0 } /* 8E */, { NULL , 0 , 0 } /* 8F */, { NULL , 0 , 0 } /* 90 */, { NULL , 0 , 0 } /* 91 */, { NULL , 0 , 0 } /* 92 */, { NULL , 0 , 0 } /* 93 */, { "SUB IYH" , 8 , 0 } /* 94 */, { "SUB IYL" , 8 , 0 } /* 95 */, { "SUB (IY+$)" , 19 , 0 } /* 96 */, { NULL , 0 , 0 } /* 97 */, { NULL , 0 , 0 } /* 98 */, { NULL , 0 , 0 } /* 99 */, { NULL , 0 , 0 } /* 9A */, { NULL , 0 , 0 } /* 9B */, { "SBC A,IYH" , 8 , 0 } /* 9C */, { "SBC A,IYL" , 8 , 0 } /* 9D */, { "SBC A,(IY+$)" , 19 , 0 } /* 9E */, { NULL , 0 , 0 } /* 9F */, { NULL , 0 , 0 } /* A0 */, { NULL , 0 , 0 } /* A1 */, { NULL , 0 , 0 } /* A2 */, { NULL , 0 , 0 } /* A3 */, { "AND IYH" , 8 , 0 } /* A4 */, { "AND IYL" , 8 , 0 } /* A5 */, { "AND (IY+$)" , 19 , 0 } /* A6 */, { NULL , 0 , 0 } /* A7 */, { NULL , 0 , 0 } /* A8 */, { NULL , 0 , 0 } /* A9 */, { NULL , 0 , 0 } /* AA */, { NULL , 0 , 0 } /* AB */, { "XOR IYH" , 8 , 0 } /* AC */, { "XOR IYL" , 8 , 0 } /* AD */, { "XOR (IY+$)" , 19 , 0 } /* AE */, { NULL , 0 , 0 } /* AF */, { NULL , 0 , 0 } /* B0 */, { NULL , 0 , 0 } /* B1 */, { NULL , 0 , 0 } /* B2 */, { NULL , 0 , 0 } /* B3 */, { "OR IYH" , 8 , 0 } /* B4 */, { "OR IYL" , 8 , 0 } /* B5 */, { "OR (IY+$)" , 19 , 0 } /* B6 */, { NULL , 0 , 0 } /* B7 */, { NULL , 0 , 0 } /* B8 */, { NULL , 0 , 0 } /* B9 */, { NULL , 0 , 0 } /* BA */, { NULL , 0 , 0 } /* BB */, { "CP IYH" , 8 , 0 } /* BC */, { "CP IYL" , 8 , 0 } /* BD */, { "CP (IY+$)" , 19 , 0 } /* BE */, { NULL , 0 , 0 } /* BF */, { NULL , 0 , 0 } /* C0 */, { NULL , 0 , 0 } /* C1 */, { NULL , 0 , 0 } /* C2 */, { NULL , 0 , 0 } /* C3 */, { NULL , 0 , 0 } /* C4 */, { NULL , 0 , 0 } /* C5 */, { NULL , 0 , 0 } /* C6 */, { NULL , 0 , 0 } /* C7 */, { NULL , 0 , 0 } /* C8 */, { NULL , 0 , 0 } /* C9 */, { NULL , 0 , 0 } /* CA */, { "shift CB" , 0 , 0 } /* CB */, { NULL , 0 , 0 } /* CC */, { NULL , 0 , 0 } /* CD */, { NULL , 0 , 0 } /* CE */, { NULL , 0 , 0 } /* CF */, { NULL , 0 , 0 } /* D0 */, { NULL , 0 , 0 } /* D1 */, { NULL , 0 , 0 } /* D2 */, { NULL , 0 , 0 } /* D3 */, { NULL , 0 , 0 } /* D4 */, { NULL , 0 , 0 } /* D5 */, { NULL , 0 , 0 } /* D6 */, { NULL , 0 , 0 } /* D7 */, { NULL , 0 , 0 } /* D8 */, { NULL , 0 , 0 } /* D9 */, { NULL , 0 , 0 } /* DA */, { NULL , 0 , 0 } /* DB */, { NULL , 0 , 0 } /* DC */, { "ignore" , 4 , 0 } /* DD */, { NULL , 0 , 0 } /* DE */, { NULL , 0 , 0 } /* DF */, { NULL , 0 , 0 } /* E0 */, { "POP IY" , 14 , 0 } /* E1 */, { NULL , 0 , 0 } /* E2 */, { "EX (SP),IY" , 23 , 0 } /* E3 */, { NULL , 0 , 0 } /* E4 */, { "PUSH IY" , 15 , 0 } /* E5 */, { NULL , 0 , 0 } /* E6 */, { NULL , 0 , 0 } /* E7 */, { NULL , 0 , 0 } /* E8 */, { "JP IY" , 8 , 0 } /* E9 */, { NULL , 0 , 0 } /* EA */, { NULL , 0 , 0 } /* EB */, { NULL , 0 , 0 } /* EC */, { NULL , 4 , 0 } /* ED */, { NULL , 0 , 0 } /* EE */, { NULL , 0 , 0 } /* EF */, { NULL , 0 , 0 } /* F0 */, { NULL , 0 , 0 } /* F1 */, { NULL , 0 , 0 } /* F2 */, { NULL , 0 , 0 } /* F3 */, { NULL , 0 , 0 } /* F4 */, { NULL , 0 , 0 } /* F5 */, { NULL , 0 , 0 } /* F6 */, { NULL , 0 , 0 } /* F7 */, { NULL , 0 , 0 } /* F8 */, { "LD SP,IY" , 10 , 0 } /* F9 */, { NULL , 0 , 0 } /* FA */, { NULL , 0 , 0 } /* FB */, { NULL , 0 , 0 } /* FC */, { "ignore" , 4 , 0 } /* FD */, { NULL , 0 , 0 } /* FE */, { NULL , 0 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_ddcb[0x100] = { { "LD B,RLC (IX+$)" , 23 , 0 } /* 00 */, { "LD C,RLC (IX+$)" , 23 , 0 } /* 01 */, { "LD D,RLC (IX+$)" , 23 , 0 } /* 02 */, { "LD E,RLC (IX+$)" , 23 , 0 } /* 03 */, { "LD H,RLC (IX+$)" , 23 , 0 } /* 04 */, { "LD L,RLC (IX+$)" , 23 , 0 } /* 05 */, { "RLC (IX+$)" , 23 , 0 } /* 06 */, { "LD A,RLC (IX+$)" , 23 , 0 } /* 07 */, { "LD B,RRC (IX+$)" , 23 , 0 } /* 08 */, { "LD C,RRC (IX+$)" , 23 , 0 } /* 09 */, { "LD D,RRC (IX+$)" , 23 , 0 } /* 0A */, { "LD E,RRC (IX+$)" , 23 , 0 } /* 0B */, { "LD H,RRC (IX+$)" , 23 , 0 } /* 0C */, { "LD L,RRC (IX+$)" , 23 , 0 } /* 0D */, { "RRC (IX+$)" , 23 , 0 } /* 0E */, { "LD A,RRC (IX+$)" , 23 , 0 } /* 0F */, { "LD B,RL (IX+$)" , 23 , 0 } /* 10 */, { "LD C,RL (IX+$)" , 23 , 0 } /* 11 */, { "LD D,RL (IX+$)" , 23 , 0 } /* 12 */, { "LD E,RL (IX+$)" , 23 , 0 } /* 13 */, { "LD H,RL (IX+$)" , 23 , 0 } /* 14 */, { "LD L,RL (IX+$)" , 23 , 0 } /* 15 */, { "RL (IX+$)" , 23 , 0 } /* 16 */, { "LD A,RL (IX+$)" , 23 , 0 } /* 17 */, { "LD B,RR (IX+$)" , 23 , 0 } /* 18 */, { "LD C,RR (IX+$)" , 23 , 0 } /* 19 */, { "LD D,RR (IX+$)" , 23 , 0 } /* 1A */, { "LD E,RR (IX+$)" , 23 , 0 } /* 1B */, { "LD H,RR (IX+$)" , 23 , 0 } /* 1C */, { "LD L,RR (IX+$)" , 23 , 0 } /* 1D */, { "RR (IX+$)" , 23 , 0 } /* 1E */, { "LD A,RR (IX+$)" , 23 , 0 } /* 1F */, { "LD B,SLA (IX+$)" , 23 , 0 } /* 20 */, { "LD C,SLA (IX+$)" , 23 , 0 } /* 21 */, { "LD D,SLA (IX+$)" , 23 , 0 } /* 22 */, { "LD E,SLA (IX+$)" , 23 , 0 } /* 23 */, { "LD H,SLA (IX+$)" , 23 , 0 } /* 24 */, { "LD L,SLA (IX+$)" , 23 , 0 } /* 25 */, { "SLA (IX+$)" , 23 , 0 } /* 26 */, { "LD A,SLA (IX+$)" , 23 , 0 } /* 27 */, { "LD B,SRA (IX+$)" , 23 , 0 } /* 28 */, { "LD C,SRA (IX+$)" , 23 , 0 } /* 29 */, { "LD D,SRA (IX+$)" , 23 , 0 } /* 2A */, { "LD E,SRA (IX+$)" , 23 , 0 } /* 2B */, { "LD H,SRA (IX+$)" , 23 , 0 } /* 2C */, { "LD L,SRA (IX+$)" , 23 , 0 } /* 2D */, { "SRA (IX+$)" , 23 , 0 } /* 2E */, { "LD A,SRA (IX+$)" , 23 , 0 } /* 2F */, { "LD B,SLL (IX+$)" , 23 , 0 } /* 30 */, { "LD C,SLL (IX+$)" , 23 , 0 } /* 31 */, { "LD D,SLL (IX+$)" , 23 , 0 } /* 32 */, { "LD E,SLL (IX+$)" , 23 , 0 } /* 33 */, { "LD H,SLL (IX+$)" , 23 , 0 } /* 34 */, { "LD L,SLL (IX+$)" , 23 , 0 } /* 35 */, { "SLL (IX+$)" , 23 , 0 } /* 36 */, { "LD A,SLL (IX+$)" , 23 , 0 } /* 37 */, { "LD B,SRL (IX+$)" , 23 , 0 } /* 38 */, { "LD C,SRL (IX+$)" , 23 , 0 } /* 39 */, { "LD D,SRL (IX+$)" , 23 , 0 } /* 3A */, { "LD E,SRL (IX+$)" , 23 , 0 } /* 3B */, { "LD H,SRL (IX+$)" , 23 , 0 } /* 3C */, { "LD L,SRL (IX+$)" , 23 , 0 } /* 3D */, { "SRL (IX+$)" , 23 , 0 } /* 3E */, { "LD A,SRL (IX+$)" , 23 , 0 } /* 3F */, { "BIT 0,(IX+$)" , 20 , 0 } /* 40 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 41 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 42 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 43 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 44 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 45 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 46 */, { "BIT 0,(IX+$)" , 20 , 0 } /* 47 */, { "BIT 1,(IX+$)" , 20 , 0 } /* 48 */, { "BIT 1,(IX+$)" , 20 , 0 } /* 49 */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4A */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4B */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4C */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4D */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4E */, { "BIT 1,(IX+$)" , 20 , 0 } /* 4F */, { "BIT 2,(IX+$)" , 20 , 0 } /* 50 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 51 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 52 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 53 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 54 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 55 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 56 */, { "BIT 2,(IX+$)" , 20 , 0 } /* 57 */, { "BIT 3,(IX+$)" , 20 , 0 } /* 58 */, { "BIT 3,(IX+$)" , 20 , 0 } /* 59 */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5A */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5B */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5C */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5D */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5E */, { "BIT 3,(IX+$)" , 20 , 0 } /* 5F */, { "BIT 4,(IX+$)" , 20 , 0 } /* 60 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 61 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 62 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 63 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 64 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 65 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 66 */, { "BIT 4,(IX+$)" , 20 , 0 } /* 67 */, { "BIT 5,(IX+$)" , 20 , 0 } /* 68 */, { "BIT 5,(IX+$)" , 20 , 0 } /* 69 */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6A */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6B */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6C */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6D */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6E */, { "BIT 5,(IX+$)" , 20 , 0 } /* 6F */, { "BIT 6,(IX+$)" , 20 , 0 } /* 70 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 71 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 72 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 73 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 74 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 75 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 76 */, { "BIT 6,(IX+$)" , 20 , 0 } /* 77 */, { "BIT 7,(IX+$)" , 20 , 0 } /* 78 */, { "BIT 7,(IX+$)" , 20 , 0 } /* 79 */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7A */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7B */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7C */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7D */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7E */, { "BIT 7,(IX+$)" , 20 , 0 } /* 7F */, { "LD B,RES 0,(IX+$)" , 23 , 0 } /* 80 */, { "LD C,RES 0,(IX+$)" , 23 , 0 } /* 81 */, { "LD D,RES 0,(IX+$)" , 23 , 0 } /* 82 */, { "LD E,RES 0,(IX+$)" , 23 , 0 } /* 83 */, { "LD H,RES 0,(IX+$)" , 23 , 0 } /* 84 */, { "LD L,RES 0,(IX+$)" , 23 , 0 } /* 85 */, { "RES 0,(IX+$)" , 23 , 0 } /* 86 */, { "LD A,RES 0,(IX+$)" , 23 , 0 } /* 87 */, { "LD B,RES 1,(IX+$)" , 23 , 0 } /* 88 */, { "LD C,RES 1,(IX+$)" , 23 , 0 } /* 89 */, { "LD D,RES 1,(IX+$)" , 23 , 0 } /* 8A */, { "LD E,RES 1,(IX+$)" , 23 , 0 } /* 8B */, { "LD H,RES 1,(IX+$)" , 23 , 0 } /* 8C */, { "LD L,RES 1,(IX+$)" , 23 , 0 } /* 8D */, { "RES 1,(IX+$)" , 23 , 0 } /* 8E */, { "LD A,RES 1,(IX+$)" , 23 , 0 } /* 8F */, { "LD B,RES 2,(IX+$)" , 23 , 0 } /* 90 */, { "LD C,RES 2,(IX+$)" , 23 , 0 } /* 91 */, { "LD D,RES 2,(IX+$)" , 23 , 0 } /* 92 */, { "LD E,RES 2,(IX+$)" , 23 , 0 } /* 93 */, { "LD H,RES 2,(IX+$)" , 23 , 0 } /* 94 */, { "LD L,RES 2,(IX+$)" , 23 , 0 } /* 95 */, { "RES 2,(IX+$)" , 23 , 0 } /* 96 */, { "LD A,RES 2,(IX+$)" , 23 , 0 } /* 97 */, { "LD B,RES 3,(IX+$)" , 23 , 0 } /* 98 */, { "LD C,RES 3,(IX+$)" , 23 , 0 } /* 99 */, { "LD D,RES 3,(IX+$)" , 23 , 0 } /* 9A */, { "LD E,RES 3,(IX+$)" , 23 , 0 } /* 9B */, { "LD H,RES 3,(IX+$)" , 23 , 0 } /* 9C */, { "LD L,RES 3,(IX+$)" , 23 , 0 } /* 9D */, { "RES 3,(IX+$)" , 23 , 0 } /* 9E */, { "LD A,RES 3,(IX+$)" , 23 , 0 } /* 9F */, { "LD B,RES 4,(IX+$)" , 23 , 0 } /* A0 */, { "LD C,RES 4,(IX+$)" , 23 , 0 } /* A1 */, { "LD D,RES 4,(IX+$)" , 23 , 0 } /* A2 */, { "LD E,RES 4,(IX+$)" , 23 , 0 } /* A3 */, { "LD H,RES 4,(IX+$)" , 23 , 0 } /* A4 */, { "LD L,RES 4,(IX+$)" , 23 , 0 } /* A5 */, { "RES 4,(IX+$)" , 23 , 0 } /* A6 */, { "LD A,RES 4,(IX+$)" , 23 , 0 } /* A7 */, { "LD B,RES 5,(IX+$)" , 23 , 0 } /* A8 */, { "LD C,RES 5,(IX+$)" , 23 , 0 } /* A9 */, { "LD D,RES 5,(IX+$)" , 23 , 0 } /* AA */, { "LD E,RES 5,(IX+$)" , 23 , 0 } /* AB */, { "LD H,RES 5,(IX+$)" , 23 , 0 } /* AC */, { "LD L,RES 5,(IX+$)" , 23 , 0 } /* AD */, { "RES 5,(IX+$)" , 23 , 0 } /* AE */, { "LD A,RES 5,(IX+$)" , 23 , 0 } /* AF */, { "LD B,RES 6,(IX+$)" , 23 , 0 } /* B0 */, { "LD C,RES 6,(IX+$)" , 23 , 0 } /* B1 */, { "LD D,RES 6,(IX+$)" , 23 , 0 } /* B2 */, { "LD E,RES 6,(IX+$)" , 23 , 0 } /* B3 */, { "LD H,RES 6,(IX+$)" , 23 , 0 } /* B4 */, { "LD L,RES 6,(IX+$)" , 23 , 0 } /* B5 */, { "RES 6,(IX+$)" , 23 , 0 } /* B6 */, { "LD A,RES 6,(IX+$)" , 23 , 0 } /* B7 */, { "LD B,RES 7,(IX+$)" , 23 , 0 } /* B8 */, { "LD C,RES 7,(IX+$)" , 23 , 0 } /* B9 */, { "LD D,RES 7,(IX+$)" , 23 , 0 } /* BA */, { "LD E,RES 7,(IX+$)" , 23 , 0 } /* BB */, { "LD H,RES 7,(IX+$)" , 23 , 0 } /* BC */, { "LD L,RES 7,(IX+$)" , 23 , 0 } /* BD */, { "RES 7,(IX+$)" , 23 , 0 } /* BE */, { "LD A,RES 7,(IX+$)" , 23 , 0 } /* BF */, { "LD B,SET 0,(IX+$)" , 23 , 0 } /* C0 */, { "LD C,SET 0,(IX+$)" , 23 , 0 } /* C1 */, { "LD D,SET 0,(IX+$)" , 23 , 0 } /* C2 */, { "LD E,SET 0,(IX+$)" , 23 , 0 } /* C3 */, { "LD H,SET 0,(IX+$)" , 23 , 0 } /* C4 */, { "LD L,SET 0,(IX+$)" , 23 , 0 } /* C5 */, { "SET 0,(IX+$)" , 23 , 0 } /* C6 */, { "LD A,SET 0,(IX+$)" , 23 , 0 } /* C7 */, { "LD B,SET 1,(IX+$)" , 23 , 0 } /* C8 */, { "LD C,SET 1,(IX+$)" , 23 , 0 } /* C9 */, { "LD D,SET 1,(IX+$)" , 23 , 0 } /* CA */, { "LD E,SET 1,(IX+$)" , 23 , 0 } /* CB */, { "LD H,SET 1,(IX+$)" , 23 , 0 } /* CC */, { "LD L,SET 1,(IX+$)" , 23 , 0 } /* CD */, { "SET 1,(IX+$)" , 23 , 0 } /* CE */, { "LD A,SET 1,(IX+$)" , 23 , 0 } /* CF */, { "LD B,SET 2,(IX+$)" , 23 , 0 } /* D0 */, { "LD C,SET 2,(IX+$)" , 23 , 0 } /* D1 */, { "LD D,SET 2,(IX+$)" , 23 , 0 } /* D2 */, { "LD E,SET 2,(IX+$)" , 23 , 0 } /* D3 */, { "LD H,SET 2,(IX+$)" , 23 , 0 } /* D4 */, { "LD L,SET 2,(IX+$)" , 23 , 0 } /* D5 */, { "SET 2,(IX+$)" , 23 , 0 } /* D6 */, { "LD A,SET 2,(IX+$)" , 23 , 0 } /* D7 */, { "LD B,SET 3,(IX+$)" , 23 , 0 } /* D8 */, { "LD C,SET 3,(IX+$)" , 23 , 0 } /* D9 */, { "LD D,SET 3,(IX+$)" , 23 , 0 } /* DA */, { "LD E,SET 3,(IX+$)" , 23 , 0 } /* DB */, { "LD H,SET 3,(IX+$)" , 23 , 0 } /* DC */, { "LD L,SET 3,(IX+$)" , 23 , 0 } /* DD */, { "SET 3,(IX+$)" , 23 , 0 } /* DE */, { "LD A,SET 3,(IX+$)" , 23 , 0 } /* DF */, { "LD B,SET 4,(IX+$)" , 23 , 0 } /* E0 */, { "LD C,SET 4,(IX+$)" , 23 , 0 } /* E1 */, { "LD D,SET 4,(IX+$)" , 23 , 0 } /* E2 */, { "LD E,SET 4,(IX+$)" , 23 , 0 } /* E3 */, { "LD H,SET 4,(IX+$)" , 23 , 0 } /* E4 */, { "LD L,SET 4,(IX+$)" , 23 , 0 } /* E5 */, { "SET 4,(IX+$)" , 23 , 0 } /* E6 */, { "LD A,SET 4,(IX+$)" , 23 , 0 } /* E7 */, { "LD B,SET 5,(IX+$)" , 23 , 0 } /* E8 */, { "LD C,SET 5,(IX+$)" , 23 , 0 } /* E9 */, { "LD D,SET 5,(IX+$)" , 23 , 0 } /* EA */, { "LD E,SET 5,(IX+$)" , 23 , 0 } /* EB */, { "LD H,SET 5,(IX+$)" , 23 , 0 } /* EC */, { "LD L,SET 5,(IX+$)" , 23 , 0 } /* ED */, { "SET 5,(IX+$)" , 23 , 0 } /* EE */, { "LD A,SET 5,(IX+$)" , 23 , 0 } /* EF */, { "LD B,SET 6,(IX+$)" , 23 , 0 } /* F0 */, { "LD C,SET 6,(IX+$)" , 23 , 0 } /* F1 */, { "LD D,SET 6,(IX+$)" , 23 , 0 } /* F2 */, { "LD E,SET 6,(IX+$)" , 23 , 0 } /* F3 */, { "LD H,SET 6,(IX+$)" , 23 , 0 } /* F4 */, { "LD L,SET 6,(IX+$)" , 23 , 0 } /* F5 */, { "SET 6,(IX+$)" , 23 , 0 } /* F6 */, { "LD A,SET 6,(IX+$)" , 23 , 0 } /* F7 */, { "LD B,SET 7,(IX+$)" , 23 , 0 } /* F8 */, { "LD C,SET 7,(IX+$)" , 23 , 0 } /* F9 */, { "LD D,SET 7,(IX+$)" , 23 , 0 } /* FA */, { "LD E,SET 7,(IX+$)" , 23 , 0 } /* FB */, { "LD H,SET 7,(IX+$)" , 23 , 0 } /* FC */, { "LD L,SET 7,(IX+$)" , 23 , 0 } /* FD */, { "SET 7,(IX+$)" , 23 , 0 } /* FE */, { "LD A,SET 7,(IX+$)" , 23 , 0 } /* FF */ }; /**/ static const z80ex_opc_dasm dasm_fdcb[0x100] = { { "LD B,RLC (IY+$)" , 23 , 0 } /* 00 */, { "LD C,RLC (IY+$)" , 23 , 0 } /* 01 */, { "LD D,RLC (IY+$)" , 23 , 0 } /* 02 */, { "LD E,RLC (IY+$)" , 23 , 0 } /* 03 */, { "LD H,RLC (IY+$)" , 23 , 0 } /* 04 */, { "LD L,RLC (IY+$)" , 23 , 0 } /* 05 */, { "RLC (IY+$)" , 23 , 0 } /* 06 */, { "LD A,RLC (IY+$)" , 23 , 0 } /* 07 */, { "LD B,RRC (IY+$)" , 23 , 0 } /* 08 */, { "LD C,RRC (IY+$)" , 23 , 0 } /* 09 */, { "LD D,RRC (IY+$)" , 23 , 0 } /* 0A */, { "LD E,RRC (IY+$)" , 23 , 0 } /* 0B */, { "LD H,RRC (IY+$)" , 23 , 0 } /* 0C */, { "LD L,RRC (IY+$)" , 23 , 0 } /* 0D */, { "RRC (IY+$)" , 23 , 0 } /* 0E */, { "LD A,RRC (IY+$)" , 23 , 0 } /* 0F */, { "LD B,RL (IY+$)" , 23 , 0 } /* 10 */, { "LD C,RL (IY+$)" , 23 , 0 } /* 11 */, { "LD D,RL (IY+$)" , 23 , 0 } /* 12 */, { "LD E,RL (IY+$)" , 23 , 0 } /* 13 */, { "LD H,RL (IY+$)" , 23 , 0 } /* 14 */, { "LD L,RL (IY+$)" , 23 , 0 } /* 15 */, { "RL (IY+$)" , 23 , 0 } /* 16 */, { "LD A,RL (IY+$)" , 23 , 0 } /* 17 */, { "LD B,RR (IY+$)" , 23 , 0 } /* 18 */, { "LD C,RR (IY+$)" , 23 , 0 } /* 19 */, { "LD D,RR (IY+$)" , 23 , 0 } /* 1A */, { "LD E,RR (IY+$)" , 23 , 0 } /* 1B */, { "LD H,RR (IY+$)" , 23 , 0 } /* 1C */, { "LD L,RR (IY+$)" , 23 , 0 } /* 1D */, { "RR (IY+$)" , 23 , 0 } /* 1E */, { "LD A,RR (IY+$)" , 23 , 0 } /* 1F */, { "LD B,SLA (IY+$)" , 23 , 0 } /* 20 */, { "LD C,SLA (IY+$)" , 23 , 0 } /* 21 */, { "LD D,SLA (IY+$)" , 23 , 0 } /* 22 */, { "LD E,SLA (IY+$)" , 23 , 0 } /* 23 */, { "LD H,SLA (IY+$)" , 23 , 0 } /* 24 */, { "LD L,SLA (IY+$)" , 23 , 0 } /* 25 */, { "SLA (IY+$)" , 23 , 0 } /* 26 */, { "LD A,SLA (IY+$)" , 23 , 0 } /* 27 */, { "LD B,SRA (IY+$)" , 23 , 0 } /* 28 */, { "LD C,SRA (IY+$)" , 23 , 0 } /* 29 */, { "LD D,SRA (IY+$)" , 23 , 0 } /* 2A */, { "LD E,SRA (IY+$)" , 23 , 0 } /* 2B */, { "LD H,SRA (IY+$)" , 23 , 0 } /* 2C */, { "LD L,SRA (IY+$)" , 23 , 0 } /* 2D */, { "SRA (IY+$)" , 23 , 0 } /* 2E */, { "LD A,SRA (IY+$)" , 23 , 0 } /* 2F */, { "LD B,SLL (IY+$)" , 23 , 0 } /* 30 */, { "LD C,SLL (IY+$)" , 23 , 0 } /* 31 */, { "LD D,SLL (IY+$)" , 23 , 0 } /* 32 */, { "LD E,SLL (IY+$)" , 23 , 0 } /* 33 */, { "LD H,SLL (IY+$)" , 23 , 0 } /* 34 */, { "LD L,SLL (IY+$)" , 23 , 0 } /* 35 */, { "SLL (IY+$)" , 23 , 0 } /* 36 */, { "LD A,SLL (IY+$)" , 23 , 0 } /* 37 */, { "LD B,SRL (IY+$)" , 23 , 0 } /* 38 */, { "LD C,SRL (IY+$)" , 23 , 0 } /* 39 */, { "LD D,SRL (IY+$)" , 23 , 0 } /* 3A */, { "LD E,SRL (IY+$)" , 23 , 0 } /* 3B */, { "LD H,SRL (IY+$)" , 23 , 0 } /* 3C */, { "LD L,SRL (IY+$)" , 23 , 0 } /* 3D */, { "SRL (IY+$)" , 23 , 0 } /* 3E */, { "LD A,SRL (IY+$)" , 23 , 0 } /* 3F */, { "BIT 0,(IY+$)" , 20 , 0 } /* 40 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 41 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 42 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 43 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 44 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 45 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 46 */, { "BIT 0,(IY+$)" , 20 , 0 } /* 47 */, { "BIT 1,(IY+$)" , 20 , 0 } /* 48 */, { "BIT 1,(IY+$)" , 20 , 0 } /* 49 */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4A */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4B */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4C */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4D */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4E */, { "BIT 1,(IY+$)" , 20 , 0 } /* 4F */, { "BIT 2,(IY+$)" , 20 , 0 } /* 50 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 51 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 52 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 53 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 54 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 55 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 56 */, { "BIT 2,(IY+$)" , 20 , 0 } /* 57 */, { "BIT 3,(IY+$)" , 20 , 0 } /* 58 */, { "BIT 3,(IY+$)" , 20 , 0 } /* 59 */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5A */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5B */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5C */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5D */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5E */, { "BIT 3,(IY+$)" , 20 , 0 } /* 5F */, { "BIT 4,(IY+$)" , 20 , 0 } /* 60 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 61 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 62 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 63 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 64 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 65 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 66 */, { "BIT 4,(IY+$)" , 20 , 0 } /* 67 */, { "BIT 5,(IY+$)" , 20 , 0 } /* 68 */, { "BIT 5,(IY+$)" , 20 , 0 } /* 69 */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6A */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6B */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6C */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6D */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6E */, { "BIT 5,(IY+$)" , 20 , 0 } /* 6F */, { "BIT 6,(IY+$)" , 20 , 0 } /* 70 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 71 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 72 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 73 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 74 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 75 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 76 */, { "BIT 6,(IY+$)" , 20 , 0 } /* 77 */, { "BIT 7,(IY+$)" , 20 , 0 } /* 78 */, { "BIT 7,(IY+$)" , 20 , 0 } /* 79 */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7A */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7B */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7C */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7D */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7E */, { "BIT 7,(IY+$)" , 20 , 0 } /* 7F */, { "LD B,RES 0,(IY+$)" , 23 , 0 } /* 80 */, { "LD C,RES 0,(IY+$)" , 23 , 0 } /* 81 */, { "LD D,RES 0,(IY+$)" , 23 , 0 } /* 82 */, { "LD E,RES 0,(IY+$)" , 23 , 0 } /* 83 */, { "LD H,RES 0,(IY+$)" , 23 , 0 } /* 84 */, { "LD L,RES 0,(IY+$)" , 23 , 0 } /* 85 */, { "RES 0,(IY+$)" , 23 , 0 } /* 86 */, { "LD A,RES 0,(IY+$)" , 23 , 0 } /* 87 */, { "LD B,RES 1,(IY+$)" , 23 , 0 } /* 88 */, { "LD C,RES 1,(IY+$)" , 23 , 0 } /* 89 */, { "LD D,RES 1,(IY+$)" , 23 , 0 } /* 8A */, { "LD E,RES 1,(IY+$)" , 23 , 0 } /* 8B */, { "LD H,RES 1,(IY+$)" , 23 , 0 } /* 8C */, { "LD L,RES 1,(IY+$)" , 23 , 0 } /* 8D */, { "RES 1,(IY+$)" , 23 , 0 } /* 8E */, { "LD A,RES 1,(IY+$)" , 23 , 0 } /* 8F */, { "LD B,RES 2,(IY+$)" , 23 , 0 } /* 90 */, { "LD C,RES 2,(IY+$)" , 23 , 0 } /* 91 */, { "LD D,RES 2,(IY+$)" , 23 , 0 } /* 92 */, { "LD E,RES 2,(IY+$)" , 23 , 0 } /* 93 */, { "LD H,RES 2,(IY+$)" , 23 , 0 } /* 94 */, { "LD L,RES 2,(IY+$)" , 23 , 0 } /* 95 */, { "RES 2,(IY+$)" , 23 , 0 } /* 96 */, { "LD A,RES 2,(IY+$)" , 23 , 0 } /* 97 */, { "LD B,RES 3,(IY+$)" , 23 , 0 } /* 98 */, { "LD C,RES 3,(IY+$)" , 23 , 0 } /* 99 */, { "LD D,RES 3,(IY+$)" , 23 , 0 } /* 9A */, { "LD E,RES 3,(IY+$)" , 23 , 0 } /* 9B */, { "LD H,RES 3,(IY+$)" , 23 , 0 } /* 9C */, { "LD L,RES 3,(IY+$)" , 23 , 0 } /* 9D */, { "RES 3,(IY+$)" , 23 , 0 } /* 9E */, { "LD A,RES 3,(IY+$)" , 23 , 0 } /* 9F */, { "LD B,RES 4,(IY+$)" , 23 , 0 } /* A0 */, { "LD C,RES 4,(IY+$)" , 23 , 0 } /* A1 */, { "LD D,RES 4,(IY+$)" , 23 , 0 } /* A2 */, { "LD E,RES 4,(IY+$)" , 23 , 0 } /* A3 */, { "LD H,RES 4,(IY+$)" , 23 , 0 } /* A4 */, { "LD L,RES 4,(IY+$)" , 23 , 0 } /* A5 */, { "RES 4,(IY+$)" , 23 , 0 } /* A6 */, { "LD A,RES 4,(IY+$)" , 23 , 0 } /* A7 */, { "LD B,RES 5,(IY+$)" , 23 , 0 } /* A8 */, { "LD C,RES 5,(IY+$)" , 23 , 0 } /* A9 */, { "LD D,RES 5,(IY+$)" , 23 , 0 } /* AA */, { "LD E,RES 5,(IY+$)" , 23 , 0 } /* AB */, { "LD H,RES 5,(IY+$)" , 23 , 0 } /* AC */, { "LD L,RES 5,(IY+$)" , 23 , 0 } /* AD */, { "RES 5,(IY+$)" , 23 , 0 } /* AE */, { "LD A,RES 5,(IY+$)" , 23 , 0 } /* AF */, { "LD B,RES 6,(IY+$)" , 23 , 0 } /* B0 */, { "LD C,RES 6,(IY+$)" , 23 , 0 } /* B1 */, { "LD D,RES 6,(IY+$)" , 23 , 0 } /* B2 */, { "LD E,RES 6,(IY+$)" , 23 , 0 } /* B3 */, { "LD H,RES 6,(IY+$)" , 23 , 0 } /* B4 */, { "LD L,RES 6,(IY+$)" , 23 , 0 } /* B5 */, { "RES 6,(IY+$)" , 23 , 0 } /* B6 */, { "LD A,RES 6,(IY+$)" , 23 , 0 } /* B7 */, { "LD B,RES 7,(IY+$)" , 23 , 0 } /* B8 */, { "LD C,RES 7,(IY+$)" , 23 , 0 } /* B9 */, { "LD D,RES 7,(IY+$)" , 23 , 0 } /* BA */, { "LD E,RES 7,(IY+$)" , 23 , 0 } /* BB */, { "LD H,RES 7,(IY+$)" , 23 , 0 } /* BC */, { "LD L,RES 7,(IY+$)" , 23 , 0 } /* BD */, { "RES 7,(IY+$)" , 23 , 0 } /* BE */, { "LD A,RES 7,(IY+$)" , 23 , 0 } /* BF */, { "LD B,SET 0,(IY+$)" , 23 , 0 } /* C0 */, { "LD C,SET 0,(IY+$)" , 23 , 0 } /* C1 */, { "LD D,SET 0,(IY+$)" , 23 , 0 } /* C2 */, { "LD E,SET 0,(IY+$)" , 23 , 0 } /* C3 */, { "LD H,SET 0,(IY+$)" , 23 , 0 } /* C4 */, { "LD L,SET 0,(IY+$)" , 23 , 0 } /* C5 */, { "SET 0,(IY+$)" , 23 , 0 } /* C6 */, { "LD A,SET 0,(IY+$)" , 23 , 0 } /* C7 */, { "LD B,SET 1,(IY+$)" , 23 , 0 } /* C8 */, { "LD C,SET 1,(IY+$)" , 23 , 0 } /* C9 */, { "LD D,SET 1,(IY+$)" , 23 , 0 } /* CA */, { "LD E,SET 1,(IY+$)" , 23 , 0 } /* CB */, { "LD H,SET 1,(IY+$)" , 23 , 0 } /* CC */, { "LD L,SET 1,(IY+$)" , 23 , 0 } /* CD */, { "SET 1,(IY+$)" , 23 , 0 } /* CE */, { "LD A,SET 1,(IY+$)" , 23 , 0 } /* CF */, { "LD B,SET 2,(IY+$)" , 23 , 0 } /* D0 */, { "LD C,SET 2,(IY+$)" , 23 , 0 } /* D1 */, { "LD D,SET 2,(IY+$)" , 23 , 0 } /* D2 */, { "LD E,SET 2,(IY+$)" , 23 , 0 } /* D3 */, { "LD H,SET 2,(IY+$)" , 23 , 0 } /* D4 */, { "LD L,SET 2,(IY+$)" , 23 , 0 } /* D5 */, { "SET 2,(IY+$)" , 23 , 0 } /* D6 */, { "LD A,SET 2,(IY+$)" , 23 , 0 } /* D7 */, { "LD B,SET 3,(IY+$)" , 23 , 0 } /* D8 */, { "LD C,SET 3,(IY+$)" , 23 , 0 } /* D9 */, { "LD D,SET 3,(IY+$)" , 23 , 0 } /* DA */, { "LD E,SET 3,(IY+$)" , 23 , 0 } /* DB */, { "LD H,SET 3,(IY+$)" , 23 , 0 } /* DC */, { "LD L,SET 3,(IY+$)" , 23 , 0 } /* DD */, { "SET 3,(IY+$)" , 23 , 0 } /* DE */, { "LD A,SET 3,(IY+$)" , 23 , 0 } /* DF */, { "LD B,SET 4,(IY+$)" , 23 , 0 } /* E0 */, { "LD C,SET 4,(IY+$)" , 23 , 0 } /* E1 */, { "LD D,SET 4,(IY+$)" , 23 , 0 } /* E2 */, { "LD E,SET 4,(IY+$)" , 23 , 0 } /* E3 */, { "LD H,SET 4,(IY+$)" , 23 , 0 } /* E4 */, { "LD L,SET 4,(IY+$)" , 23 , 0 } /* E5 */, { "SET 4,(IY+$)" , 23 , 0 } /* E6 */, { "LD A,SET 4,(IY+$)" , 23 , 0 } /* E7 */, { "LD B,SET 5,(IY+$)" , 23 , 0 } /* E8 */, { "LD C,SET 5,(IY+$)" , 23 , 0 } /* E9 */, { "LD D,SET 5,(IY+$)" , 23 , 0 } /* EA */, { "LD E,SET 5,(IY+$)" , 23 , 0 } /* EB */, { "LD H,SET 5,(IY+$)" , 23 , 0 } /* EC */, { "LD L,SET 5,(IY+$)" , 23 , 0 } /* ED */, { "SET 5,(IY+$)" , 23 , 0 } /* EE */, { "LD A,SET 5,(IY+$)" , 23 , 0 } /* EF */, { "LD B,SET 6,(IY+$)" , 23 , 0 } /* F0 */, { "LD C,SET 6,(IY+$)" , 23 , 0 } /* F1 */, { "LD D,SET 6,(IY+$)" , 23 , 0 } /* F2 */, { "LD E,SET 6,(IY+$)" , 23 , 0 } /* F3 */, { "LD H,SET 6,(IY+$)" , 23 , 0 } /* F4 */, { "LD L,SET 6,(IY+$)" , 23 , 0 } /* F5 */, { "SET 6,(IY+$)" , 23 , 0 } /* F6 */, { "LD A,SET 6,(IY+$)" , 23 , 0 } /* F7 */, { "LD B,SET 7,(IY+$)" , 23 , 0 } /* F8 */, { "LD C,SET 7,(IY+$)" , 23 , 0 } /* F9 */, { "LD D,SET 7,(IY+$)" , 23 , 0 } /* FA */, { "LD E,SET 7,(IY+$)" , 23 , 0 } /* FB */, { "LD H,SET 7,(IY+$)" , 23 , 0 } /* FC */, { "LD L,SET 7,(IY+$)" , 23 , 0 } /* FD */, { "SET 7,(IY+$)" , 23 , 0 } /* FE */, { "LD A,SET 7,(IY+$)" , 23 , 0 } /* FF */ };