trunk/src/mame/drivers/eolith.c
| r20541 | r20542 | |
| 100 | 100 | #include "emu.h" |
| 101 | 101 | #include "cpu/e132xs/e132xs.h" |
| 102 | 102 | #include "cpu/mcs51/mcs51.h" |
| 103 | | #include "sound/qs1000.h" |
| 103 | |
| 104 | 104 | #include "machine/eeprom.h" |
| 105 | 105 | #include "includes/eolith.h" |
| 106 | 106 | #include "includes/eolithsp.h" |
| r20541 | r20542 | |
| 127 | 127 | */ |
| 128 | 128 | eolith_speedup_read(space); |
| 129 | 129 | |
| 130 | | return (ioport("IN0")->read() & ~0x300) | (machine().rand() & 0x300); |
| 130 | return (m_in0->read() & ~0x300) | (machine().rand() & 0x300); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | WRITE32_MEMBER(eolith_state::systemcontrol_w) |
| r20541 | r20542 | |
| 136 | 136 | coin_counter_w(machine(), 0, data & m_coin_counter_bit); |
| 137 | 137 | set_led_status(machine(), 0, data & 1); |
| 138 | 138 | |
| 139 | | ioport("EEPROMOUT")->write(data, 0xff); |
| 139 | m_eepromoutport->write(data, 0xff); |
| 140 | 140 | |
| 141 | 141 | // bit 0x100 and 0x040 ? |
| 142 | 142 | } |
| r20541 | r20542 | |
| 144 | 144 | READ32_MEMBER(eolith_state::hidctch3_pen1_r) |
| 145 | 145 | { |
| 146 | 146 | //320 x 240 |
| 147 | | int xpos = ioport("PEN_X_P1")->read(); |
| 148 | | int ypos = ioport("PEN_Y_P1")->read(); |
| 147 | int xpos = m_penx1port->read(); |
| 148 | int ypos = m_peny1port->read(); |
| 149 | 149 | |
| 150 | 150 | return xpos + (ypos*168*2); |
| 151 | 151 | } |
| r20541 | r20542 | |
| 153 | 153 | READ32_MEMBER(eolith_state::hidctch3_pen2_r) |
| 154 | 154 | { |
| 155 | 155 | //320 x 240 |
| 156 | | int xpos = ioport("PEN_X_P2")->read(); |
| 157 | | int ypos = ioport("PEN_Y_P2")->read(); |
| 156 | int xpos = m_penx2port->read(); |
| 157 | int ypos = m_peny2port->read(); |
| 158 | 158 | |
| 159 | 159 | return xpos + (ypos*168*2); |
| 160 | 160 | } |
| r20541 | r20542 | |
| 185 | 185 | { |
| 186 | 186 | // .... xxxx - Data ROM bank (32kB) |
| 187 | 187 | // ...x .... - Unknown (Usually 1?) |
| 188 | | membank("sound_bank")->set_entry(data & 0x0f); |
| 188 | m_sndbank->set_entry(data & 0x0f); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |
| r20541 | r20542 | |
| 227 | 227 | |
| 228 | 228 | static void soundcpu_to_qs1000(device_t *device, int data) |
| 229 | 229 | { |
| 230 | | qs1000_device *qs1000 = device->machine().device<qs1000_device>("qs1000"); |
| 231 | | qs1000->serial_in(data); |
| 232 | | |
| 230 | eolith_state *state = device->machine().driver_data<eolith_state>(); |
| 231 | state->m_qs1000->serial_in(data); |
| 233 | 232 | device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(250)); |
| 234 | 233 | } |
| 235 | 234 | |
trunk/src/mame/drivers/eolithsp.c
| r20541 | r20542 | |
| 47 | 47 | /* eolith.c */ |
| 48 | 48 | { "linkypip", 0x4000825c, -1,/*0x4000ABAE,*/ 240 }, // 2nd address is used on the planet cutscene between but idle skipping between levels, but seems too aggressive |
| 49 | 49 | { "ironfort", 0x40020854, -1, 240 }, |
| 50 | { "ironfortj",0x40020234, -1, 240 }, |
| 50 | 51 | { "hidnctch", 0x4000bba0, -1, 240 }, |
| 51 | 52 | { "raccoon", 0x40008204, -1, 240 }, |
| 52 | 53 | { "puzzlekg", 0x40029458, -1, 240 }, |
trunk/src/mame/includes/eolith.h
| r20541 | r20542 | |
| 1 | |
| 2 | #include "sound/qs1000.h" |
| 3 | |
| 1 | 4 | class eolith_state : public driver_device |
| 2 | 5 | { |
| 3 | 6 | public: |
| r20541 | r20542 | |
| 4 | 7 | eolith_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 8 | : driver_device(mconfig, type, tag), |
| 6 | 9 | m_maincpu(*this, "maincpu"), |
| 7 | | m_soundcpu(*this, "soundcpu") |
| 8 | | { } |
| 10 | m_soundcpu(*this, "soundcpu"), |
| 11 | m_qs1000(*this, "qs1000"), |
| 12 | m_in0(*this, "IN0"), |
| 13 | m_eepromoutport(*this, "EEPROMOUT"), |
| 14 | m_penx1port(*this, "PEN_X_P1"), |
| 15 | m_peny1port(*this, "PEN_Y_P1"), |
| 16 | m_penx2port(*this, "PEN_X_P2"), |
| 17 | m_peny2port(*this, "PEN_Y_P2"), |
| 18 | m_sndbank(*this, "sound_bank") |
| 19 | { } |
| 9 | 20 | |
| 10 | 21 | int m_coin_counter_bit; |
| 11 | 22 | int m_buffer; |
| r20541 | r20542 | |
| 16 | 27 | |
| 17 | 28 | required_device<cpu_device> m_maincpu; |
| 18 | 29 | optional_device<cpu_device> m_soundcpu; |
| 30 | optional_device<qs1000_device> m_qs1000; |
| 31 | optional_ioport m_in0; // klondkp doesn't have it |
| 32 | optional_ioport m_eepromoutport; |
| 33 | optional_ioport m_penx1port; |
| 34 | optional_ioport m_peny1port; |
| 35 | optional_ioport m_penx2port; |
| 36 | optional_ioport m_peny2port; |
| 37 | optional_memory_bank m_sndbank; |
| 38 | |
| 19 | 39 | |
| 20 | 40 | DECLARE_READ32_MEMBER(eolith_custom_r); |
| 21 | 41 | DECLARE_WRITE32_MEMBER(systemcontrol_w); |