From 5d68b91df9679c94fed0ac9dcf40b26c52f3f4f4 Mon Sep 17 00:00:00 2001 From: smf- Date: Tue, 13 Feb 2018 19:53:20 +0000 Subject: less public (nw) --- src/mame/drivers/popeye.cpp | 2 +- src/mame/includes/popeye.h | 42 +++++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp index 46be242e51f..d694cabd192 100644 --- a/src/mame/drivers/popeye.cpp +++ b/src/mame/drivers/popeye.cpp @@ -209,7 +209,7 @@ ADDRESS_MAP_START(tnx1_state::maincpu_program_map) ADDRESS_MAP_END ADDRESS_MAP_START(tpp2_state::maincpu_program_map) - AM_IMPORT_FROM(tnx1_state::maincpu_program_map) + AM_IMPORT_FROM(tpp1_state::maincpu_program_map) //AM_RANGE(0x8000, 0x87ff) AM_NOP // 7f (normally unpopulated) AM_RANGE(0x8800, 0x8bff) AM_RAM // 7h AM_RANGE(0xc000, 0xdfff) AM_WRITE(background_w) diff --git a/src/mame/includes/popeye.h b/src/mame/includes/popeye.h index fe42de3369c..830c339116f 100644 --- a/src/mame/includes/popeye.h +++ b/src/mame/includes/popeye.h @@ -8,21 +8,25 @@ class tnx1_state : public driver_device public: tnx1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_background_pos(*this, "background_pos"), m_palettebank(*this, "palettebank"), m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_color_prom(*this, "proms"), - m_color_prom_spr(*this, "sprpal"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_color_prom_spr(*this, "sprpal") { } - uint8_t m_prot0; - uint8_t m_prot1; - uint8_t m_prot_shift; - uint8_t m_dswbit; + DECLARE_CUSTOM_INPUT_MEMBER(dsw1_read); + DECLARE_CUSTOM_INPUT_MEMBER(pop_field_r); + virtual void config(machine_config &config); + +protected: + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; required_shared_ptr m_background_pos; required_shared_ptr m_palettebank; required_shared_ptr m_spriteram; @@ -36,6 +40,10 @@ public: tilemap_t *m_fg_tilemap; uint8_t m_last_palette; int m_field; + uint8_t m_prot0; + uint8_t m_prot1; + uint8_t m_prot_shift; + uint8_t m_dswbit; DECLARE_READ8_MEMBER(protection_r); DECLARE_WRITE8_MEMBER(protection_w); @@ -43,24 +51,18 @@ public: DECLARE_WRITE8_MEMBER(popeye_colorram_w); virtual DECLARE_WRITE8_MEMBER(background_w); DECLARE_WRITE8_MEMBER(popeye_portB_w); - DECLARE_CUSTOM_INPUT_MEMBER(dsw1_read); TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void driver_start() override; virtual void video_start() override; virtual DECLARE_PALETTE_INIT(palette_init); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(popeye_interrupt); - DECLARE_CUSTOM_INPUT_MEMBER( pop_field_r ); void update_palette(); virtual void decrypt_rom(); virtual void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_field(bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - virtual void config(machine_config &config); virtual void maincpu_program_map(address_map &map); void maincpu_io_map(address_map &map); }; @@ -68,6 +70,7 @@ public: class tpp1_state : public tnx1_state { using tnx1_state::tnx1_state; +protected: virtual DECLARE_PALETTE_INIT(palette_init) override; virtual void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect) override; }; @@ -75,25 +78,26 @@ class tpp1_state : public tnx1_state class popeyebl_state : public tpp1_state { using tpp1_state::tpp1_state; +protected: virtual void decrypt_rom() override; -public: virtual void maincpu_program_map(address_map &map) override; }; class tpp2_state : public tpp1_state { using tpp1_state::tpp1_state; - virtual void decrypt_rom() override; - virtual void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect) override; - virtual DECLARE_WRITE8_MEMBER(background_w) override; public: virtual void config(machine_config &config) override; +protected: virtual void maincpu_program_map(address_map &map) override; + virtual void decrypt_rom() override; + virtual void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect) override; + virtual DECLARE_WRITE8_MEMBER(background_w) override; }; class tpp2np_state : public tpp2_state { using tpp2_state::tpp2_state; -public: +protected: virtual void maincpu_program_map(address_map &map) override; }; -- cgit v1.2.3