summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-12-29 21:17:51 +0100
committer hap <happppp@users.noreply.github.com>2019-12-29 21:18:04 +0100
commit3939fef2d10c00d0fa53610394569effb76504ce (patch)
treefc106e9d5cf7e5a085225cc5c884afd1d8ec3d96
parentb413b38dce2d7d6df62f395f214a447fdd8a3613 (diff)
30test: update notes, add more buttons, add port D (nw)
-rw-r--r--src/mame/drivers/30test.cpp182
1 files changed, 88 insertions, 94 deletions
diff --git a/src/mame/drivers/30test.cpp b/src/mame/drivers/30test.cpp
index 4a9c4c0f4b3..94987efbd9a 100644
--- a/src/mame/drivers/30test.cpp
+++ b/src/mame/drivers/30test.cpp
@@ -2,14 +2,20 @@
// copyright-holders:Angelo Salese, hap
/***************************************************************************
- 30 Test (Remake) (c) 1997 Namco
+30 Test (サーティテスト) (c) 1997 Namco, game code M125
+This is a remake, the original version was from 1970 and didn't have a CPU.
- driver by Angelo Salese
+driver by Angelo Salese
- TODO:
- - portd meaning is a mystery
- - inputs are annoying to map;
- - EEPROM
+Hardware notes:
+- MC68HC11K1
+- M6295
+- X1 1.056MHz
+- OSC1 16.000MHz
+
+TODO:
+- inputs are annoying to map
+- EEPROM in MCU
============================================================================
@@ -17,29 +23,22 @@ cheats:
- [0xb0-0xb3] timer
lamps:
-?OK???!! = really OK! (91+) (0x81)
-???????? = pretty good (80+) (0x82)
-???~??? = not bad (70+) (0x84)
-??? = normal (55+) (0x88)
-????? = pretty bad (40+) (0x90)
-???~ = worst (39 or less) (0xa0)
-??????? = game over (0xe0)
-
-
-============================================================================
-
-30-TEST (Remake)
-NAMCO 1997
-GAME CODE M125
-
-MC68HC11K1
-M6295
-X1 1.056MHz
-OSC1 16.000MHz
-
-
-cabinet photo
-http://blogs.yahoo.co.jp/nadegatayosoyuki/59285865.html
+- [0x81] really OK! (91+) - 超OKっすよ!!
+- [0x82] pretty good (80+) - かなりィ⤴っすヨ
+- [0x84] not bad (70+) - あっい〜じゃん
+- [0x88] normal (55+) - ふつう
+- [0x90] pretty bad (40+) - ちょいたり
+- [0xa0] worst (39 or less) - サイテ〜
+- [0xe0] game over - ゲームオーバー
+
+settings stored in EEPROM:
+- [0xd90] coins per credit (default 0x01)
+- [0xd91] games per credit (default 0x02)
+- [0xd99] time per game (default 0x0c, 12 seconds)
+- [0xda9] language (default 0x03) - 0 = English, 1 = Chinese, 2 = Korean, 3 = Japanese
+
+0xd90-0xda8 can also be changed in-game by holding service coin and then entering
+testmode (hold 9, press F2). Voice language cannot be changed here though.
***************************************************************************/
@@ -50,18 +49,17 @@ http://blogs.yahoo.co.jp/nadegatayosoyuki/59285865.html
#include "30test.lh"
-#define MAIN_CLOCK XTAL(16'000'000)
class namco_30test_state : public driver_device
{
public:
- namco_30test_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
- , m_oki(*this, "oki")
- , m_digits(*this, "digit%u", 0U)
- , m_lamps(*this, "lamp%u", 0U)
- { }
+ namco_30test_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_oki(*this, "oki"),
+ m_digits(*this, "digit%u", 0U),
+ m_lamps(*this, "lamp%u", 0U)
+ { }
void _30test(machine_config &config);
@@ -74,46 +72,58 @@ private:
output_finder<72> m_digits;
output_finder<8> m_lamps;
- uint8_t m_mux_data;
- uint8_t m_oki_bank;
+ uint8_t m_mux_data = 0;
- DECLARE_WRITE8_MEMBER(namco_30test_led_w);
- DECLARE_WRITE8_MEMBER(namco_30test_led_rank_w);
- DECLARE_WRITE8_MEMBER(namco_30test_lamps_w);
- DECLARE_READ8_MEMBER(namco_30test_mux_r);
- DECLARE_WRITE8_MEMBER(hc11_mux_w);
- DECLARE_WRITE8_MEMBER(hc11_okibank_w);
+ DECLARE_WRITE8_MEMBER(led_w);
+ DECLARE_WRITE8_MEMBER(led_rank_w);
+ DECLARE_WRITE8_MEMBER(lamps_w);
+ DECLARE_READ8_MEMBER(mux_r);
+ DECLARE_WRITE8_MEMBER(coin_w);
+ DECLARE_WRITE8_MEMBER(mux_w);
+ DECLARE_WRITE8_MEMBER(okibank_w);
- void namco_30test_map(address_map &map);
+ void main_map(address_map &map);
};
static const uint8_t led_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x77,0x7c,0x39,0x5e,0x79,0x00 };
-WRITE8_MEMBER(namco_30test_state::namco_30test_led_w)
+WRITE8_MEMBER(namco_30test_state::led_w)
{
+ // 0-29: playfield
+ // 30,31: time
m_digits[offset * 2] = led_map[data >> 4];
m_digits[1 + offset * 2] = led_map[data & 0x0f];
}
-WRITE8_MEMBER(namco_30test_state::namco_30test_led_rank_w)
+WRITE8_MEMBER(namco_30test_state::led_rank_w)
{
- if (offset < 4)
- {
- m_digits[64 + offset * 2] = led_map[data >> 4];
- m_digits[65 + offset * 2] = led_map[data & 0x0f];
- }
+ // 0: 1st place
+ // 1: 2nd place
+ // 2: 3rd place
+ // 3: current / last play score
+ m_digits[64 + offset * 2] = led_map[data >> 4];
+ m_digits[65 + offset * 2] = led_map[data & 0x0f];
}
-WRITE8_MEMBER(namco_30test_state::namco_30test_lamps_w)
+WRITE8_MEMBER(namco_30test_state::lamps_w)
{
// d0-d5: ranking, d6: game over, d7: assume marquee lamp
for (int i = 0; i < 8; i++)
m_lamps[i] = BIT(data, i);
}
-READ8_MEMBER(namco_30test_state::namco_30test_mux_r)
+WRITE8_MEMBER(namco_30test_state::coin_w)
+{
+ // d2: coincounter
+ machine().bookkeeping().coin_counter_w(0, BIT(data, 2));
+
+ // d3/d4: ticket dispenser
+ // other: ?
+}
+
+READ8_MEMBER(namco_30test_state::mux_r)
{
uint8_t res = 0xff;
@@ -128,31 +138,26 @@ READ8_MEMBER(namco_30test_state::namco_30test_mux_r)
return res;
}
-WRITE8_MEMBER(namco_30test_state::hc11_mux_w)
+WRITE8_MEMBER(namco_30test_state::mux_w)
{
+ //printf("%X ",data);
m_mux_data = data;
}
-WRITE8_MEMBER(namco_30test_state::hc11_okibank_w)
+WRITE8_MEMBER(namco_30test_state::okibank_w)
{
- m_oki_bank = data;
m_oki->set_rom_bank(data & 1);
}
-void namco_30test_state::namco_30test_map(address_map &map)
+
+void namco_30test_state::main_map(address_map &map)
{
map(0x0d80, 0x0dbf).ram(); // EEPROM read-back data goes there
map(0x2000, 0x2000).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- /* 0x401e-0x401f: time */
- map(0x4000, 0x401f).w(FUNC(namco_30test_state::namco_30test_led_w)); // 7-seg leds
- /* 0x6000: 1st place 7-seg led */
- /* 0x6001: 2nd place 7-seg led */
- /* 0x6002: 3rd place 7-seg led */
- /* 0x6003: current / last play score */
- /* 0x6004: lamps */
- map(0x6000, 0x6003).w(FUNC(namco_30test_state::namco_30test_led_rank_w));
- map(0x6004, 0x6004).w(FUNC(namco_30test_state::namco_30test_lamps_w));
+ map(0x4000, 0x401f).w(FUNC(namco_30test_state::led_w));
+ map(0x6000, 0x6003).w(FUNC(namco_30test_state::led_rank_w));
+ map(0x6004, 0x6004).w(FUNC(namco_30test_state::lamps_w));
map(0x8000, 0xffff).rom();
}
@@ -200,23 +205,13 @@ static INPUT_PORTS_START( 30test )
PORT_START("SYSTEM")
PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CODE(KEYCODE_7)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CODE(KEYCODE_8)
- PORT_DIPNAME( 0x08, 0x08, "UNK3" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "UNK4" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "UNK5" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "UNK6" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "UNK7" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin + also used in testmode
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CODE(KEYCODE_7)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ticket dispenser
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) // used in testmode to advance test
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -225,26 +220,25 @@ void namco_30test_state::machine_start()
m_digits.resolve();
m_lamps.resolve();
save_item(NAME(m_mux_data));
- save_item(NAME(m_oki_bank));
}
void namco_30test_state::_30test(machine_config &config)
{
/* basic machine hardware */
- MC68HC11K1(config, m_maincpu, MAIN_CLOCK);
- m_maincpu->set_addrmap(AS_PROGRAM, &namco_30test_state::namco_30test_map);
- m_maincpu->in_pa_callback().set(FUNC(namco_30test_state::namco_30test_mux_r));
- //m_maincpu->in_pd_callback().set_ram();
+ MC68HC11K1(config, m_maincpu, 16_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &namco_30test_state::main_map);
+ m_maincpu->in_pa_callback().set(FUNC(namco_30test_state::mux_r));
+ m_maincpu->out_pd_callback().set(FUNC(namco_30test_state::coin_w));
m_maincpu->in_pe_callback().set_ioport("SYSTEM");
- m_maincpu->out_pg_callback().set(FUNC(namco_30test_state::hc11_okibank_w));
- m_maincpu->out_ph_callback().set(FUNC(namco_30test_state::hc11_mux_w));
+ m_maincpu->out_pg_callback().set(FUNC(namco_30test_state::okibank_w));
+ m_maincpu->out_ph_callback().set(FUNC(namco_30test_state::mux_w));
/* no video hardware */
/* sound hardware */
SPEAKER(config, "mono").front_center();
- OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH);
+ OKIM6295(config, m_oki, 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH);
m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
}
@@ -262,4 +256,4 @@ ROM_START( 30test )
ROM_LOAD( "tt1-voi0.7p", 0x0000, 0x80000, CRC(b4fc5921) SHA1(92a88d5adb50dae48715847f12e88a35e37ef78c) )
ROM_END
-GAMEL( 1997, 30test, 0, _30test, 30test, namco_30test_state, empty_init, ROT0, "Namco", "30 Test (Remake)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK, layout_30test )
+GAMEL( 1997, 30test, 0, _30test, 30test, namco_30test_state, empty_init, ROT0, "Namco", "30 Test (remake)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK, layout_30test )