trunk/src/mess/drivers/victor9k.c
r241747 | r241748 | |
511 | 511 | MCFG_DEVICE_ADD(FDC_TAG, VICTOR_9000_FDC, 0) |
512 | 512 | MCFG_VICTOR_9000_FDC_IRQ_CB(WRITELINE(victor9k_state, fdc_irq_w)) |
513 | 513 | MCFG_VICTOR_9000_FDC_SYN_CB(DEVWRITELINE(I8259A_TAG, pic8259_device, ir0_w)) MCFG_DEVCB_XOR(1) |
514 | | MCFG_VICTOR_9000_FDC_LBRDY_CB(INPUTLINE(I8088_TAG, INPUT_LINE_TEST)) |
| 514 | MCFG_VICTOR_9000_FDC_LBRDY_CB(INPUTLINE(I8088_TAG, INPUT_LINE_TEST)) MCFG_DEVCB_XOR(1) |
515 | 515 | |
516 | 516 | // internal ram |
517 | 517 | MCFG_RAM_ADD(RAM_TAG) |
trunk/src/mess/machine/victor9k_fdc.c
r241747 | r241748 | |
13 | 13 | |
14 | 14 | TODO: |
15 | 15 | |
16 | | - disk error 8 (sync missing?) |
| 16 | - disk error 2 (cannot find block header?) |
17 | 17 | - 8048 spindle speed control |
18 | 18 | - read PLL |
19 | 19 | - write logic |
r241747 | r241748 | |
28 | 28 | // MACROS / CONSTANTS |
29 | 29 | //************************************************************************** |
30 | 30 | |
31 | | #define LOG 1 |
32 | | #define LOG_VIA 1 |
| 31 | #define LOG 0 |
| 32 | #define LOG_VIA 0 |
33 | 33 | #define LOG_SCP 0 |
34 | 34 | |
35 | 35 | #define I8048_TAG "5d" |
r241747 | r241748 | |
211 | 211 | m_via6_irq(CLEAR_LINE), |
212 | 212 | m_syn(0), |
213 | 213 | m_lbrdy(1), |
214 | | m_period(attotime::from_nsec(21300)) |
| 214 | m_period(attotime::from_nsec(2130)) |
215 | 215 | { |
216 | 216 | cur_live.tm = attotime::never; |
217 | 217 | cur_live.state = IDLE; |
r241747 | r241748 | |
1103 | 1103 | // syn |
1104 | 1104 | int syn = !(cur_live.sync_byte_counter == 15); |
1105 | 1105 | |
| 1106 | if (LOG) logerror("%s bit %u sync %u bc %u sbc %u sBC %u syn %u\n",cur_live.tm.as_string(),bit,sync,cur_live.bit_counter,cur_live.sync_bit_counter,cur_live.sync_byte_counter,syn); |
| 1107 | |
1106 | 1108 | // GCR decoder |
1107 | 1109 | if (cur_live.drw) { |
1108 | 1110 | cur_live.i = cur_live.drw << 10 | cur_live.shift_reg; |
r241747 | r241748 | |
1120 | 1122 | |
1121 | 1123 | if (brdy != cur_live.brdy) { |
1122 | 1124 | if (LOG) logerror("%s BRDY %u\n", cur_live.tm.as_string(),brdy); |
| 1125 | if (LOG && !brdy) |
| 1126 | { |
| 1127 | UINT8 e = cur_live.e; |
| 1128 | UINT8 i = cur_live.i; |
| 1129 | |
| 1130 | UINT8 data = BIT(e, 6) << 7 | BIT(i, 7) << 6 | BIT(e, 5) << 5 | BIT(e, 4) << 4 | BIT(e, 2) << 3 | BIT(i, 1) << 2 | (e & 0x03); |
| 1131 | logerror("%s BRDY %02x\n",cur_live.tm.as_string(),data); |
| 1132 | } |
1123 | 1133 | cur_live.brdy = brdy; |
1124 | 1134 | if (!brdy) cur_live.lbrdy = 0; |
1125 | 1135 | syncpoint = true; |