summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2018-04-07 12:01:31 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2018-04-07 12:01:31 +0200
commit851db3f827ba34c025848ea9eb617c91fdb351a3 (patch)
treee768e41f72e1fec0e10e37fa6b008e9be7de8739
parent26d3f0140265025ec2b73940f93ddb79503cb334 (diff)
mastboy.cpp, mastboyo.cpp: private-ize a bit more, grammar police, source clean (nw)
-rw-r--r--src/mame/drivers/mastboy.cpp18
-rw-r--r--src/mame/drivers/mastboyo.cpp24
2 files changed, 24 insertions, 18 deletions
diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp
index c4e9a04505c..fe52e7ee82a 100644
--- a/src/mame/drivers/mastboy.cpp
+++ b/src/mame/drivers/mastboy.cpp
@@ -3,7 +3,7 @@
/*
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
+ 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
@@ -468,6 +468,14 @@ public:
, m_vram(*this, "vram")
{ }
+ void mastboy(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+private:
required_device<cpu_device> m_maincpu;
required_device<msm5205_device> m_msm;
required_device<ls259_device> m_outlatch;
@@ -494,14 +502,10 @@ public:
DECLARE_READ8_MEMBER(nmi_read);
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(interrupt);
- void mastboy(machine_config &config);
+
void bank_c000_map(address_map &map);
void mastboy_io_map(address_map &map);
void mastboy_map(address_map &map);
@@ -925,7 +929,7 @@ ROM_START( mastboya )
/* 0x1c0000 tt 0x1fffff EMPTY */
ROM_END
-/* 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 */
+/* Is this actually official, or a hack? - I think the internal ROM should 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, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU!
diff --git a/src/mame/drivers/mastboyo.cpp b/src/mame/drivers/mastboyo.cpp
index 3ad6fde9241..b366f7f4525 100644
--- a/src/mame/drivers/mastboyo.cpp
+++ b/src/mame/drivers/mastboyo.cpp
@@ -29,19 +29,11 @@ public:
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;
@@ -53,6 +45,16 @@ private:
required_memory_bank m_bank1;
required_region_ptr<uint8_t> m_questionrom;
required_region_ptr<uint8_t> m_paletterom;
+
+ void mastboyo_map(address_map &map);
+ void mastboyo_portmap(address_map &map);
+
+ DECLARE_WRITE8_MEMBER(fgram_w);
+ DECLARE_WRITE8_MEMBER(fgram2_w);
+ DECLARE_WRITE8_MEMBER(rombank_w);
+ TILE_GET_INFO_MEMBER(get_fg_tile_info);
+ uint32_t screen_update_mastboyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_PALETTE_INIT(mastboyo);
};
TILE_GET_INFO_MEMBER(mastboyo_state::get_fg_tile_info)
@@ -103,12 +105,12 @@ void mastboyo_state::mastboyo_portmap(address_map &map)
void mastboyo_state::mastboyo_map(address_map &map)
{
- map(0x0000, 0x3fff).rom();
+ 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(0x7000, 0x7000).portr("UNK"); // possible watchdog? or IRQ ack?
map(0x8000, 0xffff).bankr("bank1");
}