src/mess/machine/abc1600_bus.c
| r13044 | r13045 | |
| 94 | 94 | |
| 95 | 95 | void abc1600bus_slot_device::device_start() |
| 96 | 96 | { |
| 97 | m_card = dynamic_cast<device_abc1600bus_card_interface *>(get_card_device()); |
| 98 | |
| 97 | 99 | // resolve callbacks |
| 98 | 100 | m_out_int_func.resolve(m_out_int_cb, *this); |
| 99 | 101 | m_out_pren_func.resolve(m_out_pren_cb, *this); |
| r13044 | r13045 | |
| 110 | 112 | // cs_w - |
| 111 | 113 | //------------------------------------------------- |
| 112 | 114 | |
| 113 | | WRITE8_MEMBER( abc1600bus_slot_device::cs_w ) |
| 115 | void abc1600bus_slot_device::cs_w(UINT8 data) |
| 114 | 116 | { |
| 115 | 117 | if (m_card != NULL) |
| 116 | 118 | { |
| r13044 | r13045 | |
| 120 | 122 | |
| 121 | 123 | |
| 122 | 124 | //------------------------------------------------- |
| 123 | | // rst_r - |
| 125 | // csb_r - |
| 124 | 126 | //------------------------------------------------- |
| 125 | 127 | |
| 126 | | READ8_MEMBER( abc1600bus_slot_device::rst_r ) |
| 128 | READ_LINE_MEMBER( abc1600bus_slot_device::csb_r ) |
| 127 | 129 | { |
| 130 | int data = 1; |
| 131 | |
| 128 | 132 | if (m_card != NULL) |
| 129 | 133 | { |
| 130 | | m_card->abc1600bus_rst(0); |
| 131 | | m_card->abc1600bus_rst(1); |
| 134 | data = m_card->abc1600bus_csb(); |
| 132 | 135 | } |
| 136 | |
| 137 | return data; |
| 138 | } |
| 133 | 139 | |
| 134 | | return 0xff; |
| 140 | |
| 141 | //------------------------------------------------- |
| 142 | // brst_w - reset |
| 143 | //------------------------------------------------- |
| 144 | |
| 145 | void abc1600bus_slot_device::brst_w() |
| 146 | { |
| 147 | if (m_card != NULL) |
| 148 | { |
| 149 | m_card->abc1600bus_brst(); |
| 150 | } |
| 135 | 151 | } |
| 136 | 152 | |
| 137 | 153 | |
| r13044 | r13045 | |
| 139 | 155 | // inp_r - |
| 140 | 156 | //------------------------------------------------- |
| 141 | 157 | |
| 142 | | READ8_MEMBER( abc1600bus_slot_device::inp_r ) |
| 158 | UINT8 abc1600bus_slot_device::inp_r() |
| 143 | 159 | { |
| 144 | 160 | UINT8 data = 0xff; |
| 145 | 161 | |
| r13044 | r13045 | |
| 153 | 169 | |
| 154 | 170 | |
| 155 | 171 | //------------------------------------------------- |
| 156 | | // utp_w - |
| 172 | // out_w - |
| 157 | 173 | //------------------------------------------------- |
| 158 | 174 | |
| 159 | | WRITE8_MEMBER( abc1600bus_slot_device::out_w ) |
| 175 | void abc1600bus_slot_device::out_w(UINT8 data) |
| 160 | 176 | { |
| 161 | 177 | if (m_card != NULL) |
| 162 | 178 | { |
| r13044 | r13045 | |
| 169 | 185 | // stat_r - |
| 170 | 186 | //------------------------------------------------- |
| 171 | 187 | |
| 172 | | READ8_MEMBER( abc1600bus_slot_device::stat_r ) |
| 188 | UINT8 abc1600bus_slot_device::stat_r() |
| 173 | 189 | { |
| 174 | 190 | UINT8 data = 0xff; |
| 175 | 191 | |
| r13044 | r13045 | |
| 186 | 202 | // stat_r - |
| 187 | 203 | //------------------------------------------------- |
| 188 | 204 | |
| 189 | | READ8_MEMBER( abc1600bus_slot_device::ops_r ) |
| 205 | UINT8 abc1600bus_slot_device::ops_r() |
| 190 | 206 | { |
| 191 | 207 | UINT8 data = 0xff; |
| 192 | 208 | |
| r13044 | r13045 | |
| 203 | 219 | // c1_w - |
| 204 | 220 | //------------------------------------------------- |
| 205 | 221 | |
| 206 | | WRITE8_MEMBER( abc1600bus_slot_device::c1_w ) |
| 222 | void abc1600bus_slot_device::c1_w() |
| 207 | 223 | { |
| 208 | 224 | if (m_card != NULL) |
| 209 | 225 | { |
| 210 | | m_card->abc1600bus_c1(data); |
| 226 | m_card->abc1600bus_c1(); |
| 211 | 227 | } |
| 212 | 228 | } |
| 213 | 229 | |
| r13044 | r13045 | |
| 216 | 232 | // c2_w - |
| 217 | 233 | //------------------------------------------------- |
| 218 | 234 | |
| 219 | | WRITE8_MEMBER( abc1600bus_slot_device::c2_w ) |
| 235 | void abc1600bus_slot_device::c2_w() |
| 220 | 236 | { |
| 221 | 237 | if (m_card != NULL) |
| 222 | 238 | { |
| 223 | | m_card->abc1600bus_c2(data); |
| 239 | m_card->abc1600bus_c2(); |
| 224 | 240 | } |
| 225 | 241 | } |
| 226 | 242 | |
| r13044 | r13045 | |
| 229 | 245 | // c3_w - |
| 230 | 246 | //------------------------------------------------- |
| 231 | 247 | |
| 232 | | WRITE8_MEMBER( abc1600bus_slot_device::c3_w ) |
| 248 | void abc1600bus_slot_device::c3_w() |
| 233 | 249 | { |
| 234 | 250 | if (m_card != NULL) |
| 235 | 251 | { |
| 236 | | m_card->abc1600bus_c3(data); |
| 252 | m_card->abc1600bus_c3(); |
| 237 | 253 | } |
| 238 | 254 | } |
| 239 | 255 | |
| r13044 | r13045 | |
| 242 | 258 | // c4_w - |
| 243 | 259 | //------------------------------------------------- |
| 244 | 260 | |
| 245 | | WRITE8_MEMBER( abc1600bus_slot_device::c4_w ) |
| 261 | void abc1600bus_slot_device::c4_w() |
| 246 | 262 | { |
| 247 | 263 | if (m_card != NULL) |
| 248 | 264 | { |
| 249 | | m_card->abc1600bus_c4(data); |
| 265 | m_card->abc1600bus_c4(); |
| 250 | 266 | } |
| 251 | 267 | } |
| 252 | 268 | |
| 253 | 269 | |
| 254 | 270 | //------------------------------------------------- |
| 271 | // exp_r - |
| 272 | //------------------------------------------------- |
| 273 | |
| 274 | UINT8 abc1600bus_slot_device::exp_r() |
| 275 | { |
| 276 | UINT8 data = 0xff; |
| 277 | |
| 278 | if (m_card != NULL) |
| 279 | { |
| 280 | data &= m_card->abc1600bus_exp(); |
| 281 | } |
| 282 | |
| 283 | return data; |
| 284 | } |
| 285 | |
| 286 | |
| 287 | //------------------------------------------------- |
| 288 | // xcsb2_r - |
| 289 | //------------------------------------------------- |
| 290 | |
| 291 | READ_LINE_MEMBER( abc1600bus_slot_device::xcsb2_r ) |
| 292 | { |
| 293 | int data = 1; |
| 294 | |
| 295 | if (m_card != NULL) |
| 296 | { |
| 297 | data = m_card->abc1600bus_xcsb2(); |
| 298 | } |
| 299 | |
| 300 | return data; |
| 301 | } |
| 302 | |
| 303 | |
| 304 | //------------------------------------------------- |
| 305 | // xcsb3_r - |
| 306 | //------------------------------------------------- |
| 307 | |
| 308 | READ_LINE_MEMBER( abc1600bus_slot_device::xcsb3_r ) |
| 309 | { |
| 310 | int data = 1; |
| 311 | |
| 312 | if (m_card != NULL) |
| 313 | { |
| 314 | data = m_card->abc1600bus_xcsb3(); |
| 315 | } |
| 316 | |
| 317 | return data; |
| 318 | } |
| 319 | |
| 320 | |
| 321 | //------------------------------------------------- |
| 322 | // xcsb4_r - |
| 323 | //------------------------------------------------- |
| 324 | |
| 325 | READ_LINE_MEMBER( abc1600bus_slot_device::xcsb4_r ) |
| 326 | { |
| 327 | int data = 1; |
| 328 | |
| 329 | if (m_card != NULL) |
| 330 | { |
| 331 | data = m_card->abc1600bus_xcsb4(); |
| 332 | } |
| 333 | |
| 334 | return data; |
| 335 | } |
| 336 | |
| 337 | |
| 338 | //------------------------------------------------- |
| 339 | // xcsb5_r - |
| 340 | //------------------------------------------------- |
| 341 | |
| 342 | READ_LINE_MEMBER( abc1600bus_slot_device::xcsb5_r ) |
| 343 | { |
| 344 | int data = 1; |
| 345 | |
| 346 | if (m_card != NULL) |
| 347 | { |
| 348 | data = m_card->abc1600bus_xcsb5(); |
| 349 | } |
| 350 | |
| 351 | return data; |
| 352 | } |
| 353 | |
| 354 | |
| 355 | //------------------------------------------------- |
| 255 | 356 | // tren_w - transfer enable |
| 256 | 357 | //------------------------------------------------- |
| 257 | 358 | |
src/mess/machine/abc1600_bus.h
| r13044 | r13045 | |
| 99 | 99 | |
| 100 | 100 | // ======================> device_abc1600bus_card_interface |
| 101 | 101 | |
| 102 | | class abc1600bus_device; |
| 102 | class abc1600bus_slot_device; |
| 103 | 103 | |
| 104 | 104 | // class representing interface-specific live abc1600bus card |
| 105 | 105 | class device_abc1600bus_card_interface : public device_interface |
| 106 | 106 | { |
| 107 | | friend class abc1600bus_device; |
| 107 | friend class abc1600bus_slot_device; |
| 108 | 108 | |
| 109 | 109 | public: |
| 110 | 110 | // construction/destruction |
| r13044 | r13045 | |
| 116 | 116 | virtual int abc1600bus_csb() = 0; |
| 117 | 117 | |
| 118 | 118 | // optional operation overrides |
| 119 | | virtual void abc1600bus_rst(int state) { }; |
| 119 | virtual void abc1600bus_brst() { }; |
| 120 | 120 | virtual UINT8 abc1600bus_inp() { return 0xff; }; |
| 121 | 121 | virtual void abc1600bus_out(UINT8 data) { }; |
| 122 | 122 | virtual UINT8 abc1600bus_stat() { return 0xff; }; |
| 123 | 123 | virtual UINT8 abc1600bus_ops() { return 0xff; }; |
| 124 | | virtual void abc1600bus_c1(UINT8 data) { }; |
| 125 | | virtual void abc1600bus_c2(UINT8 data) { }; |
| 126 | | virtual void abc1600bus_c3(UINT8 data) { }; |
| 127 | | virtual void abc1600bus_c4(UINT8 data) { }; |
| 124 | virtual void abc1600bus_c1() { }; |
| 125 | virtual void abc1600bus_c2() { }; |
| 126 | virtual void abc1600bus_c3() { }; |
| 127 | virtual void abc1600bus_c4() { }; |
| 128 | 128 | virtual void abc1600bus_tren(int state) { }; |
| 129 | 129 | virtual void abc1600bus_prac(int state) { }; |
| 130 | virtual UINT8 abc1600bus_exp() { return 0xff; }; |
| 130 | 131 | virtual int abc1600bus_xcsb2() { return 1; }; |
| 131 | 132 | virtual int abc1600bus_xcsb3() { return 1; }; |
| 132 | 133 | virtual int abc1600bus_xcsb4() { return 1; }; |
| 133 | 134 | virtual int abc1600bus_xcsb5() { return 1; }; |
| 134 | 135 | |
| 135 | 136 | public: |
| 136 | | abc1600bus_device *m_abc1600bus; |
| 137 | abc1600bus_slot_device *m_bus; |
| 137 | 138 | }; |
| 138 | 139 | |
| 139 | 140 | |
| r13044 | r13045 | |
| 151 | 152 | virtual void device_start(); |
| 152 | 153 | virtual void device_config_complete(); |
| 153 | 154 | |
| 154 | | DECLARE_WRITE8_MEMBER( cs_w ); |
| 155 | | DECLARE_READ8_MEMBER( rst_r ); |
| 156 | | DECLARE_READ8_MEMBER( inp_r ); |
| 157 | | DECLARE_WRITE8_MEMBER( out_w ); |
| 158 | | DECLARE_READ8_MEMBER( stat_r ); |
| 159 | | DECLARE_READ8_MEMBER( ops_r ); |
| 160 | | DECLARE_WRITE8_MEMBER( c1_w ); |
| 161 | | DECLARE_WRITE8_MEMBER( c2_w ); |
| 162 | | DECLARE_WRITE8_MEMBER( c3_w ); |
| 163 | | DECLARE_WRITE8_MEMBER( c4_w ); |
| 155 | void cs_w(UINT8 data); |
| 156 | DECLARE_READ_LINE_MEMBER( csb_r ); |
| 157 | void brst_w(); |
| 158 | UINT8 inp_r(); |
| 159 | void out_w(UINT8 data); |
| 160 | UINT8 stat_r(); |
| 161 | UINT8 ops_r(); |
| 162 | void c1_w(); |
| 163 | void c2_w(); |
| 164 | void c3_w(); |
| 165 | void c4_w(); |
| 166 | UINT8 exp_r(); |
| 167 | DECLARE_READ_LINE_MEMBER( xcsb2_r ); |
| 168 | DECLARE_READ_LINE_MEMBER( xcsb3_r ); |
| 169 | DECLARE_READ_LINE_MEMBER( xcsb4_r ); |
| 170 | DECLARE_READ_LINE_MEMBER( xcsb5_r ); |
| 164 | 171 | DECLARE_WRITE_LINE_MEMBER( tren_w ); |
| 165 | 172 | DECLARE_WRITE_LINE_MEMBER( prac_w ); |
| 166 | 173 | |
src/mess/machine/lux4105.c
| r0 | r13045 | |
| 1 | #include "lux4105.h" |
| 2 | |
| 3 | |
| 4 | |
| 5 | //************************************************************************** |
| 6 | // DEVICE DEFINITIONS |
| 7 | //************************************************************************** |
| 8 | |
| 9 | const device_type LUXOR_4105 = &device_creator<luxor_4105_device>; |
| 10 | |
| 11 | |
| 12 | //------------------------------------------------- |
| 13 | // INPUT_PORTS( luxor_4105 ) |
| 14 | //------------------------------------------------- |
| 15 | |
| 16 | INPUT_PORTS_START( luxor_4105 ) |
| 17 | INPUT_PORTS_END |
| 18 | |
| 19 | |
| 20 | //------------------------------------------------- |
| 21 | // input_ports - device-specific input ports |
| 22 | //------------------------------------------------- |
| 23 | |
| 24 | ioport_constructor luxor_4105_device::device_input_ports() const |
| 25 | { |
| 26 | return INPUT_PORTS_NAME( luxor_4105 ); |
| 27 | } |
| 28 | |
| 29 | |
| 30 | |
| 31 | //************************************************************************** |
| 32 | // LIVE DEVICE |
| 33 | //************************************************************************** |
| 34 | |
| 35 | //------------------------------------------------- |
| 36 | // luxor_4105_device - constructor |
| 37 | //------------------------------------------------- |
| 38 | |
| 39 | luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 40 | : device_t(mconfig, LUXOR_4105, "Luxor 4105", tag, owner, clock), |
| 41 | device_abc1600bus_card_interface(mconfig, *this), |
| 42 | device_slot_card_interface(mconfig, *this) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | |
| 47 | //------------------------------------------------- |
| 48 | // device_start - device-specific startup |
| 49 | //------------------------------------------------- |
| 50 | |
| 51 | void luxor_4105_device::device_start() |
| 52 | { |
| 53 | } |
| 54 | |
| 55 | |
| 56 | //------------------------------------------------- |
| 57 | // device_reset - device-specific reset |
| 58 | //------------------------------------------------- |
| 59 | |
| 60 | void luxor_4105_device::device_reset() |
| 61 | { |
| 62 | m_cs = 0; |
| 63 | } |
| 64 | |
| 65 | |
| 66 | |
| 67 | //************************************************************************** |
| 68 | // ABC 1600 BUS INTERFACE |
| 69 | //************************************************************************** |
| 70 | |
| 71 | //------------------------------------------------- |
| 72 | // abc1600bus_cs - |
| 73 | //------------------------------------------------- |
| 74 | |
| 75 | void luxor_4105_device::abc1600bus_cs(UINT8 data) |
| 76 | { |
| 77 | m_cs = (data == ADDRESS); |
| 78 | } |
| 79 | |
| 80 | |
| 81 | //------------------------------------------------- |
| 82 | // abc1600bus_csb - |
| 83 | //------------------------------------------------- |
| 84 | |
| 85 | int luxor_4105_device::abc1600bus_csb() |
| 86 | { |
| 87 | return !m_cs; |
| 88 | } |
| 89 | |
| 90 | |
| 91 | //------------------------------------------------- |
| 92 | // abc1600bus_rst - |
| 93 | //------------------------------------------------- |
| 94 | |
| 95 | void luxor_4105_device::abc1600bus_brst() |
| 96 | { |
| 97 | device_reset(); |
| 98 | } |
| 99 | |
| 100 | |
| 101 | //------------------------------------------------- |
| 102 | // abc1600bus_stat - |
| 103 | //------------------------------------------------- |
| 104 | |
| 105 | UINT8 luxor_4105_device::abc1600bus_stat() |
| 106 | { |
| 107 | UINT8 data = 0xff; |
| 108 | |
| 109 | if (m_cs) |
| 110 | { |
| 111 | } |
| 112 | |
| 113 | return data; |
| 114 | } |
| 115 | |
| 116 | |
| 117 | //------------------------------------------------- |
| 118 | // abc1600bus_inp - |
| 119 | //------------------------------------------------- |
| 120 | |
| 121 | UINT8 luxor_4105_device::abc1600bus_inp() |
| 122 | { |
| 123 | UINT8 data = 0xff; |
| 124 | |
| 125 | if (m_cs) |
| 126 | { |
| 127 | } |
| 128 | |
| 129 | return data; |
| 130 | } |
| 131 | |
| 132 | |
| 133 | //------------------------------------------------- |
| 134 | // abc1600bus_utp - |
| 135 | //------------------------------------------------- |
| 136 | |
| 137 | void luxor_4105_device::abc1600bus_out(UINT8 data) |
| 138 | { |
| 139 | if (m_cs) |
| 140 | { |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | |
| 145 | //------------------------------------------------- |
| 146 | // abc1600bus_c1 - |
| 147 | //------------------------------------------------- |
| 148 | |
| 149 | void luxor_4105_device::abc1600bus_c1() |
| 150 | { |
| 151 | if (m_cs) |
| 152 | { |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | |
| 157 | //------------------------------------------------- |
| 158 | // abc1600bus_c3 - |
| 159 | //------------------------------------------------- |
| 160 | |
| 161 | void luxor_4105_device::abc1600bus_c3() |
| 162 | { |
| 163 | if (m_cs) |
| 164 | { |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | |
| 169 | //------------------------------------------------- |
| 170 | // abc1600bus_c4 - |
| 171 | //------------------------------------------------- |
| 172 | |
| 173 | void luxor_4105_device::abc1600bus_c4() |
| 174 | { |
| 175 | if (m_cs) |
| 176 | { |
| 177 | } |
| 178 | } |
src/mess/machine/lux4105.h
| r0 | r13045 | |
| 1 | #pragma once |
| 2 | |
| 3 | #ifndef __LUXOR_4105__ |
| 4 | #define __LUXOR_4105__ |
| 5 | |
| 6 | #define ADDRESS_MAP_MODERN |
| 7 | |
| 8 | #include "emu.h" |
| 9 | #include "abc1600_bus.h" |
| 10 | |
| 11 | |
| 12 | |
| 13 | //************************************************************************** |
| 14 | // MACROS / CONSTANTS |
| 15 | //************************************************************************** |
| 16 | |
| 17 | #define LUXOR_4105_TAG "luxor_4105" |
| 18 | |
| 19 | |
| 20 | #define ADDRESS 0x25 |
| 21 | |
| 22 | |
| 23 | |
| 24 | //************************************************************************** |
| 25 | // TYPE DEFINITIONS |
| 26 | //************************************************************************** |
| 27 | |
| 28 | // ======================> luxor_4105_device |
| 29 | |
| 30 | class luxor_4105_device : public device_t, |
| 31 | public device_abc1600bus_card_interface, |
| 32 | public device_slot_card_interface |
| 33 | { |
| 34 | public: |
| 35 | // construction/destruction |
| 36 | luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 37 | |
| 38 | // optional information overrides |
| 39 | virtual ioport_constructor device_input_ports() const; |
| 40 | |
| 41 | protected: |
| 42 | // device-level overrides |
| 43 | virtual void device_start(); |
| 44 | virtual void device_reset(); |
| 45 | |
| 46 | // device_abc1600bus_interface overrides |
| 47 | virtual void abc1600bus_cs(UINT8 data); |
| 48 | virtual int abc1600bus_csb(); |
| 49 | virtual void abc1600bus_brst(); |
| 50 | virtual UINT8 abc1600bus_inp(); |
| 51 | virtual void abc1600bus_out(UINT8 data); |
| 52 | virtual UINT8 abc1600bus_stat(); |
| 53 | virtual void abc1600bus_c1(); |
| 54 | virtual void abc1600bus_c3(); |
| 55 | virtual void abc1600bus_c4(); |
| 56 | |
| 57 | private: |
| 58 | int m_cs; |
| 59 | }; |
| 60 | |
| 61 | |
| 62 | // device type definition |
| 63 | extern const device_type LUXOR_4105; |
| 64 | |
| 65 | |
| 66 | |
| 67 | #endif |
src/mess/includes/abc1600.h
| r13044 | r13045 | |
| 15 | 15 | #include "machine/abc99.h" |
| 16 | 16 | #include "machine/abc1600_bus.h" |
| 17 | 17 | #include "machine/e0516.h" |
| 18 | #include "machine/lux4105.h" |
| 18 | 19 | #include "machine/nmc9306.h" |
| 19 | 20 | #include "machine/s1410.h" |
| 20 | 21 | #include "machine/wd17xx.h" |
| r13044 | r13045 | |
| 42 | 43 | #define NMC9306_TAG "14c" |
| 43 | 44 | #define SY6845E_TAG "sy6845e" |
| 44 | 45 | #define SCREEN_TAG "screen" |
| 46 | #define BUS0I_TAG "bus0i" |
| 47 | #define BUS0X_TAG "bus0x" |
| 48 | #define BUS1_TAG "bus1" |
| 49 | #define BUS2_TAG "bus2" |
| 45 | 50 | |
| 46 | 51 | |
| 47 | 52 | |
| r13044 | r13045 | |
| 67 | 72 | m_nvram(*this, NMC9306_TAG), |
| 68 | 73 | m_crtc(*this, SY6845E_TAG), |
| 69 | 74 | m_ram(*this, RAM_TAG), |
| 70 | | m_floppy(*this, FLOPPY_0) |
| 75 | m_floppy(*this, FLOPPY_0), |
| 76 | m_bus0i(*this, BUS0I_TAG), |
| 77 | m_bus0x(*this, BUS0X_TAG), |
| 78 | m_bus1(*this, BUS1_TAG), |
| 79 | m_bus2(*this, BUS2_TAG) |
| 71 | 80 | { } |
| 72 | 81 | |
| 73 | 82 | required_device<cpu_device> m_maincpu; |
| r13044 | r13045 | |
| 83 | 92 | required_device<mc6845_device> m_crtc; |
| 84 | 93 | required_device<device_t> m_ram; |
| 85 | 94 | required_device<device_t> m_floppy; |
| 95 | required_device<abc1600bus_slot_device> m_bus0i; |
| 96 | required_device<abc1600bus_slot_device> m_bus0x; |
| 97 | required_device<abc1600bus_slot_device> m_bus1; |
| 98 | required_device<abc1600bus_slot_device> m_bus2; |
| 86 | 99 | |
| 87 | 100 | virtual void machine_start(); |
| 88 | 101 | virtual void machine_reset(); |
| r13044 | r13045 | |
| 191 | 204 | |
| 192 | 205 | // peripherals |
| 193 | 206 | int m_cs7; // card select address bit 7 |
| 207 | int m_bus0; // BUS 0 selected |
| 208 | UINT8 m_csb; // card select |
| 194 | 209 | int m_atce; // V.24 channel A external clock enable |
| 195 | 210 | int m_btce; // V.24 channel B external clock enable |
| 196 | 211 | |
src/mess/drivers/abc1600.c
| r13044 | r13045 | |
| 13 | 13 | - floppy |
| 14 | 14 | - internal floppy is really drive 2, but wd17xx.c doesn't like having NULL drives |
| 15 | 15 | - BUS0I/0X/1/2 |
| 16 | | - how to determine which bus is accessed? |
| 17 | 16 | - short/long reset (RSTBUT) |
| 18 | 17 | - CIO |
| 18 | - optimize timers! |
| 19 | 19 | - vectored interrupts with status |
| 20 | 20 | - port A bit mode, OR-PEVM, interrupt when bit=1 |
| 21 | 21 | - port B bit mode, OR-PEVM, interrupt when bit=1 |
| r13044 | r13045 | |
| 27 | 27 | - 4105 sasi interface card |
| 28 | 28 | - sasi interface |
| 29 | 29 | - Xebec S1410 card |
| 30 | - necd5126a HDD (http://stason.org/TULARC/pc/hard-drives-hdd/nec/D5126-20MB-5-25-HH-MFM-ST506.html) |
| 30 | 31 | |
| 31 | 32 | */ |
| 32 | 33 | |
| r13044 | r13045 | |
| 40 | 41 | |
| 41 | 42 | #define LOG 0 |
| 42 | 43 | |
| 44 | |
| 43 | 45 | // MAC |
| 44 | 46 | #define A0 BIT(offset, 0) |
| 45 | 47 | #define A1 BIT(offset, 1) |
| 46 | 48 | #define A2 BIT(offset, 2) |
| 49 | #define A4 BIT(offset, 4) |
| 47 | 50 | #define A7 BIT(offset, 7) |
| 48 | 51 | #define A8 BIT(offset, 8) |
| 49 | 52 | #define X11 BIT(offset, 11) |
| r13044 | r13045 | |
| 241 | 244 | } |
| 242 | 245 | else |
| 243 | 246 | { |
| 244 | | // BUS0I, BUS0X, BUS1, BUS2 |
| 247 | // card select pulse |
| 245 | 248 | UINT8 cs = (m_cs7 << 7) | ((offset >> 5) & 0x3f); |
| 246 | | |
| 247 | | switch ((offset >> 1) & 0x07) |
| 249 | |
| 250 | m_bus0i->cs_w(cs); |
| 251 | m_bus0x->cs_w(cs); |
| 252 | m_bus1->cs_w(cs); |
| 253 | m_bus2->cs_w(cs); |
| 254 | |
| 255 | // card select b? |
| 256 | m_csb = m_bus0i->csb_r(); |
| 257 | m_csb |= m_bus2->csb_r() << 1; |
| 258 | m_csb |= m_bus0x->csb_r() << 2; |
| 259 | m_csb |= m_bus1->csb_r() << 3; |
| 260 | m_csb |= m_bus0x->xcsb2_r() << 4; |
| 261 | m_csb |= m_bus0x->xcsb3_r() << 5; |
| 262 | m_csb |= m_bus0x->xcsb4_r() << 6; |
| 263 | m_csb |= m_bus0x->xcsb5_r() << 7; |
| 264 | |
| 265 | m_bus0 = !((m_csb & 0xf5) == 0xf5); |
| 266 | |
| 267 | if (X11) |
| 248 | 268 | { |
| 249 | | case 0: // INP |
| 250 | | logerror("%s INP %02x\n", machine().describe_context(), cs); |
| 251 | | break; |
| 269 | if (A4) |
| 270 | { |
| 271 | // EXP |
| 272 | logerror("%s EXP %02x\n", machine().describe_context(), cs); |
| 273 | |
| 274 | data = m_bus0x->exp_r(); |
| 275 | } |
| 276 | else |
| 277 | { |
| 278 | // RCSB |
| 279 | logerror("%s RCSB %02x\n", machine().describe_context(), cs); |
| 280 | |
| 281 | data = m_csb; |
| 282 | } |
| 283 | } |
| 284 | else |
| 285 | { |
| 286 | data = 0xff; |
| 287 | |
| 288 | switch ((offset >> 1) & 0x07) |
| 289 | { |
| 290 | case 0: // INP |
| 291 | logerror("%s INP %02x\n", machine().describe_context(), cs); |
| 292 | |
| 293 | if (m_bus0) |
| 294 | { |
| 295 | data &= m_bus0i->inp_r(); |
| 296 | data &= m_bus0x->inp_r(); |
| 297 | } |
| 298 | else |
| 299 | { |
| 300 | data &= m_bus1->inp_r(); |
| 301 | data &= m_bus2->inp_r(); |
| 302 | } |
| 303 | break; |
| 252 | 304 | |
| 253 | | case 1: // STAT |
| 254 | | logerror("%s STAT %02x\n", machine().describe_context(), cs); |
| 255 | | break; |
| 305 | case 1: // STAT |
| 306 | logerror("%s STAT %02x\n", machine().describe_context(), cs); |
| 307 | |
| 308 | if (m_bus0) |
| 309 | { |
| 310 | data &= m_bus0i->stat_r(); |
| 311 | data &= m_bus0x->stat_r(); |
| 312 | } |
| 313 | else |
| 314 | { |
| 315 | data &= m_bus1->stat_r(); |
| 316 | data &= m_bus2->stat_r(); |
| 317 | } |
| 318 | break; |
| 256 | 319 | |
| 257 | | case 2: // OPS |
| 258 | | logerror("%s OPS %02x\n", machine().describe_context(), cs); |
| 259 | | break; |
| 260 | | |
| 261 | | default: |
| 262 | | logerror("%s Unmapped read from virtual I/O %06x\n", machine().describe_context(), offset); |
| 320 | case 2: // OPS |
| 321 | logerror("%s OPS %02x\n", machine().describe_context(), cs); |
| 322 | |
| 323 | if (m_bus0) |
| 324 | { |
| 325 | data &= m_bus0i->ops_r(); |
| 326 | data &= m_bus0x->ops_r(); |
| 327 | } |
| 328 | else |
| 329 | { |
| 330 | data &= m_bus1->ops_r(); |
| 331 | data &= m_bus2->ops_r(); |
| 332 | } |
| 333 | break; |
| 334 | |
| 335 | default: |
| 336 | logerror("%s Unmapped read from virtual I/O %06x\n", machine().describe_context(), offset); |
| 337 | } |
| 263 | 338 | } |
| 264 | 339 | } |
| 265 | 340 | |
| r13044 | r13045 | |
| 363 | 438 | else |
| 364 | 439 | { |
| 365 | 440 | UINT8 cs = (m_cs7 << 7) | ((offset >> 5) & 0x3f); |
| 366 | | |
| 441 | |
| 442 | m_bus0i->cs_w(cs); |
| 443 | m_bus0x->cs_w(cs); |
| 444 | m_bus1->cs_w(cs); |
| 445 | m_bus2->cs_w(cs); |
| 446 | |
| 367 | 447 | switch ((offset >> 1) & 0x07) |
| 368 | 448 | { |
| 369 | 449 | case 0: // OUT |
| 370 | 450 | logerror("%s OUT %02x %02x\n", machine().describe_context(), cs, data); |
| 451 | |
| 452 | if (m_bus0) |
| 453 | { |
| 454 | m_bus0i->out_w(data); |
| 455 | m_bus0x->out_w(data); |
| 456 | } |
| 457 | else |
| 458 | { |
| 459 | m_bus1->out_w(data); |
| 460 | m_bus2->out_w(data); |
| 461 | } |
| 371 | 462 | break; |
| 372 | 463 | |
| 373 | 464 | case 2: // C1 |
| 374 | 465 | logerror("%s C1 %02x\n", machine().describe_context(), cs); |
| 466 | |
| 467 | if (m_bus0) |
| 468 | { |
| 469 | m_bus0i->c1_w(); |
| 470 | m_bus0x->c1_w(); |
| 471 | } |
| 472 | else |
| 473 | { |
| 474 | m_bus1->c1_w(); |
| 475 | m_bus2->c1_w(); |
| 476 | } |
| 375 | 477 | break; |
| 376 | 478 | |
| 377 | 479 | case 3: // C2 |
| 378 | 480 | logerror("%s C2 %02x\n", machine().describe_context(), cs); |
| 481 | |
| 482 | if (m_bus0) |
| 483 | { |
| 484 | m_bus0i->c2_w(); |
| 485 | m_bus0x->c2_w(); |
| 486 | } |
| 487 | else |
| 488 | { |
| 489 | m_bus1->c2_w(); |
| 490 | m_bus2->c2_w(); |
| 491 | } |
| 379 | 492 | break; |
| 380 | 493 | |
| 381 | 494 | case 4: // C3 |
| 382 | 495 | logerror("%s C3 %02x\n", machine().describe_context(), cs); |
| 496 | |
| 497 | if (m_bus0) |
| 498 | { |
| 499 | m_bus0i->c3_w(); |
| 500 | m_bus0x->c3_w(); |
| 501 | } |
| 502 | else |
| 503 | { |
| 504 | m_bus1->c3_w(); |
| 505 | m_bus2->c3_w(); |
| 506 | } |
| 383 | 507 | break; |
| 384 | 508 | |
| 385 | 509 | case 5: // C4 |
| 386 | 510 | logerror("%s C4 %02x\n", machine().describe_context(), cs); |
| 511 | |
| 512 | if (m_bus0) |
| 513 | { |
| 514 | m_bus0i->c4_w(); |
| 515 | m_bus0x->c4_w(); |
| 516 | } |
| 517 | else |
| 518 | { |
| 519 | m_bus1->c4_w(); |
| 520 | m_bus2->c4_w(); |
| 521 | } |
| 387 | 522 | break; |
| 388 | 523 | |
| 389 | 524 | default: |
| r13044 | r13045 | |
| 1313 | 1448 | |
| 1314 | 1449 | */ |
| 1315 | 1450 | |
| 1316 | | return 0; |
| 1451 | return 0; // TODO return interrupt levels if some software actually reads this port |
| 1317 | 1452 | } |
| 1318 | 1453 | |
| 1319 | 1454 | READ8_MEMBER( abc1600_state::cio_pb_r ) |
| r13044 | r13045 | |
| 1487 | 1622 | //------------------------------------------------- |
| 1488 | 1623 | |
| 1489 | 1624 | static SLOT_INTERFACE_START( abc1600bus_cards ) |
| 1490 | | // SLOT_INTERFACE("4105", LUXOR_4105) // SASI interface |
| 1625 | SLOT_INTERFACE("4105", LUXOR_4105) // SASI interface |
| 1491 | 1626 | // SLOT_INTERFACE("4077", LUXOR_4077) // Winchester controller |
| 1492 | 1627 | SLOT_INTERFACE_END |
| 1493 | 1628 | |
| 1494 | 1629 | static ABC1600BUS_INTERFACE( bus0i_intf ) |
| 1495 | 1630 | { |
| 1631 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa7_w), |
| 1496 | 1632 | DEVCB_NULL, |
| 1497 | | DEVCB_NULL, |
| 1498 | 1633 | DEVCB_NULL |
| 1499 | 1634 | }; |
| 1500 | 1635 | |
| 1501 | 1636 | static ABC1600BUS_INTERFACE( bus0x_intf ) |
| 1502 | 1637 | { |
| 1638 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa6_w), |
| 1503 | 1639 | DEVCB_NULL, |
| 1504 | 1640 | DEVCB_NULL, |
| 1505 | 1641 | DEVCB_NULL, |
| 1506 | | DEVCB_NULL, |
| 1507 | | DEVCB_NULL, |
| 1508 | | DEVCB_NULL, |
| 1509 | | DEVCB_NULL, |
| 1510 | | DEVCB_NULL |
| 1642 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa5_w), |
| 1643 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa4_w), |
| 1644 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa3_w), |
| 1645 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa2_w) |
| 1511 | 1646 | }; |
| 1512 | 1647 | |
| 1513 | 1648 | static ABC1600BUS_INTERFACE( bus1_intf ) |
| 1514 | 1649 | { |
| 1650 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa1_w), |
| 1515 | 1651 | DEVCB_NULL, |
| 1516 | | DEVCB_NULL, |
| 1517 | 1652 | DEVCB_NULL |
| 1518 | 1653 | }; |
| 1519 | 1654 | |
| 1520 | 1655 | static ABC1600BUS_INTERFACE( bus2_intf ) |
| 1521 | 1656 | { |
| 1657 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pa0_w), |
| 1522 | 1658 | DEVCB_NULL, |
| 1523 | | DEVCB_NULL, |
| 1524 | 1659 | DEVCB_DEVICE_LINE_MEMBER(Z8410AB1_2_TAG, z80dma_device, rdy_w) |
| 1525 | 1660 | }; |
| 1526 | 1661 | |
| r13044 | r13045 | |
| 1578 | 1713 | save_item(NAME(m_cause)); |
| 1579 | 1714 | save_item(NAME(m_partst)); |
| 1580 | 1715 | save_item(NAME(m_cs7)); |
| 1716 | save_item(NAME(m_bus0)); |
| 1717 | save_item(NAME(m_csb)); |
| 1581 | 1718 | save_item(NAME(m_atce)); |
| 1582 | 1719 | save_item(NAME(m_btce)); |
| 1583 | 1720 | } |
| r13044 | r13045 | |
| 1647 | 1784 | MCFG_ABC1600BUS_SLOT_ADD("bus0i", bus0i_intf, abc1600bus_cards, NULL, NULL) |
| 1648 | 1785 | MCFG_ABC1600BUS_SLOT_ADD("bus0x", bus0x_intf, abc1600bus_cards, NULL, NULL) |
| 1649 | 1786 | MCFG_ABC1600BUS_SLOT_ADD("bus1", bus1_intf, abc1600bus_cards, NULL, NULL) |
| 1650 | | MCFG_ABC1600BUS_SLOT_ADD("bus2", bus2_intf, abc1600bus_cards, NULL, NULL) |
| 1787 | MCFG_ABC1600BUS_SLOT_ADD("bus2", bus2_intf, abc1600bus_cards, "4105", NULL) |
| 1651 | 1788 | |
| 1652 | 1789 | // internal ram |
| 1653 | 1790 | MCFG_RAM_ADD(RAM_TAG) |