src/mess/machine/abc1600_bus.c
| r13067 | r13068 | |
| 53 | 53 | |
| 54 | 54 | abc1600bus_slot_device::abc1600bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 55 | 55 | device_t(mconfig, ABC1600BUS_SLOT, "ABC 1600 bus slot", tag, owner, clock), |
| 56 | | device_slot_interface(mconfig, *this) |
| 56 | device_slot_interface(mconfig, *this), |
| 57 | m_int(CLEAR_LINE), |
| 58 | m_pren(1), |
| 59 | m_trrq(1), |
| 60 | m_nmi(CLEAR_LINE), |
| 61 | m_xint2(CLEAR_LINE), |
| 62 | m_xint3(CLEAR_LINE), |
| 63 | m_xint4(CLEAR_LINE), |
| 64 | m_xint5(CLEAR_LINE) |
| 57 | 65 | { |
| 58 | 66 | } |
| 59 | 67 | |
| r13067 | r13068 | |
| 105 | 113 | m_out_xint3_func.resolve(m_out_xint3_cb, *this); |
| 106 | 114 | m_out_xint4_func.resolve(m_out_xint4_cb, *this); |
| 107 | 115 | m_out_xint5_func.resolve(m_out_xint5_cb, *this); |
| 116 | |
| 117 | // state saving |
| 118 | save_item(NAME(m_int)); |
| 119 | save_item(NAME(m_pren)); |
| 120 | save_item(NAME(m_trrq)); |
| 121 | save_item(NAME(m_nmi)); |
| 122 | save_item(NAME(m_xint2)); |
| 123 | save_item(NAME(m_xint3)); |
| 124 | save_item(NAME(m_xint4)); |
| 125 | save_item(NAME(m_xint5)); |
| 108 | 126 | } |
| 109 | 127 | |
| 110 | 128 | |
| r13067 | r13068 | |
| 384 | 402 | |
| 385 | 403 | WRITE_LINE_MEMBER( abc1600bus_slot_device::int_w ) |
| 386 | 404 | { |
| 405 | m_int = state; |
| 387 | 406 | m_out_int_func(state); |
| 388 | 407 | } |
| 389 | 408 | |
| r13067 | r13068 | |
| 394 | 413 | |
| 395 | 414 | WRITE_LINE_MEMBER( abc1600bus_slot_device::pren_w ) |
| 396 | 415 | { |
| 416 | m_pren = state; |
| 397 | 417 | m_out_pren_func(state); |
| 398 | 418 | } |
| 399 | 419 | |
| r13067 | r13068 | |
| 404 | 424 | |
| 405 | 425 | WRITE_LINE_MEMBER( abc1600bus_slot_device::trrq_w ) |
| 406 | 426 | { |
| 427 | m_trrq = state; |
| 407 | 428 | m_out_trrq_func(state); |
| 408 | 429 | } |
| 409 | 430 | |
| r13067 | r13068 | |
| 414 | 435 | |
| 415 | 436 | WRITE_LINE_MEMBER( abc1600bus_slot_device::nmi_w ) |
| 416 | 437 | { |
| 438 | m_nmi = state; |
| 417 | 439 | m_out_nmi_func(state); |
| 418 | 440 | } |
| 419 | 441 | |
| r13067 | r13068 | |
| 424 | 446 | |
| 425 | 447 | WRITE_LINE_MEMBER( abc1600bus_slot_device::xint2_w ) |
| 426 | 448 | { |
| 449 | m_xint2 = state; |
| 427 | 450 | m_out_xint2_func(state); |
| 428 | 451 | } |
| 429 | 452 | |
| r13067 | r13068 | |
| 434 | 457 | |
| 435 | 458 | WRITE_LINE_MEMBER( abc1600bus_slot_device::xint3_w ) |
| 436 | 459 | { |
| 460 | m_xint3 = state; |
| 437 | 461 | m_out_xint3_func(state); |
| 438 | 462 | } |
| 439 | 463 | |
| r13067 | r13068 | |
| 444 | 468 | |
| 445 | 469 | WRITE_LINE_MEMBER( abc1600bus_slot_device::xint4_w ) |
| 446 | 470 | { |
| 471 | m_xint4 = state; |
| 447 | 472 | m_out_xint4_func(state); |
| 448 | 473 | } |
| 449 | 474 | |
| r13067 | r13068 | |
| 454 | 479 | |
| 455 | 480 | WRITE_LINE_MEMBER( abc1600bus_slot_device::xint5_w ) |
| 456 | 481 | { |
| 482 | m_xint5 = state; |
| 457 | 483 | m_out_xint5_func(state); |
| 458 | 484 | } |
| 485 | |
| 486 | |
| 487 | //------------------------------------------------- |
| 488 | // int_r - interrupt request |
| 489 | //------------------------------------------------- |
| 490 | |
| 491 | READ_LINE_MEMBER( abc1600bus_slot_device::int_r ) |
| 492 | { |
| 493 | return m_int; |
| 494 | } |
| 495 | |
| 496 | |
| 497 | //------------------------------------------------- |
| 498 | // pren_r - peripheral enable |
| 499 | //------------------------------------------------- |
| 500 | |
| 501 | READ_LINE_MEMBER( abc1600bus_slot_device::pren_r ) |
| 502 | { |
| 503 | return m_pren; |
| 504 | } |
| 505 | |
| 506 | |
| 507 | //------------------------------------------------- |
| 508 | // trrq_r - transfer request |
| 509 | //------------------------------------------------- |
| 510 | |
| 511 | READ_LINE_MEMBER( abc1600bus_slot_device::trrq_r ) |
| 512 | { |
| 513 | return m_trrq; |
| 514 | } |
| 515 | |
| 516 | |
| 517 | //------------------------------------------------- |
| 518 | // nmi_r - non-maskable interrupt |
| 519 | //------------------------------------------------- |
| 520 | |
| 521 | READ_LINE_MEMBER( abc1600bus_slot_device::nmi_r ) |
| 522 | { |
| 523 | return m_nmi; |
| 524 | } |
| 525 | |
| 526 | |
| 527 | //------------------------------------------------- |
| 528 | // xint2_r - expansion interrupt |
| 529 | //------------------------------------------------- |
| 530 | |
| 531 | READ_LINE_MEMBER( abc1600bus_slot_device::xint2_r ) |
| 532 | { |
| 533 | return m_xint2; |
| 534 | } |
| 535 | |
| 536 | |
| 537 | //------------------------------------------------- |
| 538 | // xint3_r - expansion interrupt |
| 539 | //------------------------------------------------- |
| 540 | |
| 541 | READ_LINE_MEMBER( abc1600bus_slot_device::xint3_r ) |
| 542 | { |
| 543 | return m_xint3; |
| 544 | } |
| 545 | |
| 546 | |
| 547 | //------------------------------------------------- |
| 548 | // xint4_r - expansion interrupt |
| 549 | //------------------------------------------------- |
| 550 | |
| 551 | READ_LINE_MEMBER( abc1600bus_slot_device::xint4_r ) |
| 552 | { |
| 553 | return m_xint4; |
| 554 | } |
| 555 | |
| 556 | |
| 557 | //------------------------------------------------- |
| 558 | // xint5_r - expansion interrupt |
| 559 | //------------------------------------------------- |
| 560 | |
| 561 | READ_LINE_MEMBER( abc1600bus_slot_device::xint5_r ) |
| 562 | { |
| 563 | return m_xint5; |
| 564 | } |
src/mess/machine/abc1600_bus.h
| r13067 | r13068 | |
| 179 | 179 | DECLARE_WRITE_LINE_MEMBER( xint3_w ); |
| 180 | 180 | DECLARE_WRITE_LINE_MEMBER( xint4_w ); |
| 181 | 181 | DECLARE_WRITE_LINE_MEMBER( xint5_w ); |
| 182 | |
| 183 | DECLARE_READ_LINE_MEMBER( int_r ); |
| 184 | DECLARE_READ_LINE_MEMBER( pren_r ); |
| 185 | DECLARE_READ_LINE_MEMBER( trrq_r ); |
| 186 | DECLARE_READ_LINE_MEMBER( nmi_r ); |
| 187 | DECLARE_READ_LINE_MEMBER( xint2_r ); |
| 188 | DECLARE_READ_LINE_MEMBER( xint3_r ); |
| 189 | DECLARE_READ_LINE_MEMBER( xint4_r ); |
| 190 | DECLARE_READ_LINE_MEMBER( xint5_r ); |
| 182 | 191 | |
| 183 | 192 | private: |
| 184 | 193 | devcb_resolved_write_line m_out_int_func; |
| r13067 | r13068 | |
| 191 | 200 | devcb_resolved_write_line m_out_xint5_func; |
| 192 | 201 | |
| 193 | 202 | device_abc1600bus_card_interface *m_card; |
| 203 | |
| 204 | int m_int; |
| 205 | int m_pren; |
| 206 | int m_trrq; |
| 207 | int m_nmi; |
| 208 | int m_xint2; |
| 209 | int m_xint3; |
| 210 | int m_xint4; |
| 211 | int m_xint5; |
| 194 | 212 | }; |
| 195 | 213 | |
| 196 | 214 | |