Previous 199869 Revisions Next

r37119 Saturday 11th April, 2015 at 17:16:22 UTC by Curt Coder
(MESS) c8050fdc: Fixed write protect sense. (nw)
[src/emu/bus/ieee488]c2040fdc.c c8050.c c8050fdc.c c8050fdc.h
[src/emu/machine]mos6530n.c
[src/mess/machine]victor9k_fdc.c victor9k_fdc.h

trunk/src/emu/bus/ieee488/c2040fdc.c
r245630r245631
9393}
9494
9595
96
9796//-------------------------------------------------
9897//  device_start - device-specific startup
9998//-------------------------------------------------
trunk/src/emu/bus/ieee488/c8050.c
r245630r245631
549549   MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
550550   MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
551551   MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
552   MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
552553   MCFG_MOS6530n_IN_PB6_CB(VCC) // SINGLE SIDED
553554
554555   MCFG_DEVICE_ADD(FDC_TAG, C8050_FDC, XTAL_12MHz/2)
r245630r245631
556557   MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
557558   MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
558559   MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
559   MCFG_C8050_WPS_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb3_w))
560560   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
561561   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8050_floppies, "525ssqd", c8050_device::floppy_formats)
562562MACHINE_CONFIG_END
r245630r245631
609609   MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
610610   MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
611611   MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
612   MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
612613   MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
613614   MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
614615
r245630r245631
617618   MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
618619   MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
619620   MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
620   MCFG_C8050_WPS_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb3_w))
621621   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250_device::floppy_formats)
622622   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250_device::floppy_formats)
623623MACHINE_CONFIG_END
r245630r245631
670670   MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
671671   MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
672672   MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
673   MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
673674   MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
674675   MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
675676
r245630r245631
678679   MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
679680   MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
680681   MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
681   MCFG_C8050_WPS_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb3_w))
682682   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
683683   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, "525qd", c8250lp_device::floppy_formats)
684684MACHINE_CONFIG_END
r245630r245631
731731   MCFG_MOS6530n_OUT_PB0_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, drv_sel_w))
732732   MCFG_MOS6530n_OUT_PB1_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds0_w))
733733   MCFG_MOS6530n_OUT_PB2_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, ds1_w))
734   MCFG_MOS6530n_IN_PB3_CB(DEVREADLINE(FDC_TAG, c8050_fdc_t, wps_r))
734735   MCFG_MOS6530n_OUT_PB4_CB(DEVWRITELINE(FDC_TAG, c8050_fdc_t, odd_hd_w))
735736   MCFG_MOS6530n_IN_PB6_CB(GND) // DOUBLE SIDED
736737
r245630r245631
739740   MCFG_C8050_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
740741   MCFG_C8050_BRDY_CALLBACK(INPUTLINE(M6504_TAG, M6502_SET_OVERFLOW)) MCFG_DEVCB_XOR(1)
741742   MCFG_C8050_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
742   MCFG_C8050_WPS_CALLBACK(DEVWRITELINE(M6530_TAG, mos6530_t, pb3_w))
743743   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", c8250_floppies, "525qd", sfd1001_device::floppy_formats)
744744   MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":1", c8250_floppies, NULL,    sfd1001_device::floppy_formats)
745745MACHINE_CONFIG_END
trunk/src/emu/bus/ieee488/c8050fdc.c
r245630r245631
7979   m_write_ready(*this),
8080   m_write_brdy(*this),
8181   m_write_error(*this),
82   m_write_wps(*this),
8382   m_gcr_rom(*this, "gcr"),
8483   m_floppy0(NULL),
8584   m_floppy1(NULL),
r245630r245631
9089   m_ds(0),
9190   m_drv_sel(0),
9291   m_mode_sel(0),
93   m_rw_sel(0),
94   m_wps(0),
95   m_wps0(0),
96   m_wps1(0)
92   m_rw_sel(0)
9793{
9894   cur_live.tm = attotime::never;
9995   cur_live.state = IDLE;
r245630r245631
113109   m_write_ready.resolve_safe();
114110   m_write_brdy.resolve_safe();
115111   m_write_error.resolve_safe();
116   m_write_wps.resolve_safe();
117112
118113   // allocate timer
119114   t_gen = timer_alloc(0);
r245630r245631
127122   save_item(NAME(m_drv_sel));
128123   save_item(NAME(m_mode_sel));
129124   save_item(NAME(m_rw_sel));
125   save_item(NAME(m_odd_hd));
126   save_item(NAME(m_pi));
130127}
131128
132129
r245630r245631
222219void c8050_fdc_t::set_floppy(floppy_image_device *floppy0, floppy_image_device *floppy1)
223220{
224221   m_floppy0 = floppy0;
225   m_floppy0->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(c8050_fdc_t::wps0_w), this));
226
227   if (floppy1) {
228      m_floppy1 = floppy1;
229      m_floppy1->setup_wpt_cb(floppy_image_device::wpt_cb(FUNC(c8050_fdc_t::wps1_w), this));
230   }
222   m_floppy1 = floppy1;
231223}
232224
233void c8050_fdc_t::update_wps()
234{
235   int state = m_drv_sel ? m_wps1 : m_wps0;
236
237   if (m_wps != state)
238   {
239      m_wps = state;
240      m_write_wps(m_wps);
241   }
242}
243
244void c8050_fdc_t::wps0_w(floppy_image_device *floppy, int state)
245{
246   if (m_wps0 != state)
247   {
248      live_sync();
249      m_wps0 = state;
250      update_wps();
251      checkpoint();
252      live_run();
253   }
254}
255
256void c8050_fdc_t::wps1_w(floppy_image_device *floppy, int state)
257{
258   if (m_wps1 != state)
259   {
260      live_sync();
261      m_wps0 = state;
262      update_wps();
263      checkpoint();
264      live_run();
265   }
266}
267
268225void c8050_fdc_t::live_start()
269226{
270227   cur_live.tm = machine().time();
r245630r245631
281238   cur_live.mode_sel = m_mode_sel;
282239   cur_live.rw_sel = m_rw_sel;
283240   cur_live.pi = m_pi;
284   cur_live.wps = m_wps;
285241
286242   pll_reset(cur_live.tm, attotime::from_hz(clock() / (16 - m_ds)));
287243   checkpoint_live = cur_live;
r245630r245631
408364         if (cur_live.tm > limit)
409365            return;
410366
367         // read bit
411368         int bit = pll_get_next_bit(cur_live.tm, get_floppy(), limit);
412369         if(bit < 0)
413370            return;
r245630r245631
563520   {
564521      live_sync();
565522      m_drv_sel = cur_live.drv_sel = state;
566      update_wps();
567523      checkpoint();
568524      if (LOG) logerror("%s %s DRV SEL %u\n", machine().time().as_string(), machine().describe_context(), state);
569525      live_run();
trunk/src/emu/bus/ieee488/c8050fdc.h
r245630r245631
3838#define MCFG_C8050_ERROR_CALLBACK(_write) \
3939   devcb = &c8050_fdc_t::set_error_wr_callback(*device, DEVCB_##_write);
4040
41#define MCFG_C8050_WPS_CALLBACK(_write) \
42   devcb = &c8050_fdc_t::set_wps_wr_callback(*device, DEVCB_##_write);
4341
4442
45
4643//**************************************************************************
4744//  TYPE DEFINITIONS
4845//**************************************************************************
r245630r245631
5956   template<class _Object> static devcb_base &set_ready_wr_callback(device_t &device, _Object object) { return downcast<c8050_fdc_t &>(device).m_write_ready.set_callback(object); }
6057   template<class _Object> static devcb_base &set_brdy_wr_callback(device_t &device, _Object object) { return downcast<c8050_fdc_t &>(device).m_write_brdy.set_callback(object); }
6158   template<class _Object> static devcb_base &set_error_wr_callback(device_t &device, _Object object) { return downcast<c8050_fdc_t &>(device).m_write_error.set_callback(object); }
62   template<class _Object> static devcb_base &set_wps_wr_callback(device_t &device, _Object object) { return downcast<c8050_fdc_t &>(device).m_write_wps.set_callback(object); }
6359
6460   DECLARE_READ8_MEMBER( read );
6561   DECLARE_WRITE8_MEMBER( write );
r245630r245631
7470   DECLARE_WRITE_LINE_MEMBER( odd_hd_w );
7571   DECLARE_WRITE_LINE_MEMBER( pull_sync_w );
7672
73   DECLARE_READ_LINE_MEMBER( wps_r ) { return checkpoint_live.drv_sel ? m_floppy1->wpt_r() : m_floppy0->wpt_r(); }
74
7775   void stp0_w(int stp);
7876   void stp1_w(int stp);
7977   void ds_w(int ds);
8078
8179   void set_floppy(floppy_image_device *floppy0, floppy_image_device *floppy1);
82   void wps0_w(floppy_image_device *floppy, int state);
83   void wps1_w(floppy_image_device *floppy, int state);
8480
8581protected:
8682   // device-level overrides
r245630r245631
9288   virtual const rom_entry *device_rom_region() const;
9389
9490   void stp_w(floppy_image_device *floppy, int mtr, int &old_stp, int stp);
95   void update_wps();
9691
9792   enum {
9893      IDLE,
r245630r245631
123118
124119      UINT8 pi;
125120      UINT16 shift_reg_write;
126      int wps;
127121   };
128122
129123   devcb_write_line m_write_sync;
130124   devcb_write_line m_write_ready;
131125   devcb_write_line m_write_brdy;
132126   devcb_write_line m_write_error;
133   devcb_write_line m_write_wps;
134127
135128   required_memory_region m_gcr_rom;
136129
r245630r245631
149142   int m_rw_sel;
150143   int m_odd_hd;
151144   UINT8 m_pi;
152   int m_wps;
153   int m_wps0;
154   int m_wps1;
155145
156146   live_info cur_live, checkpoint_live;
157147   fdc_pll_t cur_pll, checkpoint_pll;
trunk/src/emu/machine/mos6530n.c
r245630r245631
1818//**************************************************************************
1919
2020#define LOG 0
21#define LOG_TIMER 0
2122
2223
2324
r245630r245631
111112{
112113   // resolve callbacks
113114   m_irq_cb.resolve_safe();
114   m_in_pa_cb.resolve_safe(0xff);
115   m_out_pa_cb.resolve_safe();
116   m_in_pb_cb.resolve_safe(0xff);
117   m_out_pb_cb.resolve_safe();
115   m_in_pa_cb.resolve();
116   m_out_pa_cb.resolve();
117   m_in_pb_cb.resolve();
118   m_out_pb_cb.resolve();
118119   m_in_pa0_cb.resolve_safe(1);
119120   m_in_pa1_cb.resolve_safe(1);
120121   m_in_pa2_cb.resolve_safe(1);
r245630r245631
198199   UINT8 ddr = m_pa_ddr;
199200   UINT8 data = (out & ddr) | (ddr ^ 0xff);
200201
201   m_out_pa_cb(data);
202
203   m_out_pa0_cb(BIT(data, 0));
204   m_out_pa1_cb(BIT(data, 1));
205   m_out_pa2_cb(BIT(data, 2));
206   m_out_pa3_cb(BIT(data, 3));
207   m_out_pa4_cb(BIT(data, 4));
208   m_out_pa5_cb(BIT(data, 5));
209   m_out_pa6_cb(BIT(data, 6));
210   m_out_pa7_cb(BIT(data, 7));
202   if (m_out_pa_cb.isnull())
203   {
204      m_out_pa0_cb(BIT(data, 0));
205      m_out_pa1_cb(BIT(data, 1));
206      m_out_pa2_cb(BIT(data, 2));
207      m_out_pa3_cb(BIT(data, 3));
208      m_out_pa4_cb(BIT(data, 4));
209      m_out_pa5_cb(BIT(data, 5));
210      m_out_pa6_cb(BIT(data, 6));
211      m_out_pa7_cb(BIT(data, 7));
212   }
213   else
214   {
215      m_out_pa_cb(data);
216   }
211217}
212218
213219
r245630r245631
228234      m_irq_cb(m_irq ? ASSERT_LINE : CLEAR_LINE);
229235   }
230236
231   m_out_pb_cb(data);
232
233   m_out_pb0_cb(BIT(data, 0));
234   m_out_pb1_cb(BIT(data, 1));
235   m_out_pb2_cb(BIT(data, 2));
236   m_out_pb3_cb(BIT(data, 3));
237   m_out_pb4_cb(BIT(data, 4));
238   m_out_pb5_cb(BIT(data, 5));
239   m_out_pb6_cb(BIT(data, 6));
240   m_out_pb7_cb(BIT(data, 7));
237   if (m_out_pb_cb.isnull())
238   {
239      m_out_pb0_cb(BIT(data, 0));
240      m_out_pb1_cb(BIT(data, 1));
241      m_out_pb2_cb(BIT(data, 2));
242      m_out_pb3_cb(BIT(data, 3));
243      m_out_pb4_cb(BIT(data, 4));
244      m_out_pb5_cb(BIT(data, 5));
245      m_out_pb6_cb(BIT(data, 6));
246      m_out_pb7_cb(BIT(data, 7));
247   }
248   else
249   {
250      m_out_pb_cb(data);   
251   }
241252}
242253
243254
r245630r245631
247258
248259void mos6530_t::pa_w(int bit, int state)
249260{
250   m_pa_in &= ~(2 << bit);
251
252   if (state) m_pa_in |= (2 << bit);
261   m_pa_in &= ~(1 << bit);
262   m_pa_in |= (state << bit);
253263}
254264
255265
r245630r245631
259269
260270void mos6530_t::pb_w(int bit, int state)
261271{
262   m_pb_in &= ~(2 << bit);
263
264   if (state) m_pb_in |= (2 << bit);
272   m_pb_in &= ~(1 << bit);
273   m_pb_in |= (state << bit);
265274}
266275
267276
r245630r245631
275284
276285   if (m_in_pa_cb.isnull())
277286   {
278      in |= m_in_pa0_cb.isnull() ? BIT(m_pa_in, 0) : m_in_pa0_cb() << 0;
279      in |= m_in_pa1_cb.isnull() ? BIT(m_pa_in, 1) : m_in_pa1_cb() << 1;
280      in |= m_in_pa2_cb.isnull() ? BIT(m_pa_in, 2) : m_in_pa2_cb() << 2;
281      in |= m_in_pa3_cb.isnull() ? BIT(m_pa_in, 3) : m_in_pa3_cb() << 3;
282      in |= m_in_pa4_cb.isnull() ? BIT(m_pa_in, 4) : m_in_pa4_cb() << 4;
283      in |= m_in_pa5_cb.isnull() ? BIT(m_pa_in, 5) : m_in_pa5_cb() << 5;
284      in |= m_in_pa6_cb.isnull() ? BIT(m_pa_in, 6) : m_in_pa6_cb() << 6;
285      in |= m_in_pa7_cb.isnull() ? BIT(m_pa_in, 7) : m_in_pa7_cb() << 7;
287      in |= (m_in_pa0_cb.isnull() ? BIT(m_pa_in, 0) : m_in_pa0_cb());
288      in |= (m_in_pa1_cb.isnull() ? BIT(m_pa_in, 1) : m_in_pa1_cb()) << 1;
289      in |= (m_in_pa2_cb.isnull() ? BIT(m_pa_in, 2) : m_in_pa2_cb()) << 2;
290      in |= (m_in_pa3_cb.isnull() ? BIT(m_pa_in, 3) : m_in_pa3_cb()) << 3;
291      in |= (m_in_pa4_cb.isnull() ? BIT(m_pa_in, 4) : m_in_pa4_cb()) << 4;
292      in |= (m_in_pa5_cb.isnull() ? BIT(m_pa_in, 5) : m_in_pa5_cb()) << 5;
293      in |= (m_in_pa6_cb.isnull() ? BIT(m_pa_in, 6) : m_in_pa6_cb()) << 6;
294      in |= (m_in_pa7_cb.isnull() ? BIT(m_pa_in, 7) : m_in_pa7_cb()) << 7;
286295   }
287296   else
288297   {
r245630r245631
290299   }
291300
292301   UINT8 out = m_pa_out;
293   UINT8 ddr = m_pa_ddr;
302   UINT8 ddr_out = m_pa_ddr;
303   UINT8 ddr_in = m_pa_ddr ^ 0xff;
304   UINT8 data = (out & ddr_out) | (in & ddr_in);
294305
295   return (out & ddr) | (in & (ddr ^ 0xff));
306   if (LOG) logerror("%s %s MOS6530 '%s' Port A Data In %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
307
308   return data;
296309}
297310
298311
r245630r245631
304317{
305318   m_pa_out = data;
306319
307   if (LOG) logerror("%s %s MOS6530 '%s' Port A data %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
320   if (LOG) logerror("%s %s MOS6530 '%s' Port A Data Out %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
308321
309322   update_pa();
310323}
r245630r245631
334347
335348   if (m_in_pb_cb.isnull())
336349   {
337      in |= m_in_pb0_cb.isnull() ? BIT(m_pb_in, 0) : m_in_pb0_cb() << 0;
338      in |= m_in_pb1_cb.isnull() ? BIT(m_pb_in, 1) : m_in_pb1_cb() << 1;
339      in |= m_in_pb2_cb.isnull() ? BIT(m_pb_in, 2) : m_in_pb2_cb() << 2;
340      in |= m_in_pb3_cb.isnull() ? BIT(m_pb_in, 3) : m_in_pb3_cb() << 3;
341      in |= m_in_pb4_cb.isnull() ? BIT(m_pb_in, 4) : m_in_pb4_cb() << 4;
342      in |= m_in_pb5_cb.isnull() ? BIT(m_pb_in, 5) : m_in_pb5_cb() << 5;
343      in |= m_in_pb6_cb.isnull() ? BIT(m_pb_in, 6) : m_in_pb6_cb() << 6;
344      in |= m_in_pb7_cb.isnull() ? BIT(m_pb_in, 7) : m_in_pb7_cb() << 7;
350      in |= (m_in_pb0_cb.isnull() ? BIT(m_pb_in, 0) : m_in_pb0_cb());
351      in |= (m_in_pb1_cb.isnull() ? BIT(m_pb_in, 1) : m_in_pb1_cb()) << 1;
352      in |= (m_in_pb2_cb.isnull() ? BIT(m_pb_in, 2) : m_in_pb2_cb()) << 2;
353      in |= (m_in_pb3_cb.isnull() ? BIT(m_pb_in, 3) : m_in_pb3_cb()) << 3;
354      in |= (m_in_pb4_cb.isnull() ? BIT(m_pb_in, 4) : m_in_pb4_cb()) << 4;
355      in |= (m_in_pb5_cb.isnull() ? BIT(m_pb_in, 5) : m_in_pb5_cb()) << 5;
356      in |= (m_in_pb6_cb.isnull() ? BIT(m_pb_in, 6) : m_in_pb6_cb()) << 6;
357      in |= (m_in_pb7_cb.isnull() ? BIT(m_pb_in, 7) : m_in_pb7_cb()) << 7;
345358   }
346359   else
347360   {
r245630r245631
349362   }
350363
351364   UINT8 out = m_pb_out;
352   UINT8 ddr = m_pb_ddr;
365   UINT8 ddr_out = m_pb_ddr;
366   UINT8 ddr_in = m_pb_ddr ^ 0xff;
367   UINT8 data = (out & ddr_out) | (in & ddr_in);
353368
354   return (out & ddr) | (in & (ddr ^ 0xff));
369   if (LOG) logerror("%s %s MOS6530 '%s' Port B Data In %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
370logerror("PB data read %02x\n",data);
371   return data;
355372}
356373
357374
r245630r245631
363380{
364381   m_pb_out = data;
365382
366   if (LOG) logerror("%s %s MOS6530 '%s' Port B data %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
383   if (LOG) logerror("%s %s MOS6530 '%s' Port B Data Out %02x\n", machine().time().as_string(), machine().describe_context(), tag(), data);
367384
368385   update_pb();
369386}
r245630r245631
438455
439456   m_ie = BIT(offset, 3) ? true : false;
440457
441   if (LOG) logerror("%s %s MOS6530 '%s' Timer value %02x shift %u IE %u\n", machine().time().as_string(), machine().describe_context(), tag(), data, m_shift, m_ie ? 1 : 0);
458   if (LOG_TIMER) logerror("%s %s MOS6530 '%s' Timer value %02x shift %u IE %u\n", machine().time().as_string(), machine().describe_context(), tag(), data, m_shift, m_ie ? 1 : 0);
442459
443460   if (m_irq) {
444461      m_irq = false;
r245630r245631
541558
542559         cur_live.value--;
543560
544         if (LOG) logerror("%s MOS6530 '%s' timer %02x IRQ 1\n", cur_live.tm.as_string(), tag(), cur_live.value);
561         if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 1\n", cur_live.tm.as_string(), tag(), cur_live.value);
545562
546563         if (!cur_live.value) {
547564            cur_live.period = attotime::from_hz(clock());
r245630r245631
559576         cur_live.value--;
560577         cur_live.irq = true;
561578
562         if (LOG) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value);
579         if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value);
563580
564581         live_delay(RUNNING_SYNCPOINT);
565582
r245630r245631
568585      }
569586
570587      case RUNNING_SYNCPOINT: {
571         if (LOG) logerror("%s MOS6530 '%s' IRQ\n", machine().time().as_string(), tag());
588         if (LOG_TIMER) logerror("%s MOS6530 '%s' IRQ\n", machine().time().as_string(), tag());
572589
573590         m_irq = true;
574591         update_pb();
r245630r245631
584601
585602         cur_live.value--;
586603
587         if (LOG) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value);
604         if (LOG_TIMER) logerror("%s MOS6530 '%s' timer %02x IRQ 0\n", cur_live.tm.as_string(), tag(), cur_live.value);
588605
589606         if (!cur_live.value) {
590607            live_abort();
trunk/src/mess/machine/victor9k_fdc.c
r245630r245631
260260   cur_live.tm = attotime::never;
261261   cur_live.state = IDLE;
262262   cur_live.next_state = -1;
263   cur_live.write_position = 0;
264   cur_live.write_start_time = attotime::never;
265263}
266264
267265
r245630r245631
271269
272270void victor_9000_fdc_t::device_start()
273271{
272   // resolve callbacks
273   m_irq_cb.resolve_safe();
274   m_syn_cb.resolve_safe();
275   m_lbrdy_cb.resolve_safe();
276
274277   // allocate timer
275278   t_gen = timer_alloc(TM_GEN);
276279   t_tach0 = timer_alloc(TM_TACH0);
r245630r245631
314317{
315318   live_abort();
316319
317   // resolve callbacks
318   m_irq_cb.resolve_safe();
319   m_syn_cb.resolve_safe();
320   m_lbrdy_cb.resolve_safe();
321
322320   // reset devices
323321   m_via4->reset();
324322   m_via5->reset();
r245630r245631
11761174   cur_live.tm = attotime::never;
11771175   cur_live.state = IDLE;
11781176   cur_live.next_state = -1;
1179   cur_live.write_position = 0;
1180   cur_live.write_start_time = attotime::never;
11811177
11821178   cur_live.brdy = 1;
11831179   cur_live.lbrdy_changed = true;
trunk/src/mess/machine/victor9k_fdc.h
r245630r245631
148148
149149      // write
150150      UINT16 shift_reg_write;
151      attotime write_start_time;
152      attotime write_buffer[32];
153      int write_position;
154151      UINT8 wd;
155152      int wrsync;
156153      int gcr_data;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team