Previous 15994 Revisions Next

r15369 Thursday 31st May, 2012 at 14:50:43 UTC by Curt Coder
[WANGPC] Some DMA fixes. (nw)
[src/mess/drivers]wangpc.c
[src/mess/includes]wangpc.h

src/mess/includes/wangpc.h
r15368r15369
125125   DECLARE_WRITE8_MEMBER( nmi_mask_w );
126126   DECLARE_READ8_MEMBER( led_on_r );
127127   DECLARE_WRITE8_MEMBER( fpu_mask_w );
128   DECLARE_READ8_MEMBER( dma_eop_clr_r );
128129   DECLARE_WRITE8_MEMBER( uart_tbre_clr_w );
129130   DECLARE_READ8_MEMBER( uart_r );
130131   DECLARE_WRITE8_MEMBER( uart_w );
src/mess/drivers/wangpc.c
r15368r15369
267267 
268268WRITE8_MEMBER( wangpc_state::dma_page_w )
269269{
270    if (LOG) logerror("%s: DMA page %u: %01x\n", machine().describe_context(), offset, data & 0x0f);
270    if (LOG) logerror("%s: DMA page %u: %06x\n", machine().describe_context(), offset + 1, (data & 0x0f) << 16);
271271 
272   m_dma_page[offset] = data & 0x0f;
272   m_dma_page[offset + 1] = data & 0x0f;
273273}
274274 
275275 
r15368r15369
369369 
370370 
371371//-------------------------------------------------
372//  dma_eop_clr_r -
373//-------------------------------------------------
374 
375READ8_MEMBER( wangpc_state::dma_eop_clr_r )
376{
377    if (LOG) logerror("%s: EOP clear\n", machine().describe_context());
378 
379   m_dma_eop = 1;
380 
381   check_level2_interrupts();
382 
383   return 0xff;
384}
385 
386 
387//-------------------------------------------------
372388//  uart_tbre_clr_w -
373389//-------------------------------------------------
374390 
r15368r15369
592608   AM_RANGE(0x10e0, 0x10e1) AM_READWRITE8(status_r, timer0_irq_clr_w, 0x00ff)
593609   AM_RANGE(0x10e2, 0x10e3) AM_READWRITE8(timer2_irq_clr_r, nmi_mask_w, 0x00ff)
594610   AM_RANGE(0x10e4, 0x10e5) AM_READWRITE8(led_on_r, fpu_mask_w, 0x00ff)
595   AM_RANGE(0x10e6, 0x10e7) AM_WRITE8(uart_tbre_clr_w, 0x00ff)
611   AM_RANGE(0x10e6, 0x10e7) AM_READWRITE8(dma_eop_clr_r, uart_tbre_clr_w, 0x00ff)
596612   AM_RANGE(0x10e8, 0x10e9) AM_READWRITE8(uart_r, uart_w, 0x00ff)
597613   AM_RANGE(0x10ea, 0x10eb) AM_READWRITE8(centronics_r, centronics_w, 0x00ff)
598614   AM_RANGE(0x10ec, 0x10ed) AM_READWRITE8(busy_clr_r, acknlg_clr_w, 0x00ff)
r15368r15369
647663void wangpc_state::update_fdc_tc()
648664{
649665   if (m_fdc_tc_enable)
650      upd765_tc_w(m_fdc, m_dma_eop);
666      upd765_tc_w(m_fdc, !m_dma_eop);
651667   else
652668      upd765_tc_w(m_fdc, 1);
653669}
r15368r15369
661677 
662678WRITE_LINE_MEMBER( wangpc_state::eop_w )
663679{
664   m_dma_eop = !state;
680   if (!state)
681   {
682      //if (LOG) logerror("EOP set\n");
665683 
684      //m_dma_eop = 0;
685      //check_level2_interrupts();
686   }
687 
666688   update_fdc_tc();
667   //check_level2_interrupts();
668689}
669690 
670691READ8_MEMBER( wangpc_state::memr_r )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team