trunk/src/emu/bus/ql/sandy_superqboard.c
| r30803 | r30804 | |
| 9 | 9 | |
| 10 | 10 | **********************************************************************/ |
| 11 | 11 | |
| 12 | /* |
| 13 | |
| 14 | TODO: |
| 15 | |
| 16 | - mouse |
| 17 | |
| 18 | */ |
| 19 | |
| 12 | 20 | #include "sandy_superqboard.h" |
| 13 | 21 | |
| 14 | 22 | |
| r30803 | r30804 | |
| 28 | 36 | //************************************************************************** |
| 29 | 37 | |
| 30 | 38 | const device_type SANDY_SUPERQBOARD = &device_creator<sandy_superqboard_t>; |
| 39 | const device_type SANDY_SUPERQBOARD_512K = &device_creator<sandy_superqboard_512k_t>; |
| 31 | 40 | |
| 32 | 41 | |
| 33 | 42 | //------------------------------------------------- |
| r30803 | r30804 | |
| 125 | 134 | //------------------------------------------------- |
| 126 | 135 | |
| 127 | 136 | sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 128 | | device_t(mconfig, SANDY_SUPERQBOARD, "Sandy SuperQBoard", tag, owner, clock, "sandy_superqboard", __FILE__), |
| 137 | device_t(mconfig, SANDY_SUPERQBOARD, "Sandy SuperQBoard 256K", tag, owner, clock, "ql_sqboard", __FILE__), |
| 129 | 138 | device_ql_expansion_card_interface(mconfig, *this), |
| 130 | 139 | m_fdc(*this, WD1772_TAG), |
| 131 | 140 | m_floppy0(*this, WD1772_TAG":0"), |
| r30803 | r30804 | |
| 134 | 143 | m_latch(*this, TTL74273_TAG), |
| 135 | 144 | m_rom(*this, "rom"), |
| 136 | 145 | m_ram(*this, "ram"), |
| 146 | m_ram_size(256*1024), |
| 137 | 147 | m_busy(1), |
| 138 | 148 | m_int2(0), |
| 139 | 149 | m_int3(0), |
| r30803 | r30804 | |
| 142 | 152 | { |
| 143 | 153 | } |
| 144 | 154 | |
| 155 | sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size) : |
| 156 | device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), |
| 157 | device_ql_expansion_card_interface(mconfig, *this), |
| 158 | m_fdc(*this, WD1772_TAG), |
| 159 | m_floppy0(*this, WD1772_TAG":0"), |
| 160 | m_floppy1(*this, WD1772_TAG":1"), |
| 161 | m_centronics(*this, CENTRONICS_TAG), |
| 162 | m_latch(*this, TTL74273_TAG), |
| 163 | m_rom(*this, "rom"), |
| 164 | m_ram(*this, "ram"), |
| 165 | m_ram_size(ram_size), |
| 166 | m_busy(1), |
| 167 | m_int2(0), |
| 168 | m_int3(0), |
| 169 | m_fd6(0), |
| 170 | m_fd7(0) |
| 171 | { |
| 172 | } |
| 145 | 173 | |
| 174 | sandy_superqboard_512k_t::sandy_superqboard_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 175 | : sandy_superqboard_t(mconfig, SANDY_SUPERQBOARD_512K, "Sandy SuperQBoard 512K", tag, owner, clock, "ql_sqboard", __FILE__, 512*1024) { } |
| 176 | |
| 177 | |
| 146 | 178 | //------------------------------------------------- |
| 147 | 179 | // device_start - device-specific startup |
| 148 | 180 | //------------------------------------------------- |
| 149 | 181 | |
| 150 | 182 | void sandy_superqboard_t::device_start() |
| 151 | 183 | { |
| 184 | // allocate memory |
| 185 | m_ram.allocate(m_ram_size); |
| 186 | |
| 187 | // state saving |
| 188 | save_item(NAME(m_busy)); |
| 189 | save_item(NAME(m_int2)); |
| 190 | save_item(NAME(m_int3)); |
| 191 | save_item(NAME(m_fd6)); |
| 192 | save_item(NAME(m_fd7)); |
| 152 | 193 | } |
| 153 | 194 | |
| 154 | 195 | |
| r30803 | r30804 | |
| 216 | 257 | } |
| 217 | 258 | } |
| 218 | 259 | |
| 260 | if (offset >= 0x60000 && offset < 0xc0000) |
| 261 | { |
| 262 | if ((offset - 0x60000) < m_ram_size) |
| 263 | { |
| 264 | data = m_ram[offset - 0x60000]; |
| 265 | } |
| 266 | } |
| 267 | |
| 219 | 268 | return data; |
| 220 | 269 | } |
| 221 | 270 | |
| r30803 | r30804 | |
| 298 | 347 | } |
| 299 | 348 | } |
| 300 | 349 | } |
| 350 | |
| 351 | if (offset >= 0x60000 && offset < 0xc0000) |
| 352 | { |
| 353 | if ((offset - 0x60000) < m_ram_size) |
| 354 | { |
| 355 | m_ram[offset - 0x60000] = data; |
| 356 | } |
| 357 | } |
| 301 | 358 | } |
| 302 | 359 | |
| 303 | 360 | void sandy_superqboard_t::check_interrupt() |
trunk/src/emu/bus/ql/sandy_superdisk.c
| r30803 | r30804 | |
| 115 | 115 | //------------------------------------------------- |
| 116 | 116 | |
| 117 | 117 | sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 118 | | device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "sandy_super_disk", __FILE__), |
| 118 | device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "ql_sdisk", __FILE__), |
| 119 | 119 | device_ql_expansion_card_interface(mconfig, *this), |
| 120 | 120 | m_fdc(*this, WD1772_TAG), |
| 121 | 121 | m_floppy0(*this, WD1772_TAG":0"), |
| r30803 | r30804 | |
| 134 | 134 | |
| 135 | 135 | void sandy_super_disk_t::device_start() |
| 136 | 136 | { |
| 137 | // state saving |
| 138 | save_item(NAME(m_busy)); |
| 139 | save_item(NAME(m_fd6)); |
| 137 | 140 | } |
| 138 | 141 | |
| 139 | 142 | |
trunk/src/emu/bus/ql/sandy_superqboard.h
| r30803 | r30804 | |
| 25 | 25 | // TYPE DEFINITIONS |
| 26 | 26 | //************************************************************************** |
| 27 | 27 | |
| 28 | | // ======================> sandy_superqboard_device |
| 28 | // ======================> sandy_superqboard_t |
| 29 | 29 | |
| 30 | 30 | class sandy_superqboard_t : public device_t, |
| 31 | 31 | public device_ql_expansion_card_interface |
| r30803 | r30804 | |
| 33 | 33 | public: |
| 34 | 34 | // construction/destruction |
| 35 | 35 | sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 36 | sandy_superqboard_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size); |
| 36 | 37 | |
| 37 | 38 | // optional information overrides |
| 38 | 39 | virtual const rom_entry *device_rom_region() const; |
| r30803 | r30804 | |
| 62 | 63 | required_memory_region m_rom; |
| 63 | 64 | optional_shared_ptr<UINT8> m_ram; |
| 64 | 65 | |
| 66 | int m_ram_size; |
| 65 | 67 | int m_busy; |
| 66 | 68 | int m_int2; |
| 67 | 69 | int m_int3; |
| r30803 | r30804 | |
| 70 | 72 | }; |
| 71 | 73 | |
| 72 | 74 | |
| 75 | // ======================> sandy_superqboard_512k_t |
| 76 | |
| 77 | class sandy_superqboard_512k_t : public sandy_superqboard_t |
| 78 | { |
| 79 | public: |
| 80 | // construction/destruction |
| 81 | sandy_superqboard_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 82 | }; |
| 83 | |
| 84 | |
| 73 | 85 | // device type definition |
| 74 | 86 | extern const device_type SANDY_SUPERQBOARD; |
| 87 | extern const device_type SANDY_SUPERQBOARD_512K; |
| 75 | 88 | |
| 76 | 89 | |
| 77 | 90 | #endif |
trunk/src/emu/bus/ql/trumpcard.c
| r30803 | r30804 | |
| 9 | 9 | |
| 10 | 10 | **********************************************************************/ |
| 11 | 11 | |
| 12 | /* |
| 13 | |
| 14 | TODO: |
| 15 | |
| 16 | - RAM always 128KB on boot screen |
| 17 | |
| 18 | */ |
| 19 | |
| 12 | 20 | #include "trumpcard.h" |
| 13 | 21 | |
| 14 | 22 | |
| r30803 | r30804 | |
| 115 | 123 | //------------------------------------------------- |
| 116 | 124 | |
| 117 | 125 | ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 118 | | device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "trump", __FILE__), |
| 126 | device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "ql_trump", __FILE__), |
| 119 | 127 | device_ql_expansion_card_interface(mconfig, *this), |
| 120 | 128 | m_fdc(*this, WD1772_TAG), |
| 121 | 129 | m_floppy0(*this, WD1772_TAG":0"), |
| r30803 | r30804 | |
| 127 | 135 | } |
| 128 | 136 | |
| 129 | 137 | ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int ram_size) : |
| 130 | | device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "trump", __FILE__), |
| 138 | device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), |
| 131 | 139 | device_ql_expansion_card_interface(mconfig, *this), |
| 132 | 140 | m_fdc(*this, WD1772_TAG), |
| 133 | 141 | m_floppy0(*this, WD1772_TAG":0"), |
| r30803 | r30804 | |
| 139 | 147 | } |
| 140 | 148 | |
| 141 | 149 | ql_trump_card_256k_t::ql_trump_card_256k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 142 | | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_256K, "QL Trump Card 256K", tag, owner, clock, "trump256k", __FILE__, 256*1024) { } |
| 150 | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_256K, "QL Trump Card 256K", tag, owner, clock, "ql_trump", __FILE__, 256*1024) { } |
| 143 | 151 | |
| 144 | 152 | ql_trump_card_512k_t::ql_trump_card_512k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 145 | | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_512K, "QL Trump Card 512K", tag, owner, clock, "trump512k", __FILE__, 512*1024) { } |
| 153 | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_512K, "QL Trump Card 512K", tag, owner, clock, "ql_trump", __FILE__, 512*1024) { } |
| 146 | 154 | |
| 147 | 155 | ql_trump_card_768k_t::ql_trump_card_768k_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 148 | | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_768K, "QL Trump Card 768K", tag, owner, clock, "trump768k", __FILE__, 768*1024) { } |
| 156 | : ql_trump_card_t(mconfig, QL_TRUMP_CARD_768K, "QL Trump Card 768K", tag, owner, clock, "ql_trump", __FILE__, 768*1024) { } |
| 149 | 157 | |
| 150 | 158 | |
| 151 | 159 | //------------------------------------------------- |
| r30803 | r30804 | |
| 154 | 162 | |
| 155 | 163 | void ql_trump_card_t::device_start() |
| 156 | 164 | { |
| 165 | // allocate memory |
| 157 | 166 | m_ram.allocate(m_ram_size); |
| 167 | |
| 168 | // state saving |
| 169 | save_item(NAME(m_rom_en)); |
| 170 | save_item(NAME(m_ram_en)); |
| 158 | 171 | } |
| 159 | 172 | |
| 160 | 173 | |
trunk/src/mess/machine/qimi.c
| r30803 | r30804 | |
| 17 | 17 | // MACROS / CONSTANTS |
| 18 | 18 | //************************************************************************** |
| 19 | 19 | |
| 20 | | #define QL_CONFIG_PORT "config" |
| 21 | | #define QIMI_PORT_MASK 0x01 |
| 22 | | #define QIMI_NONE 0x00 |
| 23 | | #define QIMI_MOUSE 0x01 |
| 24 | | |
| 25 | 20 | #define MOUSEX_TAG "MOUSEX" |
| 26 | 21 | #define MOUSEY_TAG "MOUSEY" |
| 27 | 22 | #define MOUSEB_TAG "MOUSEB" |
| r30803 | r30804 | |
| 58 | 53 | //------------------------------------------------- |
| 59 | 54 | |
| 60 | 55 | INPUT_PORTS_START( qimi ) |
| 61 | | PORT_START(QL_CONFIG_PORT) |
| 62 | | PORT_CONFNAME( QIMI_PORT_MASK, QIMI_NONE, "QIMI enabled") |
| 63 | | PORT_CONFSETTING( QIMI_NONE, "No" ) |
| 64 | | PORT_CONFSETTING( QIMI_MOUSE, "Yes" ) |
| 65 | | |
| 66 | 56 | PORT_START(MOUSEX_TAG) |
| 67 | 57 | PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) |
| 68 | 58 | |
| r30803 | r30804 | |
| 100 | 90 | m_write_extint(*this), |
| 101 | 91 | m_mousex(*this, MOUSEX_TAG), |
| 102 | 92 | m_mousey(*this, MOUSEY_TAG), |
| 103 | | m_mouseb(*this, MOUSEB_TAG), |
| 104 | | m_config(*this, QL_CONFIG_PORT) |
| 93 | m_mouseb(*this, MOUSEB_TAG) |
| 105 | 94 | { |
| 106 | 95 | } |
| 107 | 96 | |