2 Skelton for retropc emulator
5 Author : Takeda.Toshiya
11 #include "i8080_base.h"
12 #include "i8080_regdef.h"
16 const int I8080_BASE::cc_op_8085[0x100] = {
18 4,10, 7, 6, 4, 4, 7, 4,10,10, 7, 6, 4, 4, 7, 4, 7,10, 7, 6, 4, 4, 7, 4,10,10, 7, 6, 4, 4, 7, 4,
19 7,10,16, 6, 4, 4, 7, 4,10,10,16, 6, 4, 4, 7, 4, 7,10,13, 6,10,10,10, 4,10,10,13, 6, 4, 4, 7, 4,
20 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
21 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 7, 7, 7, 7, 7, 7, 5, 7, 4, 4, 4, 4, 4, 4, 7, 4,
22 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
23 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
24 6,10,10,10,11,12, 7,12, 6,10,10, 0,11,17, 7,12, 6,10,10,10,11,12, 7,12, 6,10,10,10,11, 7, 7,12,
25 6,10,10,16,11,12, 7,12, 6, 6,10, 6,11,10, 7,12, 6,10,10, 4,11,12, 7,12, 6, 6,10, 4,11, 7, 7,12
28 const int I8080_BASE::cc_op_8080[0x100] = {
30 4,10, 7, 5, 5, 5, 7, 4, 4,10, 7, 5, 5, 5, 7, 4, 4,10, 7, 5, 5, 5, 7, 4, 4,10, 7, 5, 5, 5, 7, 4,
31 4,10,16, 5, 5, 5, 7, 4, 4,10,16, 5, 5, 5, 7, 4, 4,10,13, 5,10,10,10, 4, 4,10,13, 5, 5, 5, 7, 4,
32 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5,
33 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 7, 5,
34 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
35 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4,
36 5,10,10,10,11,11, 7,11, 5,10,10,10,11,17, 7,11, 5,10,10,10,11,11, 7,11, 5,10,10,10,11,17, 7,11,
37 5,10,10,18,11,11, 7,11, 5, 5,10, 5,11,17, 7,11, 5,10,10, 4,11,11, 7,11, 5, 5,10, 4,11,17, 7,11
41 const uint8_t I8080_BASE::ZS[256] = {
42 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
43 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
44 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
45 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
46 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
47 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
48 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
49 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
50 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
51 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
52 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
53 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
54 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
55 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
56 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
57 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80
60 const uint8_t I8080_BASE::ZSP[256] = {
61 0x44,0x00,0x00,0x04,0x00,0x04,0x04,0x00,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,
62 0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,
63 0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,
64 0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,
65 0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,
66 0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,
67 0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,
68 0x00,0x04,0x04,0x00,0x04,0x00,0x00,0x04,0x04,0x00,0x00,0x04,0x00,0x04,0x04,0x00,
69 0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,
70 0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,
71 0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,
72 0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,
73 0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,
74 0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,
75 0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84,0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,
76 0x84,0x80,0x80,0x84,0x80,0x84,0x84,0x80,0x80,0x84,0x84,0x80,0x84,0x80,0x80,0x84
79 const uint16_t I8080_BASE::DAA[2048] = {
80 0x0044,0x0100,0x0200,0x0304,0x0400,0x0504,0x0604,0x0700,0x0808,0x090c,0x1010,0x1114,0x1214,0x1310,0x1414,0x1510,
81 0x1000,0x1104,0x1204,0x1300,0x1404,0x1500,0x1600,0x1704,0x180c,0x1908,0x2030,0x2134,0x2234,0x2330,0x2434,0x2530,
82 0x2020,0x2124,0x2224,0x2320,0x2424,0x2520,0x2620,0x2724,0x282c,0x2928,0x3034,0x3130,0x3230,0x3334,0x3430,0x3534,
83 0x3024,0x3120,0x3220,0x3324,0x3420,0x3524,0x3624,0x3720,0x3828,0x392c,0x4010,0x4114,0x4214,0x4310,0x4414,0x4510,
84 0x4000,0x4104,0x4204,0x4300,0x4404,0x4500,0x4600,0x4704,0x480c,0x4908,0x5014,0x5110,0x5210,0x5314,0x5410,0x5514,
85 0x5004,0x5100,0x5200,0x5304,0x5400,0x5504,0x5604,0x5700,0x5808,0x590c,0x6034,0x6130,0x6230,0x6334,0x6430,0x6534,
86 0x6024,0x6120,0x6220,0x6324,0x6420,0x6524,0x6624,0x6720,0x6828,0x692c,0x7030,0x7134,0x7234,0x7330,0x7434,0x7530,
87 0x7020,0x7124,0x7224,0x7320,0x7424,0x7520,0x7620,0x7724,0x782c,0x7928,0x8090,0x8194,0x8294,0x8390,0x8494,0x8590,
88 0x8080,0x8184,0x8284,0x8380,0x8484,0x8580,0x8680,0x8784,0x888c,0x8988,0x9094,0x9190,0x9290,0x9394,0x9490,0x9594,
89 0x9084,0x9180,0x9280,0x9384,0x9480,0x9584,0x9684,0x9780,0x9888,0x998c,0x0055,0x0111,0x0211,0x0315,0x0411,0x0515,
90 0x0045,0x0101,0x0201,0x0305,0x0401,0x0505,0x0605,0x0701,0x0809,0x090d,0x1011,0x1115,0x1215,0x1311,0x1415,0x1511,
91 0x1001,0x1105,0x1205,0x1301,0x1405,0x1501,0x1601,0x1705,0x180d,0x1909,0x2031,0x2135,0x2235,0x2331,0x2435,0x2531,
92 0x2021,0x2125,0x2225,0x2321,0x2425,0x2521,0x2621,0x2725,0x282d,0x2929,0x3035,0x3131,0x3231,0x3335,0x3431,0x3535,
93 0x3025,0x3121,0x3221,0x3325,0x3421,0x3525,0x3625,0x3721,0x3829,0x392d,0x4011,0x4115,0x4215,0x4311,0x4415,0x4511,
94 0x4001,0x4105,0x4205,0x4301,0x4405,0x4501,0x4601,0x4705,0x480d,0x4909,0x5015,0x5111,0x5211,0x5315,0x5411,0x5515,
95 0x5005,0x5101,0x5201,0x5305,0x5401,0x5505,0x5605,0x5701,0x5809,0x590d,0x6035,0x6131,0x6231,0x6335,0x6431,0x6535,
96 0x6025,0x6121,0x6221,0x6325,0x6421,0x6525,0x6625,0x6721,0x6829,0x692d,0x7031,0x7135,0x7235,0x7331,0x7435,0x7531,
97 0x7021,0x7125,0x7225,0x7321,0x7425,0x7521,0x7621,0x7725,0x782d,0x7929,0x8091,0x8195,0x8295,0x8391,0x8495,0x8591,
98 0x8081,0x8185,0x8285,0x8381,0x8485,0x8581,0x8681,0x8785,0x888d,0x8989,0x9095,0x9191,0x9291,0x9395,0x9491,0x9595,
99 0x9085,0x9181,0x9281,0x9385,0x9481,0x9585,0x9685,0x9781,0x9889,0x998d,0xa0b5,0xa1b1,0xa2b1,0xa3b5,0xa4b1,0xa5b5,
100 0xa0a5,0xa1a1,0xa2a1,0xa3a5,0xa4a1,0xa5a5,0xa6a5,0xa7a1,0xa8a9,0xa9ad,0xb0b1,0xb1b5,0xb2b5,0xb3b1,0xb4b5,0xb5b1,
101 0xb0a1,0xb1a5,0xb2a5,0xb3a1,0xb4a5,0xb5a1,0xb6a1,0xb7a5,0xb8ad,0xb9a9,0xc095,0xc191,0xc291,0xc395,0xc491,0xc595,
102 0xc085,0xc181,0xc281,0xc385,0xc481,0xc585,0xc685,0xc781,0xc889,0xc98d,0xd091,0xd195,0xd295,0xd391,0xd495,0xd591,
103 0xd081,0xd185,0xd285,0xd381,0xd485,0xd581,0xd681,0xd785,0xd88d,0xd989,0xe0b1,0xe1b5,0xe2b5,0xe3b1,0xe4b5,0xe5b1,
104 0xe0a1,0xe1a5,0xe2a5,0xe3a1,0xe4a5,0xe5a1,0xe6a1,0xe7a5,0xe8ad,0xe9a9,0xf0b5,0xf1b1,0xf2b1,0xf3b5,0xf4b1,0xf5b5,
105 0xf0a5,0xf1a1,0xf2a1,0xf3a5,0xf4a1,0xf5a5,0xf6a5,0xf7a1,0xf8a9,0xf9ad,0x0055,0x0111,0x0211,0x0315,0x0411,0x0515,
106 0x0045,0x0101,0x0201,0x0305,0x0401,0x0505,0x0605,0x0701,0x0809,0x090d,0x1011,0x1115,0x1215,0x1311,0x1415,0x1511,
107 0x1001,0x1105,0x1205,0x1301,0x1405,0x1501,0x1601,0x1705,0x180d,0x1909,0x2031,0x2135,0x2235,0x2331,0x2435,0x2531,
108 0x2021,0x2125,0x2225,0x2321,0x2425,0x2521,0x2621,0x2725,0x282d,0x2929,0x3035,0x3131,0x3231,0x3335,0x3431,0x3535,
109 0x3025,0x3121,0x3221,0x3325,0x3421,0x3525,0x3625,0x3721,0x3829,0x392d,0x4011,0x4115,0x4215,0x4311,0x4415,0x4511,
110 0x4001,0x4105,0x4205,0x4301,0x4405,0x4501,0x4601,0x4705,0x480d,0x4909,0x5015,0x5111,0x5211,0x5315,0x5411,0x5515,
111 0x5005,0x5101,0x5201,0x5305,0x5401,0x5505,0x5605,0x5701,0x5809,0x590d,0x6035,0x6131,0x6231,0x6335,0x6431,0x6535,
112 0x0604,0x0700,0x0808,0x090c,0x0a0c,0x0b08,0x0c0c,0x0d08,0x0e08,0x0f0c,0x1010,0x1114,0x1214,0x1310,0x1414,0x1510,
113 0x1600,0x1704,0x180c,0x1908,0x1a08,0x1b0c,0x1c08,0x1d0c,0x1e0c,0x1f08,0x2030,0x2134,0x2234,0x2330,0x2434,0x2530,
114 0x2620,0x2724,0x282c,0x2928,0x2a28,0x2b2c,0x2c28,0x2d2c,0x2e2c,0x2f28,0x3034,0x3130,0x3230,0x3334,0x3430,0x3534,
115 0x3624,0x3720,0x3828,0x392c,0x3a2c,0x3b28,0x3c2c,0x3d28,0x3e28,0x3f2c,0x4010,0x4114,0x4214,0x4310,0x4414,0x4510,
116 0x4600,0x4704,0x480c,0x4908,0x4a08,0x4b0c,0x4c08,0x4d0c,0x4e0c,0x4f08,0x5014,0x5110,0x5210,0x5314,0x5410,0x5514,
117 0x5604,0x5700,0x5808,0x590c,0x5a0c,0x5b08,0x5c0c,0x5d08,0x5e08,0x5f0c,0x6034,0x6130,0x6230,0x6334,0x6430,0x6534,
118 0x6624,0x6720,0x6828,0x692c,0x6a2c,0x6b28,0x6c2c,0x6d28,0x6e28,0x6f2c,0x7030,0x7134,0x7234,0x7330,0x7434,0x7530,
119 0x7620,0x7724,0x782c,0x7928,0x7a28,0x7b2c,0x7c28,0x7d2c,0x7e2c,0x7f28,0x8090,0x8194,0x8294,0x8390,0x8494,0x8590,
120 0x8680,0x8784,0x888c,0x8988,0x8a88,0x8b8c,0x8c88,0x8d8c,0x8e8c,0x8f88,0x9094,0x9190,0x9290,0x9394,0x9490,0x9594,
121 0x9684,0x9780,0x9888,0x998c,0x9a8c,0x9b88,0x9c8c,0x9d88,0x9e88,0x9f8c,0x0055,0x0111,0x0211,0x0315,0x0411,0x0515,
122 0x0605,0x0701,0x0809,0x090d,0x0a0d,0x0b09,0x0c0d,0x0d09,0x0e09,0x0f0d,0x1011,0x1115,0x1215,0x1311,0x1415,0x1511,
123 0x1601,0x1705,0x180d,0x1909,0x1a09,0x1b0d,0x1c09,0x1d0d,0x1e0d,0x1f09,0x2031,0x2135,0x2235,0x2331,0x2435,0x2531,
124 0x2621,0x2725,0x282d,0x2929,0x2a29,0x2b2d,0x2c29,0x2d2d,0x2e2d,0x2f29,0x3035,0x3131,0x3231,0x3335,0x3431,0x3535,
125 0x3625,0x3721,0x3829,0x392d,0x3a2d,0x3b29,0x3c2d,0x3d29,0x3e29,0x3f2d,0x4011,0x4115,0x4215,0x4311,0x4415,0x4511,
126 0x4601,0x4705,0x480d,0x4909,0x4a09,0x4b0d,0x4c09,0x4d0d,0x4e0d,0x4f09,0x5015,0x5111,0x5211,0x5315,0x5411,0x5515,
127 0x5605,0x5701,0x5809,0x590d,0x5a0d,0x5b09,0x5c0d,0x5d09,0x5e09,0x5f0d,0x6035,0x6131,0x6231,0x6335,0x6431,0x6535,
128 0x6625,0x6721,0x6829,0x692d,0x6a2d,0x6b29,0x6c2d,0x6d29,0x6e29,0x6f2d,0x7031,0x7135,0x7235,0x7331,0x7435,0x7531,
129 0x7621,0x7725,0x782d,0x7929,0x7a29,0x7b2d,0x7c29,0x7d2d,0x7e2d,0x7f29,0x8091,0x8195,0x8295,0x8391,0x8495,0x8591,
130 0x8681,0x8785,0x888d,0x8989,0x8a89,0x8b8d,0x8c89,0x8d8d,0x8e8d,0x8f89,0x9095,0x9191,0x9291,0x9395,0x9491,0x9595,
131 0x9685,0x9781,0x9889,0x998d,0x9a8d,0x9b89,0x9c8d,0x9d89,0x9e89,0x9f8d,0xa0b5,0xa1b1,0xa2b1,0xa3b5,0xa4b1,0xa5b5,
132 0xa6a5,0xa7a1,0xa8a9,0xa9ad,0xaaad,0xaba9,0xacad,0xada9,0xaea9,0xafad,0xb0b1,0xb1b5,0xb2b5,0xb3b1,0xb4b5,0xb5b1,
133 0xb6a1,0xb7a5,0xb8ad,0xb9a9,0xbaa9,0xbbad,0xbca9,0xbdad,0xbead,0xbfa9,0xc095,0xc191,0xc291,0xc395,0xc491,0xc595,
134 0xc685,0xc781,0xc889,0xc98d,0xca8d,0xcb89,0xcc8d,0xcd89,0xce89,0xcf8d,0xd091,0xd195,0xd295,0xd391,0xd495,0xd591,
135 0xd681,0xd785,0xd88d,0xd989,0xda89,0xdb8d,0xdc89,0xdd8d,0xde8d,0xdf89,0xe0b1,0xe1b5,0xe2b5,0xe3b1,0xe4b5,0xe5b1,
136 0xe6a1,0xe7a5,0xe8ad,0xe9a9,0xeaa9,0xebad,0xeca9,0xedad,0xeead,0xefa9,0xf0b5,0xf1b1,0xf2b1,0xf3b5,0xf4b1,0xf5b5,
137 0xf6a5,0xf7a1,0xf8a9,0xf9ad,0xfaad,0xfba9,0xfcad,0xfda9,0xfea9,0xffad,0x0055,0x0111,0x0211,0x0315,0x0411,0x0515,
138 0x0605,0x0701,0x0809,0x090d,0x0a0d,0x0b09,0x0c0d,0x0d09,0x0e09,0x0f0d,0x1011,0x1115,0x1215,0x1311,0x1415,0x1511,
139 0x1601,0x1705,0x180d,0x1909,0x1a09,0x1b0d,0x1c09,0x1d0d,0x1e0d,0x1f09,0x2031,0x2135,0x2235,0x2331,0x2435,0x2531,
140 0x2621,0x2725,0x282d,0x2929,0x2a29,0x2b2d,0x2c29,0x2d2d,0x2e2d,0x2f29,0x3035,0x3131,0x3231,0x3335,0x3431,0x3535,
141 0x3625,0x3721,0x3829,0x392d,0x3a2d,0x3b29,0x3c2d,0x3d29,0x3e29,0x3f2d,0x4011,0x4115,0x4215,0x4311,0x4415,0x4511,
142 0x4601,0x4705,0x480d,0x4909,0x4a09,0x4b0d,0x4c09,0x4d0d,0x4e0d,0x4f09,0x5015,0x5111,0x5211,0x5315,0x5411,0x5515,
143 0x5605,0x5701,0x5809,0x590d,0x5a0d,0x5b09,0x5c0d,0x5d09,0x5e09,0x5f0d,0x6035,0x6131,0x6231,0x6335,0x6431,0x6535,
144 0x0046,0x0102,0x0202,0x0306,0x0402,0x0506,0x0606,0x0702,0x080a,0x090e,0x0402,0x0506,0x0606,0x0702,0x080a,0x090e,
145 0x1002,0x1106,0x1206,0x1302,0x1406,0x1502,0x1602,0x1706,0x180e,0x190a,0x1406,0x1502,0x1602,0x1706,0x180e,0x190a,
146 0x2022,0x2126,0x2226,0x2322,0x2426,0x2522,0x2622,0x2726,0x282e,0x292a,0x2426,0x2522,0x2622,0x2726,0x282e,0x292a,
147 0x3026,0x3122,0x3222,0x3326,0x3422,0x3526,0x3626,0x3722,0x382a,0x392e,0x3422,0x3526,0x3626,0x3722,0x382a,0x392e,
148 0x4002,0x4106,0x4206,0x4302,0x4406,0x4502,0x4602,0x4706,0x480e,0x490a,0x4406,0x4502,0x4602,0x4706,0x480e,0x490a,
149 0x5006,0x5102,0x5202,0x5306,0x5402,0x5506,0x5606,0x5702,0x580a,0x590e,0x5402,0x5506,0x5606,0x5702,0x580a,0x590e,
150 0x6026,0x6122,0x6222,0x6326,0x6422,0x6526,0x6626,0x6722,0x682a,0x692e,0x6422,0x6526,0x6626,0x6722,0x682a,0x692e,
151 0x7022,0x7126,0x7226,0x7322,0x7426,0x7522,0x7622,0x7726,0x782e,0x792a,0x7426,0x7522,0x7622,0x7726,0x782e,0x792a,
152 0x8082,0x8186,0x8286,0x8382,0x8486,0x8582,0x8682,0x8786,0x888e,0x898a,0x8486,0x8582,0x8682,0x8786,0x888e,0x898a,
153 0x9086,0x9182,0x9282,0x9386,0x9482,0x9586,0x9686,0x9782,0x988a,0x998e,0x3423,0x3527,0x3627,0x3723,0x382b,0x392f,
154 0x4003,0x4107,0x4207,0x4303,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,
155 0x5007,0x5103,0x5203,0x5307,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,
156 0x6027,0x6123,0x6223,0x6327,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,
157 0x7023,0x7127,0x7227,0x7323,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,
158 0x8083,0x8187,0x8287,0x8383,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,
159 0x9087,0x9183,0x9283,0x9387,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f,
160 0xa0a7,0xa1a3,0xa2a3,0xa3a7,0xa4a3,0xa5a7,0xa6a7,0xa7a3,0xa8ab,0xa9af,0xa4a3,0xa5a7,0xa6a7,0xa7a3,0xa8ab,0xa9af,
161 0xb0a3,0xb1a7,0xb2a7,0xb3a3,0xb4a7,0xb5a3,0xb6a3,0xb7a7,0xb8af,0xb9ab,0xb4a7,0xb5a3,0xb6a3,0xb7a7,0xb8af,0xb9ab,
162 0xc087,0xc183,0xc283,0xc387,0xc483,0xc587,0xc687,0xc783,0xc88b,0xc98f,0xc483,0xc587,0xc687,0xc783,0xc88b,0xc98f,
163 0xd083,0xd187,0xd287,0xd383,0xd487,0xd583,0xd683,0xd787,0xd88f,0xd98b,0xd487,0xd583,0xd683,0xd787,0xd88f,0xd98b,
164 0xe0a3,0xe1a7,0xe2a7,0xe3a3,0xe4a7,0xe5a3,0xe6a3,0xe7a7,0xe8af,0xe9ab,0xe4a7,0xe5a3,0xe6a3,0xe7a7,0xe8af,0xe9ab,
165 0xf0a7,0xf1a3,0xf2a3,0xf3a7,0xf4a3,0xf5a7,0xf6a7,0xf7a3,0xf8ab,0xf9af,0xf4a3,0xf5a7,0xf6a7,0xf7a3,0xf8ab,0xf9af,
166 0x0047,0x0103,0x0203,0x0307,0x0403,0x0507,0x0607,0x0703,0x080b,0x090f,0x0403,0x0507,0x0607,0x0703,0x080b,0x090f,
167 0x1003,0x1107,0x1207,0x1303,0x1407,0x1503,0x1603,0x1707,0x180f,0x190b,0x1407,0x1503,0x1603,0x1707,0x180f,0x190b,
168 0x2023,0x2127,0x2227,0x2323,0x2427,0x2523,0x2623,0x2727,0x282f,0x292b,0x2427,0x2523,0x2623,0x2727,0x282f,0x292b,
169 0x3027,0x3123,0x3223,0x3327,0x3423,0x3527,0x3627,0x3723,0x382b,0x392f,0x3423,0x3527,0x3627,0x3723,0x382b,0x392f,
170 0x4003,0x4107,0x4207,0x4303,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,
171 0x5007,0x5103,0x5203,0x5307,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,
172 0x6027,0x6123,0x6223,0x6327,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,
173 0x7023,0x7127,0x7227,0x7323,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,
174 0x8083,0x8187,0x8287,0x8383,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,
175 0x9087,0x9183,0x9283,0x9387,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f,
176 0xfabe,0xfbba,0xfcbe,0xfdba,0xfeba,0xffbe,0x0046,0x0102,0x0202,0x0306,0x0402,0x0506,0x0606,0x0702,0x080a,0x090e,
177 0x0a1e,0x0b1a,0x0c1e,0x0d1a,0x0e1a,0x0f1e,0x1002,0x1106,0x1206,0x1302,0x1406,0x1502,0x1602,0x1706,0x180e,0x190a,
178 0x1a1a,0x1b1e,0x1c1a,0x1d1e,0x1e1e,0x1f1a,0x2022,0x2126,0x2226,0x2322,0x2426,0x2522,0x2622,0x2726,0x282e,0x292a,
179 0x2a3a,0x2b3e,0x2c3a,0x2d3e,0x2e3e,0x2f3a,0x3026,0x3122,0x3222,0x3326,0x3422,0x3526,0x3626,0x3722,0x382a,0x392e,
180 0x3a3e,0x3b3a,0x3c3e,0x3d3a,0x3e3a,0x3f3e,0x4002,0x4106,0x4206,0x4302,0x4406,0x4502,0x4602,0x4706,0x480e,0x490a,
181 0x4a1a,0x4b1e,0x4c1a,0x4d1e,0x4e1e,0x4f1a,0x5006,0x5102,0x5202,0x5306,0x5402,0x5506,0x5606,0x5702,0x580a,0x590e,
182 0x5a1e,0x5b1a,0x5c1e,0x5d1a,0x5e1a,0x5f1e,0x6026,0x6122,0x6222,0x6326,0x6422,0x6526,0x6626,0x6722,0x682a,0x692e,
183 0x6a3e,0x6b3a,0x6c3e,0x6d3a,0x6e3a,0x6f3e,0x7022,0x7126,0x7226,0x7322,0x7426,0x7522,0x7622,0x7726,0x782e,0x792a,
184 0x7a3a,0x7b3e,0x7c3a,0x7d3e,0x7e3e,0x7f3a,0x8082,0x8186,0x8286,0x8382,0x8486,0x8582,0x8682,0x8786,0x888e,0x898a,
185 0x8a9a,0x8b9e,0x8c9a,0x8d9e,0x8e9e,0x8f9a,0x9086,0x9182,0x9282,0x9386,0x3423,0x3527,0x3627,0x3723,0x382b,0x392f,
186 0x3a3f,0x3b3b,0x3c3f,0x3d3b,0x3e3b,0x3f3f,0x4003,0x4107,0x4207,0x4303,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,
187 0x4a1b,0x4b1f,0x4c1b,0x4d1f,0x4e1f,0x4f1b,0x5007,0x5103,0x5203,0x5307,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,
188 0x5a1f,0x5b1b,0x5c1f,0x5d1b,0x5e1b,0x5f1f,0x6027,0x6123,0x6223,0x6327,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,
189 0x6a3f,0x6b3b,0x6c3f,0x6d3b,0x6e3b,0x6f3f,0x7023,0x7127,0x7227,0x7323,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,
190 0x7a3b,0x7b3f,0x7c3b,0x7d3f,0x7e3f,0x7f3b,0x8083,0x8187,0x8287,0x8383,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,
191 0x8a9b,0x8b9f,0x8c9b,0x8d9f,0x8e9f,0x8f9b,0x9087,0x9183,0x9283,0x9387,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f,
192 0x9a9f,0x9b9b,0x9c9f,0x9d9b,0x9e9b,0x9f9f,0xa0a7,0xa1a3,0xa2a3,0xa3a7,0xa4a3,0xa5a7,0xa6a7,0xa7a3,0xa8ab,0xa9af,
193 0xaabf,0xabbb,0xacbf,0xadbb,0xaebb,0xafbf,0xb0a3,0xb1a7,0xb2a7,0xb3a3,0xb4a7,0xb5a3,0xb6a3,0xb7a7,0xb8af,0xb9ab,
194 0xbabb,0xbbbf,0xbcbb,0xbdbf,0xbebf,0xbfbb,0xc087,0xc183,0xc283,0xc387,0xc483,0xc587,0xc687,0xc783,0xc88b,0xc98f,
195 0xca9f,0xcb9b,0xcc9f,0xcd9b,0xce9b,0xcf9f,0xd083,0xd187,0xd287,0xd383,0xd487,0xd583,0xd683,0xd787,0xd88f,0xd98b,
196 0xda9b,0xdb9f,0xdc9b,0xdd9f,0xde9f,0xdf9b,0xe0a3,0xe1a7,0xe2a7,0xe3a3,0xe4a7,0xe5a3,0xe6a3,0xe7a7,0xe8af,0xe9ab,
197 0xeabb,0xebbf,0xecbb,0xedbf,0xeebf,0xefbb,0xf0a7,0xf1a3,0xf2a3,0xf3a7,0xf4a3,0xf5a7,0xf6a7,0xf7a3,0xf8ab,0xf9af,
198 0xfabf,0xfbbb,0xfcbf,0xfdbb,0xfebb,0xffbf,0x0047,0x0103,0x0203,0x0307,0x0403,0x0507,0x0607,0x0703,0x080b,0x090f,
199 0x0a1f,0x0b1b,0x0c1f,0x0d1b,0x0e1b,0x0f1f,0x1003,0x1107,0x1207,0x1303,0x1407,0x1503,0x1603,0x1707,0x180f,0x190b,
200 0x1a1b,0x1b1f,0x1c1b,0x1d1f,0x1e1f,0x1f1b,0x2023,0x2127,0x2227,0x2323,0x2427,0x2523,0x2623,0x2727,0x282f,0x292b,
201 0x2a3b,0x2b3f,0x2c3b,0x2d3f,0x2e3f,0x2f3b,0x3027,0x3123,0x3223,0x3327,0x3423,0x3527,0x3627,0x3723,0x382b,0x392f,
202 0x3a3f,0x3b3b,0x3c3f,0x3d3b,0x3e3b,0x3f3f,0x4003,0x4107,0x4207,0x4303,0x4407,0x4503,0x4603,0x4707,0x480f,0x490b,
203 0x4a1b,0x4b1f,0x4c1b,0x4d1f,0x4e1f,0x4f1b,0x5007,0x5103,0x5203,0x5307,0x5403,0x5507,0x5607,0x5703,0x580b,0x590f,
204 0x5a1f,0x5b1b,0x5c1f,0x5d1b,0x5e1b,0x5f1f,0x6027,0x6123,0x6223,0x6327,0x6423,0x6527,0x6627,0x6723,0x682b,0x692f,
205 0x6a3f,0x6b3b,0x6c3f,0x6d3b,0x6e3b,0x6f3f,0x7023,0x7127,0x7227,0x7323,0x7427,0x7523,0x7623,0x7727,0x782f,0x792b,
206 0x7a3b,0x7b3f,0x7c3b,0x7d3f,0x7e3f,0x7f3b,0x8083,0x8187,0x8287,0x8383,0x8487,0x8583,0x8683,0x8787,0x888f,0x898b,
207 0x8a9b,0x8b9f,0x8c9b,0x8d9f,0x8e9f,0x8f9b,0x9087,0x9183,0x9283,0x9387,0x9483,0x9587,0x9687,0x9783,0x988b,0x998f
213 void I8080_BASE::initialize()
215 DEVICE::initialize();
218 void I8080_BASE::reset()
221 AF = BC = DE = HL = 0;
224 IM = IM_M5 | IM_M6 | IM_M7;
225 afterHALT = BUSREQ = false;
230 void I8080_BASE::write_signal(int id, uint32_t data, uint32_t mask)
236 uint32_t I8080_BASE::read_signal(int ch)
238 if(ch == SIG_I8080_INTE) {
239 if(!afterEI && (IM & IM_IEN)) {
246 void I8080_BASE::set_intr_line(bool line, bool pending, uint32_t bit)
255 int I8080_BASE::run(int clock)
262 // opecode definitions
265 uint8_t hc = ((v & 0x0f) == 0x0f) ? HF : 0; \
267 _F = (_F & CF) | ZSP[v] | hc; \
270 uint8_t hc = ((v & 0x0f) == 0x00) ? HF : 0; \
272 _F = (_F & CF) | ZSP[v] | hc | NF; \
288 _A = (_A << 1) | (_A >> 7); \
289 _F = (_F & 0xfe) | (_A & CF); \
292 _F = (_F & 0xfe) | (_A & CF); \
293 _A = (_A >> 1) | (_A << 7); \
297 _F = (_F & 0xfe) | (_A >> 7); \
298 _A = (_A << 1) | c; \
301 int c = (_F & CF) << 7; \
302 _F = (_F & 0xfe) | (_A & CF); \
303 _A = (_A >> 1) | c; \
307 _F = ZSP[q & 255] | ((q >> 8) & CF) | ((_A ^ q ^ v) & HF) | (((v ^ _A ^ SF) & (v ^ q) & SF) >> 5); \
311 int q = _A + v + (_F & CF); \
312 _F = ZSP[q & 255] | ((q >> 8) & CF) | ((_A ^ q ^ v) & HF) | (((v ^ _A ^ SF) & (v ^ q) & SF) >> 5); \
317 _F = ZSP[q & 255] | ((q >> 8) & CF) | NF | ((_A ^ q ^ v) & HF) | (((v ^ _A) & (_A ^ q) & SF) >> 5); \
321 int q = _A - v - (_F & CF); \
322 _F = ZSP[q & 255] | ((q >> 8) & CF) | NF | ((_A ^ q ^ v) & HF) | (((v ^ _A) & (_A ^ q) & SF) >> 5); \
327 _F = ZSP[q & 255] | ((q >> 8) & CF) | NF | ((_A ^ q ^ v) & HF) | (((v ^ _A) & (_A ^ q) & SF) >> 5); \
331 _F = (_F & ~(HF + CF)) | (((HL ^ q ^ v) >> 8) & HF) | ((q >> 16) & CF); \
341 void I8080_BASE::JMP(uint8_t c)
344 uint16_t a = FETCH16();
345 printf("JMP PC=%04x To=%04x\n", PC, a);
355 void I8080_BASE::CALL(uint8_t c)
358 uint16_t a = FETCH16();
359 printf("CALL PC=%04x To=%04x\n", PC, a);
364 printf("Not CALL\n");
371 void I8080_BASE::DSUB()
374 _F = ZS[q & 255] | ((q >> 8) & CF) | NF | ((_L ^ q ^ _C) & HF) | (((_C ^ _L) & (_L ^ q) & SF) >> 5);
376 q = _H - _B - (_F & CF);
377 _F = ZS[q & 255] | ((q >> 8) & CF) | NF | ((_H ^ q ^ _B) & HF) | (((_B ^ _H) & (_H ^ q) & SF) >> 5);
383 void I8080_BASE::ANA(uint8_t v)
387 void I8080_BASE::OP(uint8_t code)
398 case 0x01: // LXI B,nnnn
407 // if(_C == 0x00) _F |= XF; else _F &= ~XF;
417 case 0x06: // MVI B,nn
423 case 0x08: // DSUB (NOP)
438 // if(_C == 0xff) _F |= XF; else _F &= ~XF;
448 case 0x0e: // MVI C,nn
454 case 0x10: // ASRH (NOP)
456 // _F = (_F & ~CF) | (_L & CF);
461 case 0x11: // LXI D,nnnn
470 // if(_E == 0x00) _F |= XF; else _F &= ~XF;
480 case 0x16: // MVI D,nn
486 case 0x18: // RLDE (NOP)
498 // if(_E == 0xff) _F |= XF; else _F &= ~XF;
508 case 0x1e: // MVI E,nn
514 case 0x20: // RIM (NOP)
517 // _A = (IM & 0x7f) | (SID ? 0x80 : 0) | RIM_IEN;
521 case 0x21: // LXI H,nnnn
524 case 0x22: // SHLD nnnn
530 // if(_L == 0x00) _F |= XF; else _F &= ~XF;
540 case 0x26: // MVI H,nn
546 case 0x28: // LDEH nn (NOP)
548 // DE = (HL + FETCH8()) & 0xffff;
555 case 0x2a: // LHLD nnnn
556 HL = RM16(FETCH16());
561 // if(_L == 0xff) _F |= XF; else _F &= ~XF;
571 case 0x2e: // MVI L,nn
577 case 0x30: // SIM (NOP)
580 case 0x31: // LXI SP,nnnn
583 case 0x32: // STA nnnn
589 // if((SP & 0xff) == 0) _F |= XF; else _F &= ~XF;
603 case 0x36: // MVI M,nn
607 _F = (_F & 0xfe) | CF;
609 case 0x38: // LDES nn (NOP)
615 case 0x3a: // LDA nnnn
621 // if((SP & 0xff) == 0xff) _F |= XF; else _F &= ~XF;
631 case 0x3e: // MVI A,nn
635 _F = (_F & 0xfe) | ((_F & CF)==1 ? 0 : 1);
637 case 0x40: // MOV B,B
639 case 0x41: // MOV B,C
642 case 0x42: // MOV B,D
645 case 0x43: // MOV B,E
648 case 0x44: // MOV B,H
651 case 0x45: // MOV B,L
654 case 0x46: // MOV B,M
657 case 0x47: // MOV B,A
660 case 0x48: // MOV C,B
663 case 0x49: // MOV C,C
665 case 0x4a: // MOV C,D
668 case 0x4b: // MOV C,E
671 case 0x4c: // MOV C,H
674 case 0x4d: // MOV C,L
677 case 0x4e: // MOV C,M
680 case 0x4f: // MOV C,A
683 case 0x50: // MOV D,B
686 case 0x51: // MOV D,C
689 case 0x52: // MOV D,D
691 case 0x53: // MOV D,E
694 case 0x54: // MOV D,H
697 case 0x55: // MOV D,L
700 case 0x56: // MOV D,M
703 case 0x57: // MOV D,A
706 case 0x58: // MOV E,B
709 case 0x59: // MOV E,C
712 case 0x5a: // MOV E,D
715 case 0x5b: // MOV E,E
717 case 0x5c: // MOV E,H
720 case 0x5d: // MOV E,L
723 case 0x5e: // MOV E,M
726 case 0x5f: // MOV E,A
729 case 0x60: // MOV H,B
732 case 0x61: // MOV H,C
735 case 0x62: // MOV H,D
738 case 0x63: // MOV H,E
741 case 0x64: // MOV H,H
743 case 0x65: // MOV H,L
746 case 0x66: // MOV H,M
749 case 0x67: // MOV H,A
752 case 0x68: // MOV L,B
755 case 0x69: // MOV L,C
758 case 0x6a: // MOV L,D
761 case 0x6b: // MOV L,E
764 case 0x6c: // MOV L,H
767 case 0x6d: // MOV L,L
769 case 0x6e: // MOV L,M
772 case 0x6f: // MOV L,A
775 case 0x70: // MOV M,B
778 case 0x71: // MOV M,C
781 case 0x72: // MOV M,D
784 case 0x73: // MOV M,E
787 case 0x74: // MOV M,H
790 case 0x75: // MOV M,L
797 case 0x77: // MOV M,A
800 case 0x78: // MOV A,B
803 case 0x79: // MOV A,C
806 case 0x7a: // MOV A,D
809 case 0x7b: // MOV A,E
812 case 0x7c: // MOV A,H
815 case 0x7d: // MOV A,L
818 case 0x7e: // MOV A,M
821 case 0x7f: // MOV A,A
1021 case 0xc2: // JNZ nnnn
1024 case 0xc3: // JMP nnnn
1027 case 0xc4: // CNZ nnnn
1030 case 0xc5: // PUSH B
1033 case 0xc6: // ADI nn
1046 case 0xca: // JZ nnnn
1049 case 0xcb: // RST 8 (JMP nnnn)
1052 case 0xcc: // CZ nnnn
1055 case 0xcd: // CALL nnnn
1058 case 0xce: // ACI nn
1071 case 0xd2: // JNC nnnn
1074 case 0xd3: // OUT nn
1077 case 0xd4: // CNC nnnn
1080 case 0xd5: // PUSH D
1083 case 0xd6: // SUI nn
1093 case 0xd9: // SHLX (RET)
1101 case 0xda: // JC nnnn
1107 case 0xdc: // CC nnnn
1110 case 0xdd: // JNX nnnn (CALL nnnn)
1118 case 0xde: // SBI nn
1131 case 0xe2: // JPO nnnn
1139 case 0xe4: // CPO nnnn
1142 case 0xe5: // PUSH H
1145 case 0xe6: // ANI nn
1158 case 0xea: // JPE nnnn
1166 case 0xec: // CPE nnnn
1169 case 0xed: // LHLX (CALL nnnn)
1177 case 0xee: // XRI nn
1190 case 0xf2: // JP nnnn
1196 case 0xf4: // CP nnnn
1199 case 0xf5: // PUSH A
1202 case 0xf6: // ORI nn
1215 case 0xfa: // JM nnnn
1222 case 0xfc: // CM nnnn
1225 case 0xfd: // JX nnnn (CALL nnnn)
1233 case 0xfe: // CPI nn
1240 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
1248 //#ifdef USE_DEBUGGER
1249 void I8080_BASE::write_debug_data8(uint32_t addr, uint32_t data)
1252 d_mem_stored->write_data8w(addr, data, &wait);
1255 uint32_t I8080_BASE::read_debug_data8(uint32_t addr)
1258 return d_mem_stored->read_data8w(addr, &wait);
1261 void I8080_BASE::write_debug_io8(uint32_t addr, uint32_t data)
1264 d_io_stored->write_io8w(addr, data, &wait);
1267 uint32_t I8080_BASE::read_debug_io8(uint32_t addr)
1270 return d_io_stored->read_io8w(addr, &wait);
1273 bool I8080_BASE::write_debug_reg(const _TCHAR *reg, uint32_t data)
1275 if(_tcsicmp(reg, _T("PC")) == 0) {
1277 } else if(_tcsicmp(reg, _T("SP")) == 0) {
1279 } else if(_tcsicmp(reg, _T("AF")) == 0) {
1281 } else if(_tcsicmp(reg, _T("BC")) == 0) {
1283 } else if(_tcsicmp(reg, _T("DE")) == 0) {
1285 } else if(_tcsicmp(reg, _T("HL")) == 0) {
1287 } else if(_tcsicmp(reg, _T("A")) == 0) {
1289 } else if(_tcsicmp(reg, _T("F")) == 0) {
1291 } else if(_tcsicmp(reg, _T("B")) == 0) {
1293 } else if(_tcsicmp(reg, _T("C")) == 0) {
1295 } else if(_tcsicmp(reg, _T("D")) == 0) {
1297 } else if(_tcsicmp(reg, _T("E")) == 0) {
1299 } else if(_tcsicmp(reg, _T("H")) == 0) {
1301 } else if(_tcsicmp(reg, _T("L")) == 0) {
1309 bool I8080_BASE::get_debug_regs_info(_TCHAR *buffer, size_t buffer_len)
1312 F = [--------] A = 00 BC = 0000 DE = 0000 HL = 0000 SP = 0000 PC = 0000
1313 IM= [--------] (BC)= 0000 (DE)= 0000 (HL)= 0000 (SP)= 0000
1314 Clocks = 0 (0) Since Scanline = 0/0 (0/0)
1317 my_stprintf_s(buffer, buffer_len,
1318 _T("F = [%c%c%c%c%c%c%c%c] A = %02X BC = %04X DE = %04X HL = %04X SP = %04X PC = %04X\n")
1319 _T("IM= [%c%c%c%c%c%c%c%c] (BC)= %04X (DE)= %04X (HL)= %04X (SP)= %04X\n")
1320 _T("Clocks = %llu (%llu) Since Scanline = %d/%d (%d/%d)"),
1321 (_F & CF) ? _T('C') : _T('-'), (_F & NF) ? _T('N') : _T('-'), (_F & VF) ? _T('V') : _T('-'), (_F & XF) ? _T('X') : _T('-'),
1322 (_F & HF) ? _T('H') : _T('-'), (_F & YF) ? _T('Y') : _T('-'), (_F & ZF) ? _T('Z') : _T('-'), (_F & SF) ? _T('S') : _T('-'),
1323 _A, BC, DE, HL, SP, PC,
1324 (IM & 0x80) ? _T('S') : _T('-'), (IM & 0x40) ? _T('7') : _T('-'), (IM & 0x20) ? _T('6') : _T('-'), (IM & 0x10) ? _T('5') : _T('-'),
1325 (IM & 0x08) ? _T('E') : _T('-'), (IM & 0x04) ? _T('7') : _T('-'), (IM & 0x02) ? _T('6') : _T('-'), (IM & 0x01) ? _T('5') : _T('-'),
1326 d_mem_stored->read_data16w(BC, &wait), d_mem_stored->read_data16w(DE, &wait), d_mem_stored->read_data16w(HL, &wait), d_mem_stored->read_data16w(SP, &wait),
1327 total_count, total_count - prev_total_count,
1328 get_passed_clock_since_vline(), get_cur_vline_clocks(), get_cur_vline(), get_lines_per_frame());
1329 prev_total_count = total_count;
1335 int I8080_BASE::debug_dasm_with_userdata(uint32_t pc, _TCHAR *buffer, size_t buffer_len, uint32_t userdata)
1339 if(d_debugger == NULL) return 0;
1341 for(int i = 0; i < 4; i++) {
1343 ops[i] = d_mem_stored->read_data8w(pc + i, &wait);
1347 case 0x00: my_stprintf_s(buffer, buffer_len, _T("nop")); break;
1348 case 0x01: my_stprintf_s(buffer, buffer_len, _T("lxi b,%s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1349 case 0x02: my_stprintf_s(buffer, buffer_len, _T("stax b")); break;
1350 case 0x03: my_stprintf_s(buffer, buffer_len, _T("inx b")); break;
1351 case 0x04: my_stprintf_s(buffer, buffer_len, _T("inr b")); break;
1352 case 0x05: my_stprintf_s(buffer, buffer_len, _T("dcr b")); break;
1353 case 0x06: my_stprintf_s(buffer, buffer_len, _T("mvi b,$%02x"), ops[ptr++]); break;
1354 case 0x07: my_stprintf_s(buffer, buffer_len, _T("rlc")); break;
1355 case 0x08: my_stprintf_s(buffer, buffer_len, _T("dsub (*)")); break;
1356 case 0x09: my_stprintf_s(buffer, buffer_len, _T("dad b")); break;
1357 case 0x0a: my_stprintf_s(buffer, buffer_len, _T("ldax b")); break;
1358 case 0x0b: my_stprintf_s(buffer, buffer_len, _T("dcx b")); break;
1359 case 0x0c: my_stprintf_s(buffer, buffer_len, _T("inr c")); break;
1360 case 0x0d: my_stprintf_s(buffer, buffer_len, _T("dcr c")); break;
1361 case 0x0e: my_stprintf_s(buffer, buffer_len, _T("mvi c,$%02x"), ops[ptr++]); break;
1362 case 0x0f: my_stprintf_s(buffer, buffer_len, _T("rrc")); break;
1363 case 0x10: my_stprintf_s(buffer, buffer_len, _T("asrh (*)")); break;
1364 case 0x11: my_stprintf_s(buffer, buffer_len, _T("lxi d,%s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1365 case 0x12: my_stprintf_s(buffer, buffer_len, _T("stax d")); break;
1366 case 0x13: my_stprintf_s(buffer, buffer_len, _T("inx d")); break;
1367 case 0x14: my_stprintf_s(buffer, buffer_len, _T("inr d")); break;
1368 case 0x15: my_stprintf_s(buffer, buffer_len, _T("dcr d")); break;
1369 case 0x16: my_stprintf_s(buffer, buffer_len, _T("mvi d,$%02x"), ops[ptr++]); break;
1370 case 0x17: my_stprintf_s(buffer, buffer_len, _T("ral")); break;
1371 case 0x18: my_stprintf_s(buffer, buffer_len, _T("rlde (*)")); break;
1372 case 0x19: my_stprintf_s(buffer, buffer_len, _T("dad d")); break;
1373 case 0x1a: my_stprintf_s(buffer, buffer_len, _T("ldax d")); break;
1374 case 0x1b: my_stprintf_s(buffer, buffer_len, _T("dcx d")); break;
1375 case 0x1c: my_stprintf_s(buffer, buffer_len, _T("inr e")); break;
1376 case 0x1d: my_stprintf_s(buffer, buffer_len, _T("dcr e")); break;
1377 case 0x1e: my_stprintf_s(buffer, buffer_len, _T("mvi e,$%02x"), ops[ptr++]); break;
1378 case 0x1f: my_stprintf_s(buffer, buffer_len, _T("rar")); break;
1379 case 0x20: my_stprintf_s(buffer, buffer_len, _T("rim")); break;
1380 case 0x21: my_stprintf_s(buffer, buffer_len, _T("lxi h,%s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1381 case 0x22: my_stprintf_s(buffer, buffer_len, _T("shld %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1382 case 0x23: my_stprintf_s(buffer, buffer_len, _T("inx h")); break;
1383 case 0x24: my_stprintf_s(buffer, buffer_len, _T("inr h")); break;
1384 case 0x25: my_stprintf_s(buffer, buffer_len, _T("dcr h")); break;
1385 case 0x26: my_stprintf_s(buffer, buffer_len, _T("mvi h,$%02x"), ops[ptr++]); break;
1386 case 0x27: my_stprintf_s(buffer, buffer_len, _T("daa")); break;
1387 case 0x28: my_stprintf_s(buffer, buffer_len, _T("ldeh $%02x (*)"), ops[ptr++]); break;
1388 case 0x29: my_stprintf_s(buffer, buffer_len, _T("dad h")); break;
1389 case 0x2a: my_stprintf_s(buffer, buffer_len, _T("lhld %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1390 case 0x2b: my_stprintf_s(buffer, buffer_len, _T("dcx h")); break;
1391 case 0x2c: my_stprintf_s(buffer, buffer_len, _T("inr l")); break;
1392 case 0x2d: my_stprintf_s(buffer, buffer_len, _T("dcr l")); break;
1393 case 0x2e: my_stprintf_s(buffer, buffer_len, _T("mvi l,$%02x"), ops[ptr++]); break;
1394 case 0x2f: my_stprintf_s(buffer, buffer_len, _T("cma")); break;
1395 case 0x30: my_stprintf_s(buffer, buffer_len, _T("sim")); break;
1396 case 0x31: my_stprintf_s(buffer, buffer_len, _T("lxi sp,%s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1397 case 0x32: my_stprintf_s(buffer, buffer_len, _T("stax %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1398 case 0x33: my_stprintf_s(buffer, buffer_len, _T("inx sp")); break;
1399 case 0x34: my_stprintf_s(buffer, buffer_len, _T("inr m")); break;
1400 case 0x35: my_stprintf_s(buffer, buffer_len, _T("dcr m")); break;
1401 case 0x36: my_stprintf_s(buffer, buffer_len, _T("mvi m,$%02x"), ops[ptr++]); break;
1402 case 0x37: my_stprintf_s(buffer, buffer_len, _T("stc")); break;
1403 case 0x38: my_stprintf_s(buffer, buffer_len, _T("ldes $%02x"), ops[ptr++]); break;
1404 case 0x39: my_stprintf_s(buffer, buffer_len, _T("dad sp")); break;
1405 case 0x3a: my_stprintf_s(buffer, buffer_len, _T("ldax %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1406 case 0x3b: my_stprintf_s(buffer, buffer_len, _T("dcx sp")); break;
1407 case 0x3c: my_stprintf_s(buffer, buffer_len, _T("inr a")); break;
1408 case 0x3d: my_stprintf_s(buffer, buffer_len, _T("dcr a")); break;
1409 case 0x3e: my_stprintf_s(buffer, buffer_len, _T("mvi a,$%02x"), ops[ptr++]); break;
1410 case 0x3f: my_stprintf_s(buffer, buffer_len, _T("cmf")); break;
1411 case 0x40: my_stprintf_s(buffer, buffer_len, _T("mov b,b")); break;
1412 case 0x41: my_stprintf_s(buffer, buffer_len, _T("mov b,c")); break;
1413 case 0x42: my_stprintf_s(buffer, buffer_len, _T("mov b,d")); break;
1414 case 0x43: my_stprintf_s(buffer, buffer_len, _T("mov b,e")); break;
1415 case 0x44: my_stprintf_s(buffer, buffer_len, _T("mov b,h")); break;
1416 case 0x45: my_stprintf_s(buffer, buffer_len, _T("mov b,l")); break;
1417 case 0x46: my_stprintf_s(buffer, buffer_len, _T("mov b,m")); break;
1418 case 0x47: my_stprintf_s(buffer, buffer_len, _T("mov b,a")); break;
1419 case 0x48: my_stprintf_s(buffer, buffer_len, _T("mov c,b")); break;
1420 case 0x49: my_stprintf_s(buffer, buffer_len, _T("mov c,c")); break;
1421 case 0x4a: my_stprintf_s(buffer, buffer_len, _T("mov c,d")); break;
1422 case 0x4b: my_stprintf_s(buffer, buffer_len, _T("mov c,e")); break;
1423 case 0x4c: my_stprintf_s(buffer, buffer_len, _T("mov c,h")); break;
1424 case 0x4d: my_stprintf_s(buffer, buffer_len, _T("mov c,l")); break;
1425 case 0x4e: my_stprintf_s(buffer, buffer_len, _T("mov c,m")); break;
1426 case 0x4f: my_stprintf_s(buffer, buffer_len, _T("mov c,a")); break;
1427 case 0x50: my_stprintf_s(buffer, buffer_len, _T("mov d,b")); break;
1428 case 0x51: my_stprintf_s(buffer, buffer_len, _T("mov d,c")); break;
1429 case 0x52: my_stprintf_s(buffer, buffer_len, _T("mov d,d")); break;
1430 case 0x53: my_stprintf_s(buffer, buffer_len, _T("mov d,e")); break;
1431 case 0x54: my_stprintf_s(buffer, buffer_len, _T("mov d,h")); break;
1432 case 0x55: my_stprintf_s(buffer, buffer_len, _T("mov d,l")); break;
1433 case 0x56: my_stprintf_s(buffer, buffer_len, _T("mov d,m")); break;
1434 case 0x57: my_stprintf_s(buffer, buffer_len, _T("mov d,a")); break;
1435 case 0x58: my_stprintf_s(buffer, buffer_len, _T("mov e,b")); break;
1436 case 0x59: my_stprintf_s(buffer, buffer_len, _T("mov e,c")); break;
1437 case 0x5a: my_stprintf_s(buffer, buffer_len, _T("mov e,d")); break;
1438 case 0x5b: my_stprintf_s(buffer, buffer_len, _T("mov e,e")); break;
1439 case 0x5c: my_stprintf_s(buffer, buffer_len, _T("mov e,h")); break;
1440 case 0x5d: my_stprintf_s(buffer, buffer_len, _T("mov e,l")); break;
1441 case 0x5e: my_stprintf_s(buffer, buffer_len, _T("mov e,m")); break;
1442 case 0x5f: my_stprintf_s(buffer, buffer_len, _T("mov e,a")); break;
1443 case 0x60: my_stprintf_s(buffer, buffer_len, _T("mov h,b")); break;
1444 case 0x61: my_stprintf_s(buffer, buffer_len, _T("mov h,c")); break;
1445 case 0x62: my_stprintf_s(buffer, buffer_len, _T("mov h,d")); break;
1446 case 0x63: my_stprintf_s(buffer, buffer_len, _T("mov h,e")); break;
1447 case 0x64: my_stprintf_s(buffer, buffer_len, _T("mov h,h")); break;
1448 case 0x65: my_stprintf_s(buffer, buffer_len, _T("mov h,l")); break;
1449 case 0x66: my_stprintf_s(buffer, buffer_len, _T("mov h,m")); break;
1450 case 0x67: my_stprintf_s(buffer, buffer_len, _T("mov h,a")); break;
1451 case 0x68: my_stprintf_s(buffer, buffer_len, _T("mov l,b")); break;
1452 case 0x69: my_stprintf_s(buffer, buffer_len, _T("mov l,c")); break;
1453 case 0x6a: my_stprintf_s(buffer, buffer_len, _T("mov l,d")); break;
1454 case 0x6b: my_stprintf_s(buffer, buffer_len, _T("mov l,e")); break;
1455 case 0x6c: my_stprintf_s(buffer, buffer_len, _T("mov l,h")); break;
1456 case 0x6d: my_stprintf_s(buffer, buffer_len, _T("mov l,l")); break;
1457 case 0x6e: my_stprintf_s(buffer, buffer_len, _T("mov l,m")); break;
1458 case 0x6f: my_stprintf_s(buffer, buffer_len, _T("mov l,a")); break;
1459 case 0x70: my_stprintf_s(buffer, buffer_len, _T("mov m,b")); break;
1460 case 0x71: my_stprintf_s(buffer, buffer_len, _T("mov m,c")); break;
1461 case 0x72: my_stprintf_s(buffer, buffer_len, _T("mov m,d")); break;
1462 case 0x73: my_stprintf_s(buffer, buffer_len, _T("mov m,e")); break;
1463 case 0x74: my_stprintf_s(buffer, buffer_len, _T("mov m,h")); break;
1464 case 0x75: my_stprintf_s(buffer, buffer_len, _T("mov m,l")); break;
1465 case 0x76: my_stprintf_s(buffer, buffer_len, _T("hlt")); break;
1466 case 0x77: my_stprintf_s(buffer, buffer_len, _T("mov m,a")); break;
1467 case 0x78: my_stprintf_s(buffer, buffer_len, _T("mov a,b")); break;
1468 case 0x79: my_stprintf_s(buffer, buffer_len, _T("mov a,c")); break;
1469 case 0x7a: my_stprintf_s(buffer, buffer_len, _T("mov a,d")); break;
1470 case 0x7b: my_stprintf_s(buffer, buffer_len, _T("mov a,e")); break;
1471 case 0x7c: my_stprintf_s(buffer, buffer_len, _T("mov a,h")); break;
1472 case 0x7d: my_stprintf_s(buffer, buffer_len, _T("mov a,l")); break;
1473 case 0x7e: my_stprintf_s(buffer, buffer_len, _T("mov a,m")); break;
1474 case 0x7f: my_stprintf_s(buffer, buffer_len, _T("mov a,a")); break;
1475 case 0x80: my_stprintf_s(buffer, buffer_len, _T("add b")); break;
1476 case 0x81: my_stprintf_s(buffer, buffer_len, _T("add c")); break;
1477 case 0x82: my_stprintf_s(buffer, buffer_len, _T("add d")); break;
1478 case 0x83: my_stprintf_s(buffer, buffer_len, _T("add e")); break;
1479 case 0x84: my_stprintf_s(buffer, buffer_len, _T("add h")); break;
1480 case 0x85: my_stprintf_s(buffer, buffer_len, _T("add l")); break;
1481 case 0x86: my_stprintf_s(buffer, buffer_len, _T("add m")); break;
1482 case 0x87: my_stprintf_s(buffer, buffer_len, _T("add a")); break;
1483 case 0x88: my_stprintf_s(buffer, buffer_len, _T("adc b")); break;
1484 case 0x89: my_stprintf_s(buffer, buffer_len, _T("adc c")); break;
1485 case 0x8a: my_stprintf_s(buffer, buffer_len, _T("adc d")); break;
1486 case 0x8b: my_stprintf_s(buffer, buffer_len, _T("adc e")); break;
1487 case 0x8c: my_stprintf_s(buffer, buffer_len, _T("adc h")); break;
1488 case 0x8d: my_stprintf_s(buffer, buffer_len, _T("adc l")); break;
1489 case 0x8e: my_stprintf_s(buffer, buffer_len, _T("adc m")); break;
1490 case 0x8f: my_stprintf_s(buffer, buffer_len, _T("adc a")); break;
1491 case 0x90: my_stprintf_s(buffer, buffer_len, _T("sub b")); break;
1492 case 0x91: my_stprintf_s(buffer, buffer_len, _T("sub c")); break;
1493 case 0x92: my_stprintf_s(buffer, buffer_len, _T("sub d")); break;
1494 case 0x93: my_stprintf_s(buffer, buffer_len, _T("sub e")); break;
1495 case 0x94: my_stprintf_s(buffer, buffer_len, _T("sub h")); break;
1496 case 0x95: my_stprintf_s(buffer, buffer_len, _T("sub l")); break;
1497 case 0x96: my_stprintf_s(buffer, buffer_len, _T("sub m")); break;
1498 case 0x97: my_stprintf_s(buffer, buffer_len, _T("sub a")); break;
1499 case 0x98: my_stprintf_s(buffer, buffer_len, _T("sbb b")); break;
1500 case 0x99: my_stprintf_s(buffer, buffer_len, _T("sbb c")); break;
1501 case 0x9a: my_stprintf_s(buffer, buffer_len, _T("sbb d")); break;
1502 case 0x9b: my_stprintf_s(buffer, buffer_len, _T("sbb e")); break;
1503 case 0x9c: my_stprintf_s(buffer, buffer_len, _T("sbb h")); break;
1504 case 0x9d: my_stprintf_s(buffer, buffer_len, _T("sbb l")); break;
1505 case 0x9e: my_stprintf_s(buffer, buffer_len, _T("sbb m")); break;
1506 case 0x9f: my_stprintf_s(buffer, buffer_len, _T("sbb a")); break;
1507 case 0xa0: my_stprintf_s(buffer, buffer_len, _T("ana b")); break;
1508 case 0xa1: my_stprintf_s(buffer, buffer_len, _T("ana c")); break;
1509 case 0xa2: my_stprintf_s(buffer, buffer_len, _T("ana d")); break;
1510 case 0xa3: my_stprintf_s(buffer, buffer_len, _T("ana e")); break;
1511 case 0xa4: my_stprintf_s(buffer, buffer_len, _T("ana h")); break;
1512 case 0xa5: my_stprintf_s(buffer, buffer_len, _T("ana l")); break;
1513 case 0xa6: my_stprintf_s(buffer, buffer_len, _T("ana m")); break;
1514 case 0xa7: my_stprintf_s(buffer, buffer_len, _T("ana a")); break;
1515 case 0xa8: my_stprintf_s(buffer, buffer_len, _T("xra b")); break;
1516 case 0xa9: my_stprintf_s(buffer, buffer_len, _T("xra c")); break;
1517 case 0xaa: my_stprintf_s(buffer, buffer_len, _T("xra d")); break;
1518 case 0xab: my_stprintf_s(buffer, buffer_len, _T("xra e")); break;
1519 case 0xac: my_stprintf_s(buffer, buffer_len, _T("xra h")); break;
1520 case 0xad: my_stprintf_s(buffer, buffer_len, _T("xra l")); break;
1521 case 0xae: my_stprintf_s(buffer, buffer_len, _T("xra m")); break;
1522 case 0xaf: my_stprintf_s(buffer, buffer_len, _T("xra a")); break;
1523 case 0xb0: my_stprintf_s(buffer, buffer_len, _T("ora b")); break;
1524 case 0xb1: my_stprintf_s(buffer, buffer_len, _T("ora c")); break;
1525 case 0xb2: my_stprintf_s(buffer, buffer_len, _T("ora d")); break;
1526 case 0xb3: my_stprintf_s(buffer, buffer_len, _T("ora e")); break;
1527 case 0xb4: my_stprintf_s(buffer, buffer_len, _T("ora h")); break;
1528 case 0xb5: my_stprintf_s(buffer, buffer_len, _T("ora l")); break;
1529 case 0xb6: my_stprintf_s(buffer, buffer_len, _T("ora m")); break;
1530 case 0xb7: my_stprintf_s(buffer, buffer_len, _T("ora a")); break;
1531 case 0xb8: my_stprintf_s(buffer, buffer_len, _T("cmp b")); break;
1532 case 0xb9: my_stprintf_s(buffer, buffer_len, _T("cmp c")); break;
1533 case 0xba: my_stprintf_s(buffer, buffer_len, _T("cmp d")); break;
1534 case 0xbb: my_stprintf_s(buffer, buffer_len, _T("cmp e")); break;
1535 case 0xbc: my_stprintf_s(buffer, buffer_len, _T("cmp h")); break;
1536 case 0xbd: my_stprintf_s(buffer, buffer_len, _T("cmp l")); break;
1537 case 0xbe: my_stprintf_s(buffer, buffer_len, _T("cmp m")); break;
1538 case 0xbf: my_stprintf_s(buffer, buffer_len, _T("cmp a")); break;
1539 case 0xc0: my_stprintf_s(buffer, buffer_len, _T("rnz")); break;
1540 case 0xc1: my_stprintf_s(buffer, buffer_len, _T("pop b")); break;
1541 case 0xc2: my_stprintf_s(buffer, buffer_len, _T("jnz %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1542 case 0xc3: my_stprintf_s(buffer, buffer_len, _T("jmp %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1543 case 0xc4: my_stprintf_s(buffer, buffer_len, _T("cnz %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1544 case 0xc5: my_stprintf_s(buffer, buffer_len, _T("push b")); break;
1545 case 0xc6: my_stprintf_s(buffer, buffer_len, _T("adi $%02x"), ops[ptr++]); break;
1546 case 0xc7: my_stprintf_s(buffer, buffer_len, _T("rst 0")); break;
1547 case 0xc8: my_stprintf_s(buffer, buffer_len, _T("rz")); break;
1548 case 0xc9: my_stprintf_s(buffer, buffer_len, _T("ret")); break;
1549 case 0xca: my_stprintf_s(buffer, buffer_len, _T("jz %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1550 case 0xcb: my_stprintf_s(buffer, buffer_len, _T("rstv 8 (*)")); break;
1551 case 0xcc: my_stprintf_s(buffer, buffer_len, _T("cz %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1552 case 0xcd: my_stprintf_s(buffer, buffer_len, _T("call %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1553 case 0xce: my_stprintf_s(buffer, buffer_len, _T("aci $%02x"), ops[ptr++]); break;
1554 case 0xcf: my_stprintf_s(buffer, buffer_len, _T("rst 1")); break;
1555 case 0xd0: my_stprintf_s(buffer, buffer_len, _T("rnc")); break;
1556 case 0xd1: my_stprintf_s(buffer, buffer_len, _T("pop d")); break;
1557 case 0xd2: my_stprintf_s(buffer, buffer_len, _T("jnc %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1558 case 0xd3: my_stprintf_s(buffer, buffer_len, _T("out $%02x"), ops[ptr++]); break;
1559 case 0xd4: my_stprintf_s(buffer, buffer_len, _T("cnc %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1560 case 0xd5: my_stprintf_s(buffer, buffer_len, _T("push d")); break;
1561 case 0xd6: my_stprintf_s(buffer, buffer_len, _T("sui $%02x"), ops[ptr++]); break;
1562 case 0xd7: my_stprintf_s(buffer, buffer_len, _T("rst 2")); break;
1563 case 0xd8: my_stprintf_s(buffer, buffer_len, _T("rc")); break;
1564 case 0xd9: my_stprintf_s(buffer, buffer_len, _T("shlx d (*)")); break;
1565 case 0xda: my_stprintf_s(buffer, buffer_len, _T("jc %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1566 case 0xdb: my_stprintf_s(buffer, buffer_len, _T("in $%02x"), ops[ptr++]); break;
1567 case 0xdc: my_stprintf_s(buffer, buffer_len, _T("cc %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1568 case 0xdd: my_stprintf_s(buffer, buffer_len, _T("jnx %s (*)"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1569 case 0xde: my_stprintf_s(buffer, buffer_len, _T("sbi $%02x"), ops[ptr++]); break;
1570 case 0xdf: my_stprintf_s(buffer, buffer_len, _T("rst 3")); break;
1571 case 0xe0: my_stprintf_s(buffer, buffer_len, _T("rpo")); break;
1572 case 0xe1: my_stprintf_s(buffer, buffer_len, _T("pop h")); break;
1573 case 0xe2: my_stprintf_s(buffer, buffer_len, _T("jpo %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1574 case 0xe3: my_stprintf_s(buffer, buffer_len, _T("xthl")); break;
1575 case 0xe4: my_stprintf_s(buffer, buffer_len, _T("cpo %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1576 case 0xe5: my_stprintf_s(buffer, buffer_len, _T("push h")); break;
1577 case 0xe6: my_stprintf_s(buffer, buffer_len, _T("ani $%02x"), ops[ptr++]); break;
1578 case 0xe7: my_stprintf_s(buffer, buffer_len, _T("rst 4")); break;
1579 case 0xe8: my_stprintf_s(buffer, buffer_len, _T("rpe")); break;
1580 case 0xe9: my_stprintf_s(buffer, buffer_len, _T("PChl")); break;
1581 case 0xea: my_stprintf_s(buffer, buffer_len, _T("jpe %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1582 case 0xeb: my_stprintf_s(buffer, buffer_len, _T("xchg")); break;
1583 case 0xec: my_stprintf_s(buffer, buffer_len, _T("cpe %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1584 case 0xed: my_stprintf_s(buffer, buffer_len, _T("lhlx d (*)")); break;
1585 case 0xee: my_stprintf_s(buffer, buffer_len, _T("xri $%02x"), ops[ptr++]); break;
1586 case 0xef: my_stprintf_s(buffer, buffer_len, _T("rst 5")); break;
1587 case 0xf0: my_stprintf_s(buffer, buffer_len, _T("rp")); break;
1588 case 0xf1: my_stprintf_s(buffer, buffer_len, _T("pop a")); break;
1589 case 0xf2: my_stprintf_s(buffer, buffer_len, _T("jp %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1590 case 0xf3: my_stprintf_s(buffer, buffer_len, _T("di")); break;
1591 case 0xf4: my_stprintf_s(buffer, buffer_len, _T("cp %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1592 case 0xf5: my_stprintf_s(buffer, buffer_len, _T("push a")); break;
1593 case 0xf6: my_stprintf_s(buffer, buffer_len, _T("ori $%02x"), ops[ptr++]); break;
1594 case 0xf7: my_stprintf_s(buffer, buffer_len, _T("rst 6")); break;
1595 case 0xf8: my_stprintf_s(buffer, buffer_len, _T("rm")); break;
1596 case 0xf9: my_stprintf_s(buffer, buffer_len, _T("sphl")); break;
1597 case 0xfa: my_stprintf_s(buffer, buffer_len, _T("jm %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1598 case 0xfb: my_stprintf_s(buffer, buffer_len, _T("ei")); break;
1599 case 0xfc: my_stprintf_s(buffer, buffer_len, _T("cm %s"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1600 case 0xfd: my_stprintf_s(buffer, buffer_len, _T("jx %s (*)"), get_value_or_symbol(d_debugger->first_symbol, _T("$%04x"), ops[ptr] | (ops[ptr + 1] << 8))); ptr += 2; break;
1601 case 0xfe: my_stprintf_s(buffer, buffer_len, _T("cpi $%02x"), ops[ptr++]); break;
1602 case 0xff: my_stprintf_s(buffer, buffer_len, _T("rst 7")); break;