trunk/src/emu/bus/ql/qimi.h
| r30633 | r30634 | |
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #endif |
| 57 | | // license:BSD-3-Clause |
| 58 | | // copyright-holders:Curt Coder |
| 59 | | /********************************************************************** |
| 60 | | |
| 61 | | QIMI (QL Internal Mouse Interface) emulation |
| 62 | | |
| 63 | | Copyright MESS Team. |
| 64 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 65 | | |
| 66 | | **********************************************************************/ |
| 67 | | |
| 68 | | #pragma once |
| 69 | | |
| 70 | | #ifndef __QIMI__ |
| 71 | | #define __QIMI__ |
| 72 | | |
| 73 | | #include "exp.h" |
| 74 | | |
| 75 | | |
| 76 | | |
| 77 | | //************************************************************************** |
| 78 | | // TYPE DEFINITIONS |
| 79 | | //************************************************************************** |
| 80 | | |
| 81 | | // ======================> qimi_device |
| 82 | | |
| 83 | | class qimi_t : public device_t, |
| 84 | | public device_ql_expansion_card_interface |
| 85 | | { |
| 86 | | public: |
| 87 | | // construction/destruction |
| 88 | | qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 89 | | |
| 90 | | // optional information overrides |
| 91 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 92 | | virtual ioport_constructor device_input_ports() const; |
| 93 | | |
| 94 | | protected: |
| 95 | | // device-level overrides |
| 96 | | virtual void device_start(); |
| 97 | | virtual void device_reset(); |
| 98 | | |
| 99 | | // device_ql_expansion_card_interface overrides |
| 100 | | |
| 101 | | private: |
| 102 | | required_ioport m_mousex; |
| 103 | | required_ioport m_mousey; |
| 104 | | required_ioport m_mouseb; |
| 105 | | }; |
| 106 | | |
| 107 | | |
| 108 | | // device type definition |
| 109 | | extern const device_type QIMI; |
| 110 | | |
| 111 | | |
| 112 | | #endif |
trunk/src/emu/bus/ql/sandy_superqboard.c
| r30633 | r30634 | |
| 98 | 98 | void sandy_superqboard_t::device_reset() |
| 99 | 99 | { |
| 100 | 100 | } |
| 101 | | // license:BSD-3-Clause |
| 102 | | // copyright-holders:Curt Coder |
| 103 | | /********************************************************************** |
| 104 | | |
| 105 | | Sandy SuperQBoard emulation |
| 106 | | |
| 107 | | Copyright MESS Team. |
| 108 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 109 | | |
| 110 | | **********************************************************************/ |
| 111 | | |
| 112 | | #include "sandy_superqboard.h" |
| 113 | | |
| 114 | | |
| 115 | | |
| 116 | | //************************************************************************** |
| 117 | | // MACROS/CONSTANTS |
| 118 | | //************************************************************************** |
| 119 | | |
| 120 | | |
| 121 | | |
| 122 | | //************************************************************************** |
| 123 | | // DEVICE DEFINITIONS |
| 124 | | //************************************************************************** |
| 125 | | |
| 126 | | const device_type SANDY_SUPERQBOARD = &device_creator<sandy_superqboard_t>; |
| 127 | | |
| 128 | | |
| 129 | | //------------------------------------------------- |
| 130 | | // ROM( sandy_superqboard ) |
| 131 | | //------------------------------------------------- |
| 132 | | |
| 133 | | ROM_START( sandy_superqboard ) |
| 134 | | ROM_REGION( 0x8000, "rom", 0 ) |
| 135 | | ROM_LOAD( "sandy_disk_controller_v1.18y_1984.rom", 0x0000, 0x8000, CRC(d02425be) SHA1(e730576e3e0c6a1acad042c09e15fc62a32d8fbd) ) |
| 136 | | ROM_END |
| 137 | | |
| 138 | | |
| 139 | | //------------------------------------------------- |
| 140 | | // rom_region - device-specific ROM region |
| 141 | | //------------------------------------------------- |
| 142 | | |
| 143 | | const rom_entry *sandy_superqboard_t::device_rom_region() const |
| 144 | | { |
| 145 | | return ROM_NAME( sandy_superqboard ); |
| 146 | | } |
| 147 | | |
| 148 | | |
| 149 | | //------------------------------------------------- |
| 150 | | // MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) |
| 151 | | //------------------------------------------------- |
| 152 | | |
| 153 | | static MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) |
| 154 | | MACHINE_CONFIG_END |
| 155 | | |
| 156 | | |
| 157 | | //------------------------------------------------- |
| 158 | | // machine_config_additions - device-specific |
| 159 | | // machine configurations |
| 160 | | //------------------------------------------------- |
| 161 | | |
| 162 | | machine_config_constructor sandy_superqboard_t::device_mconfig_additions() const |
| 163 | | { |
| 164 | | return MACHINE_CONFIG_NAME( sandy_superqboard ); |
| 165 | | } |
| 166 | | |
| 167 | | |
| 168 | | |
| 169 | | //************************************************************************** |
| 170 | | // LIVE DEVICE |
| 171 | | //************************************************************************** |
| 172 | | |
| 173 | | //------------------------------------------------- |
| 174 | | // sandy_superqboard_t - constructor |
| 175 | | //------------------------------------------------- |
| 176 | | |
| 177 | | sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 178 | | device_t(mconfig, SANDY_SUPERQBOARD, "SANDY_SUPERQBOARD", tag, owner, clock, "sandy_superqboard", __FILE__), |
| 179 | | device_ql_expansion_card_interface(mconfig, *this), |
| 180 | | m_rom(*this, "rom") |
| 181 | | { |
| 182 | | } |
| 183 | | |
| 184 | | |
| 185 | | //------------------------------------------------- |
| 186 | | // device_start - device-specific startup |
| 187 | | //------------------------------------------------- |
| 188 | | |
| 189 | | void sandy_superqboard_t::device_start() |
| 190 | | { |
| 191 | | } |
| 192 | | |
| 193 | | |
| 194 | | //------------------------------------------------- |
| 195 | | // device_reset - device-specific reset |
| 196 | | //------------------------------------------------- |
| 197 | | |
| 198 | | void sandy_superqboard_t::device_reset() |
| 199 | | { |
| 200 | | } |
trunk/src/emu/bus/ql/trumpcard.h
| r30633 | r30634 | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | #endif |
| 55 | | // license:BSD-3-Clause |
| 56 | | // copyright-holders:Curt Coder |
| 57 | | /********************************************************************** |
| 58 | | |
| 59 | | Miracle Systems QL Trump Card emulation |
| 60 | | |
| 61 | | Copyright MESS Team. |
| 62 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 63 | | |
| 64 | | **********************************************************************/ |
| 65 | | |
| 66 | | #pragma once |
| 67 | | |
| 68 | | #ifndef __QL_TRUMP_CARD__ |
| 69 | | #define __QL_TRUMP_CARD__ |
| 70 | | |
| 71 | | #include "exp.h" |
| 72 | | |
| 73 | | |
| 74 | | |
| 75 | | //************************************************************************** |
| 76 | | // TYPE DEFINITIONS |
| 77 | | //************************************************************************** |
| 78 | | |
| 79 | | // ======================> ql_trump_card_t |
| 80 | | |
| 81 | | class ql_trump_card_t : public device_t, |
| 82 | | public device_ql_expansion_card_interface |
| 83 | | { |
| 84 | | public: |
| 85 | | // construction/destruction |
| 86 | | ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 87 | | |
| 88 | | // optional information overrides |
| 89 | | virtual const rom_entry *device_rom_region() const; |
| 90 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 91 | | |
| 92 | | protected: |
| 93 | | // device-level overrides |
| 94 | | virtual void device_start(); |
| 95 | | virtual void device_reset(); |
| 96 | | |
| 97 | | // device_ql_expansion_card_interface overrides |
| 98 | | |
| 99 | | private: |
| 100 | | required_memory_region m_rom; |
| 101 | | }; |
| 102 | | |
| 103 | | |
| 104 | | // device type definition |
| 105 | | extern const device_type QL_TRUMP_CARD; |
| 106 | | |
| 107 | | |
| 108 | | #endif |
trunk/src/emu/bus/ql/sandy_superdisk.c
| r30633 | r30634 | |
| 98 | 98 | void sandy_super_disk_t::device_reset() |
| 99 | 99 | { |
| 100 | 100 | } |
| 101 | | // license:BSD-3-Clause |
| 102 | | // copyright-holders:Curt Coder |
| 103 | | /********************************************************************** |
| 104 | | |
| 105 | | Sandy Super Disk emulation |
| 106 | | |
| 107 | | Copyright MESS Team. |
| 108 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 109 | | |
| 110 | | **********************************************************************/ |
| 111 | | |
| 112 | | #include "sandy_superdisk.h" |
| 113 | | |
| 114 | | |
| 115 | | |
| 116 | | //************************************************************************** |
| 117 | | // MACROS/CONSTANTS |
| 118 | | //************************************************************************** |
| 119 | | |
| 120 | | |
| 121 | | |
| 122 | | //************************************************************************** |
| 123 | | // DEVICE DEFINITIONS |
| 124 | | //************************************************************************** |
| 125 | | |
| 126 | | const device_type SANDY_SUPER_DISK = &device_creator<sandy_super_disk_t>; |
| 127 | | |
| 128 | | |
| 129 | | //------------------------------------------------- |
| 130 | | // ROM( sandy_super_disk ) |
| 131 | | //------------------------------------------------- |
| 132 | | |
| 133 | | ROM_START( sandy_super_disk ) |
| 134 | | ROM_REGION( 0x4000, "rom", 0 ) |
| 135 | | ROM_LOAD( "sandysuperdisk.rom", 0x0000, 0x4000, CRC(b52077da) SHA1(bf531758145ffd083e01c1cf9c45d0e9264a3b53) ) |
| 136 | | ROM_END |
| 137 | | |
| 138 | | |
| 139 | | //------------------------------------------------- |
| 140 | | // rom_region - device-specific ROM region |
| 141 | | //------------------------------------------------- |
| 142 | | |
| 143 | | const rom_entry *sandy_super_disk_t::device_rom_region() const |
| 144 | | { |
| 145 | | return ROM_NAME( sandy_super_disk ); |
| 146 | | } |
| 147 | | |
| 148 | | |
| 149 | | //------------------------------------------------- |
| 150 | | // MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) |
| 151 | | //------------------------------------------------- |
| 152 | | |
| 153 | | static MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) |
| 154 | | MACHINE_CONFIG_END |
| 155 | | |
| 156 | | |
| 157 | | //------------------------------------------------- |
| 158 | | // machine_config_additions - device-specific |
| 159 | | // machine configurations |
| 160 | | //------------------------------------------------- |
| 161 | | |
| 162 | | machine_config_constructor sandy_super_disk_t::device_mconfig_additions() const |
| 163 | | { |
| 164 | | return MACHINE_CONFIG_NAME( sandy_super_disk ); |
| 165 | | } |
| 166 | | |
| 167 | | |
| 168 | | |
| 169 | | //************************************************************************** |
| 170 | | // LIVE DEVICE |
| 171 | | //************************************************************************** |
| 172 | | |
| 173 | | //------------------------------------------------- |
| 174 | | // sandy_super_disk_t - constructor |
| 175 | | //------------------------------------------------- |
| 176 | | |
| 177 | | sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 178 | | device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "sandy_super_disk", __FILE__), |
| 179 | | device_ql_expansion_card_interface(mconfig, *this), |
| 180 | | m_rom(*this, "rom") |
| 181 | | { |
| 182 | | } |
| 183 | | |
| 184 | | |
| 185 | | //------------------------------------------------- |
| 186 | | // device_start - device-specific startup |
| 187 | | //------------------------------------------------- |
| 188 | | |
| 189 | | void sandy_super_disk_t::device_start() |
| 190 | | { |
| 191 | | } |
| 192 | | |
| 193 | | |
| 194 | | //------------------------------------------------- |
| 195 | | // device_reset - device-specific reset |
| 196 | | //------------------------------------------------- |
| 197 | | |
| 198 | | void sandy_super_disk_t::device_reset() |
| 199 | | { |
| 200 | | } |
trunk/src/emu/bus/ql/sandy_superqboard.h
| r30633 | r30634 | |
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #endif |
| 57 | | // license:BSD-3-Clause |
| 58 | | // copyright-holders:Curt Coder |
| 59 | | /********************************************************************** |
| 60 | | |
| 61 | | Sandy SuperQBoard emulation |
| 62 | | |
| 63 | | Copyright MESS Team. |
| 64 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 65 | | |
| 66 | | **********************************************************************/ |
| 67 | | |
| 68 | | #pragma once |
| 69 | | |
| 70 | | #ifndef __SANDY_SUPERQBOARD__ |
| 71 | | #define __SANDY_SUPERQBOARD__ |
| 72 | | |
| 73 | | #include "exp.h" |
| 74 | | #include "bus/centronics/ctronics.h" |
| 75 | | #include "machine/wd_fdc.h" |
| 76 | | |
| 77 | | |
| 78 | | |
| 79 | | //************************************************************************** |
| 80 | | // TYPE DEFINITIONS |
| 81 | | //************************************************************************** |
| 82 | | |
| 83 | | // ======================> sandy_superqboard_device |
| 84 | | |
| 85 | | class sandy_superqboard_t : public device_t, |
| 86 | | public device_ql_expansion_card_interface |
| 87 | | { |
| 88 | | public: |
| 89 | | // construction/destruction |
| 90 | | sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 91 | | |
| 92 | | // optional information overrides |
| 93 | | virtual const rom_entry *device_rom_region() const; |
| 94 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 95 | | |
| 96 | | protected: |
| 97 | | // device-level overrides |
| 98 | | virtual void device_start(); |
| 99 | | virtual void device_reset(); |
| 100 | | |
| 101 | | // device_ql_expansion_card_interface overrides |
| 102 | | |
| 103 | | private: |
| 104 | | required_memory_region m_rom; |
| 105 | | }; |
| 106 | | |
| 107 | | |
| 108 | | // device type definition |
| 109 | | extern const device_type SANDY_SUPERQBOARD; |
| 110 | | |
| 111 | | |
| 112 | | #endif |
trunk/src/emu/bus/ql/exp.c
| r30633 | r30634 | |
| 88 | 88 | SLOT_INTERFACE("superqboard", SANDY_SUPERQBOARD) |
| 89 | 89 | SLOT_INTERFACE("trumpcard", QL_TRUMP_CARD) |
| 90 | 90 | SLOT_INTERFACE_END |
| 91 | | // license:BSD-3-Clause |
| 92 | | // copyright-holders:Curt Coder |
| 93 | | /********************************************************************** |
| 94 | | |
| 95 | | Sinclair QL expansion port emulation |
| 96 | | |
| 97 | | Copyright MESS Team. |
| 98 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 99 | | |
| 100 | | **********************************************************************/ |
| 101 | | |
| 102 | | #include "exp.h" |
| 103 | | |
| 104 | | |
| 105 | | |
| 106 | | //************************************************************************** |
| 107 | | // DEVICE DEFINITIONS |
| 108 | | //************************************************************************** |
| 109 | | |
| 110 | | const device_type QL_EXPANSION_SLOT = &device_creator<ql_expansion_slot_t>; |
| 111 | | |
| 112 | | |
| 113 | | |
| 114 | | //************************************************************************** |
| 115 | | // DEVICE QL_EXPANSION CARD INTERFACE |
| 116 | | //************************************************************************** |
| 117 | | |
| 118 | | //------------------------------------------------- |
| 119 | | // device_ql_expansion_card_interface - constructor |
| 120 | | //------------------------------------------------- |
| 121 | | |
| 122 | | device_ql_expansion_card_interface::device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device) : |
| 123 | | device_slot_card_interface(mconfig, device) |
| 124 | | { |
| 125 | | m_slot = dynamic_cast<ql_expansion_slot_t *>(device.owner()); |
| 126 | | } |
| 127 | | |
| 128 | | |
| 129 | | |
| 130 | | //************************************************************************** |
| 131 | | // LIVE DEVICE |
| 132 | | //************************************************************************** |
| 133 | | |
| 134 | | //------------------------------------------------- |
| 135 | | // ql_expansion_slot_t - constructor |
| 136 | | //------------------------------------------------- |
| 137 | | |
| 138 | | ql_expansion_slot_t::ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 139 | | device_t(mconfig, QL_EXPANSION_SLOT, "QL expansion port", tag, owner, clock, "ql_expansion_slot", __FILE__), |
| 140 | | device_slot_interface(mconfig, *this), |
| 141 | | m_write_ipl0l(*this), |
| 142 | | m_write_ipl1l(*this), |
| 143 | | m_write_berrl(*this), |
| 144 | | m_write_extintl(*this) |
| 145 | | { |
| 146 | | } |
| 147 | | |
| 148 | | |
| 149 | | //------------------------------------------------- |
| 150 | | // device_start - device-specific startup |
| 151 | | //------------------------------------------------- |
| 152 | | |
| 153 | | void ql_expansion_slot_t::device_start() |
| 154 | | { |
| 155 | | m_card = dynamic_cast<device_ql_expansion_card_interface *>(get_card_device()); |
| 156 | | |
| 157 | | // resolve callbacks |
| 158 | | m_write_ipl0l.resolve_safe(); |
| 159 | | m_write_ipl1l.resolve_safe(); |
| 160 | | m_write_berrl.resolve_safe(); |
| 161 | | m_write_extintl.resolve_safe(); |
| 162 | | } |
| 163 | | |
| 164 | | |
| 165 | | //------------------------------------------------- |
| 166 | | // SLOT_INTERFACE( ql_expansion_cards ) |
| 167 | | //------------------------------------------------- |
| 168 | | |
| 169 | | // slot devices |
| 170 | | #include "qimi.h" |
| 171 | | #include "sandy_superdisk.h" |
| 172 | | #include "sandy_superqboard.h" |
| 173 | | #include "trumpcard.h" |
| 174 | | |
| 175 | | SLOT_INTERFACE_START( ql_expansion_cards ) |
| 176 | | SLOT_INTERFACE("qimi", QIMI) |
| 177 | | SLOT_INTERFACE("superdisk", SANDY_SUPER_DISK) |
| 178 | | SLOT_INTERFACE("superqboard", SANDY_SUPERQBOARD) |
| 179 | | SLOT_INTERFACE("trumpcard", QL_TRUMP_CARD) |
| 180 | | SLOT_INTERFACE_END |
trunk/src/emu/bus/ql/sandy_superdisk.h
| r30633 | r30634 | |
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | #endif |
| 56 | | // license:BSD-3-Clause |
| 57 | | // copyright-holders:Curt Coder |
| 58 | | /********************************************************************** |
| 59 | | |
| 60 | | Sandy Super Disk emulation |
| 61 | | |
| 62 | | Copyright MESS Team. |
| 63 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 64 | | |
| 65 | | **********************************************************************/ |
| 66 | | |
| 67 | | #pragma once |
| 68 | | |
| 69 | | #ifndef __SANDY_SUPER_DISK__ |
| 70 | | #define __SANDY_SUPER_DISK__ |
| 71 | | |
| 72 | | #include "exp.h" |
| 73 | | #include "machine/wd_fdc.h" |
| 74 | | |
| 75 | | |
| 76 | | |
| 77 | | //************************************************************************** |
| 78 | | // TYPE DEFINITIONS |
| 79 | | //************************************************************************** |
| 80 | | |
| 81 | | // ======================> sandy_super_disk_device |
| 82 | | |
| 83 | | class sandy_super_disk_t : public device_t, |
| 84 | | public device_ql_expansion_card_interface |
| 85 | | { |
| 86 | | public: |
| 87 | | // construction/destruction |
| 88 | | sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 89 | | |
| 90 | | // optional information overrides |
| 91 | | virtual const rom_entry *device_rom_region() const; |
| 92 | | virtual machine_config_constructor device_mconfig_additions() const; |
| 93 | | |
| 94 | | protected: |
| 95 | | // device-level overrides |
| 96 | | virtual void device_start(); |
| 97 | | virtual void device_reset(); |
| 98 | | |
| 99 | | // device_ql_expansion_card_interface overrides |
| 100 | | |
| 101 | | private: |
| 102 | | required_memory_region m_rom; |
| 103 | | }; |
| 104 | | |
| 105 | | |
| 106 | | // device type definition |
| 107 | | extern const device_type SANDY_SUPER_DISK; |
| 108 | | |
| 109 | | |
| 110 | | #endif |
trunk/src/emu/bus/ql/qimi.c
| r30633 | r30634 | |
| 123 | 123 | void qimi_t::device_reset() |
| 124 | 124 | { |
| 125 | 125 | } |
| 126 | | // license:BSD-3-Clause |
| 127 | | // copyright-holders:Curt Coder |
| 128 | | /********************************************************************** |
| 129 | | |
| 130 | | QIMI (QL Internal Mouse Interface) emulation |
| 131 | | |
| 132 | | Copyright MESS Team. |
| 133 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 134 | | |
| 135 | | **********************************************************************/ |
| 136 | | |
| 137 | | #include "qimi.h" |
| 138 | | |
| 139 | | |
| 140 | | |
| 141 | | //************************************************************************** |
| 142 | | // MACROS/CONSTANTS |
| 143 | | //************************************************************************** |
| 144 | | |
| 145 | | #define MOUSEX_TAG "MOUSEX" |
| 146 | | #define MOUSEY_TAG "MOUSEY" |
| 147 | | #define MOUSEB_TAG "MOUSEB" |
| 148 | | |
| 149 | | |
| 150 | | // Mouse bits in Sandy port order |
| 151 | | #define MOUSE_MIDDLE 0x02 |
| 152 | | #define MOUSE_RIGHT 0x04 |
| 153 | | #define MOUSE_LEFT 0x08 |
| 154 | | #define MOUSE_DIRY 0x10 |
| 155 | | #define MOUSE_DIRX 0x20 |
| 156 | | #define MOUSE_INTY 0x40 |
| 157 | | #define MOUSE_INTX 0x80 |
| 158 | | #define MOUSE_INT_MASK (MOUSE_INTX | MOUSE_INTY) |
| 159 | | |
| 160 | | |
| 161 | | |
| 162 | | //************************************************************************** |
| 163 | | // DEVICE DEFINITIONS |
| 164 | | //************************************************************************** |
| 165 | | |
| 166 | | const device_type QIMI = &device_creator<qimi_t>; |
| 167 | | |
| 168 | | |
| 169 | | //------------------------------------------------- |
| 170 | | // MACHINE_CONFIG_FRAGMENT( qimi ) |
| 171 | | //------------------------------------------------- |
| 172 | | |
| 173 | | static MACHINE_CONFIG_FRAGMENT( qimi ) |
| 174 | | MACHINE_CONFIG_END |
| 175 | | |
| 176 | | |
| 177 | | //------------------------------------------------- |
| 178 | | // machine_config_additions - device-specific |
| 179 | | // machine configurations |
| 180 | | //------------------------------------------------- |
| 181 | | |
| 182 | | machine_config_constructor qimi_t::device_mconfig_additions() const |
| 183 | | { |
| 184 | | return MACHINE_CONFIG_NAME( qimi ); |
| 185 | | } |
| 186 | | |
| 187 | | |
| 188 | | //------------------------------------------------- |
| 189 | | // INPUT_PORTS( qimi ) |
| 190 | | //------------------------------------------------- |
| 191 | | |
| 192 | | static INPUT_PORTS_START( qimi ) |
| 193 | | PORT_START(MOUSEX_TAG) |
| 194 | | PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) |
| 195 | | |
| 196 | | PORT_START(MOUSEY_TAG) |
| 197 | | PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) |
| 198 | | |
| 199 | | PORT_START(MOUSEB_TAG) /* Mouse buttons */ |
| 200 | | PORT_BIT( MOUSE_RIGHT, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON1) |
| 201 | | PORT_BIT( MOUSE_LEFT, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Mouse Button 2") PORT_CODE(MOUSECODE_BUTTON2) |
| 202 | | PORT_BIT( MOUSE_MIDDLE, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Mouse Button 3") PORT_CODE(MOUSECODE_BUTTON3) |
| 203 | | INPUT_PORTS_END |
| 204 | | |
| 205 | | |
| 206 | | //------------------------------------------------- |
| 207 | | // input_ports - device-specific input ports |
| 208 | | //------------------------------------------------- |
| 209 | | |
| 210 | | ioport_constructor qimi_t::device_input_ports() const |
| 211 | | { |
| 212 | | return INPUT_PORTS_NAME( qimi ); |
| 213 | | } |
| 214 | | |
| 215 | | |
| 216 | | |
| 217 | | //************************************************************************** |
| 218 | | // LIVE DEVICE |
| 219 | | //************************************************************************** |
| 220 | | |
| 221 | | //------------------------------------------------- |
| 222 | | // qimi_t - constructor |
| 223 | | //------------------------------------------------- |
| 224 | | |
| 225 | | qimi_t::qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 226 | | device_t(mconfig, QIMI, "QIMI", tag, owner, clock, "qimi", __FILE__), |
| 227 | | device_ql_expansion_card_interface(mconfig, *this), |
| 228 | | m_mousex(*this, MOUSEX_TAG), |
| 229 | | m_mousey(*this, MOUSEY_TAG), |
| 230 | | m_mouseb(*this, MOUSEB_TAG) |
| 231 | | { |
| 232 | | } |
| 233 | | |
| 234 | | |
| 235 | | //------------------------------------------------- |
| 236 | | // device_start - device-specific startup |
| 237 | | //------------------------------------------------- |
| 238 | | |
| 239 | | void qimi_t::device_start() |
| 240 | | { |
| 241 | | } |
| 242 | | |
| 243 | | |
| 244 | | //------------------------------------------------- |
| 245 | | // device_reset - device-specific reset |
| 246 | | //------------------------------------------------- |
| 247 | | |
| 248 | | void qimi_t::device_reset() |
| 249 | | { |
| 250 | | } |
trunk/src/emu/bus/ql/exp.h
| r30633 | r30634 | |
| 136 | 136 | |
| 137 | 137 | |
| 138 | 138 | #endif |
| 139 | | // license:BSD-3-Clause |
| 140 | | // copyright-holders:Curt Coder |
| 141 | | /********************************************************************** |
| 142 | | |
| 143 | | Sinclair QL expansion port emulation |
| 144 | | |
| 145 | | Copyright MESS Team. |
| 146 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 147 | | |
| 148 | | ********************************************************************** |
| 149 | | |
| 150 | | A B |
| 151 | | GND * 1 * GND |
| 152 | | D3 * 2 * D2 |
| 153 | | D4 * 3 * D1 |
| 154 | | D5 * 4 * D0 |
| 155 | | D6 * 5 * ASL |
| 156 | | D7 * 6 * DSL |
| 157 | | A19 * 7 * RDWL |
| 158 | | A18 * 8 * DTACKL |
| 159 | | A17 * 9 * BGL |
| 160 | | A16 * 10 * BRL |
| 161 | | CLKCPU * 11 * A15 |
| 162 | | RED * 12 * RESETCPUL |
| 163 | | A14 * 13 * CSYNCL |
| 164 | | A13 * 14 * E |
| 165 | | A12 * 15 * VSYNCH |
| 166 | | A11 * 16 * VPAL |
| 167 | | A10 * 17 * GREEN |
| 168 | | A9 * 18 * BLUE |
| 169 | | A8 * 19 * FC2 |
| 170 | | A7 * 20 * FC1 |
| 171 | | A6 * 21 * FC0 |
| 172 | | A5 * 22 * A0 |
| 173 | | A4 * 23 * ROMOEH |
| 174 | | A3 * 24 * A1 |
| 175 | | DBGL * 25 * A2 |
| 176 | | SP2 * 26 * SP3 |
| 177 | | DSCML * 27 * IPL0L |
| 178 | | SP1 * 28 * BERRL |
| 179 | | SP0 * 29 * IPL1L |
| 180 | | VP12 * 30 * EXTINTL |
| 181 | | VM12 * 31 * VIN |
| 182 | | VIN * 32 * VIN |
| 183 | | |
| 184 | | **********************************************************************/ |
| 185 | | |
| 186 | | #pragma once |
| 187 | | |
| 188 | | #ifndef __QL_EXPANSION_SLOT__ |
| 189 | | #define __QL_EXPANSION_SLOT__ |
| 190 | | |
| 191 | | #include "emu.h" |
| 192 | | |
| 193 | | |
| 194 | | |
| 195 | | //************************************************************************** |
| 196 | | // INTERFACE CONFIGURATION MACROS |
| 197 | | //************************************************************************** |
| 198 | | |
| 199 | | #define MCFG_QL_EXPANSION_SLOT_ADD(_tag, _slot_intf, _def_slot) \ |
| 200 | | MCFG_DEVICE_ADD(_tag, QL_EXPANSION_SLOT, 0) \ |
| 201 | | MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) |
| 202 | | |
| 203 | | |
| 204 | | #define MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK(_write) \ |
| 205 | | devcb = &ql_expansion_slot_t::set_ipl0l_wr_callback(*device, DEVCB_##_write); |
| 206 | | |
| 207 | | #define MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK(_write) \ |
| 208 | | devcb = &ql_expansion_slot_t::set_ipl1l_wr_callback(*device, DEVCB_##_write); |
| 209 | | |
| 210 | | #define MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK(_write) \ |
| 211 | | devcb = &ql_expansion_slot_t::set_berrl_wr_callback(*device, DEVCB_##_write); |
| 212 | | |
| 213 | | #define MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(_write) \ |
| 214 | | devcb = &ql_expansion_slot_t::set_extintl_wr_callback(*device, DEVCB_##_write); |
| 215 | | |
| 216 | | |
| 217 | | |
| 218 | | //************************************************************************** |
| 219 | | // TYPE DEFINITIONS |
| 220 | | //************************************************************************** |
| 221 | | |
| 222 | | // ======================> device_ql_expansion_card_interface |
| 223 | | |
| 224 | | class ql_expansion_slot_t; |
| 225 | | |
| 226 | | class device_ql_expansion_card_interface : public device_slot_card_interface |
| 227 | | { |
| 228 | | friend class ql_expansion_slot_t; |
| 229 | | |
| 230 | | public: |
| 231 | | // construction/destruction |
| 232 | | device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device); |
| 233 | | |
| 234 | | protected: |
| 235 | | ql_expansion_slot_t *m_slot; |
| 236 | | }; |
| 237 | | |
| 238 | | |
| 239 | | // ======================> ql_expansion_slot_t |
| 240 | | |
| 241 | | class ql_expansion_slot_t : public device_t, |
| 242 | | public device_slot_interface |
| 243 | | { |
| 244 | | public: |
| 245 | | // construction/destruction |
| 246 | | ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 247 | | |
| 248 | | template<class _Object> static devcb_base &set_ipl0l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl0l.set_callback(object); } |
| 249 | | template<class _Object> static devcb_base &set_ipl1l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl1l.set_callback(object); } |
| 250 | | template<class _Object> static devcb_base &set_berrl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_berrl.set_callback(object); } |
| 251 | | template<class _Object> static devcb_base &set_extintl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_extintl.set_callback(object); } |
| 252 | | |
| 253 | | DECLARE_WRITE_LINE_MEMBER( extintl_w ) { m_write_extintl(state); } |
| 254 | | |
| 255 | | protected: |
| 256 | | // device-level overrides |
| 257 | | virtual void device_start(); |
| 258 | | |
| 259 | | devcb_write_line m_write_ipl0l; |
| 260 | | devcb_write_line m_write_ipl1l; |
| 261 | | devcb_write_line m_write_berrl; |
| 262 | | devcb_write_line m_write_extintl; |
| 263 | | |
| 264 | | device_ql_expansion_card_interface *m_card; |
| 265 | | }; |
| 266 | | |
| 267 | | |
| 268 | | // device type definition |
| 269 | | extern const device_type QL_EXPANSION_SLOT; |
| 270 | | |
| 271 | | |
| 272 | | SLOT_INTERFACE_EXTERN( ql_expansion_cards ); |
| 273 | | |
| 274 | | |
| 275 | | |
| 276 | | #endif |
trunk/src/emu/bus/ql/trumpcard.c
| r30633 | r30634 | |
| 98 | 98 | void ql_trump_card_t::device_reset() |
| 99 | 99 | { |
| 100 | 100 | } |
| 101 | | // license:BSD-3-Clause |
| 102 | | // copyright-holders:Curt Coder |
| 103 | | /********************************************************************** |
| 104 | | |
| 105 | | Miracle Systems QL Trump Card emulation |
| 106 | | |
| 107 | | Copyright MESS Team. |
| 108 | | Visit http://mamedev.org for licensing and usage restrictions. |
| 109 | | |
| 110 | | **********************************************************************/ |
| 111 | | |
| 112 | | #include "trumpcard.h" |
| 113 | | |
| 114 | | |
| 115 | | |
| 116 | | //************************************************************************** |
| 117 | | // MACROS/CONSTANTS |
| 118 | | //************************************************************************** |
| 119 | | |
| 120 | | |
| 121 | | |
| 122 | | //************************************************************************** |
| 123 | | // DEVICE DEFINITIONS |
| 124 | | //************************************************************************** |
| 125 | | |
| 126 | | const device_type QL_TRUMP_CARD = &device_creator<ql_trump_card_t>; |
| 127 | | |
| 128 | | |
| 129 | | //------------------------------------------------- |
| 130 | | // ROM( ql_trump_card ) |
| 131 | | //------------------------------------------------- |
| 132 | | |
| 133 | | ROM_START( ql_trump_card ) |
| 134 | | ROM_REGION( 0x8000, "rom", 0 ) |
| 135 | | ROM_LOAD( "trumpcard-125.rom", 0x0000, 0x8000, CRC(938eaa46) SHA1(9b3458cf3a279ed86ba395dc45c8f26939d6c44d) ) |
| 136 | | ROM_END |
| 137 | | |
| 138 | | |
| 139 | | //------------------------------------------------- |
| 140 | | // rom_region - device-specific ROM region |
| 141 | | //------------------------------------------------- |
| 142 | | |
| 143 | | const rom_entry *ql_trump_card_t::device_rom_region() const |
| 144 | | { |
| 145 | | return ROM_NAME( ql_trump_card ); |
| 146 | | } |
| 147 | | |
| 148 | | |
| 149 | | //------------------------------------------------- |
| 150 | | // MACHINE_CONFIG_FRAGMENT( ql_trump_card ) |
| 151 | | //------------------------------------------------- |
| 152 | | |
| 153 | | static MACHINE_CONFIG_FRAGMENT( ql_trump_card ) |
| 154 | | MACHINE_CONFIG_END |
| 155 | | |
| 156 | | |
| 157 | | //------------------------------------------------- |
| 158 | | // machine_config_additions - device-specific |
| 159 | | // machine configurations |
| 160 | | //------------------------------------------------- |
| 161 | | |
| 162 | | machine_config_constructor ql_trump_card_t::device_mconfig_additions() const |
| 163 | | { |
| 164 | | return MACHINE_CONFIG_NAME( ql_trump_card ); |
| 165 | | } |
| 166 | | |
| 167 | | |
| 168 | | |
| 169 | | //************************************************************************** |
| 170 | | // LIVE DEVICE |
| 171 | | //************************************************************************** |
| 172 | | |
| 173 | | //------------------------------------------------- |
| 174 | | // ql_trump_card_t - constructor |
| 175 | | //------------------------------------------------- |
| 176 | | |
| 177 | | ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 178 | | device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "ql_trump_card", __FILE__), |
| 179 | | device_ql_expansion_card_interface(mconfig, *this), |
| 180 | | m_rom(*this, "rom") |
| 181 | | { |
| 182 | | } |
| 183 | | |
| 184 | | |
| 185 | | //------------------------------------------------- |
| 186 | | // device_start - device-specific startup |
| 187 | | //------------------------------------------------- |
| 188 | | |
| 189 | | void ql_trump_card_t::device_start() |
| 190 | | { |
| 191 | | } |
| 192 | | |
| 193 | | |
| 194 | | //------------------------------------------------- |
| 195 | | // device_reset - device-specific reset |
| 196 | | //------------------------------------------------- |
| 197 | | |
| 198 | | void ql_trump_card_t::device_reset() |
| 199 | | { |
| 200 | | } |