| Previous | 199869 Revisions | Next |
| r26226 Sunday 17th November, 2013 at 11:15:26 UTC by Curt Coder |
|---|
| wd_fdc: Fixed ready interrupt polarity. Added a soft_reset() function which resets only the FDC and not the floppy image devices, thus preserving the correct ready states. [Curt Coder] |
| [src/emu/bus/abcbus] | lux21046.c |
| [src/emu/machine] | wd_fdc.c wd_fdc.h |
| r26225 | r26226 | |
|---|---|---|
| 65 | 65 | |
| 66 | 66 | void wd_fdc_t::device_reset() |
| 67 | 67 | { |
| 68 | soft_reset(); | |
| 69 | } | |
| 70 | ||
| 71 | void wd_fdc_t::soft_reset() | |
| 72 | { | |
| 68 | 73 | command = 0x00; |
| 69 | 74 | main_state = IDLE; |
| 70 | 75 | sub_state = IDLE; |
| r26225 | r26226 | |
| 1071 | 1076 | if(!ready_hooked) |
| 1072 | 1077 | return; |
| 1073 | 1078 | |
| 1074 | if(!intrq && (((intrq_cond & I_RDY) && state) || ((intrq_cond & I_NRDY) && | |
| 1079 | if(!intrq && (((intrq_cond & I_RDY) && !state) || ((intrq_cond & I_NRDY) && state))) { | |
| 1075 | 1080 | intrq = true; |
| 1076 | 1081 | if(!intrq_cb.isnull()) |
| 1077 | 1082 | intrq_cb(intrq); |
| r26225 | r26226 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | wd_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
| 119 | 119 | |
| 120 | void soft_reset(); | |
| 121 | ||
| 120 | 122 | void dden_w(bool dden); |
| 121 | 123 | void set_floppy(floppy_image_device *floppy); |
| 122 | 124 | void setup_intrq_cb(line_cb cb); |
| r26225 | r26226 | |
|---|---|---|
| 821 | 821 | m_cs = false; |
| 822 | 822 | m_out = 0; |
| 823 | 823 | |
| 824 | m_maincpu->reset(); | |
| 825 | ||
| 824 | 826 | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 825 | 827 | _4b_w(space, 0, 0); |
| 826 | 828 | _9b_w(space, 0, 0); |
| r26225 | r26226 | |
| 940 | 942 | { |
| 941 | 943 | if (m_cs) |
| 942 | 944 | { |
| 943 | | |
| 945 | device_reset(); | |
| 944 | 946 | } |
| 945 | 947 | } |
| 946 | 948 | |
| r26225 | r26226 | |
| 1085 | 1087 | */ |
| 1086 | 1088 | |
| 1087 | 1089 | // FDC master reset |
| 1088 | if (!BIT(data, 0)) m_fdc->reset(); | |
| 1090 | if (!BIT(data, 0)) m_fdc->soft_reset(); | |
| 1089 | 1091 | |
| 1090 | 1092 | // density select |
| 1091 | 1093 | m_fdc->dden_w(BIT(data, 1)); |
| Previous | 199869 Revisions | Next |