summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2018-12-08 02:23:07 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2018-12-08 02:23:07 +1100
commit81c398f29dec41c6ab9404abac9b9ff66dc75b54 (patch) (github)
tree95e8623bb9d689b36a8c0d6039f24c164256a32c
parentfe5e61e0dd2ff4ea2564a34b0cea390399857148 (diff)
downloadmame-81c398f29dec41c6ab9404abac9b9ff66dc75b54.tar.bz2
mame-81c398f29dec41c6ab9404abac9b9ff66dc75b54.zip
(nw) more header cleaning
-rw-r--r--src/mame/includes/ampoker2.h23
-rw-r--r--src/mame/includes/amspdwy.h26
-rw-r--r--src/mame/includes/calomega.h34
-rw-r--r--src/mame/includes/dcheese.h25
-rw-r--r--src/mame/includes/dribling.h19
-rw-r--r--src/mame/includes/efdt.h13
-rw-r--r--src/mame/includes/epos.h7
-rw-r--r--src/mame/includes/esd16.h20
-rw-r--r--src/mame/includes/gotcha.h8
-rw-r--r--src/mame/includes/gumbo.h24
-rw-r--r--src/mame/includes/ladyfrog.h21
-rw-r--r--src/mame/includes/malzak.h25
-rw-r--r--src/mame/includes/mcatadv.h6
-rw-r--r--src/mame/includes/micro3d.h46
-rw-r--r--src/mame/includes/mosaic.h22
-rw-r--r--src/mame/includes/news.h27
-rw-r--r--src/mame/includes/norautp.h7
-rw-r--r--src/mame/includes/oneshot.h28
-rw-r--r--src/mame/includes/pass.h10
-rw-r--r--src/mame/includes/polyplay.h8
-rw-r--r--src/mame/includes/taxidriv.h17
-rw-r--r--src/mame/includes/thedeep.h20
-rw-r--r--src/mame/includes/truco.h19
-rw-r--r--src/mame/includes/trucocl.h18
-rw-r--r--src/mame/includes/usgames.h19
-rw-r--r--src/mame/includes/xyonix.h21
-rw-r--r--src/mame/machine/micro3d.cpp28
-rw-r--r--src/mame/video/micro3d.cpp17
28 files changed, 365 insertions, 193 deletions
diff --git a/src/mame/includes/ampoker2.h b/src/mame/includes/ampoker2.h
index 04009558ac2..bd92c69d9db 100644
--- a/src/mame/includes/ampoker2.h
+++ b/src/mame/includes/ampoker2.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Roberto Fresca
+#ifndef MAME_INCLUDES_AMPOKER2_H
+#define MAME_INCLUDES_AMPOKER2_H
+
+#pragma once
#include "machine/watchdog.h"
#include "emupal.h"
@@ -7,8 +11,8 @@
class ampoker2_state : public driver_device
{
public:
- ampoker2_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ampoker2_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_watchdog(*this, "watchdog"),
@@ -19,6 +23,13 @@ public:
void sigma2k(machine_config &config);
void ampoker2(machine_config &config);
+ void init_rabbitpk();
+
+protected:
+ virtual void video_start() override;
+ virtual void machine_start() override;
+
+private:
DECLARE_WRITE8_MEMBER(port30_w);
DECLARE_WRITE8_MEMBER(port31_w);
DECLARE_WRITE8_MEMBER(port32_w);
@@ -28,17 +39,11 @@ public:
DECLARE_WRITE8_MEMBER(port36_w);
DECLARE_WRITE8_MEMBER(watchdog_reset_w);
DECLARE_WRITE8_MEMBER(videoram_w);
- void init_rabbitpk();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(s2k_get_bg_tile_info);
DECLARE_PALETTE_INIT(ampoker2);
DECLARE_VIDEO_START(sigma2k);
-protected:
- virtual void video_start() override;
- virtual void machine_start() override;
-
-private:
void io_map(address_map &map);
void program_map(address_map &map);
@@ -51,3 +56,5 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
output_finder<10> m_lamps;
};
+
+#endif // MAME_INCLUDES_AMPOKER2_H
diff --git a/src/mame/includes/amspdwy.h b/src/mame/includes/amspdwy.h
index 429a3e4484d..f9a8e9ec63e 100644
--- a/src/mame/includes/amspdwy.h
+++ b/src/mame/includes/amspdwy.h
@@ -5,6 +5,10 @@
American Speedway
*************************************************************************/
+#ifndef MAME_INCLUDES_AMSPDWY_H
+#define MAME_INCLUDES_AMSPDWY_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/ym2151.h"
@@ -14,8 +18,8 @@
class amspdwy_state : public driver_device
{
public:
- amspdwy_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ amspdwy_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_colorram(*this, "colorram"),
@@ -28,6 +32,14 @@ public:
m_soundlatch(*this, "soundlatch")
{ }
+ void amspdwy(machine_config &config);
+
+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_videoram;
required_shared_ptr<uint8_t> m_spriteram;
@@ -60,14 +72,12 @@ public:
TILEMAP_MAPPER_MEMBER(tilemap_scan_cols_back);
uint32_t screen_update_amspdwy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
- uint8_t amspdwy_wheel_r( int index );
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ uint8_t amspdwy_wheel_r(int index);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- void amspdwy(machine_config &config);
void amspdwy_map(address_map &map);
void amspdwy_portmap(address_map &map);
void amspdwy_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_AMSPDWY_H
diff --git a/src/mame/includes/calomega.h b/src/mame/includes/calomega.h
index 4fdf3ff1efb..aaf7c73614e 100644
--- a/src/mame/includes/calomega.h
+++ b/src/mame/includes/calomega.h
@@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Roberto Fresca
+#ifndef MAME_INCLUDES_CALOMEGA_H
+#define MAME_INCLUDES_CALOMEGA_H
+
+#pragma once
+
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "machine/clock.h"
@@ -28,6 +33,21 @@ public:
m_lamps(*this, "lamp%u", 1U)
{ }
+ void init_sys903();
+ void init_comg080();
+ void init_s903mod();
+ void init_sys905();
+
+ void sys905(machine_config &config);
+ void s903mod(machine_config &config);
+ void sys906(machine_config &config);
+ void sys903(machine_config &config);
+
+protected:
+ virtual void machine_start() override { m_lamps.resolve(); }
+ virtual void video_start() override;
+
+private:
DECLARE_WRITE8_MEMBER(calomega_videoram_w);
DECLARE_WRITE8_MEMBER(calomega_colorram_w);
DECLARE_READ8_MEMBER(s903_mux_port_r);
@@ -49,29 +69,17 @@ public:
DECLARE_WRITE_LINE_MEMBER(write_acia_tx);
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
DECLARE_WRITE_LINE_MEMBER(update_aciabaud_scale);
- void init_sys903();
- void init_comg080();
- void init_s903mod();
- void init_sys905();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update_calomega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_PALETTE_INIT(calomega);
- void sys905(machine_config &config);
- void s903mod(machine_config &config);
- void sys906(machine_config &config);
- void sys903(machine_config &config);
void s903mod_map(address_map &map);
void sys903_map(address_map &map);
void sys905_map(address_map &map);
void sys906_map(address_map &map);
-protected:
- virtual void machine_start() override { m_lamps.resolve(); }
- virtual void video_start() override;
optional_device_array<pia6821_device, 2> m_pia;
-private:
required_device<cpu_device> m_maincpu;
optional_device<acia6850_device> m_acia6850_0;
optional_device<clock_device> m_aciabaud;
@@ -95,3 +103,5 @@ private:
int m_s905_mux_data;
tilemap_t *m_bg_tilemap;
};
+
+#endif // MAME_INCLUDES_CALOMEGA_H
diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h
index 8827249f50d..20a386124e2 100644
--- a/src/mame/includes/dcheese.h
+++ b/src/mame/includes/dcheese.h
@@ -6,6 +6,10 @@
HAR MadMax hardware
**************************************************************************/
+#ifndef MAME_INCLUDES_DCHEESE_H
+#define MAME_INCLUDES_DCHEESE_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/bsmt2000.h"
@@ -23,20 +27,27 @@ public:
m_audiocpu(*this, "audiocpu"),
m_screen(*this, "screen"),
m_bsmt(*this, "bsmt"),
- m_soundlatch(*this, "soundlatch") { }
+ m_soundlatch(*this, "soundlatch")
+ { }
void fredmem(machine_config &config);
void dcheese(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(sound_latch_state_r);
-private:
+protected:
enum
{
TIMER_BLITTER_SCANLINE,
TIMER_SIGNAL_IRQ
};
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
required_region_ptr<uint16_t> m_palrom;
required_region_ptr<uint8_t> m_gfxrom;
@@ -72,8 +83,6 @@ private:
DECLARE_WRITE16_MEMBER(blitter_vidparam_w);
DECLARE_WRITE16_MEMBER(blitter_unknown_w);
DECLARE_READ16_MEMBER(blitter_vidparam_r);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(dcheese);
uint32_t screen_update_dcheese(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(dcheese_vblank);
@@ -81,13 +90,11 @@ private:
void update_irq_state();
IRQ_CALLBACK_MEMBER(irq_callback);
void update_scanline_irq();
- void do_clear( );
- void do_blit( );
+ void do_clear();
+ void do_blit();
void main_cpu_map(address_map &map);
void sound_cpu_map(address_map &map);
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
-/*----------- defined in drivers/dcheese.c -----------*/
+#endif // MAME_INCLUDES_DCHEESE_H
diff --git a/src/mame/includes/dribling.h b/src/mame/includes/dribling.h
index 7995122248e..1018f149029 100644
--- a/src/mame/includes/dribling.h
+++ b/src/mame/includes/dribling.h
@@ -5,6 +5,10 @@
Model Racing Dribbling hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_DRIBLING_H
+#define MAME_INCLUDES_DRIBLING_H
+
+#pragma once
#include "machine/i8255.h"
#include "machine/watchdog.h"
@@ -13,17 +17,22 @@
class dribling_state : public driver_device
{
public:
- dribling_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ dribling_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_watchdog(*this, "watchdog"),
m_ppi8255_0(*this, "ppi8255_0"),
m_ppi8255_1(*this, "ppi8255_1"),
m_videoram(*this, "videoram"),
- m_colorram(*this, "colorram"){ }
+ m_colorram(*this, "colorram")
+ { }
void dribling(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
/* devices */
required_device<cpu_device> m_maincpu;
@@ -51,11 +60,11 @@ private:
DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_WRITE8_MEMBER(pb_w);
DECLARE_WRITE8_MEMBER(shr_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
DECLARE_PALETTE_INIT(dribling);
uint32_t screen_update_dribling(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(dribling_irq_gen);
void dribling_map(address_map &map);
void io_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_DRIBLING_H
diff --git a/src/mame/includes/efdt.h b/src/mame/includes/efdt.h
index e33b38f6b53..ff331efc155 100644
--- a/src/mame/includes/efdt.h
+++ b/src/mame/includes/efdt.h
@@ -1,9 +1,10 @@
// license:BSD-3-Clause
// copyright-holders: ElSemi, Roberto Fresca.
-
#ifndef MAME_INCLUDES_EFDT_H
#define MAME_INCLUDES_EFDT_H
+#pragma once
+
#include "machine/74259.h"
#include "emupal.h"
@@ -11,8 +12,8 @@
class efdt_state : public driver_device
{
public:
- efdt_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ efdt_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"),
@@ -23,6 +24,11 @@ public:
void efdt(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<gfxdecode_device> m_gfxdecode;
@@ -51,7 +57,6 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_VIDEO_START(efdt);
DECLARE_PALETTE_INIT(efdt);
DECLARE_WRITE_LINE_MEMBER(vblank_nmi_w);
diff --git a/src/mame/includes/epos.h b/src/mame/includes/epos.h
index 0138da7f7f0..84b39ccc23f 100644
--- a/src/mame/includes/epos.h
+++ b/src/mame/includes/epos.h
@@ -29,6 +29,10 @@ public:
void init_dealer();
+protected:
+ virtual void machine_start() override { m_leds.resolve(); }
+ virtual void machine_reset() override;
+
private:
DECLARE_WRITE8_MEMBER(dealer_decrypt_rom);
DECLARE_WRITE8_MEMBER(port_1_w);
@@ -37,7 +41,6 @@ private:
DECLARE_READ8_MEMBER(ay_porta_mpx_r);
DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_WRITE8_MEMBER(dealer_pal_w);
- virtual void machine_reset() override;
DECLARE_MACHINE_START(epos);
DECLARE_MACHINE_START(dealer);
DECLARE_PALETTE_INIT(epos);
@@ -48,8 +51,6 @@ private:
void epos_io_map(address_map &map);
void epos_map(address_map &map);
- virtual void machine_start() override { m_leds.resolve(); }
-
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
optional_ioport_array<2> m_inputs;
diff --git a/src/mame/includes/esd16.h b/src/mame/includes/esd16.h
index 6ac16c4d63c..126880dcda9 100644
--- a/src/mame/includes/esd16.h
+++ b/src/mame/includes/esd16.h
@@ -5,6 +5,10 @@
ESD 16 Bit Games
***************************************************************************/
+#ifndef MAME_INCLUDES_ESD16_H
+#define MAME_INCLUDES_ESD16_H
+
+#pragma once
#include "machine/eepromser.h"
#include "machine/gen_latch.h"
@@ -13,8 +17,8 @@
class esd16_state : public driver_device
{
public:
- esd16_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ esd16_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_vram_0(*this, "vram_0"),
m_vram_1(*this, "vram_1"),
m_scroll_0(*this, "scroll_0"),
@@ -29,7 +33,7 @@ public:
m_sprgen(*this, "spritegen"),
m_eeprom(*this, "eeprom"),
m_soundlatch(*this, "soundlatch")
- {}
+ { }
void jumppop(machine_config &config);
void esd16(machine_config &config);
@@ -38,6 +42,11 @@ public:
void hedpanio(machine_config &config);
void hedpanic(machine_config &config);
+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_vram_0;
@@ -79,9 +88,6 @@ private:
TILE_GET_INFO_MEMBER(get_tile_info_0_16x16);
TILE_GET_INFO_MEMBER(get_tile_info_1);
TILE_GET_INFO_MEMBER(get_tile_info_1_16x16);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_hedpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECOSPR_PRIORITY_CB_MEMBER(hedpanic_pri_callback);
void hedpanic_map(address_map &map);
@@ -99,3 +105,5 @@ private:
void esd16_sprite_area(address_map &map, u32 base);
void esd16_vram_area(address_map &map, u32 base);
};
+
+#endif // MAME_INCLUDES_ESD16_H
diff --git a/src/mame/includes/gotcha.h b/src/mame/includes/gotcha.h
index 5b9e998fb5f..0b533095761 100644
--- a/src/mame/includes/gotcha.h
+++ b/src/mame/includes/gotcha.h
@@ -35,6 +35,11 @@ public:
void gotcha(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
DECLARE_WRITE16_MEMBER(gotcha_lamps_w);
DECLARE_WRITE16_MEMBER(gotcha_fgvideoram_w);
@@ -46,9 +51,6 @@ private:
TILEMAP_MAPPER_MEMBER(gotcha_tilemap_scan);
TILE_GET_INFO_MEMBER(fg_get_tile_info);
TILE_GET_INFO_MEMBER(bg_get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_gotcha(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
inline void get_tile_info( tile_data &tileinfo, int tile_index ,uint16_t *vram, int color_offs);
void gotcha_map(address_map &map);
diff --git a/src/mame/includes/gumbo.h b/src/mame/includes/gumbo.h
index f9949459fee..2b766560396 100644
--- a/src/mame/includes/gumbo.h
+++ b/src/mame/includes/gumbo.h
@@ -5,21 +5,29 @@
Gumbo - Miss Bingo - Miss Puzzle
*************************************************************************/
+#ifndef MAME_INCLUDES_GUMBO_H
+#define MAME_INCLUDES_GUMBO_H
+
+#pragma once
class gumbo_state : public driver_device
{
public:
- gumbo_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ gumbo_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_bg_videoram(*this, "bg_videoram"),
m_fg_videoram(*this, "fg_videoram"),
m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode") { }
+ m_gfxdecode(*this, "gfxdecode")
+ { }
void mspuzzle(machine_config &config);
void dblpoint(machine_config &config);
void gumbo(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
/* memory pointers */
required_shared_ptr<uint16_t> m_bg_videoram;
@@ -28,15 +36,19 @@ private:
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+
DECLARE_WRITE16_MEMBER(gumbo_bg_videoram_w);
DECLARE_WRITE16_MEMBER(gumbo_fg_videoram_w);
TILE_GET_INFO_MEMBER(get_gumbo_bg_tile_info);
TILE_GET_INFO_MEMBER(get_gumbo_fg_tile_info);
- virtual void video_start() override;
uint32_t screen_update_gumbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
+
void dblpoint_map(address_map &map);
void gumbo_map(address_map &map);
void mspuzzle_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_GUMBO_H
diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h
index ed36b92e8c4..b8ef2b0638e 100644
--- a/src/mame/includes/ladyfrog.h
+++ b/src/mame/includes/ladyfrog.h
@@ -5,6 +5,10 @@
Lady Frog
*************************************************************************/
+#ifndef MAME_INCLUDES_LADYFROG_H
+#define MAME_INCLUDES_LADYFROG_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "sound/msm5232.h"
@@ -13,8 +17,8 @@
class ladyfrog_state : public driver_device
{
public:
- ladyfrog_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ladyfrog_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_scrlram(*this, "scrlram"),
m_maincpu(*this, "maincpu"),
@@ -22,11 +26,17 @@ public:
m_msm(*this, "msm"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_soundlatch(*this, "soundlatch") { }
+ m_soundlatch(*this, "soundlatch")
+ { }
void toucheme(machine_config &config);
void ladyfrog(machine_config &config);
+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_videoram;
@@ -74,9 +84,6 @@ private:
DECLARE_WRITE8_MEMBER(ladyfrog_scrlram_w);
DECLARE_WRITE8_MEMBER(unk_w);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_VIDEO_START(toucheme);
DECLARE_VIDEO_START(ladyfrog_common);
uint32_t screen_update_ladyfrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -85,3 +92,5 @@ private:
void ladyfrog_map(address_map &map);
void ladyfrog_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_LADYFROG_H
diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h
index 6886adf29f6..99c7c296455 100644
--- a/src/mame/includes/malzak.h
+++ b/src/mame/includes/malzak.h
@@ -5,6 +5,10 @@
Malzak
*************************************************************************/
+#ifndef MAME_INCLUDES_MALZAK_H
+#define MAME_INCLUDES_MALZAK_H
+
+#pragma once
#include "machine/s2636.h"
#include "video/saa5050.h"
@@ -15,15 +19,16 @@ class malzak_state : public driver_device
{
public:
malzak_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_s2636(*this, "s2636%u", 0U),
- m_trom(*this, "saa5050"),
- m_videoram(*this, "videoram"),
- m_gfxdecode(*this, "gfxdecode"),
- m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_mainbank(*this, "mainbank") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_s2636(*this, "s2636%u", 0U)
+ , m_trom(*this, "saa5050")
+ , m_videoram(*this, "videoram")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_screen(*this, "screen")
+ , m_palette(*this, "palette")
+ , m_mainbank(*this, "mainbank")
+ { }
void malzak(machine_config &config);
void malzak2(machine_config &config);
@@ -68,3 +73,5 @@ private:
void malzak_io_map(address_map &map);
void malzak_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MALZAK_H
diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h
index 8507b4f404f..3ba72fcffc9 100644
--- a/src/mame/includes/mcatadv.h
+++ b/src/mame/includes/mcatadv.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Paul Priest, David Haywood
+#ifndef MAME_INCLUDES_MCATADV_H
+#define MAME_INCLUDES_MCATADV_H
+
+#pragma once
#include "machine/watchdog.h"
#include "emupal.h"
@@ -64,3 +68,5 @@ private:
void nost_sound_io_map(address_map &map);
void nost_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MCATADV_H
diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h
index 8c2ad54aeca..19adb0a5116 100644
--- a/src/mame/includes/micro3d.h
+++ b/src/mame/includes/micro3d.h
@@ -24,21 +24,6 @@
#define DRMATH_MONITOR_DISPLAY 0
-struct micro3d_vtx
-{
- int32_t x, y, z;
-};
-
-enum planes
-{
- CLIP_Z_MIN,
- CLIP_Z_MAX,
- CLIP_X_MIN,
- CLIP_X_MAX,
- CLIP_Y_MIN,
- CLIP_Y_MAX
-};
-
class micro3d_sound_device;
class micro3d_state : public driver_device
@@ -75,12 +60,36 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(botss_hwchk_r);
-private:
+protected:
enum
{
TIMER_MAC_DONE
};
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ virtual void video_reset() override;
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
+ enum planes
+ {
+ CLIP_Z_MIN,
+ CLIP_Z_MAX,
+ CLIP_X_MIN,
+ CLIP_X_MAX,
+ CLIP_Y_MIN,
+ CLIP_Y_MAX
+ };
+
+ struct micro3d_vtx
+ {
+ int32_t x, y, z;
+
+ constexpr int64_t dot_product(micro3d_vtx const &that) const;
+ };
+
required_device<cpu_device> m_maincpu;
required_device<i8051_device> m_audiocpu;
required_device<upd7759_device> m_upd7759;
@@ -170,9 +179,6 @@ private:
DECLARE_WRITE8_MEMBER(micro3d_sound_p3_w);
DECLARE_READ8_MEMBER(micro3d_sound_p1_r);
DECLARE_READ8_MEMBER(micro3d_sound_p3_r);
- virtual void machine_reset() override;
- virtual void video_start() override;
- virtual void video_reset() override;
INTERRUPT_GEN_MEMBER(micro3d_vblank);
TIMER_CALLBACK_MEMBER(mac_done_callback);
DECLARE_WRITE8_MEMBER(micro3d_upd7759_w);
@@ -201,8 +207,6 @@ private:
void soundmem_prg(address_map &map);
void vgbmem(address_map &map);
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
required_device<mc2661_device> m_vgb_uart;
};
diff --git a/src/mame/includes/mosaic.h b/src/mame/includes/mosaic.h
index 7fd9ae57d3c..094ddaa6c30 100644
--- a/src/mame/includes/mosaic.h
+++ b/src/mame/includes/mosaic.h
@@ -5,20 +5,30 @@
Mosaic
*************************************************************************/
+#ifndef MAME_INCLUDES_MOSAIC_H
+#define MAME_INCLUDES_MOSAIC_H
+
+#pragma once
class mosaic_state : public driver_device
{
public:
- mosaic_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ mosaic_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_fgvideoram(*this, "fgvideoram"),
- m_bgvideoram(*this, "bgvideoram") { }
+ m_bgvideoram(*this, "bgvideoram")
+ { }
void mosaic(machine_config &config);
void gfire2(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
/* devices */
required_device<cpu_device> m_maincpu;
@@ -45,13 +55,11 @@ private:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- 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);
void gfire2_io_map(address_map &map);
void gfire2_map(address_map &map);
void mosaic_io_map(address_map &map);
void mosaic_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MOSAIC_H
diff --git a/src/mame/includes/news.h b/src/mame/includes/news.h
index a50042bb49f..257c4559361 100644
--- a/src/mame/includes/news.h
+++ b/src/mame/includes/news.h
@@ -1,18 +1,28 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_NEWS_H
+#define MAME_INCLUDES_NEWS_H
+
+#pragma once
class news_state : public driver_device
{
public:
- news_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ news_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_bgram(*this, "bgram"),
m_fgram(*this, "fgram"),
m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode") { }
+ m_gfxdecode(*this, "gfxdecode")
+ { }
void news(machine_config &config);
+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_bgram;
@@ -22,16 +32,17 @@ private:
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
int m_bgpic;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+
DECLARE_WRITE8_MEMBER(news_fgram_w);
DECLARE_WRITE8_MEMBER(news_bgram_w);
DECLARE_WRITE8_MEMBER(news_bgpic_w);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_news(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
void news_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_NEWS_H
diff --git a/src/mame/includes/norautp.h b/src/mame/includes/norautp.h
index a756367572f..6ff08a24bb2 100644
--- a/src/mame/includes/norautp.h
+++ b/src/mame/includes/norautp.h
@@ -49,6 +49,10 @@ public:
void init_enc();
void init_deb();
+protected:
+ virtual void machine_start() override { m_lamps.resolve(); }
+ virtual void video_start() override;
+
private:
DECLARE_WRITE_LINE_MEMBER(ppi2_obf_w);
TIMER_CALLBACK_MEMBER(ppi2_ack);
@@ -74,9 +78,6 @@ private:
void nortest1_map(address_map &map);
void ssjkrpkr_map(address_map &map);
- virtual void machine_start() override { m_lamps.resolve(); }
- virtual void video_start() override;
-
std::unique_ptr<uint16_t[]> m_np_vram;
required_device<cpu_device> m_maincpu;
required_device_array<i8255_device, 3> m_ppi8255;
diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h
index a23e606c4be..aaa3fd9dcff 100644
--- a/src/mame/includes/oneshot.h
+++ b/src/mame/includes/oneshot.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Paul Priest
+#ifndef MAME_INCLUDES_ONESHOT_H
+#define MAME_INCLUDES_ONESHOT_H
+
+#pragma once
#include "sound/okim6295.h"
#include "emupal.h"
@@ -7,8 +11,8 @@
class oneshot_state : public driver_device
{
public:
- oneshot_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ oneshot_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_sprites(*this, "sprites"),
m_bg_videoram(*this, "bg_videoram"),
m_mid_videoram(*this, "mid_videoram"),
@@ -17,11 +21,17 @@ public:
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
void maddonna(machine_config &config);
void oneshot(machine_config &config);
+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_sprites;
@@ -46,6 +56,10 @@ private:
/* devices */
required_device<cpu_device> m_maincpu;
+ required_device<okim6295_device> m_oki;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+
DECLARE_READ16_MEMBER(oneshot_in0_word_r);
DECLARE_READ16_MEMBER(oneshot_gun_x_p1_r);
DECLARE_READ16_MEMBER(oneshot_gun_y_p1_r);
@@ -58,16 +72,12 @@ private:
TILE_GET_INFO_MEMBER(get_oneshot_bg_tile_info);
TILE_GET_INFO_MEMBER(get_oneshot_mid_tile_info);
TILE_GET_INFO_MEMBER(get_oneshot_fg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
uint32_t screen_update_oneshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_maddonna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_crosshairs( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
- required_device<okim6295_device> m_oki;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
void oneshot_map(address_map &map);
void oneshot_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_ONESHOT_H
diff --git a/src/mame/includes/pass.h b/src/mame/includes/pass.h
index 1c343cc5948..c27be53d147 100644
--- a/src/mame/includes/pass.h
+++ b/src/mame/includes/pass.h
@@ -19,6 +19,12 @@ public:
{
}
+ void pass(machine_config &config);
+
+protected:
+ virtual void video_start() override;
+
+private:
DECLARE_WRITE16_MEMBER(pass_bg_videoram_w);
DECLARE_WRITE16_MEMBER(pass_fg_videoram_w);
TILE_GET_INFO_MEMBER(get_pass_bg_tile_info);
@@ -26,14 +32,10 @@ public:
uint32_t screen_update_pass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void pass(machine_config &config);
void pass_map(address_map &map);
void pass_sound_io_map(address_map &map);
void pass_sound_map(address_map &map);
-protected:
- virtual void video_start() override;
-private:
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
diff --git a/src/mame/includes/polyplay.h b/src/mame/includes/polyplay.h
index 3fbf90bcc59..bf9867934f6 100644
--- a/src/mame/includes/polyplay.h
+++ b/src/mame/includes/polyplay.h
@@ -42,6 +42,10 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(input_changed);
+protected:
+ virtual void machine_start() override { m_lamps.resolve(); }
+ virtual void video_start() override;
+
private:
INTERRUPT_GEN_MEMBER(nmi_handler);
@@ -55,7 +59,6 @@ private:
DECLARE_READ8_MEMBER(pio_portb_r);
DECLARE_WRITE8_MEMBER(pio_portb_w);
-
DECLARE_WRITE8_MEMBER(polyplay_characterram_w);
DECLARE_PALETTE_INIT(polyplay);
uint32_t screen_update_polyplay(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -64,9 +67,6 @@ private:
void polyplay_mem_zre(address_map &map);
void polyplay_mem_zrepp(address_map &map);
- virtual void machine_start() override { m_lamps.resolve(); }
- virtual void video_start() override;
-
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_characterram;
diff --git a/src/mame/includes/taxidriv.h b/src/mame/includes/taxidriv.h
index 0bd8d094315..2911878a28d 100644
--- a/src/mame/includes/taxidriv.h
+++ b/src/mame/includes/taxidriv.h
@@ -1,13 +1,17 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+#ifndef MAME_INCLUDES_TAXIDRIV_H
+#define MAME_INCLUDES_TAXIDRIV_H
+
+#pragma once
#include "emupal.h"
class taxidriv_state : public driver_device
{
public:
- taxidriv_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ taxidriv_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"),
@@ -19,10 +23,14 @@ public:
m_vram5(*this, "vram5"),
m_vram6(*this, "vram6"),
m_vram7(*this, "vram7"),
- m_scroll(*this, "scroll") { }
+ m_scroll(*this, "scroll")
+ { }
void taxidriv(machine_config &config);
+protected:
+ virtual void machine_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -69,7 +77,6 @@ private:
DECLARE_WRITE8_MEMBER(p8910_0b_w);
DECLARE_WRITE8_MEMBER(spritectrl_w);
- virtual void machine_start() override;
DECLARE_PALETTE_INIT(taxidriv);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -78,3 +85,5 @@ private:
void cpu3_port_map(address_map &map);
void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TAXIDRIV_H
diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h
index 25e7494bb01..1052d334be4 100644
--- a/src/mame/includes/thedeep.h
+++ b/src/mame/includes/thedeep.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Luca Elia
+#ifndef MAME_INCLUDES_THEDEEP_H
+#define MAME_INCLUDES_THEDEEP_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "machine/timer.h"
@@ -10,8 +14,8 @@
class thedeep_state : public driver_device
{
public:
- thedeep_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ thedeep_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_audiocpu(*this, "audiocpu"),
m_mcu(*this, "mcu"),
@@ -24,10 +28,15 @@ public:
m_vram_1(*this, "vram_1"),
m_scroll(*this, "scroll"),
m_scroll2(*this, "scroll2")
- { }
+ { }
void thedeep(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<cpu_device> m_audiocpu;
@@ -69,9 +78,6 @@ private:
TILE_GET_INFO_MEMBER(get_tile_info_0);
TILE_GET_INFO_MEMBER(get_tile_info_1);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(thedeep);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -82,3 +88,5 @@ private:
void audio_map(address_map &map);
void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_THEDEEP_H
diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h
index 18a5bcc2a54..8c12fa66165 100644
--- a/src/mame/includes/truco.h
+++ b/src/mame/includes/truco.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi, Roberto Fresca
+#ifndef MAME_INCLUDES_TRUCO_H
+#define MAME_INCLUDES_TRUCO_H
+
+#pragma once
#include "machine/watchdog.h"
#include "sound/dac.h"
@@ -8,16 +12,21 @@
class truco_state : public driver_device
{
public:
- truco_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ truco_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_watchdog(*this, "watchdog"),
m_dac(*this, "dac"),
m_videoram(*this, "videoram"),
- m_battery_ram(*this, "battery_ram") { }
+ m_battery_ram(*this, "battery_ram")
+ { }
void truco(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<watchdog_timer_device> m_watchdog;
@@ -34,8 +43,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
DECLARE_WRITE_LINE_MEMBER(pia_irqb_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
DECLARE_PALETTE_INIT(truco);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -43,3 +50,5 @@ private:
INTERRUPT_GEN_MEMBER(interrupt);
void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_TRUCO_H
diff --git a/src/mame/includes/trucocl.h b/src/mame/includes/trucocl.h
index a8b4ab4580d..324098e7ef5 100644
--- a/src/mame/includes/trucocl.h
+++ b/src/mame/includes/trucocl.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Ernesto Corvi
+#ifndef MAME_INCLUDES_TRUCOCL_H
+#define MAME_INCLUDES_TRUCOCL_H
+
+#pragma once
#include "sound/dac.h"
#include "emupal.h"
@@ -19,12 +23,18 @@ public:
void init_trucocl();
-private:
+protected:
enum
{
TIMER_DAC_IRQ
};
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
int m_cur_dac_address;
int m_cur_dac_address_index;
required_shared_ptr<uint8_t> m_videoram;
@@ -39,7 +49,6 @@ private:
DECLARE_WRITE8_MEMBER(trucocl_colorram_w);
DECLARE_WRITE8_MEMBER(audio_dac_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(trucocl);
uint32_t screen_update_trucocl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(trucocl_interrupt);
@@ -49,7 +58,6 @@ private:
void main_map(address_map &map);
void main_io(address_map &map);
-
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual void machine_reset() override;
};
+
+#endif // MAME_INCLUDES_TRUCOCL_H
diff --git a/src/mame/includes/usgames.h b/src/mame/includes/usgames.h
index 136303e8166..6c0280cea19 100644
--- a/src/mame/includes/usgames.h
+++ b/src/mame/includes/usgames.h
@@ -1,22 +1,31 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Nicola Salmoria
+#ifndef MAME_INCLUDES_USGAMES_H
+#define MAME_INCLUDES_USGAMES_H
+
+#pragma once
#include "emupal.h"
class usgames_state : public driver_device
{
public:
- usgames_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ usgames_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_videoram(*this, "videoram"),
m_charram(*this, "charram"),
- m_leds(*this, "led%u", 0U) { }
+ m_leds(*this, "led%u", 0U)
+ { }
void usg32(machine_config &config);
void usg185(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
@@ -36,11 +45,11 @@ private:
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(usgames);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void usg185_map(address_map &map);
void usgames_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_USGAMES_H
diff --git a/src/mame/includes/xyonix.h b/src/mame/includes/xyonix.h
index 381022d981f..e56727f6f7d 100644
--- a/src/mame/includes/xyonix.h
+++ b/src/mame/includes/xyonix.h
@@ -1,19 +1,29 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_XYONIX_H
+#define MAME_INCLUDES_XYONIX_H
+
+#pragma once
#include "emupal.h"
class xyonix_state : public driver_device
{
public:
- xyonix_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ xyonix_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_vidram(*this, "vidram") { }
+ m_vidram(*this, "vidram")
+ { }
void xyonix(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<gfxdecode_device> m_gfxdecode;
@@ -35,9 +45,6 @@ private:
DECLARE_WRITE8_MEMBER(io_w);
DECLARE_WRITE8_MEMBER(vidram_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
TILE_GET_INFO_MEMBER(get_tile_info);
DECLARE_PALETTE_INIT(xyonix);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -46,3 +53,5 @@ private:
void main_map(address_map &map);
void port_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_XYONIX_H
diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp
index 2bb8b87ed50..f188a24754b 100644
--- a/src/mame/machine/micro3d.cpp
+++ b/src/mame/machine/micro3d.cpp
@@ -109,12 +109,12 @@ WRITE8_MEMBER( micro3d_state::vgb_uart_w )
*
*************************************/
-static inline int64_t dot_product(micro3d_vtx *v1, micro3d_vtx *v2)
+inline constexpr int64_t micro3d_state::micro3d_vtx::dot_product(micro3d_vtx const &that) const
{
- int64_t result = ((int64_t)v1->x * (int64_t)v2->x) +
- ((int64_t)v1->y * (int64_t)v2->y) +
- ((int64_t)v1->z * (int64_t)v2->z);
- return result;
+ return
+ (int64_t(x) * int64_t(that.x)) +
+ (int64_t(y) * int64_t(that.y)) +
+ (int64_t(z) * int64_t(that.z));
}
static inline int64_t normalised_multiply(int32_t a, int32_t b)
@@ -280,23 +280,19 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
case 0x11: cnt += 0x100;
case 0x10:
{
- int i;
micro3d_vtx v2;
-
v2.x = mac_sram[mrab11 + 0x7fc];
v2.y = mac_sram[mrab11 + 0x7fd];
v2.z = mac_sram[mrab11 + 0x7fe];
- for (i = 0; i <= cnt; ++i)
+ for (int i = 0; i <= cnt; ++i)
{
micro3d_vtx v1;
- int64_t dp;
-
v1.x = mac_sram[sram_r_addr++];
v1.y = mac_sram[sram_r_addr++];
v1.z = mac_sram[sram_r_addr++];
- dp = dot_product(&v1, &v2);
+ int64_t const dp = v1.dot_product(v2);
mac_sram[sram_w_addr++] = dp >> 32;
mac_sram[sram_w_addr++] = dp & 0xffffffff;
mac_sram[sram_w_addr++] = 0;
@@ -310,23 +306,19 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
case 0x15: cnt += 0x100;
case 0x14:
{
- int i;
-
- for (i = 0; i <= cnt; ++i)
+ for (int i = 0; i <= cnt; ++i)
{
micro3d_vtx v1;
- micro3d_vtx v2;
- int64_t dp;
-
v1.x = mac_sram[sram_r_addr++];
v1.y = mac_sram[sram_r_addr++];
v1.z = mac_sram[sram_r_addr++];
+ micro3d_vtx v2;
v2.x = mac_sram[vtx_addr++];
v2.y = mac_sram[vtx_addr++];
v2.z = mac_sram[vtx_addr++];
- dp = dot_product(&v1, &v2);
+ int64_t const dp = v1.dot_product(v2);
mac_sram[sram_w_addr++] = dp >> 32;
mac_sram[sram_w_addr++] = dp & 0xffffffff;
mac_sram[sram_w_addr++] = 0;
diff --git a/src/mame/video/micro3d.cpp b/src/mame/video/micro3d.cpp
index 8a8a177e68f..7efaae37aca 100644
--- a/src/mame/video/micro3d.cpp
+++ b/src/mame/video/micro3d.cpp
@@ -145,15 +145,14 @@ int micro3d_state::inside(micro3d_vtx *v, enum planes plane)
return 0;
}
-/* Calculate where two points intersect */
-micro3d_vtx micro3d_state::intersect(micro3d_vtx *v1, micro3d_vtx *v2, enum planes plane)
+// Calculate where two points intersect
+micro3d_state::micro3d_vtx micro3d_state::intersect(micro3d_vtx *v1, micro3d_vtx *v2, enum planes plane)
{
float m = 0.0;
- micro3d_vtx vo = { 0, 0, 0 };
-
if (v1->x != v2->x)
- m = (float)(v1->y - v2->y) / (float)(v1->x - v2->x);
+ m = float(v1->y - v2->y) / float(v1->x - v2->x);
+ micro3d_vtx vo = { 0, 0, 0 };
switch (plane)
{
case CLIP_Z_MIN:
@@ -162,8 +161,8 @@ micro3d_vtx micro3d_state::intersect(micro3d_vtx *v1, micro3d_vtx *v2, enum plan
if (v1->z != v2->z)
{
- mxz = (float)(v1->x - v2->x) / (float)(v1->z - v2->z);
- myz = (float)(v1->y - v2->y) / (float)(v1->z - v2->z);
+ mxz = float(v1->x - v2->x) / float(v1->z - v2->z);
+ myz = float(v1->y - v2->y) / float(v1->z - v2->z);
}
else
{
@@ -182,8 +181,8 @@ micro3d_vtx micro3d_state::intersect(micro3d_vtx *v1, micro3d_vtx *v2, enum plan
if (v1->z != v2->z)
{
- mxz = (float)(v1->x - v2->x) / (float)(v1->z - v2->z);
- myz = (float)(v1->y - v2->y) / (float)(v1->z - v2->z);
+ mxz = float(v1->x - v2->x) / float(v1->z - v2->z);
+ myz = float(v1->y - v2->y) / float(v1->z - v2->z);
}
else
{