src/mess/drivers/mc10.c
| r13094 | r13095 | |
| 39 | 39 | public: |
| 40 | 40 | mc10_state(const machine_config &mconfig, device_type type, const char *tag) |
| 41 | 41 | : driver_device(mconfig, type, tag), |
| 42 | | m_maincpu(*this, "maincpu"), |
| 43 | | m_mc6847(*this, "mc6847"), |
| 44 | | m_ef9345(*this, "ef9345"), |
| 45 | | m_dac(*this, "dac"), |
| 46 | | m_ram(*this, RAM_TAG), |
| 47 | | m_cassette(*this, CASSETTE_TAG), |
| 48 | | m_printer(*this, "printer") |
| 49 | | { } |
| 42 | m_maincpu(*this, "maincpu"), |
| 43 | m_mc6847(*this, "mc6847"), |
| 44 | m_ef9345(*this, "ef9345"), |
| 45 | m_dac(*this, "dac"), |
| 46 | m_ram(*this, RAM_TAG), |
| 47 | m_cassette(*this, CASSETTE_TAG), |
| 48 | m_printer(*this, "printer") |
| 49 | { } |
| 50 | 50 | |
| 51 | 51 | required_device<cpu_device> m_maincpu; |
| 52 | 52 | optional_device<device_t> m_mc6847; |
| r13094 | r13095 | |
| 70 | 70 | |
| 71 | 71 | DECLARE_READ8_MEMBER( mc10_bfff_r ); |
| 72 | 72 | DECLARE_WRITE8_MEMBER( mc10_bfff_w ); |
| 73 | DECLARE_READ8_MEMBER( alice90_bfff_r ); |
| 73 | 74 | DECLARE_WRITE8_MEMBER( alice32_bfff_w ); |
| 74 | 75 | DECLARE_READ8_MEMBER( mc10_port1_r ); |
| 75 | 76 | DECLARE_WRITE8_MEMBER( mc10_port1_w ); |
| r13094 | r13095 | |
| 99 | 100 | return result; |
| 100 | 101 | } |
| 101 | 102 | |
| 103 | READ8_MEMBER( mc10_state::alice90_bfff_r ) |
| 104 | { |
| 105 | UINT8 result = 0xff; |
| 106 | |
| 107 | if (!BIT(m_keyboard_strobe, 7)) result &= input_port_read(machine(), "pb7"); |
| 108 | else |
| 109 | if (!BIT(m_keyboard_strobe, 6)) result &= input_port_read(machine(), "pb6"); |
| 110 | else |
| 111 | if (!BIT(m_keyboard_strobe, 5)) result &= input_port_read(machine(), "pb5"); |
| 112 | else |
| 113 | if (!BIT(m_keyboard_strobe, 4)) result &= input_port_read(machine(), "pb4"); |
| 114 | else |
| 115 | if (!BIT(m_keyboard_strobe, 3)) result &= input_port_read(machine(), "pb3"); |
| 116 | else |
| 117 | if (!BIT(m_keyboard_strobe, 2)) result &= input_port_read(machine(), "pb2"); |
| 118 | else |
| 119 | if (!BIT(m_keyboard_strobe, 1)) result &= input_port_read(machine(), "pb1"); |
| 120 | else |
| 121 | if (!BIT(m_keyboard_strobe, 0)) result &= input_port_read(machine(), "pb0"); |
| 122 | |
| 123 | return result; |
| 124 | } |
| 125 | |
| 102 | 126 | WRITE8_MEMBER( mc10_state::mc10_bfff_w ) |
| 103 | 127 | { |
| 104 | 128 | /* bit 2 to 6, mc6847 mode lines */ |
| r13094 | r13095 | |
| 285 | 309 | AM_RANGE(0x0100, 0x2fff) AM_NOP /* unused */ |
| 286 | 310 | AM_RANGE(0x3000, 0xafff) AM_RAMBANK("bank1") /* 32k internal ram */ |
| 287 | 311 | AM_RANGE(0xbf20, 0xbf29) AM_DEVREADWRITE("ef9345", ef9345_device, data_r, data_w) |
| 288 | | AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(mc10_bfff_r, alice32_bfff_w) |
| 312 | AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(alice90_bfff_r, alice32_bfff_w) |
| 289 | 313 | AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("maincpu", 0x0000) /* ROM */ |
| 290 | 314 | ADDRESS_MAP_END |
| 291 | 315 | |
| r13094 | r13095 | |
| 584 | 608 | MCFG_CPU_MODIFY("maincpu") |
| 585 | 609 | MCFG_CPU_PROGRAM_MAP(alice90_mem) |
| 586 | 610 | |
| 587 | | MCFG_RAM_MODIFY(RAM_TAG) |
| 611 | MCFG_RAM_MODIFY(RAM_TAG) |
| 588 | 612 | MCFG_RAM_DEFAULT_SIZE("32K") |
| 589 | 613 | |
| 590 | 614 | /* Software lists */ |