From 11b9e381d36f38bcc493de61f5039f201863f35b Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 4 Dec 2014 00:55:39 +0100 Subject: [PATCH] (MESS)Game promoted to working ------------------ Code Name: Sector [hap, seanriddle] --- src/mess/drivers/cnsector.c | 49 +++++++------ src/mess/drivers/comp4.c | 12 ++-- src/mess/drivers/ticalc1x.c | 3 + src/mess/layout/cnsector.lay | 131 +++++++++++++++++++++++++++++------ 4 files changed, 146 insertions(+), 49 deletions(-) diff --git a/src/mess/drivers/cnsector.c b/src/mess/drivers/cnsector.c index 8aae3e34520..89ea09bfbf4 100644 --- a/src/mess/drivers/cnsector.c +++ b/src/mess/drivers/cnsector.c @@ -4,6 +4,10 @@ Parker Brothers Code Name: Sector * MP0905BNL ZA0379 (die labeled 0970F-05B) + + This is a tabletop submarine pursuit game. A grid board and small toy + boats are used to remember your locations (a Paint app should be ok too). + Refer to the official manual for more information, it is not a simple game. ***************************************************************************/ @@ -149,34 +153,34 @@ WRITE16_MEMBER(cnsector_state::write_o) static INPUT_PORTS_START( cnsector ) PORT_START("IN.0") // O0 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) // ? next - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) // ? left - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) // nc? - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) // ? range + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Next Ship") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_NAME("Left") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Range") PORT_START("IN.1") // O1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) // ? aim - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) // ? right - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) // nc? - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) // ?nc + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("Aim") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_NAME("Right") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.2") // O2 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) // ? fire - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) // ? evasive - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) // nc? - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) // ? recall + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_NAME("Fire") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("Evasive Sub") // expert button + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("Recall") PORT_START("IN.3") // O3 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) // ? finder - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) // ? slow - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) // nc? - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) // ?nc + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("Sub Finder") // expert button + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_NAME("Slower") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.4") // O4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) // ? teach - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) // ? fast - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) // nc? - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) // ? move + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_NAME("Teach Mode") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("Faster") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_NAME("Move Ship") INPUT_PORTS_END @@ -194,6 +198,9 @@ void cnsector_state::machine_start() memset(m_leds_decay, 0, sizeof(m_leds_decay)); m_o = 0; + save_item(NAME(m_leds_state)); + save_item(NAME(m_leds_cache)); + save_item(NAME(m_leds_decay)); save_item(NAME(m_o)); } @@ -238,4 +245,4 @@ ROM_START( cnsector ) ROM_END -CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) diff --git a/src/mess/drivers/comp4.c b/src/mess/drivers/comp4.c index bfac4728174..bf678b00847 100644 --- a/src/mess/drivers/comp4.c +++ b/src/mess/drivers/comp4.c @@ -37,10 +37,10 @@ public: required_device m_maincpu; required_ioport_array<3> m_button_matrix; + UINT16 m_o; + UINT16 m_leds_state; UINT8 m_leds_decay[0x10]; - UINT16 m_r; - UINT16 m_o; DECLARE_READ8_MEMBER(read_k); DECLARE_WRITE16_MEMBER(write_o); @@ -116,9 +116,7 @@ WRITE16_MEMBER(comp4_state::write_r) // R2 R7 // R1 R6 // R0 R5 - m_r = data; - - m_leds_state = m_r; + m_leds_state = data; leds_update(); } @@ -170,10 +168,10 @@ void comp4_state::machine_start() { m_leds_state = 0; memset(m_leds_decay, 0, sizeof(m_leds_decay)); - m_r = 0; m_o = 0; - save_item(NAME(m_r)); + save_item(NAME(m_leds_state)); + save_item(NAME(m_leds_decay)); save_item(NAME(m_o)); } diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index 6cdd04a8709..7de9b533edd 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -632,6 +632,9 @@ void ticalc1x_state::machine_start() m_r = 0; m_o = 0; + save_item(NAME(m_leds_state)); + save_item(NAME(m_leds_cache)); + save_item(NAME(m_leds_decay)); save_item(NAME(m_r)); save_item(NAME(m_o)); } diff --git a/src/mess/layout/cnsector.lay b/src/mess/layout/cnsector.lay index 0d51d9e9b54..9c7c22c7baf 100644 --- a/src/mess/layout/cnsector.lay +++ b/src/mess/layout/cnsector.lay @@ -3,6 +3,11 @@ + + + + + @@ -12,43 +17,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + + + + + +