summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <hazemamewip@hotmail.com>2018-04-07 10:52:32 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2018-04-07 11:52:32 +0200
commit26d3f0140265025ec2b73940f93ddb79503cb334 (patch)
tree6483d1440b50a178ef7e3d3fcb0392d65a8b3878
parent8886db2a7944e487f295c1a0dc5509610565dd87 (diff)
new WORKING machines (#3427)
* new WORKING machines Master Boy (1987, Z80 hardware) [David Haywood, ARPA, Recreativas.org, The Dumping Union] * info update (nw)
-rw-r--r--scripts/target/mame/arcade.lua1
-rw-r--r--src/mame/drivers/mastboy.cpp8
-rw-r--r--src/mame/drivers/mastboyo.cpp240
-rw-r--r--src/mame/mame.lst11
4 files changed, 253 insertions, 7 deletions
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 066b6d680fa..7bd8228683e 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -1858,6 +1858,7 @@ files {
MAME_DIR .. "src/mame/includes/glass.h",
MAME_DIR .. "src/mame/video/glass.cpp",
MAME_DIR .. "src/mame/drivers/mastboy.cpp",
+ MAME_DIR .. "src/mame/drivers/mastboyo.cpp",
MAME_DIR .. "src/mame/drivers/rollext.cpp",
MAME_DIR .. "src/mame/drivers/splash.cpp",
MAME_DIR .. "src/mame/includes/splash.h",
diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp
index c86b47903f3..c4e9a04505c 100644
--- a/src/mame/drivers/mastboy.cpp
+++ b/src/mame/drivers/mastboy.cpp
@@ -3,6 +3,8 @@
/*
Master Boy - Gaelco (c)1991
+ this is the 2nd release of Master Boy, the original 1987 game is on different hardware, see mastboyo.cpp for that one
+
MAME Driver by David Haywood
Special Thanks to Charles MacDonald
@@ -923,10 +925,10 @@ ROM_START( mastboya )
/* 0x1c0000 tt 0x1fffff EMPTY */
ROM_END
-/* Is this actually official, or a hack? */
+/* Is this actually official, or a hack? - I think the internal ROM shouild be different on the Italian sets as it indexes the wrong strings on the startup screens, showing MARK instead of PLAY MARK etc. so marked as BAD_DUMP on these sets */
ROM_START( mastboyi )
ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU!
+ ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU!
ROM_LOAD( "3-mem-a.ic77", 0x04000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL
ROM_CONTINUE( 0x04000, 0x4000 )
ROM_CONTINUE( 0x04000, 0x4000 )
@@ -961,7 +963,7 @@ ROM_END
// only one of the question roms differs (minor wording / spelling changes in most cases)
ROM_START( mastboyia )
ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU!
+ ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU!
ROM_LOAD( "3-mem-a.ic77", 0x04000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL
ROM_CONTINUE( 0x04000, 0x4000 )
ROM_CONTINUE( 0x04000, 0x4000 )
diff --git a/src/mame/drivers/mastboyo.cpp b/src/mame/drivers/mastboyo.cpp
new file mode 100644
index 00000000000..3ad6fde9241
--- /dev/null
+++ b/src/mame/drivers/mastboyo.cpp
@@ -0,0 +1,240 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/*
+
+Master Boy, Z80 hardware version
+
+this is Gaelco's first game, although there should be a 1986 release too, likely on the same hardware
+
+*/
+
+#include "emu.h"
+#include "cpu/z80/z80.h"
+#include "sound/ay8910.h"
+#include "screen.h"
+#include "speaker.h"
+#include "machine/nvram.h"
+
+class mastboyo_state : public driver_device
+{
+public:
+ mastboyo_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_fgram(*this, "fgram"),
+ m_fgram2(*this, "fgram2"),
+ m_maincpu(*this, "maincpu"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_bank1(*this, "bank1"),
+ m_questionrom(*this, "questions"),
+ m_paletterom(*this, "palette")
+ { }
+
+ DECLARE_WRITE8_MEMBER(fgram_w);
+ DECLARE_WRITE8_MEMBER(fgram2_w);
+ DECLARE_WRITE8_MEMBER(rombank_w);
+ TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ DECLARE_PALETTE_INIT(mastboyo);
+
+ void mastboyo(machine_config &config);
+ void mastboyo_map(address_map &map);
+ void mastboyo_portmap(address_map &map);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+ uint32_t screen_update_mastboyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+private:
+ tilemap_t *m_fg_tilemap;
+
+ required_shared_ptr<uint8_t> m_fgram;
+ required_shared_ptr<uint8_t> m_fgram2;
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_memory_bank m_bank1;
+ required_region_ptr<uint8_t> m_questionrom;
+ required_region_ptr<uint8_t> m_paletterom;
+};
+
+TILE_GET_INFO_MEMBER(mastboyo_state::get_fg_tile_info)
+{
+ int code = m_fgram[tile_index];
+ int attr = m_fgram2[tile_index];
+ SET_TILE_INFO_MEMBER(0,
+ code,
+ attr&0xf,
+ 0);
+}
+
+void mastboyo_state::video_start()
+{
+ m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(mastboyo_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+}
+
+WRITE8_MEMBER(mastboyo_state::fgram_w)
+{
+ m_fgram[offset] = data;
+ m_fg_tilemap->mark_tile_dirty(offset);
+}
+
+WRITE8_MEMBER(mastboyo_state::fgram2_w)
+{
+ m_fgram2[offset] = data;
+ m_fg_tilemap->mark_tile_dirty(offset);
+}
+
+WRITE8_MEMBER(mastboyo_state::rombank_w)
+{
+ m_bank1->set_entry(data&0xf);
+}
+
+uint32_t mastboyo_state::screen_update_mastboyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
+ return 0;
+}
+
+void mastboyo_state::mastboyo_portmap(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0x00, 0x01).w("aysnd", FUNC(ym2149_device::address_data_w));
+ map(0x00, 0x00).r("aysnd", FUNC(ym2149_device::data_r));
+}
+
+
+void mastboyo_state::mastboyo_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4000, 0x47ff).ram().share("nvram");
+ map(0x5000, 0x53ff).ram().w(this, FUNC(mastboyo_state::fgram_w)).share("fgram");
+ map(0x5400, 0x57ff).ram().w(this, FUNC(mastboyo_state::fgram2_w)).share("fgram2");
+ map(0x6000, 0x6000).w(this, FUNC(mastboyo_state::rombank_w));
+// map(0x7000, 0x7000).portr("UNK"); // possible watchdog? or IRQ ack?
+ map(0x8000, 0xffff).bankr("bank1");
+}
+
+
+static INPUT_PORTS_START( mastboyo )
+ PORT_START("IN0")
+ PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coin_A ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x03, "Disabled" )
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0c, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) )
+ PORT_DIPNAME( 0x30, 0x20, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x00, "2" )
+ PORT_DIPSETTING( 0x10, "3" )
+ PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPSETTING( 0x30, "6" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
+ // note, Player 2 buttons must be used when entering name, and can be used for answering questions even in single player mode
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Red / Enter Initial")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Green / Delete Initial")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Red / <<")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Green / >>")
+INPUT_PORTS_END
+
+static const gfx_layout tiles8x8_layout =
+{
+ 8,8,
+ RGN_FRAC(1,1),
+ 4,
+ { 0, 1, 2, 3 },
+ { 24, 28, 0, 4, 8, 12, 16, 20,}, // note, slightly strange order
+ { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
+ 32*8
+};
+
+static GFXDECODE_START( mastboyo )
+ GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 16 )
+GFXDECODE_END
+
+void mastboyo_state::machine_start()
+{
+ m_bank1->configure_entries(0, 0x10, &m_questionrom[0x00000], 0x08000);
+ m_bank1->set_entry(1);
+}
+
+PALETTE_INIT_MEMBER(mastboyo_state, mastboyo)
+{
+ for (int i = 0; i < palette.entries(); i++)
+ {
+ const int pal = (m_paletterom[i]&0x0f) | ((m_paletterom[palette.entries() + i]&0x0f) << 4);
+ const int green = (pal & 0x07);
+ const int red = (pal & 0x38) >> 3;
+ const int blue = (pal & 0xc0) >> 6;
+
+ palette.set_pen_color(i, pal3bit(red), pal3bit(green), pal2bit(blue));
+ }
+}
+
+MACHINE_CONFIG_START(mastboyo_state::mastboyo)
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", Z80, 20_MHz_XTAL/6)
+ MCFG_CPU_PROGRAM_MAP(mastboyo_map)
+ MCFG_CPU_IO_MAP(mastboyo_portmap)
+ MCFG_CPU_PERIODIC_INT_DRIVER(mastboyo_state, irq0_line_hold, 256.244f) // not sure, INT0 pin was measured at 256.244Hz
+
+ MCFG_NVRAM_ADD_0FILL("nvram")
+
+ /* video hardware */
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 2*8, 256-2*8-1)
+ MCFG_SCREEN_UPDATE_DRIVER(mastboyo_state, screen_update_mastboyo)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", mastboyo)
+
+ MCFG_PALETTE_ADD("palette", 256)
+ MCFG_PALETTE_INIT_OWNER(mastboyo_state, mastboyo)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+
+ MCFG_SOUND_ADD("aysnd", AY8910, 20_MHz_XTAL/4)
+ MCFG_AY8910_PORT_A_READ_CB(IOPORT("IN0")) // DSW
+ MCFG_AY8910_PORT_B_READ_CB(IOPORT("IN1")) // player inputs
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+
+MACHINE_CONFIG_END
+
+ROM_START( mastboyo )
+ ROM_REGION( 0x04000, "maincpu", 0 )
+ ROM_LOAD( "masterboy-1987-27128-ic14.bin", 0x00000, 0x04000, CRC(d05a22eb) SHA1(528eb27622d28d098ceefc6a6fb43bb1a527444d) )
+
+ ROM_REGION( 0x04000, "gfx1", 0 )
+ ROM_LOAD( "masterboy-1987-27128-mbfij-ic36.bin", 0x00000, 0x04000, CRC(aa2a174d) SHA1(a27eae023453877131646594100b575af7a3c473) )
+
+ ROM_REGION( 0x80000, "questions", ROMREGION_ERASEFF )
+ /* IC6 - IC9 empty */
+ ROM_LOAD( "masterboy-1987-27c512-ic10.bin", 0x40000, 0x10000, CRC(66da2826) SHA1(ef86efbfa251fc7cf62fe99b26551203fd599294) )
+ ROM_LOAD( "masterboy-1987-27256-ic11.bin", 0x50000, 0x08000, CRC(40b07eeb) SHA1(93f62e0a2a330f7ff1041eaa7cba3ef42121b1a8) )
+ ROM_LOAD( "masterboy-1987-27c512-ic12.bin", 0x60000, 0x10000, CRC(b2819e38) SHA1(e4dd036747221926d0f9f86e00e28f578decc942) )
+ ROM_LOAD( "masterboy-1987-27c512-ic13.bin", 0x70000, 0x10000, CRC(71df82e9) SHA1(a0d75ec1181094e39d2246805e4dac5a621daa1a) )
+
+ ROM_REGION( 0x100, "proms", 0 ) // timing or memory mapping?
+ ROM_LOAD( "masterboy-1987-82s129-d-ic23.bin", 0x000, 0x100, CRC(d5fd2dfd) SHA1(66e3afa9e73507db0647d125c0be992b27d08adc) )
+
+ ROM_REGION( 0x200, "palette", 0 )
+ ROM_LOAD( "masterboy-1987-82s129-h-ic39.bin", 0x100, 0x100, CRC(8e965fc3) SHA1(b52c8e505438937c7a5d3e1393d54f0ad0425e78) )
+ ROM_LOAD( "masterboy-1987-82s129-l-ic40.bin", 0x000, 0x100, CRC(4d061216) SHA1(1abf9320da75a3fd23c6bdbcc4088d18e133c4e5) )
+ROM_END
+
+GAME( 1987, mastboyo, 0, mastboyo, mastboyo, mastboyo_state, 0, ROT0, "Gaelco (Covielsa license)", "Master Boy (1987, Z80 hardware)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index e4ea6b4d62b..621d1307534 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -18510,10 +18510,13 @@ markham // TVG14 (c) 1983 Sun Electronics
marywu //
@source:mastboy.cpp
-mastboy // (c) 1987 - No Ref on the PCB
-mastboya // (c) 1987 - No Ref on the PCB
-mastboyi // (c) 1987 - No Ref on the PCB
-mastboyia // (c) 1987 - No Ref on the PCB
+mastboy // (c) 1991 - No Ref on the PCB
+mastboya // (c) 1991 - No Ref on the PCB
+mastboyi // (c) 1991 - No Ref on the PCB
+mastboyia // (c) 1991 - No Ref on the PCB
+
+@source:mastboyo.cpp
+mastboyo // (c) 1987 - No Ref on the PCB
@source:matmania.cpp
excthour // TA-0015 (c) 1985 + Taito license