Previous 15994 Revisions Next

r10983 Wednesday 30th March, 2011 at 09:53:53 UTC by Curt Coder
[ABC1600] Fixed DMAMAP offsets, added watchdog and DRDY0-2.
[src/mess/drivers]abc1600.c
[src/mess/includes]abc1600.h

src/mess/includes/abc1600.h
r10982r10983
139139   void write_user_memory(offs_t offset, UINT8 data);
140140   UINT8 read_supervisor_memory(offs_t offset);
141141   void write_supervisor_memory(offs_t offset, UINT8 data);
142
143   inline void update_drdy0();
144   inline void update_drdy1();
145   inline void update_drdy2();
142146   inline offs_t get_dma_address(int index, UINT16 offset);
143147   inline UINT8 dma_mreq_r(int index, UINT16 offset);
144148   inline void dma_mreq_w(int index, UINT16 offset, UINT8 data);
src/mess/drivers/abc1600.c
r10982r10983
1010
1111    TODO:
1212
13   - sector not boot
14    - floppy
15   - watchdog
13   - floppy
14      - sector 0 not boot
15   - BUS0I/0X/1/2
16   - M68K bus errors
17   - short/long reset (RSTBUT)
18   - SCC interrupt
1619    - CIO (interrupt controller)
1720      - RTC
1821      - NVRAM
r10982r10983
7174// DMA map
7275enum
7376{
74   DMAMAP_R2_LO = 2,
77   DMAMAP_R2_LO = 0,
7578   DMAMAP_R2_HI,
76   DMAMAP_R1_LO,
79   DMAMAP_R1_LO = 4,
7780   DMAMAP_R1_HI,
7881   DMAMAP_R0_LO,
7982   DMAMAP_R0_HI
r10982r10983
536539      7      X20
537540   
538541   */
539
540   //watchdog_reset_w()
541542   
542543   UINT8 data = 0x02;
543544   
544545   // DMA status
545546   data |= m_cause;
547   
548   watchdog_reset(machine);
546549
547550   return data;
548551}
r10982r10983
715718}
716719
717720
721
718722//**************************************************************************
719723//  DMA
720724//**************************************************************************
721725
722726//-------------------------------------------------
727//  update_drdy0 -
728//-------------------------------------------------
729
730inline void abc1600_state::update_drdy0()
731{
732   if (m_sysfs)
733   {
734      // floppy
735      m_dma0->rdy_w(!wd17xx_drq_r(m_fdc));
736   }
737   else
738   {
739      // BUS0I/BUS0X
740      m_dma0->rdy_w(1);
741   }
742}
743
744
745//-------------------------------------------------
746//  update_drdy1 -
747//-------------------------------------------------
748
749inline void abc1600_state::update_drdy1()
750{
751   if (m_sysscc)
752   {
753      // SCC
754      m_dma1->rdy_w(1);
755   }
756   else
757   {
758      // BUS1
759      m_dma1->rdy_w(1);
760   }
761}
762
763
764//-------------------------------------------------
765//  update_drdy2 -
766//-------------------------------------------------
767
768inline void abc1600_state::update_drdy2()
769{
770   // Winchester
771   m_dma2->rdy_w(1);
772}
773
774   
775//-------------------------------------------------
723776//  get_dma_address -
724777//-------------------------------------------------
725778
r10982r10983
912965   
913966   case 6: // SYSSCC
914967      m_sysscc = state;
968      update_drdy1();
915969      break;
916970   
917971   case 7: // SYSFS
918972      m_sysfs = state;
919     
920      if (m_sysfs)
921      {
922         z80dma_rdy_w(m_dma0, !wd17xx_drq_r(m_fdc));
923      }
924      else
925      {
926         z80dma_rdy_w(m_dma0, 1);
927      }
973      update_drdy0();
928974      break;
929975   }
930976}
r10982r10983
12921338
12931339WRITE_LINE_MEMBER( abc1600_state::drq_w )
12941340{
1295   if (m_sysfs)
1296   {
1297      z80dma_rdy_w(m_dma0, !state);
1298   }
1299   else
1300   {
1301      z80dma_rdy_w(m_dma0, 1);
1302   }
1341   update_drdy0();
13031342}
13041343
13051344static const wd17xx_interface fdc_intf =
r10982r10983
13901429   // basic machine hardware
13911430   MCFG_CPU_ADD(MC68008P8_TAG, M68008, XTAL_64MHz/8)
13921431   MCFG_CPU_PROGRAM_MAP(abc1600_mem)
1432   MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(XTAL_64MHz/8/10/20000/8/8))
13931433
13941434   // video hardware
13951435   MCFG_FRAGMENT_ADD(abc1600_video)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team