Skip to content

Commit

Permalink
more private member use in 'D, E, F, G' drivers (nw) (#3704)
Browse files Browse the repository at this point in the history
* more private member use in 'D' drivers (nw)

* same for 'E' drivers (nw)

* and 'F' (nw)

* 'G' (nw)

(left galaxian/galaxold alone because I know somebody is looking at them)
  • Loading branch information
David Haywood authored and happppp committed Jun 27, 2018
1 parent 8aa76c1 commit 6d6b562
Show file tree
Hide file tree
Showing 274 changed files with 2,251 additions and 1,611 deletions.
7 changes: 5 additions & 2 deletions src/mame/drivers/d6800.cpp
Expand Up @@ -72,6 +72,10 @@ class d6800_state : public driver_device
, m_io_shift(*this, "SHIFT")
{ }


void d6800(machine_config &config);

private:
DECLARE_READ8_MEMBER( d6800_cassette_r );
DECLARE_WRITE8_MEMBER( d6800_cassette_w );
DECLARE_READ8_MEMBER( d6800_keyboard_r );
Expand All @@ -82,9 +86,8 @@ class d6800_state : public driver_device
TIMER_DEVICE_CALLBACK_MEMBER(d6800_p);
DECLARE_QUICKLOAD_LOAD_MEMBER( d6800 );

void d6800(machine_config &config);
void d6800_map(address_map &map);
private:

uint8_t m_rtc;
bool m_cb2;
bool m_cassold;
Expand Down
6 changes: 4 additions & 2 deletions src/mame/drivers/d6809.cpp
Expand Up @@ -97,13 +97,15 @@ class d6809_state : public driver_device
, m_terminal(*this, "terminal")
{ }

void d6809(machine_config &config);

private:
DECLARE_READ8_MEMBER( term_r );
DECLARE_WRITE8_MEMBER( term_w );
void kbd_put(u8 data);

void d6809(machine_config &config);
void mem_map(address_map &map);
private:

uint8_t m_term_data;
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
Expand Down
4 changes: 3 additions & 1 deletion src/mame/drivers/d9final.cpp
Expand Up @@ -45,6 +45,9 @@ class d9final_state : public driver_device
m_hi_vram(*this, "hi_vram"),
m_cram(*this, "cram") { }

void d9final(machine_config &config);

private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;

Expand All @@ -66,7 +69,6 @@ class d9final_state : public driver_device
virtual void video_start() override;

uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void d9final(machine_config &config);
void d9final_io(address_map &map);
void d9final_map(address_map &map);
};
Expand Down
11 changes: 6 additions & 5 deletions src/mame/drivers/dacholer.cpp
Expand Up @@ -59,6 +59,12 @@ class dacholer_state : public driver_device
, m_leds(*this, "led%u", 0U)
{ }

void itaten(machine_config &config);
void dacholer(machine_config &config);

DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r);

private:
DECLARE_WRITE8_MEMBER(bg_scroll_x_w);
DECLARE_WRITE8_MEMBER(bg_scroll_y_w);
DECLARE_WRITE8_MEMBER(background_w);
Expand All @@ -70,16 +76,13 @@ class dacholer_state : public driver_device
DECLARE_WRITE8_MEMBER(snd_ack_w);
DECLARE_WRITE8_MEMBER(snd_irq_w);
DECLARE_WRITE8_MEMBER(music_irq_w);
DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
DECLARE_PALETTE_INIT(dacholer);
uint32_t screen_update_dacholer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(sound_irq);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
void itaten(machine_config &config);
void dacholer(machine_config &config);
void itaten_main_map(address_map &map);
void itaten_snd_io_map(address_map &map);
void itaten_snd_map(address_map &map);
Expand All @@ -88,12 +91,10 @@ class dacholer_state : public driver_device
void snd_io_map(address_map &map);
void snd_map(address_map &map);

protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;

private:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
Expand Down
4 changes: 3 additions & 1 deletion src/mame/drivers/dai3wksi.cpp
Expand Up @@ -67,6 +67,9 @@ class dai3wksi_state : public driver_device
m_dai3wksi_videoram(*this, "videoram"),
m_in2(*this, "IN2") { }

void dai3wksi(machine_config &config);

private:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<samples_device> m_samples;
Expand Down Expand Up @@ -98,7 +101,6 @@ class dai3wksi_state : public driver_device

virtual void machine_start() override;
virtual void machine_reset() override;
void dai3wksi(machine_config &config);
void main_map(address_map &map);
};

Expand Down
7 changes: 5 additions & 2 deletions src/mame/drivers/dambustr.cpp
Expand Up @@ -66,12 +66,15 @@ class dambustr_state : public galaxold_state
: galaxold_state(mconfig, type, tag),
m_custom(*this, "cust") { }

void dambustr(machine_config &config);

void init_dambustr();

private:
required_device<galaxian_sound_device> m_custom;

int m_noise_data;
DECLARE_WRITE8_MEMBER(dambustr_noise_enable_w);
void init_dambustr();
void dambustr(machine_config &config);
void dambustr_map(address_map &map);
};

Expand Down
4 changes: 3 additions & 1 deletion src/mame/drivers/daruma.cpp
Expand Up @@ -29,13 +29,15 @@ class daruma_state : public driver_device
m_maincpu(*this, "maincpu"),
m_speaker(*this, "speaker") { }

void daruma(machine_config &config);

private:
DECLARE_READ8_MEMBER(dev0_r);
DECLARE_WRITE8_MEMBER(dev1_w);
DECLARE_WRITE8_MEMBER(dev2_w);
DECLARE_READ8_MEMBER(dev4_r);
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
void daruma(machine_config &config);
void mem_io(address_map &map);
void mem_prg(address_map &map);
};
Expand Down
9 changes: 5 additions & 4 deletions src/mame/drivers/datum.cpp
Expand Up @@ -66,14 +66,15 @@ class datum_state : public driver_device
, m_digits(*this, "digit%u", 0U)
{ }

void datum(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(trigger_reset);
DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi);

private:
DECLARE_READ8_MEMBER(pa_r);
DECLARE_WRITE8_MEMBER(pa_w);
DECLARE_WRITE8_MEMBER(pb_w);
DECLARE_INPUT_CHANGED_MEMBER(trigger_reset);
DECLARE_INPUT_CHANGED_MEMBER(trigger_nmi);
void datum(machine_config &config);
void datum_mem(address_map &map);
private:
uint8_t m_keydata;
virtual void machine_reset() override;
virtual void machine_start() override { m_digits.resolve(); }
Expand Down
3 changes: 1 addition & 2 deletions src/mame/drivers/dblcrown.cpp
Expand Up @@ -73,14 +73,13 @@ class dblcrown_state : public driver_device

void dblcrown(machine_config &config);

protected:
private:
// driver_device overrides
virtual void machine_start() override;
virtual void machine_reset() override;

virtual void video_start() override;

private:
// screen updates
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

Expand Down
8 changes: 5 additions & 3 deletions src/mame/drivers/dblewing.cpp
Expand Up @@ -100,6 +100,11 @@ class dblewing_state : public driver_device
m_soundlatch_pending(false)
{ }

void dblewing(machine_config &config);

void init_dblewing();

private:
/* memory pointers */
required_shared_ptr<uint16_t> m_pf1_rowscroll;
required_shared_ptr<uint16_t> m_pf2_rowscroll;
Expand All @@ -115,7 +120,6 @@ class dblewing_state : public driver_device

DECLARE_READ8_MEMBER(irq_latch_r);
DECLARE_WRITE_LINE_MEMBER(soundlatch_irq_w);
void init_dblewing();
uint32_t screen_update_dblewing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

DECO16IC_BANK_CB_MEMBER(bank_callback);
Expand All @@ -124,12 +128,10 @@ class dblewing_state : public driver_device
READ16_MEMBER( wf_protection_region_0_104_r );
WRITE16_MEMBER( wf_protection_region_0_104_w );

void dblewing(machine_config &config);
void dblewing_map(address_map &map);
void decrypted_opcodes_map(address_map &map);
void sound_io(address_map &map);
void sound_map(address_map &map);
private:
bool m_soundlatch_pending;
};

Expand Down
30 changes: 17 additions & 13 deletions src/mame/drivers/dbox.cpp
Expand Up @@ -435,32 +435,36 @@

class dbox_state : public driver_device
{
public:
dbox_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_display(*this, "display")
, m_ip16_74259(*this, "hct259.ip16")
{ }
public:
dbox_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_display(*this, "display")
, m_ip16_74259(*this, "hct259.ip16")
{ }

void dbox(machine_config &config);

void init_dbox();

private:
required_device<m68340_cpu_device> m_maincpu;
required_device<sda5708_device> m_display;
required_device<latch8_device> m_ip16_74259;

virtual void machine_reset() override;
virtual void machine_start () override;
void init_dbox();
virtual void machine_start() override;
DECLARE_WRITE8_MEMBER(sda5708_reset);
DECLARE_WRITE8_MEMBER(sda5708_clk);
DECLARE_WRITE8_MEMBER(write_pa);

void dbox(machine_config &config);
void dbox_map(address_map &map);

#if LOCALFLASH
DECLARE_READ16_MEMBER (sysflash_r);
DECLARE_WRITE16_MEMBER (sysflash_w);
DECLARE_READ16_MEMBER(sysflash_r);
DECLARE_WRITE16_MEMBER(sysflash_w);
private:
uint16_t *m_sysflash;
uint16_t * m_sysflash;
uint32_t m_sf_mode;
uint32_t m_sf_state;
#endif
Expand Down
5 changes: 4 additions & 1 deletion src/mame/drivers/dct11em.cpp
Expand Up @@ -20,11 +20,14 @@ class dct11em_state : public driver_device
dct11em_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu") { }

void dct11em(machine_config &config);

private:
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
void dct11em(machine_config &config);
void dct11em_mem(address_map &map);
};

Expand Down
12 changes: 7 additions & 5 deletions src/mame/drivers/ddayjlc.cpp
Expand Up @@ -84,6 +84,13 @@ class ddayjlc_state : public driver_device
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { }

void ddayjlc(machine_config &config);

void init_ddayjlc();
DECLARE_CUSTOM_INPUT_MEMBER(prot_r);

private:

DECLARE_WRITE8_MEMBER(prot_w);
DECLARE_WRITE8_MEMBER(char_bank_w);
DECLARE_WRITE8_MEMBER(bgvram_w);
Expand All @@ -97,23 +104,18 @@ class ddayjlc_state : public driver_device
DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_WRITE8_MEMBER(i8257_CH0_w);
DECLARE_WRITE8_MEMBER(i8257_LMSR_w);
DECLARE_CUSTOM_INPUT_MEMBER(prot_r);
void init_ddayjlc();
TILE_GET_INFO_MEMBER(get_tile_info_bg);
TILE_GET_INFO_MEMBER(get_tile_info_fg);
DECLARE_PALETTE_INIT(ddayjlc);
uint32_t screen_update_ddayjlc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
void ddayjlc(machine_config &config);
void main_map(address_map &map);
void sound_map(address_map &map);

protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;

private:
/* memory pointers */
required_shared_ptr<uint8_t> m_mainram;
required_shared_ptr<uint8_t> m_spriteram;
Expand Down
9 changes: 5 additions & 4 deletions src/mame/drivers/ddealer.cpp
Expand Up @@ -138,6 +138,11 @@ class ddealer_state : public driver_device
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }

void ddealer(machine_config &config);

void init_ddealer();

private:
DECLARE_WRITE16_MEMBER(flipscreen_w);
DECLARE_WRITE16_MEMBER(back_vram_w);
DECLARE_WRITE16_MEMBER(mcu_shared_w);
Expand All @@ -149,16 +154,12 @@ class ddealer_state : public driver_device

TIMER_DEVICE_CALLBACK_MEMBER(mcu_sim);

void ddealer(machine_config &config);
void ddealer_map(address_map &map);
void init_ddealer();

protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;

private:
// memory pointers
required_shared_ptr<uint16_t> m_vregs;
required_shared_ptr<uint16_t> m_left_fg_vram_top;
Expand Down

0 comments on commit 6d6b562

Please sign in to comment.