trunk/src/mame/drivers/harddriv.c
| r26915 | r26916 | |
| 399 | 399 | hddsk_update_pif /* a change has occurred on an output pin */ |
| 400 | 400 | }; |
| 401 | 401 | |
| 402 | | |
| 403 | 402 | /************************************* |
| 404 | 403 | * |
| 405 | | * 68681 DUART config |
| 406 | | * |
| 407 | | *************************************/ |
| 408 | | |
| 409 | | static const duartn68681_config duart_config = |
| 410 | | { |
| 411 | | DEVCB_DRIVER_LINE_MEMBER(harddriv_state, harddriv_duart_irq_handler), /* irq callback */ |
| 412 | | DEVCB_NULL, /* serial transmit A */ |
| 413 | | DEVCB_NULL, /* serial transmit B */ |
| 414 | | DEVCB_NULL, /* input port */ |
| 415 | | DEVCB_NULL, /* output port */ |
| 416 | | }; |
| 417 | | |
| 418 | | |
| 419 | | |
| 420 | | /************************************* |
| 421 | | * |
| 422 | 404 | * Driver board memory maps |
| 423 | 405 | * |
| 424 | 406 | *************************************/ |
| r26915 | r26916 | |
| 1353 | 1335 | MCFG_M48T02_ADD("200e") // MK48T02 |
| 1354 | 1336 | MCFG_EEPROM_2816_ADD("210e") // MK48Z02 |
| 1355 | 1337 | |
| 1356 | | MCFG_DUARTN68681_ADD("duartn68681", XTAL_3_6864MHz, duart_config) |
| 1338 | MCFG_DUARTN68681_ADD("duartn68681", XTAL_3_6864MHz) |
| 1339 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(harddriv_state, harddriv_duart_irq_handler)) |
| 1357 | 1340 | |
| 1358 | 1341 | /* video hardware */ |
| 1359 | 1342 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
trunk/src/mame/drivers/vlc.c
| r26915 | r26916 | |
| 596 | 596 | INPUT_PORTS_END |
| 597 | 597 | |
| 598 | 598 | /***************************************************************************/ |
| 599 | | static const duartn68681_config nevada_duart18_68681_config = |
| 600 | | { |
| 601 | | DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart18_irq_handler), |
| 602 | | DEVCB_NULL, |
| 603 | | DEVCB_NULL, |
| 604 | | DEVCB_INPUT_PORT("DSW1"), |
| 605 | | DEVCB_NULL |
| 606 | | }; |
| 607 | | /***************************************************************************/ |
| 608 | | static const duartn68681_config nevada_duart39_68681_config = |
| 609 | | { |
| 610 | | DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart39_irq_handler), |
| 611 | | DEVCB_NULL, |
| 612 | | DEVCB_NULL, |
| 613 | | DEVCB_INPUT_PORT("DSW2"), |
| 614 | | DEVCB_NULL |
| 615 | | }; |
| 616 | | /***************************************************************************/ |
| 617 | | static const duartn68681_config nevada_duart40_68681_config = |
| 618 | | { |
| 619 | | DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart40_irq_handler), |
| 620 | | DEVCB_DEVICE_LINE_MEMBER("microtouch", microtouch_serial_device, rx), |
| 621 | | DEVCB_NULL, |
| 622 | | DEVCB_INPUT_PORT("DSW3"), |
| 623 | | DEVCB_NULL |
| 624 | | }; |
| 625 | | |
| 626 | | /***************************************************************************/ |
| 627 | 599 | /************************* |
| 628 | 600 | * Machine Reset * |
| 629 | 601 | *************************/ |
| r26915 | r26916 | |
| 667 | 639 | MCFG_SOUND_ADD("aysnd", AY8912, SOUND_CLOCK) |
| 668 | 640 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 669 | 641 | |
| 670 | | MCFG_DUARTN68681_ADD( "duart18_68681", XTAL_3_6864MHz , nevada_duart18_68681_config ) // UARTA = Modem 1200Baud |
| 671 | | MCFG_DUARTN68681_ADD( "duart39_68681", XTAL_3_6864MHz , nevada_duart39_68681_config ) // UARTA = Printer |
| 672 | | MCFG_DUARTN68681_ADD( "duart40_68681", XTAL_3_6864MHz , nevada_duart40_68681_config ) // UARTA = Touch , UARTB = Bill Acceptor |
| 642 | MCFG_DUARTN68681_ADD( "duart18_68681", XTAL_3_6864MHz ) // UARTA = Modem 1200Baud |
| 643 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(nevada_state, duart18_irq_handler)) |
| 644 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW1")) |
| 645 | |
| 646 | MCFG_DUARTN68681_ADD( "duart39_68681", XTAL_3_6864MHz ) // UARTA = Printer |
| 647 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(nevada_state, duart39_irq_handler)) |
| 648 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW2")) |
| 649 | |
| 650 | MCFG_DUARTN68681_ADD( "duart40_68681", XTAL_3_6864MHz ) // UARTA = Touch , UARTB = Bill Acceptor |
| 651 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(nevada_state, duart40_irq_handler)) |
| 652 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("microtouch", microtouch_serial_device, rx)) |
| 653 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW3")) |
| 654 | |
| 673 | 655 | MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("duart40_68681", duartn68681_device, rx_a_w) ) |
| 674 | 656 | /* devices */ |
| 675 | 657 | MCFG_MSM6242_ADD("rtc", nevada_rtc_intf) |
trunk/src/mame/drivers/tmaster.c
| r26915 | r26916 | |
| 908 | 908 | // lev 2 triggered at the end of the blit |
| 909 | 909 | } |
| 910 | 910 | |
| 911 | | static const duartn68681_config tmaster_duart68681_config = |
| 912 | | { |
| 913 | | DEVCB_DRIVER_LINE_MEMBER(tmaster_state, duart_irq_handler), |
| 914 | | DEVCB_DEVICE_LINE_MEMBER("microtouch", microtouch_serial_device, rx), |
| 915 | | DEVCB_NULL, |
| 916 | | DEVCB_NULL, |
| 917 | | DEVCB_NULL |
| 918 | | }; |
| 919 | | |
| 920 | 911 | static MACHINE_CONFIG_START( tm, tmaster_state ) |
| 921 | 912 | MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) /* 12MHz */ |
| 922 | 913 | MCFG_CPU_PROGRAM_MAP(tmaster_map) |
| r26915 | r26916 | |
| 924 | 915 | |
| 925 | 916 | MCFG_MACHINE_RESET_OVERRIDE(tmaster_state,tmaster) |
| 926 | 917 | |
| 927 | | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2 /*??*/, tmaster_duart68681_config ) |
| 918 | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2 /*??*/) |
| 919 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(tmaster_state, duart_irq_handler)) |
| 920 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("microtouch", microtouch_serial_device, rx)) |
| 921 | |
| 928 | 922 | MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("duart68681", duartn68681_device, rx_a_w) ) |
| 929 | 923 | |
| 930 | 924 | MCFG_NVRAM_ADD_0FILL("nvram") |
trunk/src/mame/drivers/adp.c
| r26915 | r26916 | |
| 316 | 316 | m_register_active = 0; |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | | static const duartn68681_config skattv_duart68681_config = |
| 320 | | { |
| 321 | | DEVCB_DRIVER_LINE_MEMBER(adp_state, duart_irq_handler), |
| 322 | | DEVCB_DEVICE_LINE_MEMBER("microtouch", microtouch_serial_device, rx), |
| 323 | | DEVCB_NULL, |
| 324 | | DEVCB_INPUT_PORT("DSW1"), |
| 325 | | DEVCB_NULL |
| 326 | | }; |
| 327 | | |
| 328 | 319 | PALETTE_INIT_MEMBER(adp_state,adp) |
| 329 | 320 | { |
| 330 | 321 | int i; |
| r26915 | r26916 | |
| 640 | 631 | MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) |
| 641 | 632 | MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv) |
| 642 | 633 | |
| 643 | | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config ) |
| 634 | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2 ) |
| 635 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(adp_state, duart_irq_handler)) |
| 636 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("microtouch", microtouch_serial_device, rx)) |
| 637 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW1")) |
| 638 | |
| 644 | 639 | MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("duart68681", duartn68681_device, rx_a_w) ) |
| 645 | 640 | |
| 646 | 641 | MCFG_SCREEN_ADD("screen", RASTER) |
| r26915 | r26916 | |
| 672 | 667 | MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) |
| 673 | 668 | MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv) |
| 674 | 669 | |
| 675 | | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config ) |
| 670 | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2 ) |
| 671 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(adp_state, duart_irq_handler)) |
| 672 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("microtouch", microtouch_serial_device, rx)) |
| 673 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW1")) |
| 674 | |
| 676 | 675 | MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("duart68681", duartn68681_device, rx_a_w) ) |
| 677 | 676 | |
| 678 | 677 | MCFG_SCREEN_ADD("screen", RASTER) |
| r26915 | r26916 | |
| 700 | 699 | MCFG_CPU_ADD("maincpu", M68000, 8000000) |
| 701 | 700 | MCFG_CPU_PROGRAM_MAP(backgamn_mem) |
| 702 | 701 | |
| 703 | | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config ) |
| 702 | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8_664MHz / 2 ) |
| 703 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(adp_state, duart_irq_handler)) |
| 704 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("microtouch", microtouch_serial_device, rx)) |
| 705 | MCFG_DUARTN68681_INPORT_CALLBACK(IOPORT("DSW1")) |
| 706 | |
| 704 | 707 | MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("duart68681", duartn68681_device, rx_a_w) ) |
| 705 | 708 | |
| 706 | 709 | MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) |
trunk/src/mame/drivers/bfm_sc4h.c
| r26915 | r26916 | |
| 672 | 672 | awp_draw_reel(5); |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | | |
| 676 | | static const duartn68681_config bfm_sc4_duart68681_config = |
| 677 | | { |
| 678 | | DEVCB_DRIVER_LINE_MEMBER(sc4_state, bfm_sc4_duart_irq_handler), |
| 679 | | DEVCB_DRIVER_LINE_MEMBER(sc4_state, bfm_sc4_duart_txa), |
| 680 | | DEVCB_NULL, |
| 681 | | DEVCB_DRIVER_MEMBER(sc4_state, bfm_sc4_duart_input_r), |
| 682 | | DEVCB_DRIVER_MEMBER(sc4_state, bfm_sc4_duart_output_w), |
| 683 | | // TODO: What are the actual frequencies? |
| 684 | | XTAL_16MHz/2/8, /* IP2/RxCB clock */ |
| 685 | | XTAL_16MHz/2/16, /* IP3/TxCA clock */ |
| 686 | | XTAL_16MHz/2/16, /* IP4/RxCA clock */ |
| 687 | | XTAL_16MHz/2/8, /* IP5/TxCB clock */ |
| 688 | | }; |
| 689 | | |
| 690 | | |
| 691 | | |
| 692 | 675 | void m68307_duart_irq_handler(device_t *device, int state, UINT8 vector) |
| 693 | 676 | { |
| 694 | 677 | sc4_state *drvstate = device->machine().driver_data<sc4_state>(); |
| r26915 | r26916 | |
| 758 | 741 | |
| 759 | 742 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 760 | 743 | |
| 761 | | MCFG_DUARTN68681_ADD("duart68681", 16000000/4, bfm_sc4_duart68681_config) // ?? Mhz |
| 744 | MCFG_DUARTN68681_ADD("duart68681", 16000000/4) // ?? Mhz |
| 745 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(XTAL_16MHz/2/8, XTAL_16MHz/2/16, XTAL_16MHz/2/16, XTAL_16MHz/2/8) |
| 746 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(sc4_state, bfm_sc4_duart_irq_handler)) |
| 747 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(sc4_state, bfm_sc4_duart_txa)) |
| 748 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(sc4_state, bfm_sc4_duart_input_r)) |
| 749 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(sc4_state, bfm_sc4_duart_output_w)) |
| 762 | 750 | |
| 763 | 751 | MCFG_BFMBDA_ADD("vfd0",0) |
| 764 | 752 | |
trunk/src/mame/drivers/bfm_sc5.c
| r26915 | r26916 | |
| 214 | 214 | logerror("bfm_sc5_duart_output_w\n"); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | | |
| 218 | | static const duartn68681_config bfm_sc5_duart68681_config = |
| 219 | | { |
| 220 | | DEVCB_DRIVER_LINE_MEMBER(bfm_sc5_state, bfm_sc5_duart_irq_handler), |
| 221 | | DEVCB_DRIVER_LINE_MEMBER(bfm_sc5_state, bfm_sc5_duart_txa), |
| 222 | | DEVCB_NULL, |
| 223 | | DEVCB_DRIVER_MEMBER(bfm_sc5_state, bfm_sc5_duart_input_r), |
| 224 | | DEVCB_DRIVER_MEMBER(bfm_sc5_state, bfm_sc5_duart_output_w), |
| 225 | | // TODO: What are the actual frequencies? |
| 226 | | 16000000/2/8, /* IP2/RxCB clock */ |
| 227 | | 16000000/2/16, /* IP3/TxCA clock */ |
| 228 | | 16000000/2/16, /* IP4/RxCA clock */ |
| 229 | | 16000000/2/8, /* IP5/TxCB clock */ |
| 230 | | }; |
| 231 | | |
| 232 | | |
| 233 | 217 | MACHINE_CONFIG_START( bfm_sc5, bfm_sc5_state ) |
| 234 | 218 | MCFG_CPU_ADD("maincpu", MCF5206E, 40000000) /* MCF5206eFT */ |
| 235 | 219 | MCFG_CPU_PROGRAM_MAP(sc5_map) |
| r26915 | r26916 | |
| 238 | 222 | /* sound hardware */ |
| 239 | 223 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 240 | 224 | |
| 241 | | MCFG_DUARTN68681_ADD("duart68681", 16000000/4, bfm_sc5_duart68681_config) // ?? Mhz |
| 225 | MCFG_DUARTN68681_ADD("duart68681", 16000000/4) // ?? Mhz |
| 226 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(16000000/2/8, 16000000/2/16, 16000000/2/16, 16000000/2/8) |
| 227 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(bfm_sc5_state, bfm_sc5_duart_irq_handler)) |
| 228 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(bfm_sc5_state, bfm_sc5_duart_txa)) |
| 229 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(bfm_sc5_state, bfm_sc5_duart_input_r)) |
| 230 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(bfm_sc5_state, bfm_sc5_duart_output_w)) |
| 242 | 231 | |
| 243 | | |
| 244 | 232 | MCFG_BFMBDA_ADD("vfd0",0) |
| 245 | 233 | |
| 246 | 234 | MCFG_DEFAULT_LAYOUT(layout_bfm_sc5) |
trunk/src/emu/machine/n68681.c
| r26915 | r26916 | |
| 54 | 54 | const device_type DUART68681CHANNEL = &device_creator<duart68681_channel>; |
| 55 | 55 | |
| 56 | 56 | MACHINE_CONFIG_FRAGMENT( duart68681 ) |
| 57 | | MCFG_DUART68681_CHANNEL_ADD(CHANA_TAG) |
| 58 | | MCFG_DUART68681_CHANNEL_ADD(CHANB_TAG) |
| 57 | MCFG_DEVICE_ADD(CHANA_TAG, DUART68681CHANNEL, 0) |
| 58 | MCFG_DEVICE_ADD(CHANB_TAG, DUART68681CHANNEL, 0) |
| 59 | 59 | MACHINE_CONFIG_END |
| 60 | 60 | |
| 61 | 61 | //************************************************************************** |
| r26915 | r26916 | |
| 65 | 65 | duartn68681_device::duartn68681_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 66 | 66 | : device_t(mconfig, DUARTN68681, "DUART 68681 (new)", tag, owner, clock, "dun68681", __FILE__), |
| 67 | 67 | m_chanA(*this, CHANA_TAG), |
| 68 | | m_chanB(*this, CHANB_TAG) |
| 68 | m_chanB(*this, CHANB_TAG), |
| 69 | write_irq(*this), |
| 70 | write_a_tx(*this), |
| 71 | write_b_tx(*this), |
| 72 | read_inport(*this), |
| 73 | write_outport(*this) |
| 69 | 74 | { |
| 70 | 75 | } |
| 71 | 76 | |
| 77 | //------------------------------------------------- |
| 78 | // static_set_clocks - configuration helper to set |
| 79 | // the external clocks |
| 80 | //------------------------------------------------- |
| 81 | |
| 82 | void duartn68681_device::static_set_clocks(device_t &device, int clk3, int clk4, int clk5, int clk6) |
| 83 | { |
| 84 | duartn68681_device &duart = downcast<duartn68681_device &>(device); |
| 85 | duart.ip3clk = clk3; |
| 86 | duart.ip4clk = clk4; |
| 87 | duart.ip5clk = clk5; |
| 88 | duart.ip6clk = clk6; |
| 89 | } |
| 90 | |
| 72 | 91 | /*------------------------------------------------- |
| 73 | 92 | device start callback |
| 74 | 93 | -------------------------------------------------*/ |
| 75 | 94 | |
| 76 | 95 | void duartn68681_device::device_start() |
| 77 | 96 | { |
| 78 | | m_out_irq_func.resolve(m_out_irq_cb, *this); |
| 79 | | m_out_a_tx_func.resolve(m_out_a_tx_cb, *this); |
| 80 | | m_out_b_tx_func.resolve(m_out_b_tx_cb, *this); |
| 81 | | m_in_port_func.resolve(m_in_port_cb, *this); |
| 82 | | m_out_port_func.resolve(m_out_port_cb, *this); |
| 97 | write_irq.resolve_safe(); |
| 98 | write_a_tx.resolve_safe(); |
| 99 | write_b_tx.resolve_safe(); |
| 100 | read_inport.resolve_safe(0); |
| 101 | write_outport.resolve_safe(); |
| 83 | 102 | |
| 84 | 103 | duart_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(duartn68681_device::duart_timer_callback),this), NULL); |
| 85 | 104 | |
| r26915 | r26916 | |
| 109 | 128 | IP_last_state = 0; /* last state of IP bits */ |
| 110 | 129 | // "reset clears internal registers (SRA, SRB, IMR, ISR, OPR, OPCR) puts OP0-7 in the high state, stops the counter/timer, and puts channels a/b in the inactive state" |
| 111 | 130 | |
| 112 | | m_out_port_func(0, OPR ^ 0xff); |
| 131 | write_outport(OPR ^ 0xff); |
| 113 | 132 | } |
| 114 | 133 | |
| 115 | | //------------------------------------------------- |
| 116 | | // device_config_complete - perform any |
| 117 | | // operations now that the configuration is |
| 118 | | // complete |
| 119 | | //------------------------------------------------- |
| 120 | | |
| 121 | | void duartn68681_device::device_config_complete() |
| 122 | | { |
| 123 | | // inherit a copy of the static data |
| 124 | | const duartn68681_config *intf = reinterpret_cast<const duartn68681_config *>(static_config()); |
| 125 | | if (intf != NULL) |
| 126 | | { |
| 127 | | *static_cast<duartn68681_config *>(this) = *intf; |
| 128 | | } |
| 129 | | // or initialize to defaults if none provided |
| 130 | | else |
| 131 | | { |
| 132 | | memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb)); |
| 133 | | memset(&m_out_a_tx_cb, 0, sizeof(m_out_a_tx_cb)); |
| 134 | | memset(&m_out_b_tx_cb, 0, sizeof(m_out_b_tx_cb)); |
| 135 | | memset(&m_in_port_cb, 0, sizeof(m_in_port_cb)); |
| 136 | | memset(&m_out_port_cb, 0, sizeof(m_out_port_cb)); |
| 137 | | } |
| 138 | | } |
| 139 | | |
| 140 | 134 | machine_config_constructor duartn68681_device::device_mconfig_additions() const |
| 141 | 135 | { |
| 142 | 136 | return MACHINE_CONFIG_NAME( duart68681 ); |
| r26915 | r26916 | |
| 162 | 156 | if ( (ISR & IMR) != 0 ) |
| 163 | 157 | { |
| 164 | 158 | LOG(( "68681: Interrupt line active (IMR & ISR = %02X)\n", (ISR & IMR) )); |
| 165 | | m_out_irq_func(ASSERT_LINE); |
| 159 | write_irq(ASSERT_LINE); |
| 166 | 160 | } |
| 167 | 161 | else |
| 168 | 162 | { |
| 169 | 163 | LOG(( "68681: Interrupt line not active (IMR & ISR = %02X)\n", ISR & IMR)); |
| 170 | | m_out_irq_func(CLEAR_LINE); |
| 164 | write_irq(CLEAR_LINE); |
| 171 | 165 | } |
| 172 | 166 | }; |
| 173 | 167 | |
| r26915 | r26916 | |
| 271 | 265 | |
| 272 | 266 | case 0x04: /* IPCR */ |
| 273 | 267 | { |
| 274 | | UINT8 IP = m_in_port_func(0); |
| 268 | UINT8 IP = read_inport(); |
| 275 | 269 | |
| 276 | 270 | r = (((IP_last_state ^ IP) & 0x0f) << 4) | (IP & 0x0f); |
| 277 | 271 | IP_last_state = IP; |
| r26915 | r26916 | |
| 299 | 293 | break; |
| 300 | 294 | |
| 301 | 295 | case 0x0d: /* IP */ |
| 302 | | r = m_in_port_func(0); |
| 296 | r = read_inport(); |
| 303 | 297 | break; |
| 304 | 298 | |
| 305 | 299 | case 0x0e: /* Start counter command */ |
| r26915 | r26916 | |
| 412 | 406 | |
| 413 | 407 | case 0x0e: /* Set Output Port Bits */ |
| 414 | 408 | OPR |= data; |
| 415 | | m_out_port_func(0, OPR ^ 0xff); |
| 409 | write_outport(OPR ^ 0xff); |
| 416 | 410 | break; |
| 417 | 411 | |
| 418 | 412 | case 0x0f: /* Reset Output Port Bits */ |
| 419 | 413 | OPR &= ~data; |
| 420 | | m_out_port_func(0, OPR ^ 0xff); |
| 414 | write_outport(OPR ^ 0xff); |
| 421 | 415 | break; |
| 422 | 416 | } |
| 423 | 417 | } |
| r26915 | r26916 | |
| 583 | 577 | // printf("ch %d transmit %d\n", m_ch, bit); |
| 584 | 578 | if (m_ch == 0) |
| 585 | 579 | { |
| 586 | | m_uart->m_out_a_tx_func(bit); |
| 580 | m_uart->write_a_tx(bit); |
| 587 | 581 | } |
| 588 | 582 | else |
| 589 | 583 | { |
| 590 | | m_uart->m_out_b_tx_func(bit); |
| 584 | m_uart->write_b_tx(bit); |
| 591 | 585 | } |
| 592 | 586 | } |
| 593 | 587 | |
trunk/src/emu/machine/n68681.h
| r26915 | r26916 | |
| 2 | 2 | #define _N68681_H |
| 3 | 3 | |
| 4 | 4 | |
| 5 | | #define MCFG_DUARTN68681_ADD(_tag, _clock, _config) \ |
| 6 | | MCFG_DEVICE_ADD(_tag, DUARTN68681, _clock) \ |
| 7 | | MCFG_DEVICE_CONFIG(_config) |
| 5 | #define MCFG_DUARTN68681_ADD(_tag, _clock) \ |
| 6 | MCFG_DEVICE_ADD(_tag, DUARTN68681, _clock) |
| 8 | 7 | |
| 9 | | #define MCFG_DUARTN68681_REPLACE(_tag, _clock, _config) \ |
| 10 | | MCFG_DEVICE_REPLACE(_tag, DUARTN68681, _clock) \ |
| 11 | | MCFG_DEVICE_CONFIG(_config) |
| 8 | #define MCFG_DUARTN68681_REPLACE(_tag, _clock) \ |
| 9 | MCFG_DEVICE_REPLACE(_tag, DUARTN68681, _clock) |
| 12 | 10 | |
| 13 | | #define MCFG_DUART68681_CHANNEL_ADD(_tag) \ |
| 14 | | MCFG_DEVICE_ADD(_tag, DUART68681CHANNEL, 0) |
| 11 | #define MCFG_DUARTN68681_IRQ_CALLBACK(_cb) \ |
| 12 | downcast<duartn68681_device *>(device)->set_irq_cb(DEVCB2_##_cb); |
| 13 | |
| 14 | #define MCFG_DUARTN68681_A_TX_CALLBACK(_cb) \ |
| 15 | downcast<duartn68681_device *>(device)->set_a_tx_cb(DEVCB2_##_cb); |
| 16 | |
| 17 | #define MCFG_DUARTN68681_B_TX_CALLBACK(_cb) \ |
| 18 | downcast<duartn68681_device *>(device)->set_b_tx_cb(DEVCB2_##_cb); |
| 19 | |
| 20 | #define MCFG_DUARTN68681_INPORT_CALLBACK(_cb) \ |
| 21 | downcast<duartn68681_device *>(device)->set_inport_cb(DEVCB2_##_cb); |
| 22 | |
| 23 | #define MCFG_DUARTN68681_OUTPORT_CALLBACK(_cb) \ |
| 24 | downcast<duartn68681_device *>(device)->set_outport_cb(DEVCB2_##_cb); |
| 25 | |
| 26 | #define MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(_a, _b, _c, _d) \ |
| 27 | duartn68681_device::static_set_clocks(*device, _a, _b, _c, _d); |
| 28 | |
| 15 | 29 | // forward declaration |
| 16 | 30 | class duartn68681_device; |
| 17 | 31 | |
| 18 | | struct duartn68681_config |
| 19 | | { |
| 20 | | devcb_write_line m_out_irq_cb; |
| 21 | | devcb_write_line m_out_a_tx_cb; |
| 22 | | devcb_write_line m_out_b_tx_cb; |
| 23 | | devcb_read8 m_in_port_cb; |
| 24 | | devcb_write8 m_out_port_cb; |
| 25 | | |
| 26 | | /* clocks for external baud rates */ |
| 27 | | INT32 ip3clk, ip4clk, ip5clk, ip6clk; |
| 28 | | }; |
| 29 | | |
| 30 | 32 | #define MC68681_RX_FIFO_SIZE 3 |
| 31 | 33 | |
| 32 | 34 | // forward declaration |
| r26915 | r26916 | |
| 91 | 93 | void recalc_framing(); |
| 92 | 94 | }; |
| 93 | 95 | |
| 94 | | class duartn68681_device : public device_t, public duartn68681_config |
| 96 | class duartn68681_device : public device_t |
| 95 | 97 | { |
| 96 | 98 | friend class duart68681_channel; |
| 97 | 99 | |
| r26915 | r26916 | |
| 101 | 103 | required_device<duart68681_channel> m_chanA; |
| 102 | 104 | required_device<duart68681_channel> m_chanB; |
| 103 | 105 | |
| 106 | // inline configuration helpers |
| 107 | static void static_set_clocks(device_t &device, int clk3, int clk4, int clk5, int clk6); |
| 108 | |
| 104 | 109 | // API |
| 105 | 110 | DECLARE_READ8_HANDLER(read); |
| 106 | 111 | DECLARE_WRITE8_HANDLER(write); |
| r26915 | r26916 | |
| 109 | 114 | DECLARE_WRITE_LINE_MEMBER( rx_a_w ) { m_chanA->device_serial_interface::rx_w((UINT8)state); } |
| 110 | 115 | DECLARE_WRITE_LINE_MEMBER( rx_b_w ) { m_chanB->device_serial_interface::rx_w((UINT8)state); } |
| 111 | 116 | |
| 117 | template<class _write> void set_irq_cb(_write wr) { write_irq.set_callback(wr); } |
| 118 | template<class _write> void set_a_tx_cb(_write wr) { write_a_tx.set_callback(wr); } |
| 119 | template<class _write> void set_b_tx_cb(_write wr) { write_b_tx.set_callback(wr); } |
| 120 | template<class _read> void set_inport_cb(_read rd) { read_inport.set_callback(rd); } |
| 121 | template<class _write> void set_outport_cb(_write wr) { write_outport.set_callback(wr); } |
| 122 | |
| 123 | devcb2_write_line write_irq, write_a_tx, write_b_tx; |
| 124 | devcb2_read8 read_inport; |
| 125 | devcb2_write8 write_outport; |
| 126 | INT32 ip3clk, ip4clk, ip5clk, ip6clk; |
| 127 | |
| 112 | 128 | protected: |
| 113 | 129 | // device-level overrides |
| 114 | | virtual void device_config_complete(); |
| 115 | 130 | virtual void device_start(); |
| 116 | 131 | virtual void device_reset(); |
| 117 | 132 | virtual machine_config_constructor device_mconfig_additions() const; |
trunk/src/mess/drivers/cat.c
| r26915 | r26916 | |
| 1112 | 1112 | #endif |
| 1113 | 1113 | } |
| 1114 | 1114 | |
| 1115 | | static const duartn68681_config cat_duart_config = |
| 1116 | | { |
| 1117 | | DEVCB_DRIVER_LINE_MEMBER(cat_state, cat_duart_irq_handler), /* irq callback */ |
| 1118 | | DEVCB_DRIVER_LINE_MEMBER(cat_state, cat_duart_txa), /* serial transmit A */ |
| 1119 | | DEVCB_NULL, /* serial transmit B */ |
| 1120 | | DEVCB_DRIVER_MEMBER(cat_state, cat_duart_input), /* input port */ |
| 1121 | | DEVCB_DRIVER_MEMBER(cat_state, cat_duart_output), /* output port */ |
| 1122 | | }; |
| 1123 | | |
| 1124 | 1115 | static MACHINE_CONFIG_START( cat, cat_state ) |
| 1125 | 1116 | |
| 1126 | 1117 | /* basic machine hardware */ |
| r26915 | r26916 | |
| 1143 | 1134 | |
| 1144 | 1135 | MCFG_VIDEO_START_OVERRIDE(cat_state,cat) |
| 1145 | 1136 | |
| 1146 | | MCFG_DUARTN68681_ADD( "duartn68681", XTAL_19_968MHz*2/11, cat_duart_config ) // duart is normally clocked by 3.6864mhz xtal, but cat seemingly uses a divider from the main xtal instead which probably yields 3.63054545Mhz. There is a trace to cut and a mounting area to allow using an actual 3.6864mhz xtal if you so desire |
| 1137 | MCFG_DUARTN68681_ADD( "duartn68681", XTAL_19_968MHz*2/11 ) // duart is normally clocked by 3.6864mhz xtal, but cat seemingly uses a divider from the main xtal instead which probably yields 3.63054545Mhz. There is a trace to cut and a mounting area to allow using an actual 3.6864mhz xtal if you so desire |
| 1138 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(cat_state, cat_duart_irq_handler)) |
| 1139 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(cat_state, cat_duart_txa)) |
| 1140 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(cat_state, cat_duart_input)) |
| 1141 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(cat_state, cat_duart_output)) |
| 1147 | 1142 | |
| 1148 | 1143 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1149 | 1144 | MACHINE_CONFIG_END |
trunk/src/mess/drivers/esq5505.c
| r26915 | r26916 | |
| 188 | 188 | virtual void machine_start(); |
| 189 | 189 | virtual void machine_reset(); |
| 190 | 190 | |
| 191 | | DECLARE_READ16_MEMBER(es5510_dsp_r); |
| 192 | | DECLARE_WRITE16_MEMBER(es5510_dsp_w); |
| 193 | 191 | DECLARE_READ16_MEMBER(lower_r); |
| 194 | 192 | DECLARE_WRITE16_MEMBER(lower_w); |
| 195 | 193 | |
| r26915 | r26916 | |
| 512 | 510 | m_panel->rx_w(state); |
| 513 | 511 | } |
| 514 | 512 | |
| 515 | | static const duartn68681_config duart_config = |
| 516 | | { |
| 517 | | DEVCB_DRIVER_LINE_MEMBER(esq5505_state, duart_irq_handler), |
| 518 | | DEVCB_DRIVER_LINE_MEMBER(esq5505_state, duart_tx_a), |
| 519 | | DEVCB_DRIVER_LINE_MEMBER(esq5505_state, duart_tx_b), |
| 520 | | DEVCB_DRIVER_MEMBER(esq5505_state, duart_input), |
| 521 | | DEVCB_DRIVER_MEMBER(esq5505_state, duart_output), |
| 522 | | |
| 523 | | 500000, 500000, // IP3, IP4 |
| 524 | | 1000000, 1000000, // IP5, IP6 |
| 525 | | }; |
| 526 | | |
| 527 | 513 | static void esq_dma_end(running_machine &machine, int channel, int irq) |
| 528 | 514 | { |
| 529 | 515 | device_t *device = machine.device("mc68450"); |
| r26915 | r26916 | |
| 666 | 652 | |
| 667 | 653 | MCFG_ESQPANEL2x40_ADD("panel", esqpanel_config) |
| 668 | 654 | |
| 669 | | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 655 | MCFG_DUARTN68681_ADD("duart", 4000000) |
| 656 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(esq5505_state, duart_irq_handler)) |
| 657 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(esq5505_state, duart_tx_a)) |
| 658 | MCFG_DUARTN68681_B_TX_CALLBACK(WRITELINE(esq5505_state, duart_tx_b)) |
| 659 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(esq5505_state, duart_input)) |
| 660 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esq5505_state, duart_output)) |
| 661 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 670 | 662 | |
| 671 | 663 | MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin") |
| 672 | 664 | MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx |
| r26915 | r26916 | |
| 722 | 714 | |
| 723 | 715 | MCFG_ESQPANEL2x40_ADD("panel", esqpanel_config) |
| 724 | 716 | |
| 725 | | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 717 | MCFG_DUARTN68681_ADD("duart", 4000000) |
| 718 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(esq5505_state, duart_irq_handler)) |
| 719 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(esq5505_state, duart_tx_a)) |
| 720 | MCFG_DUARTN68681_B_TX_CALLBACK(WRITELINE(esq5505_state, duart_tx_b)) |
| 721 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(esq5505_state, duart_input)) |
| 722 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esq5505_state, duart_output)) |
| 723 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 726 | 724 | |
| 727 | 725 | MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin") |
| 728 | 726 | MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx |
trunk/src/mess/drivers/ht68k.c
| r26915 | r26916 | |
| 121 | 121 | if (m_floppy) {m_floppy->ss_w(BIT(data,3) ? 0 : 1);} |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | | static const duartn68681_config ht68k_duart68681_config = |
| 125 | | { |
| 126 | | DEVCB_DRIVER_LINE_MEMBER(ht68k_state, duart_irq_handler), |
| 127 | | DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx), //serial channel CON (console, for terminal, 9600 baud) |
| 128 | | DEVCB_DRIVER_LINE_MEMBER(ht68k_state, duart_txb), // serial channel AUX (auxiliary, for modem or other serial device, 1200 baud) |
| 129 | | DEVCB_DRIVER_MEMBER(ht68k_state, duart_input), |
| 130 | | DEVCB_DRIVER_MEMBER(ht68k_state, duart_output) |
| 131 | | }; |
| 132 | | |
| 133 | 124 | static SLOT_INTERFACE_START( ht68k_floppies ) |
| 134 | 125 | SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) |
| 135 | 126 | SLOT_INTERFACE_END |
| r26915 | r26916 | |
| 143 | 134 | MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart68681", duartn68681_device, rx_a_w)) |
| 144 | 135 | |
| 145 | 136 | /* video hardware */ |
| 146 | | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8MHz / 2, ht68k_duart68681_config ) |
| 137 | MCFG_DUARTN68681_ADD( "duart68681", XTAL_8MHz / 2 ) |
| 138 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 139 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(ht68k_state, duart_irq_handler)) |
| 140 | MCFG_DUARTN68681_A_TX_CALLBACK(DEVWRITELINE("rs232", serial_port_device, tx)) |
| 141 | MCFG_DUARTN68681_B_TX_CALLBACK(WRITELINE(ht68k_state, duart_txb)) |
| 142 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(ht68k_state, duart_input)) |
| 143 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(ht68k_state, duart_output)) |
| 147 | 144 | |
| 148 | 145 | MCFG_WD1770x_ADD("wd1770", XTAL_8MHz ) |
| 149 | 146 | |
trunk/src/mess/drivers/esqkt.c
| r26915 | r26916 | |
| 197 | 197 | m_sq1panel->rx_w(state); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | | static const duartn68681_config duart_config = |
| 201 | | { |
| 202 | | DEVCB_DRIVER_LINE_MEMBER(esqkt_state, duart_irq_handler), |
| 203 | | DEVCB_DRIVER_LINE_MEMBER(esqkt_state, duart_tx_a), |
| 204 | | DEVCB_DRIVER_LINE_MEMBER(esqkt_state, duart_tx_b), |
| 205 | | DEVCB_DRIVER_MEMBER(esqkt_state, duart_input), |
| 206 | | DEVCB_DRIVER_MEMBER(esqkt_state, duart_output), |
| 207 | | |
| 208 | | 500000, 500000, // IP3, IP4 |
| 209 | | 1000000, 1000000, // IP5, IP6 |
| 210 | | }; |
| 211 | | |
| 212 | 200 | static const es5506_interface es5506_config = |
| 213 | 201 | { |
| 214 | 202 | "waverom", /* Bank 0 */ |
| r26915 | r26916 | |
| 253 | 241 | |
| 254 | 242 | MCFG_ESQPANEL2x40_SQ1_ADD("sq1panel", esqpanel_config) |
| 255 | 243 | |
| 256 | | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 244 | MCFG_DUARTN68681_ADD("duart", 4000000) |
| 245 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(esqkt_state, duart_irq_handler)) |
| 246 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(esqkt_state, duart_tx_a)) |
| 247 | MCFG_DUARTN68681_B_TX_CALLBACK(WRITELINE(esqkt_state, duart_tx_b)) |
| 248 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(esqkt_state, duart_input)) |
| 249 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esqkt_state, duart_output)) |
| 250 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 251 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 257 | 252 | |
| 258 | 253 | MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin") |
| 259 | 254 | MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx |
trunk/src/mess/drivers/dectalk.c
| r26915 | r26916 | |
| 390 | 390 | #endif |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | | static const duartn68681_config dectalk_duart_config = |
| 394 | | { |
| 395 | | DEVCB_DRIVER_LINE_MEMBER(dectalk_state, dectalk_duart_irq_handler), /* irq callback */ |
| 396 | | DEVCB_DRIVER_LINE_MEMBER(dectalk_state, dectalk_duart_txa), /* serial transmit A (alternate) */ |
| 397 | | DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx), /* serial transmit B (main/local terminal) */ |
| 398 | | DEVCB_DRIVER_MEMBER(dectalk_state, dectalk_duart_input), /* input port */ |
| 399 | | DEVCB_DRIVER_MEMBER(dectalk_state, dectalk_duart_output), /* output port */ |
| 400 | | }; |
| 401 | | |
| 402 | | |
| 403 | 393 | /* FIFO and TMS32010 stuff */ |
| 404 | 394 | #define SPC_INITIALIZE state->m_m68k_spcflags_latch&0x1 // speech initialize flag |
| 405 | 395 | #define SPC_IRQ_ENABLED ((state->m_m68k_spcflags_latch&0x40)>>6) // irq enable flag |
| r26915 | r26916 | |
| 890 | 880 | MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz/2) /* E74 20MHz OSC (/2) */ |
| 891 | 881 | MCFG_CPU_PROGRAM_MAP(m68k_mem) |
| 892 | 882 | MCFG_CPU_IO_MAP(m68k_io) |
| 893 | | MCFG_DUARTN68681_ADD( "duartn68681", XTAL_3_6864MHz, dectalk_duart_config ) /* 2681 duart (not 68681!); Y3 3.6864MHz Xtal */ |
| 883 | MCFG_DUARTN68681_ADD( "duartn68681", XTAL_3_6864MHz ) /* 2681 duart (not 68681!); Y3 3.6864MHz Xtal */ |
| 884 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler)) |
| 885 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa)) |
| 886 | MCFG_DUARTN68681_B_TX_CALLBACK(DEVWRITELINE("rs232", serial_port_device, tx)) |
| 887 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input)) |
| 888 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output)) |
| 894 | 889 | |
| 895 | 890 | MCFG_CPU_ADD("dsp", TMS32010, XTAL_20MHz) /* Y1 20MHz xtal */ |
| 896 | 891 | MCFG_CPU_PROGRAM_MAP(tms32010_mem) |
trunk/src/mess/drivers/esq1.c
| r26915 | r26916 | |
| 594 | 594 | SLOT_INTERFACE("midiout", MIDIOUT_PORT) |
| 595 | 595 | SLOT_INTERFACE_END |
| 596 | 596 | |
| 597 | | static const duartn68681_config duart_config = |
| 598 | | { |
| 599 | | DEVCB_DRIVER_LINE_MEMBER(esq1_state, duart_irq_handler), |
| 600 | | DEVCB_DRIVER_LINE_MEMBER(esq1_state, duart_tx_a), |
| 601 | | DEVCB_DRIVER_LINE_MEMBER(esq1_state, duart_tx_b), |
| 602 | | DEVCB_DRIVER_MEMBER(esq1_state, duart_input), |
| 603 | | DEVCB_DRIVER_MEMBER(esq1_state, duart_output), |
| 604 | | |
| 605 | | 500000, 500000, // IP3, IP4 |
| 606 | | 1000000, 1000000, // IP5, IP6 |
| 607 | | }; |
| 608 | | |
| 609 | 597 | static const esqpanel_interface esqpanel_config = |
| 610 | 598 | { |
| 611 | 599 | DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_b_w) |
| r26915 | r26916 | |
| 615 | 603 | MCFG_CPU_ADD("maincpu", M6809E, 4000000) // how fast is it? |
| 616 | 604 | MCFG_CPU_PROGRAM_MAP(esq1_map) |
| 617 | 605 | |
| 618 | | MCFG_DUARTN68681_ADD("duart", 4000000, duart_config) |
| 606 | MCFG_DUARTN68681_ADD("duart", 4000000) |
| 607 | MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000) |
| 608 | MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(esq1_state, duart_irq_handler)) |
| 609 | MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(esq1_state, duart_tx_a)) |
| 610 | MCFG_DUARTN68681_B_TX_CALLBACK(WRITELINE(esq1_state, duart_tx_b)) |
| 611 | MCFG_DUARTN68681_INPORT_CALLBACK(READ8(esq1_state, duart_input)) |
| 612 | MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esq1_state, duart_output)) |
| 613 | |
| 619 | 614 | MCFG_ESQPANEL2x40_ADD("panel", esqpanel_config) |
| 620 | 615 | |
| 621 | 616 | MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin") |