Previous 15994 Revisions Next

r13192 Tuesday 8th November, 2011 at 21:57:18 UTC by Curt Coder
[PC1512] HDC WIP. (nw)
[src/mess/machine]isa_wdxt_gen.c isa_wdxt_gen.h wd11c00_17.c wd11c00_17.h

src/mess/machine/wd11c00_17.c
r13191r13192
8484{
8585   int irq = ((m_status & STATUS_IRQ) && (m_mask & MASK_IRQ)) ? ASSERT_LINE : CLEAR_LINE;
8686   int drq = ((m_status & STATUS_DRQ) && (m_mask & MASK_DMA)) ? ASSERT_LINE : CLEAR_LINE;
87   int busy = (m_status & STATUS_BUSY) ? ASSERT_LINE : CLEAR_LINE;
87   int busy = (m_status & STATUS_BUSY) ? 0 : 1;
8888   int req = (m_status & STATUS_REQ) ? ASSERT_LINE : CLEAR_LINE;
8989   
9090   m_out_irq5_func(irq);
r13191r13192
323323   switch (offset)
324324   {
325325   case 0x00:
326      if (LOG) logerror("%s WD11C00-17 '%s' Read RAM %03x:", machine().describe_context(), tag(), m_ra);
326327      data = read_data();
328      if (LOG) logerror("%02x\n", data);
327329      break;
328330     
329331   case 0x20:
r13191r13192
344346   switch (offset)
345347   {
346348   case 0x00:
349      if (LOG) logerror("%s WD11C00-17 '%s' Write RAM %03x:%02x\n", machine().describe_context(), tag(), m_ra, data);
347350      write_data(data);
348351      break;
349352     
r13191r13192
352355      break;
353356     
354357   case 0x60:
358      if (LOG) logerror("%s WD11C00-17 '%s' RA %01x\n", machine().describe_context(), tag(), data & 0x07);
355359      m_ra = ((data & 0x07) << 8) | (m_ra & 0xff);
356360      break;
357361   }
r13191r13192
407411      m_ra &= 0xff00;
408412   }
409413}
414
415
416//-------------------------------------------------
417//  busy_r -
418//-------------------------------------------------
419   
420READ_LINE_MEMBER( wd11c00_17_device::busy_r )
421{
422   return (m_status & STATUS_BUSY) ? 0 : 1;
423}
src/mess/machine/wd11c00_17.h
r13191r13192
7777   DECLARE_WRITE_LINE_MEMBER( cd_w );
7878   DECLARE_WRITE_LINE_MEMBER( clct_w );
7979
80   DECLARE_READ_LINE_MEMBER( busy_r );
81
8082protected:
8183   // device-level overrides
8284   virtual void device_start();
src/mess/machine/isa_wdxt_gen.c
r13191r13192
8989
9090
9191//-------------------------------------------------
92//  ADDRESS_MAP( wd1015_mem )
93//-------------------------------------------------
94
95static ADDRESS_MAP_START( wd1015_mem, AS_PROGRAM, 8, wdxt_gen_device )
96   AM_RANGE(0x0000, 0x07ff) AM_ROM AM_REGION(WD1015_TAG, 0)
97ADDRESS_MAP_END
98
99
100//-------------------------------------------------
10192//  ADDRESS_MAP( wd1015_io )
10293//-------------------------------------------------
10394
10495static ADDRESS_MAP_START( wd1015_io, AS_IO, 8, wdxt_gen_device )
10596   AM_RANGE(0x00, 0xff) AM_DEVREADWRITE(WD11C00_17_TAG, wd11c00_17_device, read, write)
10697   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(wd1015_t0_r)
98   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(wd1015_t1_r)
10799   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(wd1015_p1_r, wd1015_p1_w)
108100   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(wd1015_p2_w)
109101ADDRESS_MAP_END
r13191r13192
181173//-------------------------------------------------
182174
183175static MACHINE_CONFIG_FRAGMENT( wdxt_gen )
184   MCFG_CPU_ADD(WD1015_TAG, I8048, 5000000)
185   MCFG_CPU_PROGRAM_MAP(wd1015_mem)
176   MCFG_CPU_ADD(WD1015_TAG, I8049, 5000000)
186177   MCFG_CPU_IO_MAP(wd1015_io)
187178
188179   MCFG_WD11C00_17_ADD(WD11C00_17_TAG, 5000000, host_intf)
r13191r13192
281272
282273READ8_MEMBER( wdxt_gen_device::wd1015_t0_r )
283274{
275   return m_host->busy_r();
276}
277
278
279//-------------------------------------------------
280//  wd1015_t1_r -
281//-------------------------------------------------
282
283READ8_MEMBER( wdxt_gen_device::wd1015_t1_r )
284{
284285   return 0; // TODO
285286}
286287
r13191r13192
320321
321322        bit     description
322323
323        P10     
324        P11     
325        P12     
326        P13     
327        P14     
324        P10     HSEL0
325        P11     HSEL1
326        P12     HSEL2
327        P13     DSEL0
328        P14     DSEL1
328329        P15     
329        P16     
330        P16     STEP?
330331        P17     
331332
332333    */
333334
334   logerror("P1 %02x\n", data);
335   logerror("%s P1 %02x\n", machine().describe_context(), data);
335336}
336337
337338
r13191r13192
356357
357358    */
358359   
359   logerror("P2 %02x\n", data);
360   logerror("%s P2 %02x\n", machine().describe_context(), data);
360361   
361362   m_host->clct_w(BIT(data, 4));
362363}
src/mess/machine/isa_wdxt_gen.h
r13191r13192
5555   DECLARE_READ8_MEMBER( ram_r );
5656   DECLARE_WRITE8_MEMBER( ram_w );
5757   DECLARE_READ8_MEMBER( wd1015_t0_r );
58   DECLARE_READ8_MEMBER( wd1015_t1_r );
5859   DECLARE_READ8_MEMBER( wd1015_p1_r );
5960   DECLARE_WRITE8_MEMBER( wd1015_p1_w );
6061   DECLARE_WRITE8_MEMBER( wd1015_p2_w );

Previous 15994 Revisions Next


© 1998-2018 The MESS Team