src/mess/drivers/wangpc.c
| r15368 | r15369 | |
| 267 | 267 | |
| 268 | 268 | WRITE8_MEMBER( wangpc_state::dma_page_w )
|
| 269 | 269 | {
|
| 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);
|
| 271 | 271 | |
| 272 | | m_dma_page[offset] = data & 0x0f;
|
| 272 | m_dma_page[offset + 1] = data & 0x0f;
|
| 273 | 273 | }
|
| 274 | 274 | |
| 275 | 275 | |
| r15368 | r15369 | |
| 369 | 369 | |
| 370 | 370 | |
| 371 | 371 | //-------------------------------------------------
|
| 372 | // dma_eop_clr_r -
|
| 373 | //-------------------------------------------------
|
| 374 | |
| 375 | READ8_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 | //-------------------------------------------------
|
| 372 | 388 | // uart_tbre_clr_w -
|
| 373 | 389 | //-------------------------------------------------
|
| 374 | 390 | |
| r15368 | r15369 | |
| 592 | 608 | AM_RANGE(0x10e0, 0x10e1) AM_READWRITE8(status_r, timer0_irq_clr_w, 0x00ff)
|
| 593 | 609 | AM_RANGE(0x10e2, 0x10e3) AM_READWRITE8(timer2_irq_clr_r, nmi_mask_w, 0x00ff)
|
| 594 | 610 | 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)
|
| 596 | 612 | AM_RANGE(0x10e8, 0x10e9) AM_READWRITE8(uart_r, uart_w, 0x00ff)
|
| 597 | 613 | AM_RANGE(0x10ea, 0x10eb) AM_READWRITE8(centronics_r, centronics_w, 0x00ff)
|
| 598 | 614 | AM_RANGE(0x10ec, 0x10ed) AM_READWRITE8(busy_clr_r, acknlg_clr_w, 0x00ff)
|
| r15368 | r15369 | |
| 647 | 663 | void wangpc_state::update_fdc_tc()
|
| 648 | 664 | {
|
| 649 | 665 | if (m_fdc_tc_enable)
|
| 650 | | upd765_tc_w(m_fdc, m_dma_eop);
|
| 666 | upd765_tc_w(m_fdc, !m_dma_eop);
|
| 651 | 667 | else
|
| 652 | 668 | upd765_tc_w(m_fdc, 1);
|
| 653 | 669 | }
|
| r15368 | r15369 | |
| 661 | 677 | |
| 662 | 678 | WRITE_LINE_MEMBER( wangpc_state::eop_w )
|
| 663 | 679 | {
|
| 664 | | m_dma_eop = !state;
|
| 680 | if (!state)
|
| 681 | {
|
| 682 | //if (LOG) logerror("EOP set\n");
|
| 665 | 683 | |
| 684 | //m_dma_eop = 0;
|
| 685 | //check_level2_interrupts();
|
| 686 | }
|
| 687 | |
| 666 | 688 | update_fdc_tc();
|
| 667 | | //check_level2_interrupts();
|
| 668 | 689 | }
|
| 669 | 690 | |
| 670 | 691 | READ8_MEMBER( wangpc_state::memr_r )
|