trunk/src/emu/bus/vme/vme.c
| r0 | r249041 | |
| 1 | // license:BSD-3-Clause |
| 2 | // copyright-holders:Joakim Larsson Edström |
| 3 | /* |
| 4 | * vme.c |
| 5 | */ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include "emuopts.h" |
| 9 | #include "vme.h" |
| 10 | |
| 11 | //************************************************************************** |
| 12 | // GLOBAL VARIABLES |
| 13 | //************************************************************************** |
| 14 | |
| 15 | const device_type VME_EXPANSION_SLOT = &device_creator<vme_expansion_slot_device>; |
| 16 | |
| 17 | //************************************************************************** |
| 18 | // DEVICE CPC_EXPANSION CARD INTERFACE |
| 19 | //************************************************************************** |
| 20 | |
| 21 | |
| 22 | device_vme_expansion_card_interface::device_vme_expansion_card_interface(const machine_config &mconfig, device_t &device) |
| 23 | : device_slot_card_interface(mconfig, device) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | |
| 28 | device_vme_expansion_card_interface::~device_vme_expansion_card_interface() |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | //************************************************************************** |
| 33 | // LIVE DEVICE |
| 34 | //************************************************************************** |
| 35 | |
| 36 | vme_expansion_slot_device::vme_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 37 | device_t(mconfig, VME_EXPANSION_SLOT, "Sharp X680x0 expansion slot", tag, owner, clock, "vme_expansion_slot", __FILE__), |
| 38 | device_slot_interface(mconfig, *this), |
| 39 | m_out_irq2_cb(*this), |
| 40 | m_out_irq4_cb(*this), |
| 41 | m_out_nmi_cb(*this), |
| 42 | m_out_reset_cb(*this) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | vme_expansion_slot_device::~vme_expansion_slot_device() |
| 47 | { |
| 48 | } |
| 49 | |
| 50 | //------------------------------------------------- |
| 51 | // device_start - device-specific startup |
| 52 | //------------------------------------------------- |
| 53 | |
| 54 | void vme_expansion_slot_device::device_start() |
| 55 | { |
| 56 | m_card = dynamic_cast<device_vme_expansion_card_interface *>(get_card_device()); |
| 57 | |
| 58 | // resolve callbacks |
| 59 | m_out_irq2_cb.resolve_safe(); |
| 60 | m_out_irq4_cb.resolve_safe(); |
| 61 | m_out_nmi_cb.resolve_safe(); |
| 62 | m_out_reset_cb.resolve_safe(); |
| 63 | } |
| 64 | |
| 65 | |
| 66 | //------------------------------------------------- |
| 67 | // device_reset - device-specific reset |
| 68 | //------------------------------------------------- |
| 69 | |
| 70 | void vme_expansion_slot_device::device_reset() |
| 71 | { |
| 72 | } |
| 73 | |
| 74 | |
| 75 | WRITE_LINE_MEMBER( vme_expansion_slot_device::irq2_w ) { m_out_irq2_cb(state); } |
| 76 | WRITE_LINE_MEMBER( vme_expansion_slot_device::irq4_w ) { m_out_irq4_cb(state); } |
| 77 | WRITE_LINE_MEMBER( vme_expansion_slot_device::nmi_w ) { m_out_nmi_cb(state); } |
| 78 | WRITE_LINE_MEMBER( vme_expansion_slot_device::reset_w ) { m_out_reset_cb(state); } |
trunk/src/emu/bus/vme/vme.h
| r0 | r249041 | |
| 1 | // license:BSD-3-Clause |
| 2 | // copyright-holders: Joakim Larsson Edström |
| 3 | |
| 4 | /* |
| 5 | * vme.h |
| 6 | * |
| 7 | * VME bus system |
| 8 | * |
| 9 | * Pinout: (from http://pinouts.ru/Slots/vmebus_pinout.shtml) |
| 10 | |
| 11 | P1/J1 P2/J2 (optional for 32 bit) |
| 12 | +-A-B-C--+ A B C +-A-B-C--+ A B C |
| 13 | 01 | [][][] | D00 BBSY* D08 | [][][] | n/a +5v n/a |
| 14 | 02 | [][][] | D01 BCLR* D09 | [][][] | n/a GROUND n/a |
| 15 | 03 | [][][] | D02 ACFAIL* D10 | [][][] | n/a RESERVED n/a |
| 16 | 04 | [][][] | D03 BG0IN* D11 | [][][] | n/a A24 n/a |
| 17 | 05 | [][][] | D04 BG0OUT* D12 | [][][] | n/a A25 n/a |
| 18 | 06 | [][][] | D05 BG1IN* D13 | [][][] | n/a A26 n/a |
| 19 | 07 | [][][] | D06 BG1OUT* D14 | [][][] | n/a A27 n/a |
| 20 | 08 | [][][] | D07 BG2IN* D15 | [][][] | n/a A28 n/a |
| 21 | 09 | [][][] | GROUND BG2OUT* GROUND | [][][] | n/a A29 n/a |
| 22 | 10 | [][][] | SYSCLK BG3IN* SYSFAIL* | [][][] | n/a A30 n/a |
| 23 | 11 | [][][] | GROUND BG3OUT* BERR* | [][][] | n/a A31 n/a |
| 24 | 12 | [][][] | DS1* BR0* SYSRESET* | [][][] | n/a GROUND n/a |
| 25 | 13 | [][][] | DS0* BR1* LWORD* | [][][] | n/a +5v n/a |
| 26 | 14 | [][][] | WRITE* BR2* AM5 | [][][] | n/a D16 n/a |
| 27 | 15 | [][][] | GROUND BR3* A23 | [][][] | n/a D17 n/a |
| 28 | 16 | [][][] | DTACK* AM0 A22 | [][][] | n/a D18 n/a |
| 29 | 17 | [][][] | GROUND AM1 A21 | [][][] | n/a D19 n/a |
| 30 | 18 | [][][] | AS* AM2 A20 | [][][] | n/a D20 n/a |
| 31 | 19 | [][][] | GROUND AM3 A19 | [][][] | n/a D21 n/a |
| 32 | 20 | [][][] | IACK* GROUND A18 | [][][] | n/a D22 n/a |
| 33 | 21 | [][][] | IACKIN* SERCLK* A17 | [][][] | n/a D23 n/a |
| 34 | 22 | [][][] | IACKOUT* SERDAT* A16 | [][][] | n/a GROUND n/a |
| 35 | 23 | [][][] | AM4 GROUND A15 | [][][] | n/a D24 n/a |
| 36 | 24 | [][][] | A07 IRQ7* A14 | [][][] | n/a D25 n/a |
| 37 | 25 | [][][] | A06 IRQ6* A13 | [][][] | n/a D26 n/a |
| 38 | 26 | [][][] | A05 IRQ5* A12 | [][][] | n/a D27 n/a |
| 39 | 27 | [][][] | A04 IRQ4* A11 | [][][] | n/a D28 n/a |
| 40 | 28 | [][][] | A03 IRQ3* A10 | [][][] | n/a D29 n/a |
| 41 | 29 | [][][] | A02 IRQ2* A09 | [][][] | n/a D30 n/a |
| 42 | 30 | [][][] | A01 IRQ1* A08 | [][][] | n/a D31 n/a |
| 43 | 31 | [][][] | -12v +5v STDBY +12v | [][][] | n/a GROUND n/a |
| 44 | 32 | [][][] | +5v +5v +5v | [][][] | n/a +5v n/a |
| 45 | |
| 46 | */ |
| 47 | |
| 48 | #ifndef VME_H_ |
| 49 | #define VME_H_ |
| 50 | |
| 51 | #include "emu.h" |
| 52 | |
| 53 | //************************************************************************** |
| 54 | // CONSTANTS |
| 55 | //************************************************************************** |
| 56 | |
| 57 | #define VME_EXP_SLOT_TAG "vmeexp" |
| 58 | |
| 59 | //************************************************************************** |
| 60 | // INTERFACE CONFIGURATION MACROS |
| 61 | //************************************************************************** |
| 62 | |
| 63 | #define MCFG_VME_EXPANSION_SLOT_OUT_IRQ2_CB(_devcb) \ |
| 64 | devcb = &vme_expansion_slot_device::set_out_irq2_callback(*device, DEVCB_##_devcb); |
| 65 | |
| 66 | #define MCFG_VME_EXPANSION_SLOT_OUT_IRQ4_CB(_devcb) \ |
| 67 | devcb = &vme_expansion_slot_device::set_out_irq4_callback(*device, DEVCB_##_devcb); |
| 68 | |
| 69 | #define MCFG_VME_EXPANSION_SLOT_OUT_NMI_CB(_devcb) \ |
| 70 | devcb = &vme_expansion_slot_device::set_out_nmi_callback(*device, DEVCB_##_devcb); |
| 71 | |
| 72 | #define MCFG_VME_EXPANSION_SLOT_OUT_RESET_CB(_devcb) \ |
| 73 | devcb = &vme_expansion_slot_device::set_out_reset_callback(*device, DEVCB_##_devcb); |
| 74 | |
| 75 | |
| 76 | //************************************************************************** |
| 77 | // TYPE DEFINITIONS |
| 78 | //************************************************************************** |
| 79 | |
| 80 | // ======================> device_vme_expansion_card_interface |
| 81 | |
| 82 | // class representing interface-specific live vme_expansion card |
| 83 | class device_vme_expansion_card_interface : public device_slot_card_interface |
| 84 | { |
| 85 | public: |
| 86 | // construction/destruction |
| 87 | device_vme_expansion_card_interface(const machine_config &mconfig, device_t &device); |
| 88 | virtual ~device_vme_expansion_card_interface(); |
| 89 | |
| 90 | // reset |
| 91 | virtual void vme_reset_w() { }; |
| 92 | }; |
| 93 | |
| 94 | |
| 95 | // ======================> vme_expansion_slot_device |
| 96 | |
| 97 | class vme_expansion_slot_device : public device_t, |
| 98 | public device_slot_interface |
| 99 | { |
| 100 | public: |
| 101 | // construction/destruction |
| 102 | vme_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 103 | virtual ~vme_expansion_slot_device(); |
| 104 | |
| 105 | template<class _Object> static devcb_base &set_out_irq2_callback(device_t &device, _Object object) { return downcast<vme_expansion_slot_device &>(device).m_out_irq2_cb.set_callback(object); } |
| 106 | template<class _Object> static devcb_base &set_out_irq4_callback(device_t &device, _Object object) { return downcast<vme_expansion_slot_device &>(device).m_out_irq4_cb.set_callback(object); } |
| 107 | template<class _Object> static devcb_base &set_out_nmi_callback(device_t &device, _Object object) { return downcast<vme_expansion_slot_device &>(device).m_out_nmi_cb.set_callback(object); } |
| 108 | template<class _Object> static devcb_base &set_out_reset_callback(device_t &device, _Object object) { return downcast<vme_expansion_slot_device &>(device).m_out_reset_cb.set_callback(object); } |
| 109 | |
| 110 | |
| 111 | DECLARE_WRITE_LINE_MEMBER( irq2_w ); |
| 112 | DECLARE_WRITE_LINE_MEMBER( irq4_w ); |
| 113 | DECLARE_WRITE_LINE_MEMBER( nmi_w ); |
| 114 | DECLARE_WRITE_LINE_MEMBER( reset_w ); |
| 115 | |
| 116 | protected: |
| 117 | // device-level overrides |
| 118 | virtual void device_start(); |
| 119 | virtual void device_reset(); |
| 120 | |
| 121 | devcb_write_line m_out_irq2_cb; |
| 122 | devcb_write_line m_out_irq4_cb; |
| 123 | devcb_write_line m_out_nmi_cb; |
| 124 | devcb_write_line m_out_reset_cb; |
| 125 | |
| 126 | device_vme_expansion_card_interface *m_card; |
| 127 | }; |
| 128 | |
| 129 | |
| 130 | // device type definition |
| 131 | extern const device_type VME_EXPANSION_SLOT; |
| 132 | |
| 133 | #endif /* VME_H_ */ |
trunk/src/mess/drivers/force68k.c
| r249040 | r249041 | |
| 329 | 329 | |
| 330 | 330 | /* P3/Host Port config */ |
| 331 | 331 | MCFG_DEVICE_ADD ("aciahost", ACIA6850, 0) |
| 332 | |
| 333 | MCFG_ACIA6850_TXD_HANDLER (DEVWRITELINE ("rs232host", rs232_port_device, write_txd)) |
| 334 | MCFG_ACIA6850_RTS_HANDLER (DEVWRITELINE ("rs232host", rs232_port_device, write_rts)) |
| 335 | |
| 336 | MCFG_RS232_PORT_ADD ("rs232host", default_rs232_devices, "null_modem") |
| 337 | MCFG_RS232_RXD_HANDLER (DEVWRITELINE ("aciahost", acia6850_device, write_rxd)) |
| 338 | MCFG_RS232_CTS_HANDLER (DEVWRITELINE ("aciahost", acia6850_device, write_cts)) |
| 339 | |
| 332 | 340 | MCFG_DEVICE_ADD ("aciahost_clock", CLOCK, ACIA_CLOCK) |
| 333 | 341 | MCFG_CLOCK_SIGNAL_HANDLER (WRITELINE (force68k_state, write_aciahost_clock)) |
| 334 | 342 | |
| r249040 | r249041 | |
| 419 | 427 | * DC <expression> <CR> Data Conversion |
| 420 | 428 | * DF <CR> Display Formatted registers |
| 421 | 429 | * DU [n] <address1> <address2>[<string>] <CR> Dump memory to object file |
| 422 | | * GO [<address] <CR> Execute program |
| 430 | * GO or G [<address] <CR> Execute program. |
| 423 | 431 | * GD [<address] <CR> Go Direct |
| 424 | 432 | * GT <address> <CR> Exec prog: temporary breakpoint |
| 425 | 433 | * HE<CR> Help; display monitor commands |
| 426 | 434 | * LO [n] [;<options] <CR> Load Object file |
| 427 | | * MD <address> [<count» <CR> Memory Display |
| 428 | | * MM <address> [<data» [;<options» <CR> Memory Modify |
| 435 | * MD <address> [<count>] <CR> Memory Display |
| 436 | * MM or M <address> [<data<][;<options>] <CR> Memory Modify |
| 429 | 437 | * MS <address> <data1 > <data2> < ... <CR> Memory Set - starting at addr with data 1. data 2 ... |
| 430 | 438 | * NOBR [<address> ... ] <CR> Remove Breakpoint |
| 431 | 439 | * NOPA <CR> Printer Detach (Centronics on PIT/P2) |
| r249040 | r249041 | |
| 433 | 441 | * PA <CR> Printer Attach (Centronics on PIT/P2) |
| 434 | 442 | * PF[n] <CR> Set/display Port Format |
| 435 | 443 | * RM <CR> Register Modify |
| 436 | | * TM [<exit character» <CR> Transparent Mode |
| 437 | | * TR [<count] <CR> Trace |
| 444 | * TM [<exit character>] <CR> Transparent Mode |
| 445 | * TR OR T [<count] <CR> Trace |
| 438 | 446 | * TT <address> <CR> Trace: temporary breakpoint |
| 439 | 447 | * VE [n] [<string] <CR> Verify memory/object file |
| 440 | 448 | * ---------------------------------------------------------------------------- |
| 441 | | * .AO - .A7 [<expression] <CR> Display/set address register |
| 442 | | * .00 - .07 [<expression] <CR> Display/set data register |
| 443 | | * .RO - .R6 [<expression] <CR> Display/set offset register |
| 444 | | * .PC [<expression] <CR> Display/set program counter |
| 445 | | * .SR [<expression] <CR> Display/set status register |
| 446 | | * .SS [<expression] <CR> Display/set supervisor stack |
| 447 | | * .US [<expression] <CR> Display/set user stack |
| 449 | * .AO - .A7 [<expression] <CR> Display/set address register |
| 450 | * .00 - .07 [<expression] <CR> Display/set data register |
| 451 | * .RO - .R6 [<expression] <CR> Display/set offset register |
| 452 | * .PC [<expression] <CR> Display/set program counter |
| 453 | * .SR [<expression] <CR> Display/set status register |
| 454 | * .SS [<expression] <CR> Display/set supervisor stack |
| 455 | * .US [<expression] <CR> Display/set user stack |
| 448 | 456 | * ---------------------------------------------------------------------------- |
| 449 | | * MD <address> [<count>]; D1 <CR> Disassemble memory location |
| 457 | * MD <address> [<count>]; DI <CR> Disassemble memory location |
| 450 | 458 | * MM <address>; DI <CR> Disassemble/Assemble memory location |
| 451 | 459 | * ---------------------------------------------------------------------------- |
| 460 | * Undocumented commands found in ROM table at address 0x80308 |
| 461 | * .* No WHAT message displayed, no action seen. |
| 452 | 462 | */ |
| 453 | 463 | ROM_END |
| 454 | 464 | |