diff options
Diffstat (limited to 'src/mame/drivers/crvision.cpp')
-rw-r--r-- | src/mame/drivers/crvision.cpp | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/src/mame/drivers/crvision.cpp b/src/mame/drivers/crvision.cpp index 64ae55e5c27..1205e03b26e 100644 --- a/src/mame/drivers/crvision.cpp +++ b/src/mame/drivers/crvision.cpp @@ -27,7 +27,8 @@ Salora Manager - RAM mapping - - cassette (figure out correct input level) - it can load if you try a few times + - cassette (figure out correct input level) - it can load its own recordings if you try a few times; + -- The "sonicinvader.wav" found on the net works perfectly with CRUN. - floppy (interface cartridge needed) */ @@ -133,11 +134,14 @@ SHFT Z X C V B N M . , / SHFT - laser2001, manager: cassette format is incompatible with crvision. - manager: appears the joystick is 4-way only. +- crvision: if you get "ERROR 00" while loading a tape, you can continue to load the remainder of it with CLOAD or CRUN. + The bad line(s) will be missing. TODO: - manager: paste can lose a character or 2 at the start of a line - crvision: paste is very poor -- crvision: in natural key mode & in paste, shift causes no output. +- crvision: in natural key mode & in paste, shifted characters do not appear. +- crvision: there is a buzzing noise while game carts are running. */ @@ -497,11 +501,11 @@ static INPUT_PORTS_START( manager ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_START("JOY.1") PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_START("JOY.2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -511,11 +515,14 @@ static INPUT_PORTS_START( manager ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_START("JOY.3") PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + + PORT_START("NMI") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F10) PORT_CHANGED_MEMBER(DEVICE_SELF, crvision_state, trigger_nmi, 0) INPUT_PORTS_END /*************************************************************************** @@ -547,31 +554,17 @@ void crvision_state::pia_pa_w(uint8_t data) m_cassette->output( BIT(data, 7) ? +1.0 : -1.0); } -uint8_t crvision_state::read_keyboard(int pa) +uint8_t crvision_state::read_keyboard(u8 pa) { - uint8_t i, modifier = 0xff, value = 0xff; + uint8_t value = 0xff; // Get shift/ctrl keys - switch (pa & 3) - { - case 0: modifier = m_inp_pa0[7]->read(); break; - case 1: modifier = m_inp_pa1[7]->read(); break; - case 2: modifier = m_inp_pa2[7]->read(); break; - case 3: modifier = m_inp_pa3[7]->read(); break; - } - modifier &= 0x80; + u8 modifier = m_io_keypad[pa][7]->read() & 0x80; // Get normal keys/joystick - for (i = 0; i < 6; i++) + for (u8 i = 0; i < 6; i++) { - switch (pa & 3) - { - case 0: value = m_inp_pa0[i]->read(); break; - case 1: value = m_inp_pa1[i]->read(); break; - case 2: value = m_inp_pa2[i]->read(); break; - case 3: value = m_inp_pa3[i]->read(); break; - } - value &= 0x7f; + value = m_io_keypad[pa][i]->read() & 0x7f; if (value < 0x7f) { @@ -628,7 +621,7 @@ uint8_t crvision_state::pia_pb_r() uint8_t data = 0xff; - for (int i = 0; i < 4; i++) + for (u8 i = 0; i < 4; i++) if (BIT(m_keylatch, i)) data &= read_keyboard(i); @@ -652,7 +645,7 @@ uint8_t laser2001_state::pia_pa_r() uint8_t data = 0xff; - for (int i = 0; i < 8; i++) + for (u8 i = 0; i < 8; i++) if (!BIT(m_keylatch, i)) data &= m_inp_y[i]->read(); @@ -679,7 +672,7 @@ uint8_t laser2001_state::pia_pb_r() { uint8_t data = 0xff; - for (int i = 0; i < 4; i++) + for (u8 i = 0; i < 4; i++) if (~m_joylatch >> i & 1) data &= m_inp_joy[i]->read(); |