diff --git a/hash/crvision.xml b/hash/crvision.xml index 98b64cfaef5..c8489f626e9 100644 --- a/hash/crvision.xml +++ b/hash/crvision.xml @@ -51,8 +51,18 @@ B-6196 : First Book of Wizzard Programs Creativision carts were universal (Japanese NTSC dumps turned out to be the same as worldwide PAL ones). -USAGE: Carts generally start up in attract mode, so press F10, then Z (unless otherwise noted), - wait for intro music to end. Shift is the usual "fire" key. +USAGE: Carts generally start up in attract mode, so to play: + - press F10 + - Make any adjustments, such as starting level, number of players etc with the action keys + - Press R to begin (there may a short tune first) + - On older machines (crvision, wizzard etc) action keys are Shift and Ctrl. + - On newer machines (laser2001, manager), the action buttons are Ctrl and Alt. + +NOTE that the BASIC carts will load on the newer machines, but the keyboard is incompatible. You must + use the inbuilt BASIC instead. + +NOTE that all our versions of astropin have a corruption of the right flipper that appears when you press R, + and the BASIC carts have a corruption of the @ symbol. Both of these are most likely original issues. --> @@ -62,7 +72,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -76,7 +86,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -90,7 +100,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -108,7 +118,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -122,7 +132,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -136,7 +146,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -152,6 +162,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. + @@ -167,6 +178,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. + @@ -182,6 +194,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1983 Video Technology Ltd. + @@ -196,6 +209,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1983 Video Technology Ltd. + @@ -227,7 +241,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -241,7 +255,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -255,7 +269,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -270,7 +284,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -284,7 +298,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1983 Video Technology Ltd. - + @@ -299,7 +313,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1983 Video Technology Ltd. - + @@ -314,7 +328,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -328,7 +342,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -358,7 +372,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -373,7 +387,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -386,7 +400,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot Planet Defender (8k Cart, Bad?) 1981 Video Technology Ltd. - + @@ -400,7 +414,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -414,7 +428,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -429,7 +443,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -445,7 +459,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1983 Video Technology Ltd. - + @@ -460,7 +474,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -473,7 +487,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot Stone Age 1984 Video Technology Ltd. - + @@ -487,7 +501,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -502,7 +516,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -516,7 +530,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -532,7 +546,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -546,7 +560,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -561,7 +575,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1981 Video Technology Ltd. - + @@ -575,7 +589,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -590,7 +604,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + @@ -606,7 +620,7 @@ USAGE: Carts generally start up in attract mode, so press F10, then Z (unless ot 1982 Video Technology Ltd. - + 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(); diff --git a/src/mame/includes/crvision.h b/src/mame/includes/crvision.h index 507d1314f1d..79d35beb558 100644 --- a/src/mame/includes/crvision.h +++ b/src/mame/includes/crvision.h @@ -29,21 +29,23 @@ class crvision_state : public driver_device { public: crvision_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_pia(*this, PIA6821_TAG), - m_psg(*this, SN76489_TAG), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_centronics(*this, CENTRONICS_TAG), - m_cent_data_out(*this, "cent_data_out"), - m_ram(*this, RAM_TAG), - m_inp_pa0(*this, "PA0.%u", 0), - m_inp_pa1(*this, "PA1.%u", 0), - m_inp_pa2(*this, "PA2.%u", 0), - m_inp_pa3(*this, "PA3.%u", 0) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, M6502_TAG) + , m_pia(*this, PIA6821_TAG) + , m_psg(*this, SN76489_TAG) + , m_cassette(*this, "cassette") + , m_cart(*this, "cartslot") + , m_centronics(*this, CENTRONICS_TAG) + , m_cent_data_out(*this, "cent_data_out") + , m_ram(*this, RAM_TAG) + , m_io_keypad{{*this, "PA0.%u", 0U},{*this, "PA1.%u", 0U},{*this, "PA2.%u", 0U},{*this, "PA3.%u", 0U}} { } + void creativision(machine_config &config); + void ntsc(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); + +protected: required_device m_maincpu; required_device m_pia; required_device m_psg; @@ -52,24 +54,18 @@ public: required_device m_centronics; required_device m_cent_data_out; required_device m_ram; - optional_ioport_array<8> m_inp_pa0; - optional_ioport_array<8> m_inp_pa1; - optional_ioport_array<8> m_inp_pa2; - optional_ioport_array<8> m_inp_pa3; + optional_ioport_array<8> m_io_keypad[4]; + virtual void machine_start() override; uint8_t m_keylatch; - uint8_t read_keyboard(int pa); + +private: + void crvision_map(address_map &map); + uint8_t read_keyboard(u8 pa); void pia_pa_w(uint8_t data); uint8_t pia_pa_r(); uint8_t pia_pb_r(); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - - void creativision(machine_config &config); - void ntsc(machine_config &config); - void crvision_map(address_map &map); -protected: - virtual void machine_start() override; }; class crvision_pal_state : public crvision_state @@ -87,10 +83,13 @@ public: laser2001_state(const machine_config &mconfig, device_type type, const char *tag) : crvision_state(mconfig, type, tag) , m_centronics(*this, CENTRONICS_TAG) - , m_inp_y(*this, "Y.%u", 0) - , m_inp_joy(*this, "JOY.%u", 0) + , m_inp_y(*this, "Y.%u", 0U) + , m_inp_joy(*this, "JOY.%u", 0U) { } + void lasr2001(machine_config &config); + +private: required_device m_centronics; required_ioport_array<8> m_inp_y; required_ioport_array<4> m_inp_joy; @@ -110,9 +109,7 @@ public: DECLARE_READ_LINE_MEMBER( pia_cb1_r ); DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); - void lasr2001(machine_config &config); void lasr2001_map(address_map &map); -protected: virtual void machine_start() override; };