summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2018-09-25 15:09:47 +0200
committer hap <happppp@users.noreply.github.com>2018-09-25 15:09:47 +0200
commit3a15fb49adbd2b88426c8c30860d35473a4839e1 (patch)
treeb95e5b09a6b51454ec28e722ae8cf0564dbadc28
parentba4bcbaa14ce5f2768a4aae25f744c218f98c082 (diff)
video21: assume there is no deal button, but instead vblank status (nw)
-rw-r--r--src/mame/drivers/video21.cpp86
-rw-r--r--src/mame/layout/video21.lay16
2 files changed, 30 insertions, 72 deletions
diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp
index ffd5f7539ef..9876549c711 100644
--- a/src/mame/drivers/video21.cpp
+++ b/src/mame/drivers/video21.cpp
@@ -4,26 +4,23 @@
2018-09-15
-Video 21 blackjack game. Thanks to hap who figured out the inputs and the name of the game.
-
+Video 21 blackjack game
VIDEO-GAMES - LICH/GERMANY 1017a
-NEC D8080AFC (i8080), unknown xtal, bank of 7 dips. 10x 4-bit proms, type F93453 (=82S137)
+NEC D8080AFC (i8080), 20.79MHz xtal, bank of 7 dips. 10x 4-bit proms, type F93453 (=82S137)
Video Ram = 7 x 2102 (bit 7 omitted). Main Ram = 2x MCM145101 (=M5101L).
The game has sound (there's a LM380N visible), looks like there's a bunch of TTL chips
involved, and a 555.
To Do:
- Sound
-- CPU clock
+- confirm CPU clock
- unknown status bits? eg. hopper
- color overlay as seen on flyer upright cabinet
-- no lamp for 'Deal' is this correct?
- If you win, it hangs. This is why it's marked as GNW.
When booted, press Key out (mapped to W by default) to get it going.
-
*******************************************************************************************/
#include "emu.h"
@@ -51,21 +48,17 @@ protected:
virtual void machine_start() override;
private:
-
- DECLARE_WRITE8_MEMBER(unk_w);
+ DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_WRITE8_MEMBER(lamp1_w);
DECLARE_WRITE8_MEMBER(lamp2_w);
- void clear_lamps(device_t &device);
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void mem_map(address_map &map);
void io_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_shared_ptr<u8> m_p_videoram;
required_region_ptr<u8> m_p_chargen;
-
- int m_offcounter;
+
output_finder<24> m_lamps;
};
@@ -102,45 +95,24 @@ uint32_t video21_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
return 0;
}
-WRITE8_MEMBER(video21_state::unk_w)
+WRITE8_MEMBER(video21_state::sound_w)
{
- // doesn't appear to be lamps
- logerror("%s: unk_w %02x\n", machine().describe_context(), data);
+ // seems like sound beeper pitch (FF is off)
+ logerror("%s: sound_w %02x\n", machine().describe_context(), data);
}
WRITE8_MEMBER(video21_state::lamp1_w)
{
for (int i = 0; i < 8; i++)
- {
m_lamps[i+0] = BIT(data, 7-i);
- }
- m_offcounter = 8;
+
+ // TODO: also hopper out
}
WRITE8_MEMBER(video21_state::lamp2_w)
{
for (int i = 0; i < 8; i++)
- {
m_lamps[i+8] = BIT(data, 7-i);
- }
- m_offcounter = 8;
-}
-
-void video21_state::clear_lamps(device_t &device)
-{
- // the game stops writing the lamp values in certain situations and expects the lamps to turn off automatically (decay?)
- // eg. if you select 'take' in the 'take' or 'stand' choice
-
- if (m_offcounter > 0)
- m_offcounter--;
-
- if (m_offcounter == 0)
- {
- for (int i = 0; i < 16; i++)
- {
- m_lamps[i] = 0;
- }
- }
}
@@ -151,7 +123,7 @@ void video21_state::mem_map(address_map &map) {
}
void video21_state::io_map(address_map &map) {
- map(0x02,0x02).w(FUNC(video21_state::unk_w)); // lots of unknown writes, might be some kind of dac
+ map(0x02,0x02).w(FUNC(video21_state::sound_w));
map(0x04,0x04).w(FUNC(video21_state::lamp1_w));
map(0x08,0x08).w(FUNC(video21_state::lamp2_w));
map(0x41,0x41).portr("IN41");
@@ -183,7 +155,7 @@ static INPUT_PORTS_START( video21 )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) // ?
PORT_START("IN42")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -192,10 +164,10 @@ static INPUT_PORTS_START( video21 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
- PORT_DIPNAME( 0x40, 0x40, "42b6" )
+ PORT_DIPNAME( 0x40, 0x40, "42b6" ) // some hopper status?
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("IN44")
PORT_DIPNAME( 0x01, 0x01, "44b0" )
@@ -207,12 +179,12 @@ static INPUT_PORTS_START( video21 )
PORT_DIPNAME( 0x04, 0x04, "44b2" )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
- PORT_DIPNAME( 0x20, 0x20, "44b5" )
+ PORT_DIPNAME( 0x20, 0x20, "44b5" ) // double or nothing?
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "44b6" )
+ PORT_DIPNAME( 0x40, 0x40, "44b6" ) // take winnings?
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Max Bet" )
@@ -249,7 +221,6 @@ void video21_state::video21(machine_config &config)
I8080A(config, m_maincpu, 20.79_MHz_XTAL / 10); // crystal confirmed but divisor unknown (divider appears to be 74LS160)
m_maincpu->set_addrmap(AS_PROGRAM, &video21_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &video21_state::io_map);
- m_maincpu->set_periodic_int(FUNC(video21_state::clear_lamps), attotime::from_hz(240));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -264,24 +235,25 @@ void video21_state::video21(machine_config &config)
PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
/* sound hardware */
+ // TODO
}
ROM_START( video21 )
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD_NIB_HIGH( "lich_prg.02", 0x0000, 0x0400, CRC(05585e39) SHA1(7eefb5d63b4499a303ecdcad6af5df9fe9c89205) )
- ROM_LOAD_NIB_LOW ( "lich_prg.03", 0x0000, 0x0400, CRC(b9134e96) SHA1(e7a8ff71f735add608d3c9dcc287ca37414debcb) )
- ROM_LOAD_NIB_HIGH( "lich_prg.04", 0x0400, 0x0400, CRC(8a6aa143) SHA1(16973106a95b17d8c4712db8aa7ef564751ae6d4) )
- ROM_LOAD_NIB_LOW ( "lich_prg.05", 0x0400, 0x0400, CRC(98c07d4d) SHA1(d3126b5484c67ecc7c44ddc25b48ff72ed8a734f) )
- ROM_LOAD_NIB_HIGH( "lich_prg.76", 0x0800, 0x0400, CRC(737c27f5) SHA1(55c7eb29b979d35633e5fb2c1c1ac3117901a0f0) )
- ROM_LOAD_NIB_LOW ( "lich_prg.78", 0x0800, 0x0400, CRC(c1081a2f) SHA1(24dc1d9afa4635c3114369c338903343a8b81d1a) )
- ROM_LOAD_NIB_HIGH( "lich_prg.77", 0x0c00, 0x0400, CRC(3a725b98) SHA1(efa3802025f1f99b45e56abd85dc3d1860d4734d) )
- ROM_LOAD_NIB_LOW ( "lich_prg.79", 0x0c00, 0x0400, CRC(044d1bfd) SHA1(5a57c1ab7eb7dd7ed05852e128b704c3b37a87b8) )
+ ROM_LOAD_NIB_HIGH( "2", 0x0000, 0x0400, CRC(05585e39) SHA1(7eefb5d63b4499a303ecdcad6af5df9fe9c89205) )
+ ROM_LOAD_NIB_LOW ( "3", 0x0000, 0x0400, CRC(b9134e96) SHA1(e7a8ff71f735add608d3c9dcc287ca37414debcb) )
+ ROM_LOAD_NIB_HIGH( "4", 0x0400, 0x0400, CRC(8a6aa143) SHA1(16973106a95b17d8c4712db8aa7ef564751ae6d4) )
+ ROM_LOAD_NIB_LOW ( "5", 0x0400, 0x0400, CRC(98c07d4d) SHA1(d3126b5484c67ecc7c44ddc25b48ff72ed8a734f) )
+ ROM_LOAD_NIB_HIGH( "76", 0x0800, 0x0400, CRC(737c27f5) SHA1(55c7eb29b979d35633e5fb2c1c1ac3117901a0f0) )
+ ROM_LOAD_NIB_LOW ( "78", 0x0800, 0x0400, CRC(c1081a2f) SHA1(24dc1d9afa4635c3114369c338903343a8b81d1a) )
+ ROM_LOAD_NIB_HIGH( "77", 0x0c00, 0x0400, CRC(3a725b98) SHA1(efa3802025f1f99b45e56abd85dc3d1860d4734d) )
+ ROM_LOAD_NIB_LOW ( "79", 0x0c00, 0x0400, CRC(044d1bfd) SHA1(5a57c1ab7eb7dd7ed05852e128b704c3b37a87b8) )
ROM_REGION( 0x0400, "chargen", 0 )
- ROM_LOAD_NIB_HIGH( "lich_gfx.29", 0x0000, 0x0400, CRC(2b70870d) SHA1(1f50a6976e1634020c78f10c1259e38f5e010a86) )
- ROM_LOAD_NIB_LOW ( "lich_gfx.43", 0x0000, 0x0400, CRC(0ecb0aab) SHA1(7f3f1b93a5d38828ae3e97e5f8ef1a6a96dc798b) )
+ ROM_LOAD_NIB_HIGH( "29", 0x0000, 0x0400, CRC(2b70870d) SHA1(1f50a6976e1634020c78f10c1259e38f5e010a86) )
+ ROM_LOAD_NIB_LOW ( "43", 0x0000, 0x0400, CRC(0ecb0aab) SHA1(7f3f1b93a5d38828ae3e97e5f8ef1a6a96dc798b) )
ROM_END
-GAMEL(1980, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_video21)
+GAMEL(1980?, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE, layout_video21)
diff --git a/src/mame/layout/video21.lay b/src/mame/layout/video21.lay
index 8a6237eeb9e..cee8648d47c 100644
--- a/src/mame/layout/video21.lay
+++ b/src/mame/layout/video21.lay
@@ -66,15 +66,6 @@
</text>
</element>
- <element name="deal" defstate="0">
- <rect state="0">
- <color red="0.10" green="1.00" blue="0.10" />
- </rect>
- <text string="Deal">
- <color red="0.0" green="0.0" blue="0.0" />
- <bounds x="0.1" y="0.25" width="0.8" height="0.5" />
- </text>
- </element>
<view name="Button Lamps">
<screen index="0">
@@ -93,11 +84,6 @@
<bezel name="lamp10" element="Out1_20" inputtag="IN44" inputmask="0x10">
<bounds x="2.50" y="3.10" width="0.20" height="0.14" />
</bezel>
-
- <!-- no lamp associated with this? -->
- <bezel name="deal" element="deal" inputtag="IN42" inputmask="0x80">
- <bounds x="3.75" y="3.10" width="0.20" height="0.14" />
- </bezel>
-
+
</view>
</mamelayout>