summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-02-19 20:34:33 +1100
committer Vas Crabb <vas@vastheman.com>2018-02-19 20:34:33 +1100
commit8b1bc128e5568a713bc280d78623fcb3f7805b2a (patch)
treebc20f49cedae1f436469e6442cb3240b3882f37f /src/mame/includes
parent1d31c19472f4c63955dcfba1f7e393bbe553afda (diff)
backport lots of cleanup from WIP branch (nw)
Diffstat (limited to 'src/mame/includes')
-rw-r--r--src/mame/includes/arcadia.h42
-rw-r--r--src/mame/includes/atarig42.h83
-rw-r--r--src/mame/includes/atarigx2.h61
-rw-r--r--src/mame/includes/badlands.h3
-rw-r--r--src/mame/includes/batman.h40
-rw-r--r--src/mame/includes/beathead.h60
-rw-r--r--src/mame/includes/blstroid.h45
-rw-r--r--src/mame/includes/bsktball.h58
-rw-r--r--src/mame/includes/canyon.h39
-rw-r--r--src/mame/includes/carpolo.h29
-rw-r--r--src/mame/includes/ccastles.h80
-rw-r--r--src/mame/includes/cloak.h45
-rw-r--r--src/mame/includes/cloud9.h70
-rw-r--r--src/mame/includes/copsnrob.h38
-rw-r--r--src/mame/includes/cyberbal.h44
-rw-r--r--src/mame/includes/cybstorm.h42
-rw-r--r--src/mame/includes/dragrace.h46
-rw-r--r--src/mame/includes/eprom.h60
-rw-r--r--src/mame/includes/equites.h80
-rw-r--r--src/mame/includes/exidy440.h114
-rw-r--r--src/mame/includes/foodf.h48
-rw-r--r--src/mame/includes/gauntlet.h82
-rw-r--r--src/mame/includes/gridlee.h61
-rw-r--r--src/mame/includes/irobot.h115
-rw-r--r--src/mame/includes/jedi.h71
-rw-r--r--src/mame/includes/klax.h21
-rw-r--r--src/mame/includes/lynx.h217
-rw-r--r--src/mame/includes/metalmx.h53
-rw-r--r--src/mame/includes/nitedrvr.h54
-rw-r--r--src/mame/includes/offtwall.h51
-rw-r--r--src/mame/includes/ohmygod.h49
-rw-r--r--src/mame/includes/orbit.h8
-rw-r--r--src/mame/includes/pcw16.h78
-rw-r--r--src/mame/includes/pecom.h43
-rw-r--r--src/mame/includes/poolshrk.h46
-rw-r--r--src/mame/includes/rampart.h44
-rw-r--r--src/mame/includes/relief.h50
-rw-r--r--src/mame/includes/shuuz.h25
-rw-r--r--src/mame/includes/skullxbo.h49
-rw-r--r--src/mame/includes/skydiver.h42
-rw-r--r--src/mame/includes/skyraid.h42
-rw-r--r--src/mame/includes/sprint8.h60
-rw-r--r--src/mame/includes/starshp1.h74
-rw-r--r--src/mame/includes/super6.h11
-rw-r--r--src/mame/includes/tank8.h59
-rw-r--r--src/mame/includes/thunderj.h40
-rw-r--r--src/mame/includes/toobin.h52
-rw-r--r--src/mame/includes/triplhnt.h67
-rw-r--r--src/mame/includes/ultratnk.h52
-rw-r--r--src/mame/includes/vertigo.h195
-rw-r--r--src/mame/includes/victory.h101
-rw-r--r--src/mame/includes/videopin.h54
-rw-r--r--src/mame/includes/vindictr.h46
-rw-r--r--src/mame/includes/wrally.h9
-rw-r--r--src/mame/includes/wswan.h90
-rw-r--r--src/mame/includes/xybots.h42
-rw-r--r--src/mame/includes/z88.h36
57 files changed, 1946 insertions, 1370 deletions
diff --git a/src/mame/includes/arcadia.h b/src/mame/includes/arcadia.h
index eb03c399a66..46088c6d63f 100644
--- a/src/mame/includes/arcadia.h
+++ b/src/mame/includes/arcadia.h
@@ -5,10 +5,11 @@
* includes/arcadia.h
*
****************************************************************************/
-
#ifndef MAME_INCLUDES_ARCADIA_H
#define MAME_INCLUDES_ARCADIA_H
+#pragma once
+
#include "cpu/s2650/s2650.h"
#include "audio/arcadia.h"
@@ -30,8 +31,8 @@
class arcadia_state : public driver_device
{
public:
- arcadia_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ arcadia_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_custom(*this, "custom"),
m_panel(*this, "panel"),
m_controller1_col1(*this, "controller1_col1"),
@@ -47,11 +48,30 @@ public:
m_cart(*this, "cartslot"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_screen(*this, "screen") { }
+ m_screen(*this, "screen")
+ { }
+
+ DECLARE_DRIVER_INIT(arcadia);
+ void arcadia(machine_config &config);
+protected:
DECLARE_READ_LINE_MEMBER(vsync_r);
DECLARE_READ8_MEMBER(video_r);
DECLARE_WRITE8_MEMBER(video_w);
+
+ virtual void machine_start() override;
+ virtual void video_start() override;
+ DECLARE_PALETTE_INIT(arcadia);
+ uint32_t screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(video_line);
+ void arcadia_mem(address_map &map);
+
+ void draw_char(uint8_t *ch, int charcode, int y, int x);
+ void vh_draw_line(int y, uint8_t chars1[16]);
+ int sprite_collision(int n1, int n2);
+ void draw_sprites();
+
+private:
int m_line;
int m_charline;
int m_shift;
@@ -96,16 +116,7 @@ public:
} d;
} m_reg;
std::unique_ptr<bitmap_ind16> m_bitmap;
- DECLARE_DRIVER_INIT(arcadia);
- virtual void machine_start() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(arcadia);
- uint32_t screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(video_line);
- void arcadia(machine_config &config);
- void arcadia_mem(address_map &map);
-protected:
required_device<arcadia_sound_device> m_custom;
required_ioport m_panel;
required_ioport m_controller1_col1;
@@ -118,14 +129,11 @@ protected:
required_ioport m_controller2_extra;
required_ioport m_joysticks;
- void draw_char(uint8_t *ch, int charcode, int y, int x);
- void vh_draw_line(int y, uint8_t chars1[16]);
- int sprite_collision(int n1, int n2);
- void draw_sprites();
required_device<cpu_device> m_maincpu;
required_device<arcadia_cart_slot_device> m_cart;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
};
+
#endif // MAME_INCLUDES_ARCADIA_H
diff --git a/src/mame/includes/atarig42.h b/src/mame/includes/atarig42.h
index 27b4f5cd26b..0e3d0364640 100644
--- a/src/mame/includes/atarig42.h
+++ b/src/mame/includes/atarig42.h
@@ -5,6 +5,10 @@
Atari G42 hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_ATARIG42_H
+#define MAME_INCLUDES_ATARIG42_H
+
+#pragma once
#include "audio/atarijsa.h"
#include "machine/atarigen.h"
@@ -15,14 +19,33 @@
class atarig42_state : public atarigen_state
{
public:
- atarig42_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_rle(*this, "rle"),
- m_asic65(*this, "asic65"),
- m_mo_command(*this, "mo_command") { }
+ atarig42_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_rle(*this, "rle"),
+ m_asic65(*this, "asic65"),
+ m_mo_command(*this, "mo_command")
+ { }
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void update_interrupts() override;
+ virtual void scanline_update(screen_device &screen, int scanline) override;
+ DECLARE_READ16_MEMBER(special_port2_r);
+ DECLARE_WRITE16_MEMBER(a2d_select_w);
+ DECLARE_READ16_MEMBER(a2d_data_r);
+ DECLARE_WRITE16_MEMBER(io_latch_w);
+ DECLARE_WRITE16_MEMBER(mo_command_w);
+ TILE_GET_INFO_MEMBER(get_alpha_tile_info);
+ TILE_GET_INFO_MEMBER(get_playfield_tile_info);
+ TILEMAP_MAPPER_MEMBER(atarig42_playfield_scan);
+ DECLARE_VIDEO_START(atarig42);
+ uint32_t screen_update_atarig42(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void atarig42(machine_config &config);
+ void main_map(address_map &map);
required_device<atari_jsa_iii_device> m_jsa;
@@ -49,30 +72,32 @@ public:
uint16_t * m_sloop_base;
uint32_t m_last_accesses[8];
- virtual void update_interrupts() override;
- virtual void scanline_update(screen_device &screen, int scanline) override;
- DECLARE_READ16_MEMBER(special_port2_r);
- DECLARE_WRITE16_MEMBER(a2d_select_w);
- DECLARE_READ16_MEMBER(a2d_data_r);
- DECLARE_WRITE16_MEMBER(io_latch_w);
- DECLARE_WRITE16_MEMBER(mo_command_w);
+};
+
+class atarig42_0x200_state : public atarig42_state
+{
+public:
+ using atarig42_state::atarig42_state;
+ DECLARE_DRIVER_INIT(roadriot);
+ void atarig42_0x200(machine_config &config);
+
+protected:
DECLARE_READ16_MEMBER(roadriot_sloop_data_r);
DECLARE_WRITE16_MEMBER(roadriot_sloop_data_w);
- DECLARE_READ16_MEMBER(guardians_sloop_data_r);
- DECLARE_WRITE16_MEMBER(guardians_sloop_data_w);
void roadriot_sloop_tweak(int offset);
- void guardians_sloop_tweak(int offset);
- DECLARE_DRIVER_INIT(roadriot);
+};
+
+class atarig42_0x400_state : public atarig42_state
+{
+public:
+ using atarig42_state::atarig42_state;
DECLARE_DRIVER_INIT(guardian);
- TILE_GET_INFO_MEMBER(get_alpha_tile_info);
- TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- TILEMAP_MAPPER_MEMBER(atarig42_playfield_scan);
- DECLARE_MACHINE_START(atarig42);
- DECLARE_MACHINE_RESET(atarig42);
- DECLARE_VIDEO_START(atarig42);
- uint32_t screen_update_atarig42(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void atarig42(machine_config &config);
- void atarig42_0x200(machine_config &config);
void atarig42_0x400(machine_config &config);
- void main_map(address_map &map);
+
+protected:
+ DECLARE_READ16_MEMBER(guardians_sloop_data_r);
+ DECLARE_WRITE16_MEMBER(guardians_sloop_data_w);
+ void guardians_sloop_tweak(int offset);
};
+
+#endif // MAME_INCLUDES_ATARIG42_H
diff --git a/src/mame/includes/atarigx2.h b/src/mame/includes/atarigx2.h
index ed924edcf0e..3e0db334f50 100644
--- a/src/mame/includes/atarigx2.h
+++ b/src/mame/includes/atarigx2.h
@@ -5,6 +5,10 @@
Atari GX2 hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_ATARIGX2_H
+#define MAME_INCLUDES_ATARIGX2_H
+
+#pragma once
#include "audio/atarijsa.h"
#include "machine/atarigen.h"
@@ -25,6 +29,35 @@ public:
, m_rle(*this, "rle")
{ }
+ DECLARE_DRIVER_INIT(spclords);
+ DECLARE_DRIVER_INIT(rrreveng);
+ DECLARE_DRIVER_INIT(motofren);
+ void atarigx2_0x200(machine_config &config);
+ void atarigx2_0x400(machine_config &config);
+
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ virtual void update_interrupts() override;
+ virtual void scanline_update(screen_device &screen, int scanline) override;
+ DECLARE_READ32_MEMBER(special_port2_r);
+ DECLARE_READ32_MEMBER(special_port3_r);
+ DECLARE_READ32_MEMBER(a2d_data_r);
+ DECLARE_WRITE32_MEMBER(latch_w);
+ DECLARE_WRITE32_MEMBER(mo_command_w);
+ DECLARE_WRITE32_MEMBER(atarigx2_protection_w);
+ DECLARE_READ32_MEMBER(atarigx2_protection_r);
+ DECLARE_READ32_MEMBER(rrreveng_prot_r);
+ TILE_GET_INFO_MEMBER(get_alpha_tile_info);
+ TILE_GET_INFO_MEMBER(get_playfield_tile_info);
+ TILEMAP_MAPPER_MEMBER(atarigx2_playfield_scan);
+ uint32_t screen_update_atarigx2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_WRITE16_MEMBER( atarigx2_mo_control_w );
+
+ void atarigx2(machine_config &config);
+ void main_map(address_map &map);
+
+private:
uint16_t m_playfield_base;
required_device<atari_jsa_iiis_device> m_jsa;
@@ -46,30 +79,6 @@ public:
uint16_t m_last_write;
uint16_t m_last_write_offset;
uint32_t m_protection_ram[0x1000];
-
- virtual void update_interrupts() override;
- virtual void scanline_update(screen_device &screen, int scanline) override;
- DECLARE_READ32_MEMBER(special_port2_r);
- DECLARE_READ32_MEMBER(special_port3_r);
- DECLARE_READ32_MEMBER(a2d_data_r);
- DECLARE_WRITE32_MEMBER(latch_w);
- DECLARE_WRITE32_MEMBER(mo_command_w);
- DECLARE_WRITE32_MEMBER(atarigx2_protection_w);
- DECLARE_READ32_MEMBER(atarigx2_protection_r);
- DECLARE_READ32_MEMBER(rrreveng_prot_r);
- DECLARE_DRIVER_INIT(spclords);
- DECLARE_DRIVER_INIT(rrreveng);
- DECLARE_DRIVER_INIT(motofren);
- TILE_GET_INFO_MEMBER(get_alpha_tile_info);
- TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- TILEMAP_MAPPER_MEMBER(atarigx2_playfield_scan);
- DECLARE_MACHINE_START(atarigx2);
- DECLARE_MACHINE_RESET(atarigx2);
- DECLARE_VIDEO_START(atarigx2);
- uint32_t screen_update_atarigx2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE16_MEMBER( atarigx2_mo_control_w );
- void atarigx2(machine_config &config);
- void atarigx2_0x200(machine_config &config);
- void atarigx2_0x400(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_ATARIGX2_H
diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h
index f0210875e4d..fdc7229d77f 100644
--- a/src/mame/includes/badlands.h
+++ b/src/mame/includes/badlands.h
@@ -5,10 +5,11 @@
Atari Bad Lands hardware
*************************************************************************/
-
#ifndef MAME_INCLUDES_BADLANDS_H
#define MAME_INCLUDES_BADLANDS_H
+#pragma once
+
#include "cpu/z80/z80.h"
#include "cpu/m68000/m68000.h"
#include "cpu/m6502/m6502.h"
diff --git a/src/mame/includes/batman.h b/src/mame/includes/batman.h
index c07af93c81f..1b8094ea01e 100644
--- a/src/mame/includes/batman.h
+++ b/src/mame/includes/batman.h
@@ -5,6 +5,10 @@
Atari Batman hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_BATMAN_H
+#define MAME_INCLUDES_BATMAN_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,29 +17,35 @@
class batman_state : public atarigen_state
{
public:
- batman_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_vad(*this, "vad") { }
-
- required_device<atari_jsa_iii_device> m_jsa;
- required_device<atari_vad_device> m_vad;
+ batman_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_vad(*this, "vad")
+ { }
- uint16_t m_latch_data;
- uint8_t m_alpha_tile_bank;
+ DECLARE_DRIVER_INIT(batman);
+ void batman(machine_config &config);
- virtual void update_interrupts() override;
+protected:
+ virtual void machine_start() override;
DECLARE_WRITE16_MEMBER(latch_w);
- DECLARE_DRIVER_INIT(batman);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
- DECLARE_MACHINE_START(batman);
- DECLARE_MACHINE_RESET(batman);
DECLARE_VIDEO_START(batman);
uint32_t screen_update_batman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void batman(machine_config &config);
+ virtual void update_interrupts() override;
void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_iii_device> m_jsa;
+ required_device<atari_vad_device> m_vad;
+
+ uint16_t m_latch_data;
+ uint8_t m_alpha_tile_bank;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_BATMAN_H
diff --git a/src/mame/includes/beathead.h b/src/mame/includes/beathead.h
index f51248e8989..b475a430a9a 100644
--- a/src/mame/includes/beathead.h
+++ b/src/mame/includes/beathead.h
@@ -5,6 +5,10 @@
Atari "Stella on Steroids" hardware
***************************************************************************/
+#ifndef MAME_INCLUDES_BEATHEAD_H
+#define MAME_INCLUDES_BEATHEAD_H
+
+#pragma once
#include "machine/atarigen.h"
#include "machine/timer.h"
@@ -14,8 +18,8 @@
class beathead_state : public atarigen_state
{
public:
- beathead_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
+ beathead_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
m_jsa(*this, "jsa"),
m_nvram(*this, "nvram"),
m_videoram(*this, "videoram"),
@@ -25,12 +29,37 @@ public:
m_rom_base(*this, "rom_base")
{ }
- virtual void machine_reset() override;
+ void beathead(machine_config &config);
+protected:
+ // in drivers/beathead.c
+ virtual void update_interrupts() override;
+ DECLARE_WRITE32_MEMBER( interrupt_control_w );
+ DECLARE_READ32_MEMBER( interrupt_control_r );
+ DECLARE_WRITE32_MEMBER( eeprom_data_w );
+ DECLARE_WRITE32_MEMBER( eeprom_enable_w );
+ DECLARE_WRITE32_MEMBER( sound_reset_w );
+ DECLARE_WRITE32_MEMBER( coin_count_w );
+ DECLARE_READ32_MEMBER( speedup_r );
+ DECLARE_READ32_MEMBER( movie_speedup_r );
+
+ // in video/beathead.c
+ DECLARE_WRITE32_MEMBER( vram_transparent_w );
+ DECLARE_WRITE32_MEMBER( vram_bulk_w );
+ DECLARE_WRITE32_MEMBER( vram_latch_w );
+ DECLARE_WRITE32_MEMBER( vram_copy_w );
+ DECLARE_WRITE32_MEMBER( finescroll_w );
+ DECLARE_READ32_MEMBER( hsync_ram_r );
+ DECLARE_WRITE32_MEMBER( hsync_ram_w );
+ TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback);
+
+ virtual void machine_reset() override;
virtual void video_start() override;
+ void main_map(address_map &map);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+private:
required_device<atari_jsa_iii_device> m_jsa;
required_shared_ptr<uint32_t> m_nvram;
@@ -57,27 +86,6 @@ public:
uint8_t m_irq_state[3];
uint8_t m_eeprom_enabled;
-
- // in drivers/beathead.c
- virtual void update_interrupts() override;
- DECLARE_WRITE32_MEMBER( interrupt_control_w );
- DECLARE_READ32_MEMBER( interrupt_control_r );
- DECLARE_WRITE32_MEMBER( eeprom_data_w );
- DECLARE_WRITE32_MEMBER( eeprom_enable_w );
- DECLARE_WRITE32_MEMBER( sound_reset_w );
- DECLARE_WRITE32_MEMBER( coin_count_w );
- DECLARE_READ32_MEMBER( speedup_r );
- DECLARE_READ32_MEMBER( movie_speedup_r );
-
- // in video/beathead.c
- DECLARE_WRITE32_MEMBER( vram_transparent_w );
- DECLARE_WRITE32_MEMBER( vram_bulk_w );
- DECLARE_WRITE32_MEMBER( vram_latch_w );
- DECLARE_WRITE32_MEMBER( vram_copy_w );
- DECLARE_WRITE32_MEMBER( finescroll_w );
- DECLARE_READ32_MEMBER( hsync_ram_r );
- DECLARE_WRITE32_MEMBER( hsync_ram_w );
- TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback);
- void beathead(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_BEATHEAD_H
diff --git a/src/mame/includes/blstroid.h b/src/mame/includes/blstroid.h
index f07fb0c03db..4415268efe5 100644
--- a/src/mame/includes/blstroid.h
+++ b/src/mame/includes/blstroid.h
@@ -5,6 +5,10 @@
Atari Blasteroids hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_BLSTROID_H
+#define MAME_INCLUDES_BLSTROID_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -19,35 +23,40 @@ public:
TIMER_IRQ_ON
};
- blstroid_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_playfield_tilemap(*this, "playfield"),
- m_jsa(*this, "jsa"),
- m_mob(*this, "mob"),
- m_priorityram(*this, "priorityram") { }
+ blstroid_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_playfield_tilemap(*this, "playfield"),
+ m_jsa(*this, "jsa"),
+ m_mob(*this, "mob"),
+ m_priorityram(*this, "priorityram")
+ { }
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<atari_jsa_i_device> m_jsa;
- required_device<atari_motion_objects_device> m_mob;
- required_shared_ptr<uint16_t> m_priorityram;
+ DECLARE_DRIVER_INIT(blstroid);
+ void blstroid(machine_config &config);
+protected:
+ virtual void machine_reset() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_WRITE16_MEMBER(blstroid_halt_until_hblank_0_w);
- DECLARE_DRIVER_INIT(blstroid);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(blstroid);
- DECLARE_MACHINE_RESET(blstroid);
DECLARE_VIDEO_START(blstroid);
uint32_t screen_update_blstroid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void main_map(address_map &map);
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<atari_jsa_i_device> m_jsa;
+ required_device<atari_motion_objects_device> m_mob;
+ required_shared_ptr<uint16_t> m_priorityram;
+
emu_timer *m_irq_off_timer;
emu_timer *m_irq_on_timer;
static const atari_motion_objects_config s_mob_config;
-
- void blstroid(machine_config &config);
- void main_map(address_map &map);
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
+
+#endif // MAME_INCLUDES_BLSTROID_H
diff --git a/src/mame/includes/bsktball.h b/src/mame/includes/bsktball.h
index e1781d35fb8..5cd7e1c6f1e 100644
--- a/src/mame/includes/bsktball.h
+++ b/src/mame/includes/bsktball.h
@@ -5,6 +5,10 @@
Atari Basketball hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_BSKTBALL_H
+#define MAME_INCLUDES_BSKTBALL_H
+
+#pragma once
#include "machine/timer.h"
#include "sound/discrete.h"
@@ -19,15 +23,41 @@
class bsktball_state : public driver_device
{
public:
- bsktball_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ bsktball_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_motion(*this, "motion"),
m_discrete(*this, "discrete"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
+
+ void bsktball(machine_config &config);
+
+protected:
+ DECLARE_WRITE_LINE_MEMBER(nmion_w);
+ DECLARE_WRITE_LINE_MEMBER(ld1_w);
+ DECLARE_WRITE_LINE_MEMBER(ld2_w);
+ DECLARE_READ8_MEMBER(bsktball_in0_r);
+ DECLARE_WRITE_LINE_MEMBER(led1_w);
+ DECLARE_WRITE_LINE_MEMBER(led2_w);
+ DECLARE_WRITE8_MEMBER(bsktball_videoram_w);
+ TILE_GET_INFO_MEMBER(get_bg_tile_info);
+ DECLARE_PALETTE_INIT(bsktball);
+ uint32_t screen_update_bsktball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_DEVICE_CALLBACK_MEMBER(bsktball_scanline);
+ DECLARE_WRITE8_MEMBER(bsktball_bounce_w);
+ DECLARE_WRITE8_MEMBER(bsktball_note_w);
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ void main_map(address_map &map);
+private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_motion;
@@ -51,30 +81,14 @@ public:
int m_last_p1_vert;
int m_last_p2_horiz;
int m_last_p2_vert;
- DECLARE_WRITE_LINE_MEMBER(nmion_w);
- DECLARE_WRITE_LINE_MEMBER(ld1_w);
- DECLARE_WRITE_LINE_MEMBER(ld2_w);
- DECLARE_READ8_MEMBER(bsktball_in0_r);
- DECLARE_WRITE_LINE_MEMBER(led1_w);
- DECLARE_WRITE_LINE_MEMBER(led2_w);
- DECLARE_WRITE8_MEMBER(bsktball_videoram_w);
- TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(bsktball);
- uint32_t screen_update_bsktball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(bsktball_scanline);
- DECLARE_WRITE8_MEMBER(bsktball_bounce_w);
- DECLARE_WRITE8_MEMBER(bsktball_note_w);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void bsktball(machine_config &config);
- void main_map(address_map &map);
};
/*----------- defined in audio/bsktball.c -----------*/
DISCRETE_SOUND_EXTERN( bsktball );
+
+#endif // MAME_INCLUDES_BSKTBALL_H
diff --git a/src/mame/includes/canyon.h b/src/mame/includes/canyon.h
index 41a666c8bf3..ca24db765c0 100644
--- a/src/mame/includes/canyon.h
+++ b/src/mame/includes/canyon.h
@@ -5,6 +5,10 @@
Atari Canyon Bomber hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CANYON_H
+#define MAME_INCLUDES_CANYON_H
+
+#pragma once
#include "machine/74259.h"
#include "machine/watchdog.h"
@@ -24,24 +28,20 @@
class canyon_state : public driver_device
{
public:
- canyon_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ canyon_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_outlatch(*this, "outlatch"),
m_discrete(*this, "discrete"),
m_maincpu(*this, "maincpu"),
m_watchdog(*this, "watchdog"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- /* memory pointers */
- required_shared_ptr<uint8_t> m_videoram;
+ m_palette(*this, "palette")
+ { }
- required_device<f9334_device> m_outlatch;
- required_device<discrete_device> m_discrete;
+ void canyon(machine_config &config);
- /* video-related */
- tilemap_t *m_bg_tilemap;
+protected:
DECLARE_READ8_MEMBER(canyon_switches_r);
DECLARE_READ8_MEMBER(canyon_options_r);
DECLARE_WRITE8_MEMBER(output_latch_w);
@@ -49,21 +49,34 @@ public:
DECLARE_WRITE_LINE_MEMBER(led2_w);
DECLARE_WRITE8_MEMBER(canyon_videoram_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(canyon);
uint32_t screen_update_canyon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE8_MEMBER(canyon_motor_w);
DECLARE_WRITE8_MEMBER(canyon_explode_w);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_bombs( bitmap_ind16 &bitmap, const rectangle &cliprect );
+
+ virtual void video_start() override;
+ void main_map(address_map &map);
+
+private:
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_videoram;
+
+ required_device<f9334_device> m_outlatch;
+ required_device<discrete_device> m_discrete;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap;
+
required_device<cpu_device> m_maincpu;
required_device<watchdog_timer_device> m_watchdog;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void canyon(machine_config &config);
- void main_map(address_map &map);
};
/*----------- defined in audio/canyon.c -----------*/
DISCRETE_SOUND_EXTERN( canyon );
+
+#endif // MAME_INCLUDES_CANYON_H
diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h
index 49e818b161f..f9f43b8bb34 100644
--- a/src/mame/includes/carpolo.h
+++ b/src/mame/includes/carpolo.h
@@ -7,6 +7,10 @@
driver by Zsolt Vasvari
****************************************************************************/
+#ifndef MAME_INCLUDES_CARPOLO_H
+#define MAME_INCLUDES_CARPOLO_H
+
+#pragma once
#include "machine/6821pia.h"
#include "machine/7474.h"
@@ -16,8 +20,8 @@
class carpolo_state : public driver_device
{
public:
- carpolo_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ carpolo_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_alpharam(*this, "alpharam"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
@@ -37,8 +41,17 @@ public:
m_ttl7474_1a_2(*this, "7474_1a_2"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
- {}
+ { }
+
+ DECLARE_DRIVER_INIT(carpolo);
+ void carpolo(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+private:
required_shared_ptr<uint8_t> m_alpharam;
required_shared_ptr<uint8_t> m_spriteram;
uint8_t m_ball_screen_collision_cause;
@@ -75,6 +88,7 @@ public:
std::unique_ptr<bitmap_ind16> m_sprite_goal_collision_bitmap1;
std::unique_ptr<bitmap_ind16> m_sprite_goal_collision_bitmap2;
std::unique_ptr<bitmap_ind16> m_sprite_border_collision_bitmap;
+
DECLARE_READ8_MEMBER(carpolo_ball_screen_collision_cause_r);
DECLARE_READ8_MEMBER(carpolo_car_ball_collision_x_r);
DECLARE_READ8_MEMBER(carpolo_car_ball_collision_y_r);
@@ -89,10 +103,6 @@ public:
DECLARE_WRITE8_MEMBER(carpolo_car_ball_interrupt_clear_w);
DECLARE_WRITE8_MEMBER(carpolo_car_border_interrupt_clear_w);
DECLARE_WRITE8_MEMBER(carpolo_timer_interrupt_clear_w);
- DECLARE_DRIVER_INIT(carpolo);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(carpolo);
uint32_t screen_update_carpolo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_carpolo);
@@ -130,6 +140,7 @@ public:
int check_sprite_sprite_collision(int x1, int y1, int code1, int flipy1,
int x2, int y2, int code2, int flipy2,
int *col_x, int *col_y);
- void carpolo(machine_config &config);
- void main_map(address_map &map);
+ void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_CARPOLO_H
diff --git a/src/mame/includes/ccastles.h b/src/mame/includes/ccastles.h
index 34c601bc64d..680a412426f 100644
--- a/src/mame/includes/ccastles.h
+++ b/src/mame/includes/ccastles.h
@@ -5,6 +5,10 @@
Atari Crystal Castles hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CCASTLES_H
+#define MAME_INCLUDES_CCASTLES_H
+
+#pragma once
#include "cpu/m6502/m6502.h"
#include "machine/x2212.h"
@@ -13,17 +17,50 @@
class ccastles_state : public driver_device
{
public:
- ccastles_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_nvram_4b(*this, "nvram_4b"),
- m_nvram_4a(*this, "nvram_4a") ,
+ ccastles_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_nvram_4b(*this, "nvram_4b"),
+ m_nvram_4a(*this, "nvram_4a") ,
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette"){ }
+ m_palette(*this, "palette")
+ { }
+
+ DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
+ void ccastles(machine_config &config);
+
+protected:
+ DECLARE_WRITE8_MEMBER(irq_ack_w);
+ DECLARE_WRITE8_MEMBER(led_w);
+ DECLARE_WRITE8_MEMBER(ccounter_w);
+ DECLARE_WRITE8_MEMBER(bankswitch_w);
+ DECLARE_READ8_MEMBER(leta_r);
+ DECLARE_WRITE8_MEMBER(nvram_recall_w);
+ DECLARE_WRITE8_MEMBER(nvram_store_w);
+ DECLARE_READ8_MEMBER(nvram_r);
+ DECLARE_WRITE8_MEMBER(nvram_w);
+ DECLARE_WRITE8_MEMBER(ccastles_hscroll_w);
+ DECLARE_WRITE8_MEMBER(ccastles_vscroll_w);
+ DECLARE_WRITE8_MEMBER(ccastles_video_control_w);
+ DECLARE_WRITE8_MEMBER(ccastles_paletteram_w);
+ DECLARE_WRITE8_MEMBER(ccastles_videoram_w);
+ DECLARE_READ8_MEMBER(ccastles_bitmode_r);
+ DECLARE_WRITE8_MEMBER(ccastles_bitmode_w);
+ DECLARE_WRITE8_MEMBER(ccastles_bitmode_addr_w);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ uint32_t screen_update_ccastles(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_CALLBACK_MEMBER(clock_irq);
+ inline void ccastles_write_vram( uint16_t addr, uint8_t data, uint8_t bitmd, uint8_t pixba );
+ inline void bitmode_autoinc( );
+ inline void schedule_next_irq( int curscanline );
+ void main_map(address_map &map);
+private:
/* devices */
required_device<m6502_device> m_maincpu;
required_device<x2212_device> m_nvram_4b;
@@ -55,33 +92,6 @@ public:
emu_timer *m_irq_timer;
uint8_t m_irq_state;
uint8_t m_nvram_store[2];
-
- DECLARE_WRITE8_MEMBER(irq_ack_w);
- DECLARE_WRITE8_MEMBER(led_w);
- DECLARE_WRITE8_MEMBER(ccounter_w);
- DECLARE_WRITE8_MEMBER(bankswitch_w);
- DECLARE_READ8_MEMBER(leta_r);
- DECLARE_WRITE8_MEMBER(nvram_recall_w);
- DECLARE_WRITE8_MEMBER(nvram_store_w);
- DECLARE_READ8_MEMBER(nvram_r);
- DECLARE_WRITE8_MEMBER(nvram_w);
- DECLARE_WRITE8_MEMBER(ccastles_hscroll_w);
- DECLARE_WRITE8_MEMBER(ccastles_vscroll_w);
- DECLARE_WRITE8_MEMBER(ccastles_video_control_w);
- DECLARE_WRITE8_MEMBER(ccastles_paletteram_w);
- DECLARE_WRITE8_MEMBER(ccastles_videoram_w);
- DECLARE_READ8_MEMBER(ccastles_bitmode_r);
- DECLARE_WRITE8_MEMBER(ccastles_bitmode_w);
- DECLARE_WRITE8_MEMBER(ccastles_bitmode_addr_w);
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update_ccastles(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_CALLBACK_MEMBER(clock_irq);
- inline void ccastles_write_vram( uint16_t addr, uint8_t data, uint8_t bitmd, uint8_t pixba );
- inline void bitmode_autoinc( );
- inline void schedule_next_irq( int curscanline );
- void ccastles(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_CCASTLES_H
diff --git a/src/mame/includes/cloak.h b/src/mame/includes/cloak.h
index 8205ef9134d..2c796d4d2ec 100644
--- a/src/mame/includes/cloak.h
+++ b/src/mame/includes/cloak.h
@@ -5,6 +5,11 @@
Atari Cloak & Dagger hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CLOAK_H
+#define MAME_INCLUDES_CLOAK_H
+
+#pragma once
+
#include "screen.h"
class cloak_state : public driver_device
@@ -18,20 +23,12 @@ public:
m_slave(*this, "slave"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_spriteram;
- int m_nvram_enabled;
- uint8_t m_bitmap_videoram_selected;
- uint8_t m_bitmap_videoram_address_x;
- uint8_t m_bitmap_videoram_address_y;
- std::unique_ptr<uint8_t[]> m_bitmap_videoram1;
- std::unique_ptr<uint8_t[]> m_bitmap_videoram2;
- uint8_t *m_current_bitmap_videoram_accessed;
- uint8_t *m_current_bitmap_videoram_displayed;
- std::unique_ptr<uint16_t[]> m_palette_ram;
- tilemap_t *m_bg_tilemap;
+ void cloak(machine_config &config);
+
+protected:
DECLARE_WRITE_LINE_MEMBER(start_led_1_w);
DECLARE_WRITE_LINE_MEMBER(start_led_2_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_l_w);
@@ -54,12 +51,28 @@ public:
void set_pen(int i);
void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void master_map(address_map &map);
+ void slave_map(address_map &map);
+
+private:
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ int m_nvram_enabled;
+ uint8_t m_bitmap_videoram_selected;
+ uint8_t m_bitmap_videoram_address_x;
+ uint8_t m_bitmap_videoram_address_y;
+ std::unique_ptr<uint8_t[]> m_bitmap_videoram1;
+ std::unique_ptr<uint8_t[]> m_bitmap_videoram2;
+ uint8_t *m_current_bitmap_videoram_accessed;
+ uint8_t *m_current_bitmap_videoram_displayed;
+ std::unique_ptr<uint16_t[]> m_palette_ram;
+ tilemap_t *m_bg_tilemap;
+
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_slave;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void cloak(machine_config &config);
- void master_map(address_map &map);
- void slave_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_CLOAK_H
diff --git a/src/mame/includes/cloud9.h b/src/mame/includes/cloud9.h
index b886f300e10..fb27d68b45e 100644
--- a/src/mame/includes/cloud9.h
+++ b/src/mame/includes/cloud9.h
@@ -5,6 +5,10 @@
Atari Cloud 9 (prototype) hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CLOUD9_H
+#define MAME_INCLUDES_CLOUD9_H
+
+#pragma once
#include "cpu/m6502/m6502.h"
#include "machine/74259.h"
@@ -14,17 +18,46 @@
class cloud9_state : public driver_device
{
public:
- cloud9_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_nvram(*this, "nvram") ,
+ cloud9_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_nvram(*this, "nvram") ,
m_spriteram(*this, "spriteram"),
m_paletteram(*this, "paletteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_videolatch(*this, "videolatch") { }
+ m_videolatch(*this, "videolatch")
+ { }
+
+ DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
+ void cloud9(machine_config &config);
+
+protected:
+ DECLARE_WRITE8_MEMBER(irq_ack_w);
+ DECLARE_WRITE_LINE_MEMBER(coin1_counter_w);
+ DECLARE_WRITE_LINE_MEMBER(coin2_counter_w);
+ DECLARE_WRITE_LINE_MEMBER(led1_w);
+ DECLARE_WRITE_LINE_MEMBER(led2_w);
+ DECLARE_READ8_MEMBER(leta_r);
+ DECLARE_WRITE8_MEMBER(nvram_recall_w);
+ DECLARE_WRITE8_MEMBER(nvram_store_w);
+ DECLARE_WRITE8_MEMBER(cloud9_paletteram_w);
+ DECLARE_WRITE8_MEMBER(cloud9_videoram_w);
+ DECLARE_READ8_MEMBER(cloud9_bitmode_r);
+ DECLARE_WRITE8_MEMBER(cloud9_bitmode_w);
+ DECLARE_WRITE8_MEMBER(cloud9_bitmode_addr_w);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ uint32_t screen_update_cloud9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_CALLBACK_MEMBER(clock_irq);
+ inline void cloud9_write_vram( uint16_t addr, uint8_t data, uint8_t bitmd, uint8_t pixba );
+ inline void bitmode_autoinc();
+ inline void schedule_next_irq(int curscanline);
+ void cloud9_map(address_map &map);
+private:
/* devices */
required_device<m6502_device> m_maincpu;
required_device<x2212_device> m_nvram;
@@ -53,29 +86,6 @@ public:
int m_vblank_end;
emu_timer *m_irq_timer;
uint8_t m_irq_state;
-
- DECLARE_WRITE8_MEMBER(irq_ack_w);
- DECLARE_WRITE_LINE_MEMBER(coin1_counter_w);
- DECLARE_WRITE_LINE_MEMBER(coin2_counter_w);
- DECLARE_WRITE_LINE_MEMBER(led1_w);
- DECLARE_WRITE_LINE_MEMBER(led2_w);
- DECLARE_READ8_MEMBER(leta_r);
- DECLARE_WRITE8_MEMBER(nvram_recall_w);
- DECLARE_WRITE8_MEMBER(nvram_store_w);
- DECLARE_WRITE8_MEMBER(cloud9_paletteram_w);
- DECLARE_WRITE8_MEMBER(cloud9_videoram_w);
- DECLARE_READ8_MEMBER(cloud9_bitmode_r);
- DECLARE_WRITE8_MEMBER(cloud9_bitmode_w);
- DECLARE_WRITE8_MEMBER(cloud9_bitmode_addr_w);
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update_cloud9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_CALLBACK_MEMBER(clock_irq);
- inline void cloud9_write_vram( uint16_t addr, uint8_t data, uint8_t bitmd, uint8_t pixba );
- inline void bitmode_autoinc( );
- inline void schedule_next_irq(int curscanline);
- void cloud9(machine_config &config);
- void cloud9_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_CLOUD9_H
diff --git a/src/mame/includes/copsnrob.h b/src/mame/includes/copsnrob.h
index 13657ac4120..117254dd4f3 100644
--- a/src/mame/includes/copsnrob.h
+++ b/src/mame/includes/copsnrob.h
@@ -5,6 +5,10 @@
Atari Cops'n Robbers hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_COPSNROB_H
+#define MAME_INCLUDES_COPSNROB_H
+
+#pragma once
#include "machine/74259.h"
#include "sound/discrete.h"
@@ -14,8 +18,8 @@
class copsnrob_state : public driver_device
{
public:
- copsnrob_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ copsnrob_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_trucky(*this, "trucky"),
m_truckram(*this, "truckram"),
m_bulletsram(*this, "bulletsram"),
@@ -26,8 +30,23 @@ public:
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
+
+ void copsnrob(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ void copsnrob_audio(machine_config &config);
+ void main_map(address_map &map);
+
+ DECLARE_READ8_MEMBER(copsnrob_misc_r);
+ DECLARE_WRITE8_MEMBER(copsnrob_misc2_w);
+ DECLARE_WRITE_LINE_MEMBER(one_start_w);
+ uint32_t screen_update_copsnrob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+private:
/* memory pointers */
required_shared_ptr<uint8_t> m_trucky;
required_shared_ptr<uint8_t> m_truckram;
@@ -36,20 +55,15 @@ public:
required_shared_ptr<uint8_t> m_cary;
required_shared_ptr<uint8_t> m_videoram;
required_device<discrete_device> m_discrete;
+
/* misc */
uint8_t m_misc;
uint8_t m_ic_h3_data;
- DECLARE_READ8_MEMBER(copsnrob_misc_r);
- DECLARE_WRITE8_MEMBER(copsnrob_misc2_w);
- DECLARE_WRITE_LINE_MEMBER(one_start_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- uint32_t screen_update_copsnrob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void copsnrob(machine_config &config);
- void copsnrob_audio(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_COPSNROB_H
diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h
index 907faee176d..a9b45cbe193 100644
--- a/src/mame/includes/cyberbal.h
+++ b/src/mame/includes/cyberbal.h
@@ -5,6 +5,10 @@
Atari Cyberball hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CYBERBAL_H
+#define MAME_INCLUDES_CYBERBAL_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -18,24 +22,25 @@
class cyberbal_state : public atarigen_state
{
public:
- cyberbal_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_audiocpu(*this, "audiocpu"),
- m_extracpu(*this, "extra"),
- m_daccpu(*this, "dac"),
- m_rdac(*this, "rdac"),
- m_ldac(*this, "ldac"),
- m_soundcomm(*this, "soundcomm"),
- m_ymsnd(*this, "ymsnd"),
- m_jsa(*this, "jsa"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob"),
- m_playfield2_tilemap(*this, "playfield2"),
- m_alpha2_tilemap(*this, "alpha2"),
- m_mob2(*this, "mob2"),
- m_lscreen(*this, "lscreen"),
- m_rscreen(*this, "rscreen") { }
+ cyberbal_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_audiocpu(*this, "audiocpu"),
+ m_extracpu(*this, "extra"),
+ m_daccpu(*this, "dac"),
+ m_rdac(*this, "rdac"),
+ m_ldac(*this, "ldac"),
+ m_soundcomm(*this, "soundcomm"),
+ m_ymsnd(*this, "ymsnd"),
+ m_jsa(*this, "jsa"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob"),
+ m_playfield2_tilemap(*this, "playfield2"),
+ m_alpha2_tilemap(*this, "alpha2"),
+ m_mob2(*this, "mob2"),
+ m_lscreen(*this, "lscreen"),
+ m_rscreen(*this, "rscreen")
+ { }
optional_device<m6502_device> m_audiocpu;
optional_device<cpu_device> m_extracpu;
@@ -104,9 +109,12 @@ public:
void main_map(address_map &map);
void sound_68k_map(address_map &map);
void sound_map(address_map &map);
+
private:
void video_start_common(int screens);
void cyberbal_sound_reset();
uint32_t update_one_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int index);
void update_sound_68k_interrupts();
};
+
+#endif // MAME_INCLUDES_CYBERBAL_H
diff --git a/src/mame/includes/cybstorm.h b/src/mame/includes/cybstorm.h
index dd3f60066ba..f8699235027 100644
--- a/src/mame/includes/cybstorm.h
+++ b/src/mame/includes/cybstorm.h
@@ -5,6 +5,10 @@
Atari Cyberstorm hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_CYBSTORM_H
+#define MAME_INCLUDES_CYBSTORM_H
+
+#pragma once
#include "audio/atarijsa.h"
#include "machine/atarigen.h"
@@ -15,19 +19,18 @@ class cybstorm_state : public atarigen_state
{
public:
cybstorm_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag)
- , m_jsa(*this, "jsa")
- , m_vad(*this, "vad")
- , m_vadbank(*this, "vadbank")
+ : atarigen_state(mconfig, type, tag)
+ , m_jsa(*this, "jsa")
+ , m_vad(*this, "vad")
+ , m_vadbank(*this, "vadbank")
{ }
- optional_device<atari_jsa_iiis_device> m_jsa;
- required_device<atari_vad_device> m_vad;
- required_device<address_map_bank_device> m_vadbank;
-
- uint32_t m_latch_data;
- uint8_t m_alpha_tile_bank;
+ DECLARE_DRIVER_INIT(cybstorm);
+ void cybstorm(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
DECLARE_READ32_MEMBER(special_port1_r);
@@ -38,16 +41,21 @@ public:
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
TILEMAP_MAPPER_MEMBER(playfield_scan);
- DECLARE_DRIVER_INIT(cybstorm);
- DECLARE_MACHINE_START(cybstorm);
- DECLARE_MACHINE_RESET(cybstorm);
-
- DECLARE_VIDEO_START(cybstorm);
uint32_t screen_update_cybstorm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void cybstorm(machine_config &config);
void round2(machine_config &config);
void main_map(address_map &map);
void vadbank_map(address_map &map);
+
+private:
+ optional_device<atari_jsa_iiis_device> m_jsa;
+ required_device<atari_vad_device> m_vad;
+ required_device<address_map_bank_device> m_vadbank;
+
+ uint32_t m_latch_data;
+ uint8_t m_alpha_tile_bank;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_CYBSTORM_H
diff --git a/src/mame/includes/dragrace.h b/src/mame/includes/dragrace.h
index 171c3c8ef2e..66fe39225ad 100644
--- a/src/mame/includes/dragrace.h
+++ b/src/mame/includes/dragrace.h
@@ -5,6 +5,10 @@
Atari Drag Race hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_DRAGRACE_H
+#define MAME_INCLUDES_DRAGRACE_H
+
+#pragma once
#include "machine/timer.h"
#include "machine/watchdog.h"
@@ -42,6 +46,28 @@ public:
{
}
+ void dragrace(machine_config &config);
+
+protected:
+ DECLARE_WRITE8_MEMBER(speed1_w);
+ DECLARE_WRITE8_MEMBER(speed2_w);
+ DECLARE_WRITE_LINE_MEMBER(p1_start_w);
+ DECLARE_WRITE_LINE_MEMBER(p2_start_w);
+ DECLARE_READ8_MEMBER(dragrace_input_r);
+ DECLARE_READ8_MEMBER(dragrace_steering_r);
+ DECLARE_READ8_MEMBER(dragrace_scanline_r);
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ DECLARE_PALETTE_INIT(dragrace);
+ uint32_t screen_update_dragrace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_DEVICE_CALLBACK_MEMBER(dragrace_frame_callback);
+ void dragrace_update_misc_flags( address_space &space );
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ void dragrace_map(address_map &map);
+
+private:
/* memory pointers */
required_shared_ptr<uint8_t> m_playfield_ram;
required_shared_ptr<uint8_t> m_position_ram;
@@ -58,25 +84,9 @@ public:
required_device<watchdog_timer_device> m_watchdog;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
-
- DECLARE_WRITE8_MEMBER(speed1_w);
- DECLARE_WRITE8_MEMBER(speed2_w);
- DECLARE_WRITE_LINE_MEMBER(p1_start_w);
- DECLARE_WRITE_LINE_MEMBER(p2_start_w);
- DECLARE_READ8_MEMBER(dragrace_input_r);
- DECLARE_READ8_MEMBER(dragrace_steering_r);
- DECLARE_READ8_MEMBER(dragrace_scanline_r);
- TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(dragrace);
- uint32_t screen_update_dragrace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(dragrace_frame_callback);
- void dragrace_update_misc_flags( address_space &space );
- void dragrace(machine_config &config);
- void dragrace_map(address_map &map);
};
/*----------- defined in audio/dragrace.c -----------*/
DISCRETE_SOUND_EXTERN( dragrace );
+
+#endif // MAME_INCLUDES_DRAGRACE_H
diff --git a/src/mame/includes/eprom.h b/src/mame/includes/eprom.h
index 115fd577a57..6cb77995af6 100644
--- a/src/mame/includes/eprom.h
+++ b/src/mame/includes/eprom.h
@@ -5,6 +5,10 @@
Atari Escape hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_EPROM_H
+#define MAME_INCLUDES_EPROM_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,22 +17,22 @@
class eprom_state : public atarigen_state
{
public:
- eprom_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob"),
- m_jsa(*this, "jsa"),
- m_extra(*this, "extra") { }
+ eprom_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob"),
+ m_jsa(*this, "jsa"),
+ m_extra(*this, "extra")
+ { }
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
- required_device<atari_jsa_base_device> m_jsa;
- int m_screen_intensity;
- int m_video_disable;
- uint16_t m_sync_data;
- int m_last_offset;
+ void guts(machine_config &config);
+ void eprom(machine_config &config);
+ void klaxp(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_READ16_MEMBER(special_port1_r);
@@ -36,26 +40,30 @@ public:
DECLARE_WRITE16_MEMBER(eprom_latch_w);
DECLARE_READ16_MEMBER(sync_r);
template<bool maincpu> DECLARE_WRITE16_MEMBER(sync_w);
- DECLARE_DRIVER_INIT(klaxp);
- DECLARE_DRIVER_INIT(guts);
- DECLARE_DRIVER_INIT(eprom);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
TILE_GET_INFO_MEMBER(guts_get_playfield_tile_info);
- DECLARE_MACHINE_START(eprom);
- DECLARE_MACHINE_RESET(eprom);
DECLARE_VIDEO_START(eprom);
DECLARE_VIDEO_START(guts);
uint32_t screen_update_eprom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_guts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void update_palette();
- optional_device<cpu_device> m_extra;
- static const atari_motion_objects_config s_mob_config;
- static const atari_motion_objects_config s_guts_mob_config;
- void guts(machine_config &config);
- void eprom(machine_config &config);
- void klaxp(machine_config &config);
void extra_map(address_map &map);
void guts_map(address_map &map);
void main_map(address_map &map);
+
+private:
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+ required_device<atari_jsa_base_device> m_jsa;
+ int m_screen_intensity;
+ int m_video_disable;
+ uint16_t m_sync_data;
+ int m_last_offset;
+ optional_device<cpu_device> m_extra;
+ static const atari_motion_objects_config s_mob_config;
+ static const atari_motion_objects_config s_guts_mob_config;
};
+
+#endif // MAME_INCLUDES_EPROM_H
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index f4a0cc973ef..a4e132081c5 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -5,6 +5,10 @@
Equites, Splendor Blast driver
*************************************************************************/
+#ifndef MAME_INCLUDES_EQUITES_H
+#define MAME_INCLUDES_EQUITES_H
+
+#pragma once
#include "machine/alpha8201.h"
#include "machine/gen_latch.h"
@@ -19,8 +23,8 @@
class equites_state : public driver_device
{
public:
- equites_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ equites_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_bg_videoram(*this, "bg_videoram"),
m_spriteram(*this, "spriteram"),
m_spriteram_2(*this, "spriteram_2"),
@@ -50,10 +54,7 @@ public:
/* video-related */
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
- int m_fg_char_bank;
uint8_t m_bgcolor;
- uint16_t m_splndrbt_bg_scrollx;
- uint16_t m_splndrbt_bg_scrolly;
/* misc */
int m_sound_prom_address;
@@ -68,7 +69,6 @@ public:
float m_cymvol;
float m_hihatvol;
int m_timer_count;
- int m_gekisou_unknown_bit;
/* devices */
required_device<cpu_device> m_maincpu;
@@ -91,7 +91,6 @@ public:
DECLARE_WRITE8_MEMBER(equites_8155_porta_w);
DECLARE_WRITE8_MEMBER(equites_8155_portb_w);
DECLARE_WRITE8_MEMBER(equites_8155_portc_w);
- DECLARE_WRITE16_MEMBER(gekisou_unknown_bit_w);
DECLARE_READ16_MEMBER(equites_spriteram_kludge_r);
DECLARE_WRITE8_MEMBER(mainlatch_w);
DECLARE_READ8_MEMBER(mcu_ram_r);
@@ -103,49 +102,80 @@ public:
DECLARE_WRITE16_MEMBER(equites_bg_videoram_w);
DECLARE_WRITE8_MEMBER(equites_bgcolor_w);
DECLARE_WRITE16_MEMBER(equites_scrollreg_w);
- DECLARE_WRITE_LINE_MEMBER(splndrbt_selchar_w);
DECLARE_WRITE_LINE_MEMBER(flip_screen_w);
- DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w);
- DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w);
- DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
DECLARE_WRITE8_MEMBER(equites_8910porta_w);
DECLARE_WRITE8_MEMBER(equites_8910portb_w);
- DECLARE_DRIVER_INIT(splndrbt);
DECLARE_DRIVER_INIT(equites);
TILE_GET_INFO_MEMBER(equites_fg_info);
- TILE_GET_INFO_MEMBER(splndrbt_fg_info);
TILE_GET_INFO_MEMBER(equites_bg_info);
- TILE_GET_INFO_MEMBER(splndrbt_bg_info);
DECLARE_VIDEO_START(equites);
DECLARE_PALETTE_INIT(equites);
- DECLARE_VIDEO_START(splndrbt);
- DECLARE_PALETTE_INIT(splndrbt);
uint32_t screen_update_equites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_splndrbt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(equites_8155_timer_pulse);
TIMER_CALLBACK_MEMBER(equites_frq_adjuster_callback);
TIMER_DEVICE_CALLBACK_MEMBER(equites_scanline);
- TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline);
DECLARE_WRITE_LINE_MEMBER(equites_msm5232_gate);
void equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end);
void equites_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
- void splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
- void splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect);
void equites_update_dac();
void unpack_block(const char *region, int offset, int size);
void unpack_region(const char *region);
+ void equites(machine_config &config);
+protected:
virtual void machine_start() override;
virtual void machine_reset() override;
void common_sound(machine_config &config);
- void equites(machine_config &config);
- void splndrbt(machine_config &config);
- void gekisou(machine_config &config);
- void hvoltage(machine_config &config);
void equites_map(address_map &map);
- void gekisou_map(address_map &map);
void mcu_map(address_map &map);
void sound_map(address_map &map);
void sound_portmap(address_map &map);
+};
+
+class gekisou_state : public equites_state
+{
+public:
+ using equites_state::equites_state;
+ DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
+ void gekisou(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ void gekisou_map(address_map &map);
+ DECLARE_WRITE16_MEMBER(gekisou_unknown_bit_w);
+
+private:
+ int m_gekisou_unknown_bit;
+};
+
+
+class splndrbt_state : public equites_state
+{
+public:
+ using equites_state::equites_state;
+ DECLARE_DRIVER_INIT(splndrbt);
+ void splndrbt(machine_config &config);
+ void hvoltage(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
void splndrbt_map(address_map &map);
+ DECLARE_WRITE_LINE_MEMBER(splndrbt_selchar_w);
+ DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w);
+ DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w);
+ TILE_GET_INFO_MEMBER(splndrbt_fg_info);
+ TILE_GET_INFO_MEMBER(splndrbt_bg_info);
+ DECLARE_VIDEO_START(splndrbt);
+ DECLARE_PALETTE_INIT(splndrbt);
+ uint32_t screen_update_splndrbt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline);
+ void splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect);
+
+private:
+ int m_fg_char_bank;
+ uint16_t m_splndrbt_bg_scrollx;
+ uint16_t m_splndrbt_bg_scrolly;
};
+
+#endif // MAME_INCLUDES_EQUITES_H
diff --git a/src/mame/includes/exidy440.h b/src/mame/includes/exidy440.h
index 5c28358ca14..7134faac3bc 100644
--- a/src/mame/includes/exidy440.h
+++ b/src/mame/includes/exidy440.h
@@ -5,6 +5,10 @@
Exidy 440 hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_EXIDY440_H
+#define MAME_INCLUDES_EXIDY440_H
+
+#pragma once
#include "audio/exidy440.h"
#include "screen.h"
@@ -15,40 +19,28 @@
class exidy440_state : public driver_device
{
public:
- exidy440_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ exidy440_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_imageram(*this, "imageram"),
m_spriteram(*this, "spriteram"),
m_scanline(*this, "scanline"),
m_maincpu(*this, "maincpu"),
m_custom(*this, "custom"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
-
- required_shared_ptr<uint8_t> m_imageram;
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_scanline;
+ m_palette(*this, "palette")
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<exidy440_sound_device> m_custom;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
+ DECLARE_CUSTOM_INPUT_MEMBER(firq_beam_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(firq_vblank_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r);
+ DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
+ DECLARE_DRIVER_INIT(showdown);
+ DECLARE_DRIVER_INIT(yukon);
+ DECLARE_DRIVER_INIT(exidy440);
+ DECLARE_DRIVER_INIT(claypign);
+ void exidy440(machine_config &config);
- uint8_t m_bank;
- const uint8_t *m_showdown_bank_data[2];
- int8_t m_showdown_bank_select;
- uint8_t m_showdown_bank_offset;
- uint8_t m_firq_vblank;
- uint8_t m_firq_beam;
- uint8_t m_topsecex_yscroll;
- uint8_t m_latched_x;
- std::unique_ptr<uint8_t[]> m_local_videoram;
- std::unique_ptr<uint8_t[]> m_local_paletteram;
- uint8_t m_firq_enable;
- uint8_t m_firq_select;
- uint8_t m_palettebank_io;
- uint8_t m_palettebank_vis;
- emu_timer *m_collide_firq_timer;
+protected:
DECLARE_WRITE8_MEMBER(bankram_w);
DECLARE_READ8_MEMBER(exidy440_input_port_3_r);
DECLARE_READ8_MEMBER(sound_command_ack_r);
@@ -57,8 +49,6 @@ public:
DECLARE_WRITE8_MEMBER(exidy440_coin_counter_w);
DECLARE_READ8_MEMBER(showdown_bank0_r);
DECLARE_READ8_MEMBER(claypign_protection_r);
- DECLARE_READ8_MEMBER(topsecex_input_port_5_r);
- DECLARE_WRITE8_MEMBER(topsecex_yscroll_w);
DECLARE_READ8_MEMBER(exidy440_videoram_r);
DECLARE_WRITE8_MEMBER(exidy440_videoram_w);
DECLARE_READ8_MEMBER(exidy440_paletteram_r);
@@ -68,33 +58,67 @@ public:
DECLARE_WRITE8_MEMBER(exidy440_spriteram_w);
DECLARE_WRITE8_MEMBER(exidy440_control_w);
DECLARE_WRITE8_MEMBER(exidy440_interrupt_clear_w);
- DECLARE_CUSTOM_INPUT_MEMBER(firq_beam_r);
- DECLARE_CUSTOM_INPUT_MEMBER(firq_vblank_r);
- DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r);
- DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
- DECLARE_DRIVER_INIT(showdown);
- DECLARE_DRIVER_INIT(topsecex);
- DECLARE_DRIVER_INIT(yukon);
- DECLARE_DRIVER_INIT(exidy440);
- DECLARE_DRIVER_INIT(claypign);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- DECLARE_VIDEO_START(exidy440);
- DECLARE_VIDEO_START(topsecex);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
uint32_t screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(exidy440_vblank_interrupt);
TIMER_CALLBACK_MEMBER(delayed_sound_command_w);
TIMER_CALLBACK_MEMBER(beam_firq_callback);
TIMER_CALLBACK_MEMBER(collide_firq_callback);
void exidy440_update_firq();
void exidy440_bank_select(uint8_t bank);
- void exidy440(machine_config &config);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
void exidy440_video(machine_config &config);
- void topsecex(machine_config &config);
- void topsecex_video(machine_config &config);
void exidy440_map(address_map &map);
void exidy440_audio_map(address_map &map);
+
+ required_shared_ptr<uint8_t> m_imageram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_scanline;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<exidy440_sound_device> m_custom;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+private:
+ uint8_t m_bank;
+ const uint8_t *m_showdown_bank_data[2];
+ int8_t m_showdown_bank_select;
+ uint8_t m_showdown_bank_offset;
+ uint8_t m_firq_vblank;
+ uint8_t m_firq_beam;
+ uint8_t m_latched_x;
+ std::unique_ptr<uint8_t[]> m_local_videoram;
+ std::unique_ptr<uint8_t[]> m_local_paletteram;
+ uint8_t m_firq_enable;
+ uint8_t m_firq_select;
+ uint8_t m_palettebank_io;
+ uint8_t m_palettebank_vis;
+ emu_timer *m_collide_firq_timer;
};
+
+
+class topsecex_state : public exidy440_state
+{
+public:
+ using exidy440_state::exidy440_state;
+ DECLARE_DRIVER_INIT(topsecex);
+ void topsecex(machine_config &config);
+
+protected:
+ void topsecex_video(machine_config &config);
+ DECLARE_READ8_MEMBER(topsecex_input_port_5_r);
+ DECLARE_WRITE8_MEMBER(topsecex_yscroll_w);
+ uint32_t screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ virtual void video_start() override;
+
+private:
+ uint8_t m_topsecex_yscroll;
+};
+
+#endif // MAME_INCLUDES_EXIDY440_H
diff --git a/src/mame/includes/foodf.h b/src/mame/includes/foodf.h
index 8e15da171ae..b76869a0944 100644
--- a/src/mame/includes/foodf.h
+++ b/src/mame/includes/foodf.h
@@ -5,6 +5,10 @@
Atari Food Fight hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_FOODF_H
+#define MAME_INCLUDES_FOODF_H
+
+#pragma once
#include "machine/atarigen.h"
#include "machine/timer.h"
@@ -13,22 +17,19 @@
class foodf_state : public atarigen_state
{
public:
- foodf_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_nvram(*this, "nvram"),
- m_playfield_tilemap(*this, "playfield"),
- m_spriteram(*this, "spriteram") { }
-
- required_device<x2212_device> m_nvram;
- required_device<tilemap_device> m_playfield_tilemap;
+ foodf_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_nvram(*this, "nvram"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_spriteram(*this, "spriteram")
+ { }
- double m_rweights[3];
- double m_gweights[3];
- double m_bweights[2];
- uint8_t m_playfield_flip;
+ void foodf(machine_config &config);
- uint8_t m_whichport;
- required_shared_ptr<uint16_t> m_spriteram;
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
DECLARE_WRITE16_MEMBER(nvram_recall_w);
DECLARE_WRITE8_MEMBER(digital_w);
@@ -38,11 +39,22 @@ public:
void foodf_set_flip(int flip);
DECLARE_READ8_MEMBER(pot_r);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(foodf);
- DECLARE_MACHINE_RESET(foodf);
- DECLARE_VIDEO_START(foodf);
uint32_t screen_update_foodf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_update_timer);
- void foodf(machine_config &config);
+
void main_map(address_map &map);
+
+private:
+ required_device<x2212_device> m_nvram;
+ required_device<tilemap_device> m_playfield_tilemap;
+
+ double m_rweights[3];
+ double m_gweights[3];
+ double m_bweights[2];
+ uint8_t m_playfield_flip;
+
+ uint8_t m_whichport;
+ required_shared_ptr<uint16_t> m_spriteram;
};
+
+#endif // MAME_INCLUDES_FOODF_H
diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h
index a20f0d5c8b0..f092bc9824f 100644
--- a/src/mame/includes/gauntlet.h
+++ b/src/mame/includes/gauntlet.h
@@ -5,6 +5,10 @@
Atari Gauntlet hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_GAUNTLET_H
+#define MAME_INCLUDES_GAUNTLET_H
+
+#pragma once
#include "machine/atarigen.h"
#include "machine/74259.h"
@@ -16,33 +20,30 @@
class gauntlet_state : public atarigen_state
{
public:
- gauntlet_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_audiocpu(*this, "audiocpu"),
- m_soundcomm(*this, "soundcomm"),
- m_ym2151(*this, "ymsnd"),
- m_pokey(*this, "pokey"),
- m_tms5220(*this, "tms"),
- m_soundctl(*this, "soundctl"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob") { }
-
- required_device<cpu_device> m_audiocpu;
- required_device<atari_sound_comm_device> m_soundcomm;
- required_device<ym2151_device> m_ym2151;
- required_device<pokey_device> m_pokey;
- required_device<tms5220_device> m_tms5220;
- required_device<ls259_device> m_soundctl;
+ gauntlet_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_audiocpu(*this, "audiocpu"),
+ m_soundcomm(*this, "soundcomm"),
+ m_ym2151(*this, "ymsnd"),
+ m_pokey(*this, "pokey"),
+ m_tms5220(*this, "tms"),
+ m_soundctl(*this, "soundctl"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob")
+ { }
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
+ DECLARE_DRIVER_INIT(gauntlet);
+ DECLARE_DRIVER_INIT(vindctr2);
+ void vindctr2(machine_config &config);
+ void gauntlet(machine_config &config);
+ void gaunt2p(machine_config &config);
+ void gauntlet2(machine_config &config);
- uint16_t m_sound_reset_val;
- uint8_t m_vindctr2_screen_refresh;
- uint8_t m_playfield_tile_bank;
- uint8_t m_playfield_color_bank;
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_WRITE16_MEMBER(sound_reset_w);
@@ -53,23 +54,34 @@ public:
DECLARE_WRITE8_MEMBER(mixer_w);
void swap_memory(void *ptr1, void *ptr2, int bytes);
void common_init(int vindctr2);
- DECLARE_DRIVER_INIT(gauntlet);
- DECLARE_DRIVER_INIT(vindctr2);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(gauntlet);
- DECLARE_MACHINE_RESET(gauntlet);
- DECLARE_VIDEO_START(gauntlet);
uint32_t screen_update_gauntlet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE16_MEMBER( gauntlet_xscroll_w );
DECLARE_WRITE16_MEMBER( gauntlet_yscroll_w );
- static const atari_motion_objects_config s_mob_config;
void gauntlet_base(machine_config &config);
- void vindctr2(machine_config &config);
- void gauntlet(machine_config &config);
- void gaunt2p(machine_config &config);
- void gauntlet2(machine_config &config);
void main_map(address_map &map);
void sound_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_audiocpu;
+ required_device<atari_sound_comm_device> m_soundcomm;
+ required_device<ym2151_device> m_ym2151;
+ required_device<pokey_device> m_pokey;
+ required_device<tms5220_device> m_tms5220;
+ required_device<ls259_device> m_soundctl;
+
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+
+ uint16_t m_sound_reset_val;
+ uint8_t m_vindctr2_screen_refresh;
+ uint8_t m_playfield_tile_bank;
+ uint8_t m_playfield_color_bank;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_GAUNTLET_H
diff --git a/src/mame/includes/gridlee.h b/src/mame/includes/gridlee.h
index 3a134117855..413c3b6acb1 100644
--- a/src/mame/includes/gridlee.h
+++ b/src/mame/includes/gridlee.h
@@ -7,6 +7,10 @@
driver by Aaron Giles
***************************************************************************/
+#ifndef MAME_INCLUDES_GRIDLEE_H
+#define MAME_INCLUDES_GRIDLEE_H
+
+#pragma once
#include "sound/samples.h"
#include "machine/74259.h"
@@ -27,34 +31,19 @@
class gridlee_state : public driver_device
{
public:
- gridlee_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ gridlee_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_latch(*this, "latch"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_videoram;
- required_device<cpu_device> m_maincpu;
- required_device<ls259_device> m_latch;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- uint8_t m_last_analog_input[2];
- uint8_t m_last_analog_output[2];
- std::unique_ptr<uint8_t[]> m_poly17;
- uint8_t *m_rand17;
- emu_timer *m_irq_off;
- emu_timer *m_irq_timer;
- emu_timer *m_firq_off;
- emu_timer *m_firq_timer;
- uint8_t m_cocktail_flip;
- std::unique_ptr<uint8_t[]> m_local_videoram;
- uint8_t m_palettebank_vis;
+ void gridlee(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(analog_port_r);
DECLARE_READ8_MEMBER(random_num_r);
DECLARE_WRITE8_MEMBER(latch_w);
@@ -64,9 +53,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(cocktail_flip_w);
DECLARE_WRITE8_MEMBER(gridlee_videoram_w);
DECLARE_WRITE8_MEMBER(gridlee_palette_select_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(gridlee);
uint32_t screen_update_gridlee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(irq_off_tick);
@@ -75,8 +61,31 @@ public:
TIMER_CALLBACK_MEMBER(firq_timer_tick);
void expand_pixels();
void poly17_init();
- void gridlee(machine_config &config);
void cpu1_map(address_map &map);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
+private:
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_device<cpu_device> m_maincpu;
+ required_device<ls259_device> m_latch;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ uint8_t m_last_analog_input[2];
+ uint8_t m_last_analog_output[2];
+ std::unique_ptr<uint8_t[]> m_poly17;
+ uint8_t *m_rand17;
+ emu_timer *m_irq_off;
+ emu_timer *m_irq_timer;
+ emu_timer *m_firq_off;
+ emu_timer *m_firq_timer;
+ uint8_t m_cocktail_flip;
+ std::unique_ptr<uint8_t[]> m_local_videoram;
+ uint8_t m_palettebank_vis;
};
@@ -112,3 +121,5 @@ private:
};
DECLARE_DEVICE_TYPE(GRIDLEE, gridlee_sound_device)
+
+#endif // MAME_INCLUDES_GRIDLEE_H
diff --git a/src/mame/includes/irobot.h b/src/mame/includes/irobot.h
index ffda13271ff..a4560f42dc7 100644
--- a/src/mame/includes/irobot.h
+++ b/src/mame/includes/irobot.h
@@ -5,39 +5,81 @@
Atari I, Robot hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_IROBOT_H
+#define MAME_INCLUDES_IROBOT_H
+
+#pragma once
#include "machine/timer.h"
#include "screen.h"
#define IR_TIMING 1 /* try to emulate MB and VG running time */
-struct irmb_ops
-{
- const struct irmb_ops *nxtop;
- uint32_t func;
- uint32_t diradd;
- uint32_t latchmask;
- uint32_t *areg;
- uint32_t *breg;
- uint8_t cycles;
- uint8_t diren;
- uint8_t flags;
- uint8_t ramsel;
-};
-
-
class irobot_state : public driver_device
{
public:
- irobot_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_nvram(*this, "nvram") ,
+ struct irmb_ops
+ {
+ const struct irmb_ops *nxtop;
+ uint32_t func;
+ uint32_t diradd;
+ uint32_t latchmask;
+ uint32_t *areg;
+ uint32_t *breg;
+ uint8_t cycles;
+ uint8_t diren;
+ uint8_t flags;
+ uint8_t ramsel;
+ };
+
+ irobot_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_nvram(*this, "nvram") ,
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
+
+ DECLARE_DRIVER_INIT(irobot);
+
+ void irobot(machine_config &config);
+
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ void irobot_map(address_map &map);
+
+ DECLARE_WRITE8_MEMBER(irobot_nvram_w);
+ DECLARE_WRITE8_MEMBER(irobot_clearirq_w);
+ DECLARE_WRITE8_MEMBER(irobot_clearfirq_w);
+ DECLARE_READ8_MEMBER(irobot_sharedmem_r);
+ DECLARE_WRITE8_MEMBER(irobot_sharedmem_w);
+ DECLARE_WRITE8_MEMBER(irobot_statwr_w);
+ DECLARE_WRITE8_MEMBER(irobot_out0_w);
+ DECLARE_WRITE8_MEMBER(irobot_rom_banksel_w);
+ DECLARE_WRITE8_MEMBER(irobot_control_w);
+ DECLARE_READ8_MEMBER(irobot_control_r);
+ DECLARE_READ8_MEMBER(irobot_status_r);
+ DECLARE_WRITE8_MEMBER(irobot_paletteram_w);
+ DECLARE_READ8_MEMBER(quad_pokeyn_r);
+ DECLARE_WRITE8_MEMBER(quad_pokeyn_w);
+ DECLARE_PALETTE_INIT(irobot);
+ uint32_t screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_CALLBACK_MEMBER(scanline_callback);
+ TIMER_DEVICE_CALLBACK_MEMBER(irobot_irvg_done_callback);
+ TIMER_DEVICE_CALLBACK_MEMBER(irobot_irmb_done_callback);
+ void irobot_poly_clear(uint8_t *bitmap_base);
+ void irobot_poly_clear();
+ void draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col);
+ void irobot_run_video();
+ uint32_t irmb_din(const irmb_ops *curop);
+ void irmb_dout(const irmb_ops *curop, uint32_t d);
+ void load_oproms();
+ void irmb_run();
+private:
required_shared_ptr<uint8_t> m_nvram;
required_shared_ptr<uint8_t> m_videoram;
uint8_t m_vg_clear;
@@ -70,40 +112,11 @@ public:
int m_ir_ymin;
int m_ir_xmax;
int m_ir_ymax;
- DECLARE_WRITE8_MEMBER(irobot_nvram_w);
- DECLARE_WRITE8_MEMBER(irobot_clearirq_w);
- DECLARE_WRITE8_MEMBER(irobot_clearfirq_w);
- DECLARE_READ8_MEMBER(irobot_sharedmem_r);
- DECLARE_WRITE8_MEMBER(irobot_sharedmem_w);
- DECLARE_WRITE8_MEMBER(irobot_statwr_w);
- DECLARE_WRITE8_MEMBER(irobot_out0_w);
- DECLARE_WRITE8_MEMBER(irobot_rom_banksel_w);
- DECLARE_WRITE8_MEMBER(irobot_control_w);
- DECLARE_READ8_MEMBER(irobot_control_r);
- DECLARE_READ8_MEMBER(irobot_status_r);
- DECLARE_WRITE8_MEMBER(irobot_paletteram_w);
- DECLARE_READ8_MEMBER(quad_pokeyn_r);
- DECLARE_WRITE8_MEMBER(quad_pokeyn_w);
- DECLARE_DRIVER_INIT(irobot);
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(irobot);
- uint32_t screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_CALLBACK_MEMBER(scanline_callback);
- TIMER_DEVICE_CALLBACK_MEMBER(irobot_irvg_done_callback);
- TIMER_DEVICE_CALLBACK_MEMBER(irobot_irmb_done_callback);
- void _irobot_poly_clear(uint8_t *bitmap_base);
- void irobot_poly_clear();
- void draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col);
- void irobot_run_video();
- uint32_t irmb_din(const irmb_ops *curop);
- void irmb_dout(const irmb_ops *curop, uint32_t d);
- void load_oproms();
- void irmb_run();
+
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void irobot(machine_config &config);
- void irobot_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_IROBOT_H
diff --git a/src/mame/includes/jedi.h b/src/mame/includes/jedi.h
index 65bc928bbdb..ba12b49e08e 100644
--- a/src/mame/includes/jedi.h
+++ b/src/mame/includes/jedi.h
@@ -5,6 +5,10 @@
Atari Return of the Jedi hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_JEDI_H
+#define MAME_INCLUDES_JEDI_H
+
+#pragma once
#include "screen.h"
@@ -21,8 +25,8 @@
class jedi_state : public driver_device
{
public:
- jedi_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ jedi_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_nvram(*this, "nvram") ,
m_backgroundram(*this, "backgroundram"),
m_paletteram(*this, "paletteram"),
@@ -36,30 +40,10 @@ public:
m_screen(*this, "screen")
{ }
- required_shared_ptr<uint8_t> m_nvram;
-
- /* machine state */
- uint8_t m_a2d_select;
- uint8_t m_nvram_enabled;
- emu_timer *m_interrupt_timer;
-
- /* video state */
- required_shared_ptr<uint8_t> m_backgroundram;
- required_shared_ptr<uint8_t> m_paletteram;
- required_shared_ptr<uint8_t> m_foregroundram;
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_smoothing_table;
- uint32_t m_vscroll;
- uint32_t m_hscroll;
- bool m_foreground_bank;
- bool m_video_off;
+ DECLARE_CUSTOM_INPUT_MEMBER(jedi_audio_comm_stat_r);
+ void jedi(machine_config &config);
- /* audio state */
- uint8_t m_audio_latch;
- uint8_t m_audio_ack_latch;
- required_shared_ptr<uint8_t> m_audio_comm_stat;
- required_shared_ptr<uint8_t> m_speech_data;
- uint8_t m_speech_strobe_state;
+protected:
DECLARE_WRITE8_MEMBER(main_irq_ack_w);
DECLARE_WRITE8_MEMBER(rom_banksel_w);
DECLARE_READ8_MEMBER(a2d_data_r);
@@ -70,7 +54,6 @@ public:
DECLARE_WRITE8_MEMBER(nvram_enable_w);
DECLARE_WRITE8_MEMBER(jedi_vscroll_w);
DECLARE_WRITE8_MEMBER(jedi_hscroll_w);
- DECLARE_CUSTOM_INPUT_MEMBER(jedi_audio_comm_stat_r);
DECLARE_WRITE8_MEMBER(irq_ack_w);
DECLARE_WRITE_LINE_MEMBER(audio_reset_w);
DECLARE_WRITE8_MEMBER(jedi_audio_latch_w);
@@ -94,12 +77,40 @@ public:
void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_background_and_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- required_device<screen_device> m_screen;
- void jedi(machine_config &config);
void jedi_audio(machine_config &config);
void jedi_video(machine_config &config);
void audio_map(address_map &map);
void main_map(address_map &map);
+
+private:
+ required_shared_ptr<uint8_t> m_nvram;
+
+ /* machine state */
+ uint8_t m_a2d_select;
+ uint8_t m_nvram_enabled;
+ emu_timer *m_interrupt_timer;
+
+ /* video state */
+ required_shared_ptr<uint8_t> m_backgroundram;
+ required_shared_ptr<uint8_t> m_paletteram;
+ required_shared_ptr<uint8_t> m_foregroundram;
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_smoothing_table;
+ uint32_t m_vscroll;
+ uint32_t m_hscroll;
+ bool m_foreground_bank;
+ bool m_video_off;
+
+ /* audio state */
+ uint8_t m_audio_latch;
+ uint8_t m_audio_ack_latch;
+ required_shared_ptr<uint8_t> m_audio_comm_stat;
+ required_shared_ptr<uint8_t> m_speech_data;
+ uint8_t m_speech_strobe_state;
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_audiocpu;
+ required_device<screen_device> m_screen;
};
+
+#endif // MAME_INCLUDES_JEDI_H
diff --git a/src/mame/includes/klax.h b/src/mame/includes/klax.h
index a1682cc02a6..d17ef34aa69 100644
--- a/src/mame/includes/klax.h
+++ b/src/mame/includes/klax.h
@@ -5,6 +5,10 @@
Atari Klax hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_KLAX_H
+#define MAME_INCLUDES_KLAX_H
+
+#pragma once
#include "machine/atarigen.h"
#include "video/atarimo.h"
@@ -19,8 +23,11 @@ public:
, m_p1(*this, "P1")
{ }
- DECLARE_MACHINE_START(klax);
- DECLARE_MACHINE_RESET(klax);
+ void klax(machine_config &config);
+ void klax2bl(machine_config &config);
+
+protected:
+ virtual void machine_reset() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
@@ -29,20 +36,20 @@ public:
DECLARE_WRITE16_MEMBER(klax_latch_w);
- DECLARE_VIDEO_START(klax);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
uint32_t screen_update_klax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
-
- void klax(machine_config &config);
- void klax2bl(machine_config &config);
void bootleg_sound_map(address_map &map);
void klax2bl_map(address_map &map);
void klax_map(address_map &map);
+
private:
required_device<tilemap_device> m_playfield_tilemap;
required_device<atari_motion_objects_device> m_mob;
required_ioport m_p1;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_KLAX_H
diff --git a/src/mame/includes/lynx.h b/src/mame/includes/lynx.h
index 6ed055e9406..17e321cf868 100644
--- a/src/mame/includes/lynx.h
+++ b/src/mame/includes/lynx.h
@@ -5,10 +5,11 @@
* includes/lynx.h
*
****************************************************************************/
-
#ifndef MAME_INCLUDES_LYNX_H
#define MAME_INCLUDES_LYNX_H
+#pragma once
+
#include "audio/lynx.h"
#include "imagedev/snapquik.h"
#include "bus/generic/slot.h"
@@ -18,86 +19,86 @@
#define LYNX_QUICKLOAD 1
-struct BLITTER
-{
- // global
- uint16_t screen;
- uint16_t colbuf;
- uint16_t colpos; // byte where value of collision is written
- int16_t xoff, yoff;
- // in command
- int mode;
- uint8_t spr_coll;
- uint8_t spritenr;
- int16_t x_pos,y_pos;
- uint16_t width, height; // uint16 important for blue lightning
- int16_t tilt_accumulator;
- uint16_t height_accumulator, width_accumulator;
- uint16_t width_offset, height_offset;
- int16_t stretch, tilt;
- uint8_t color[16]; // or stored
- uint16_t bitmap;
- int use_rle;
- int line_color;
-
- uint8_t spr_ctl0;
- uint8_t spr_ctl1;
- uint16_t scb;
- uint16_t scb_next;
- uint8_t sprite_collide;
-
- int everon;
- uint8_t fred;
- int memory_accesses;
- attotime time;
-
- int no_collide;
- int vstretch;
- int lefthanded;
- int busy;
-};
+#define NR_LYNX_TIMERS 8
-struct UART
+class lynx_state : public driver_device
{
- uint8_t serctl;
- uint8_t data_received, data_to_send, buffer;
- int received;
- int sending;
- int buffer_loaded;
-};
+public:
+ struct BLITTER
+ {
+ // global
+ uint16_t screen;
+ uint16_t colbuf;
+ uint16_t colpos; // byte where value of collision is written
+ int16_t xoff, yoff;
+ // in command
+ int mode;
+ uint8_t spr_coll;
+ uint8_t spritenr;
+ int16_t x_pos,y_pos;
+ uint16_t width, height; // uint16 important for blue lightning
+ int16_t tilt_accumulator;
+ uint16_t height_accumulator, width_accumulator;
+ uint16_t width_offset, height_offset;
+ int16_t stretch, tilt;
+ uint8_t color[16]; // or stored
+ uint16_t bitmap;
+ int use_rle;
+ int line_color;
+
+ uint8_t spr_ctl0;
+ uint8_t spr_ctl1;
+ uint16_t scb;
+ uint16_t scb_next;
+ uint8_t sprite_collide;
+
+ int everon;
+ uint8_t fred;
+ int memory_accesses;
+ attotime time;
+
+ int no_collide;
+ int vstretch;
+ int lefthanded;
+ int busy;
+ };
-struct SUZY
-{
- uint8_t data[0x100];
- uint8_t high;
- int low;
- int signed_math;
- int accumulate;
- int accumulate_overflow;
-};
+ struct UART
+ {
+ uint8_t serctl;
+ uint8_t data_received, data_to_send, buffer;
+ int received;
+ int sending;
+ int buffer_loaded;
+ };
-struct MIKEY
-{
- uint8_t data[0x100];
- uint16_t disp_addr;
- uint8_t vb_rest;
-};
+ struct SUZY
+ {
+ uint8_t data[0x100];
+ uint8_t high;
+ int low;
+ int signed_math;
+ int accumulate;
+ int accumulate_overflow;
+ };
-struct LYNX_TIMER
-{
- uint8_t bakup;
- uint8_t cntrl1;
- uint8_t cntrl2;
- uint8_t counter;
- emu_timer *timer;
- int timer_active;
-};
+ struct MIKEY
+ {
+ uint8_t data[0x100];
+ uint16_t disp_addr;
+ uint8_t vb_rest;
+ };
-#define NR_LYNX_TIMERS 8
+ struct LYNX_TIMER
+ {
+ uint8_t bakup;
+ uint8_t cntrl1;
+ uint8_t cntrl2;
+ uint8_t counter;
+ emu_timer *timer;
+ int timer_active;
+ };
-class lynx_state : public driver_device
-{
-public:
enum
{
TIMER_BLITTER,
@@ -106,8 +107,8 @@ public:
TIMER_UART
};
- lynx_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ lynx_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_mem_0000(*this, "mem_0000"),
m_mem_fc00(*this, "mem_fc00"),
m_mem_fd00(*this, "mem_fd00"),
@@ -116,36 +117,11 @@ public:
m_maincpu(*this, "maincpu"),
m_sound(*this, "custom"),
m_cart(*this, "cartslot"),
- m_palette(*this, "palette") { }
-
- virtual void video_start() override;
+ m_palette(*this, "palette")
+ { }
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_shared_ptr<uint8_t> m_mem_0000;
- required_shared_ptr<uint8_t> m_mem_fc00;
- required_shared_ptr<uint8_t> m_mem_fd00;
- required_shared_ptr<uint8_t> m_mem_fe00;
- required_shared_ptr<uint8_t> m_mem_fffa;
- required_device<cpu_device> m_maincpu;
- required_device<lynx_sound_device> m_sound;
- required_device<generic_slot_device> m_cart;
- required_device<palette_device> m_palette;
- uint16_t m_granularity;
- int m_sign_AB;
- int m_sign_CD;
- uint32_t m_lynx_palette[0x10];
- int m_rotate;
- uint8_t m_memory_config;
-
- BLITTER m_blitter;
- SUZY m_suzy;
- MIKEY m_mikey;
- UART m_uart;
- LYNX_TIMER m_timer[NR_LYNX_TIMERS];
-
- bitmap_ind16 m_bitmap;
- bitmap_ind16 m_bitmap_temp;
DECLARE_READ8_MEMBER(suzy_read);
DECLARE_WRITE8_MEMBER(suzy_write);
DECLARE_WRITE8_MEMBER(lynx_uart_w);
@@ -158,8 +134,6 @@ public:
void lynx_multiply();
uint8_t lynx_timer_read(int which, int offset);
void lynx_timer_write(int which, int offset, uint8_t data);
- virtual void machine_start() override;
- virtual void machine_reset() override;
DECLARE_PALETTE_INIT(lynx);
void sound_cb();
TIMER_CALLBACK_MEMBER(lynx_blitter_timer);
@@ -183,11 +157,40 @@ public:
void lynx_uart_reset();
image_verify_result lynx_verify_cart(char *header, int kind);
DECLARE_QUICKLOAD_LOAD_MEMBER( lynx );
-
void lynx(machine_config &config);
- void lynx_mem(address_map &map);
+
protected:
+ virtual void machine_start() override;
+ 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;
+ void lynx_mem(address_map &map);
+
+private:
+ required_shared_ptr<uint8_t> m_mem_0000;
+ required_shared_ptr<uint8_t> m_mem_fc00;
+ required_shared_ptr<uint8_t> m_mem_fd00;
+ required_shared_ptr<uint8_t> m_mem_fe00;
+ required_shared_ptr<uint8_t> m_mem_fffa;
+ required_device<cpu_device> m_maincpu;
+ required_device<lynx_sound_device> m_sound;
+ required_device<generic_slot_device> m_cart;
+ required_device<palette_device> m_palette;
+ uint16_t m_granularity;
+ int m_sign_AB;
+ int m_sign_CD;
+ uint32_t m_lynx_palette[0x10];
+ int m_rotate;
+ uint8_t m_memory_config;
+
+ BLITTER m_blitter;
+ SUZY m_suzy;
+ MIKEY m_mikey;
+ UART m_uart;
+ LYNX_TIMER m_timer[NR_LYNX_TIMERS];
+
+ bitmap_ind16 m_bitmap;
+ bitmap_ind16 m_bitmap_temp;
};
diff --git a/src/mame/includes/metalmx.h b/src/mame/includes/metalmx.h
index f9725703eca..ed8da93bc29 100644
--- a/src/mame/includes/metalmx.h
+++ b/src/mame/includes/metalmx.h
@@ -1,5 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Philip Bennett
+#ifndef MAME_INCLUDES_METALMX_H
+#define MAME_INCLUDES_METALMX_H
+
+#pragma once
+
#include "audio/cage.h"
#include "cpu/adsp2100/adsp2100.h"
@@ -10,29 +15,23 @@
class metalmx_state : public driver_device
{
public:
- metalmx_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_gsp(*this, "gsp"),
- m_adsp(*this, "adsp"),
- m_dsp32c_1(*this, "dsp32c_1"),
- m_dsp32c_2(*this, "dsp32c_2"),
- m_cage(*this, "cage"),
+ metalmx_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_gsp(*this, "gsp"),
+ m_adsp(*this, "adsp"),
+ m_dsp32c_1(*this, "dsp32c_1"),
+ m_dsp32c_2(*this, "dsp32c_2"),
+ m_cage(*this, "cage"),
m_adsp_internal_program_ram(*this, "adsp_intprog"),
m_gsp_dram(*this, "gsp_dram"),
- m_gsp_vram(*this, "gsp_vram"){ }
-
- required_device<m68ec020_device> m_maincpu;
- required_device<tms34020_device> m_gsp;
- required_device<adsp2105_device> m_adsp;
- required_device<dsp32c_device> m_dsp32c_1;
- required_device<dsp32c_device> m_dsp32c_2;
- required_device<atari_cage_device> m_cage;
+ m_gsp_vram(*this, "gsp_vram")
+ { }
- required_shared_ptr<uint32_t> m_adsp_internal_program_ram;
- required_shared_ptr<uint16_t> m_gsp_dram;
- required_shared_ptr<uint16_t> m_gsp_vram;
+ DECLARE_DRIVER_INIT(metalmx);
+ void metalmx(machine_config &config);
+protected:
DECLARE_READ32_MEMBER(unk_r);
DECLARE_READ32_MEMBER(watchdog_r);
DECLARE_WRITE32_MEMBER(shifter_w);
@@ -51,16 +50,28 @@ public:
DECLARE_READ32_MEMBER(host_vram_r);
DECLARE_WRITE32_MEMBER(host_vram_w);
DECLARE_WRITE32_MEMBER(timer_w);
- DECLARE_DRIVER_INIT(metalmx);
DECLARE_WRITE8_MEMBER(cage_irq_callback);
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_metalmx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void metalmx(machine_config &config);
void adsp_data_map(address_map &map);
void adsp_program_map(address_map &map);
void dsp32c_1_map(address_map &map);
void dsp32c_2_map(address_map &map);
void gsp_map(address_map &map);
void main_map(address_map &map);
+
+private:
+ required_device<m68ec020_device> m_maincpu;
+ required_device<tms34020_device> m_gsp;
+ required_device<adsp2105_device> m_adsp;
+ required_device<dsp32c_device> m_dsp32c_1;
+ required_device<dsp32c_device> m_dsp32c_2;
+ required_device<atari_cage_device> m_cage;
+
+ required_shared_ptr<uint32_t> m_adsp_internal_program_ram;
+ required_shared_ptr<uint16_t> m_gsp_dram;
+ required_shared_ptr<uint16_t> m_gsp_vram;
};
+
+#endif // MAME_INCLUDES_METALMX_H
diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h
index 8e18e2d2330..c10615ad9a3 100644
--- a/src/mame/includes/nitedrvr.h
+++ b/src/mame/includes/nitedrvr.h
@@ -5,6 +5,10 @@
Atari Night Driver hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_NITEDRVR_H
+#define MAME_INCLUDES_NITEDRVR_H
+
+#pragma once
#include "machine/timer.h"
#include "sound/discrete.h"
@@ -21,15 +25,38 @@
class nitedrvr_state : public driver_device
{
public:
- nitedrvr_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ nitedrvr_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_hvc(*this, "hvc"),
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"){ }
+ m_palette(*this, "palette")
+ { }
+
+ void nitedrvr(machine_config &config);
+
+protected:
+ DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r);
+ DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w);
+ DECLARE_READ8_MEMBER(nitedrvr_in0_r);
+ DECLARE_READ8_MEMBER(nitedrvr_in1_r);
+ DECLARE_WRITE8_MEMBER(nitedrvr_out0_w);
+ DECLARE_WRITE8_MEMBER(nitedrvr_out1_w);
+ DECLARE_WRITE8_MEMBER(nitedrvr_videoram_w);
+ 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_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_crash_toggle_callback);
+ void draw_box(bitmap_ind16 &bitmap, const rectangle &cliprect, int bx, int by, int ex, int ey);
+ void draw_roadway(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ int nitedrvr_steering();
+ void nitedrvr_map(address_map &map);
+private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_hvc;
@@ -53,26 +80,9 @@ public:
required_device<discrete_device> m_discrete;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
-
- DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r);
- DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w);
- DECLARE_READ8_MEMBER(nitedrvr_in0_r);
- DECLARE_READ8_MEMBER(nitedrvr_in1_r);
- DECLARE_WRITE8_MEMBER(nitedrvr_out0_w);
- DECLARE_WRITE8_MEMBER(nitedrvr_out1_w);
- DECLARE_WRITE8_MEMBER(nitedrvr_videoram_w);
- 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_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_crash_toggle_callback);
- void draw_box(bitmap_ind16 &bitmap, const rectangle &cliprect, int bx, int by, int ex, int ey);
- void draw_roadway(bitmap_ind16 &bitmap, const rectangle &cliprect);
- int nitedrvr_steering();
- void nitedrvr(machine_config &config);
- void nitedrvr_map(address_map &map);
};
/*----------- defined in audio/nitedrvr.c -----------*/
DISCRETE_SOUND_EXTERN( nitedrvr );
+
+#endif // MAME_INCLUDES_NITEDRVR_H
diff --git a/src/mame/includes/offtwall.h b/src/mame/includes/offtwall.h
index a14a74710a8..7b414e3d3c2 100644
--- a/src/mame/includes/offtwall.h
+++ b/src/mame/includes/offtwall.h
@@ -5,6 +5,10 @@
Atari "Round" hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_OFFTWALL_H
+#define MAME_INCLUDES_OFFTWALL_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,38 +17,43 @@
class offtwall_state : public atarigen_state
{
public:
- offtwall_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_vad(*this, "vad"),
- m_mainram(*this, "mainram"),
- m_bankrom_base(*this, "bankrom_base") { }
+ offtwall_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_vad(*this, "vad"),
+ m_mainram(*this, "mainram"),
+ m_bankrom_base(*this, "bankrom_base")
+ { }
- required_device<atari_jsa_iii_device> m_jsa;
- required_device<atari_vad_device> m_vad;
- required_shared_ptr<uint16_t> m_mainram;
+ DECLARE_DRIVER_INIT(offtwall);
+ DECLARE_DRIVER_INIT(offtwalc);
- uint16_t *m_bankswitch_base;
- required_shared_ptr<uint16_t> m_bankrom_base;
- uint32_t m_bank_offset;
+ void offtwall(machine_config &config);
- uint16_t *m_spritecache_count;
- uint16_t *m_unknown_verify_base;
+protected:
virtual void update_interrupts() override;
DECLARE_WRITE16_MEMBER(io_latch_w);
DECLARE_READ16_MEMBER(bankswitch_r);
DECLARE_READ16_MEMBER(bankrom_r);
DECLARE_READ16_MEMBER(spritecache_count_r);
DECLARE_READ16_MEMBER(unknown_verify_r);
- DECLARE_DRIVER_INIT(offtwall);
- DECLARE_DRIVER_INIT(offtwalc);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(offtwall);
- DECLARE_MACHINE_RESET(offtwall);
- DECLARE_VIDEO_START(offtwall);
uint32_t screen_update_offtwall(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_iii_device> m_jsa;
+ required_device<atari_vad_device> m_vad;
+ required_shared_ptr<uint16_t> m_mainram;
+
+ uint16_t *m_bankswitch_base;
+ required_shared_ptr<uint16_t> m_bankrom_base;
+ uint32_t m_bank_offset;
+
+ uint16_t *m_spritecache_count;
+ uint16_t *m_unknown_verify_base;
static const atari_motion_objects_config s_mob_config;
- void offtwall(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_OFFTWALL_H
diff --git a/src/mame/includes/ohmygod.h b/src/mame/includes/ohmygod.h
index 7094947313b..e692940034d 100644
--- a/src/mame/includes/ohmygod.h
+++ b/src/mame/includes/ohmygod.h
@@ -5,19 +5,43 @@
Oh My God!
*************************************************************************/
+#ifndef MAME_INCLUDES_OHMYGOD_H
+#define MAME_INCLUDES_OHMYGOD_H
+
+#pragma once
class ohmygod_state : public driver_device
{
public:
- ohmygod_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ohmygod_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_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
+
+ DECLARE_DRIVER_INIT(ohmygod);
+ DECLARE_DRIVER_INIT(naname);
+ void ohmygod(machine_config &config);
+protected:
+ DECLARE_WRITE16_MEMBER(ohmygod_ctrl_w);
+ DECLARE_WRITE16_MEMBER(ohmygod_videoram_w);
+ DECLARE_WRITE16_MEMBER(ohmygod_spritebank_w);
+ DECLARE_WRITE16_MEMBER(ohmygod_scrollx_w);
+ DECLARE_WRITE16_MEMBER(ohmygod_scrolly_w);
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ uint32_t screen_update_ohmygod(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+ void ohmygod_map(address_map &map);
+ void oki_map(address_map &map);
+private:
/* memory pointers */
required_shared_ptr<uint16_t> m_videoram;
required_shared_ptr<uint16_t> m_spriteram;
@@ -31,23 +55,10 @@ public:
/* misc */
int m_adpcm_bank_shift;
int m_sndbank;
- DECLARE_WRITE16_MEMBER(ohmygod_ctrl_w);
- DECLARE_WRITE16_MEMBER(ohmygod_videoram_w);
- DECLARE_WRITE16_MEMBER(ohmygod_spritebank_w);
- DECLARE_WRITE16_MEMBER(ohmygod_scrollx_w);
- DECLARE_WRITE16_MEMBER(ohmygod_scrolly_w);
- DECLARE_DRIVER_INIT(ohmygod);
- DECLARE_DRIVER_INIT(naname);
- TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update_ohmygod(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void ohmygod(machine_config &config);
- void ohmygod_map(address_map &map);
- void oki_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_OHMYGOD_H
diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h
index 3b922603902..c9312941f93 100644
--- a/src/mame/includes/orbit.h
+++ b/src/mame/includes/orbit.h
@@ -41,6 +41,9 @@ public:
m_palette(*this, "palette")
{ }
+ void orbit(machine_config &config);
+
+protected:
DECLARE_WRITE_LINE_MEMBER(coin_lockout_w);
DECLARE_WRITE_LINE_MEMBER(heat_rst_led_w);
DECLARE_WRITE_LINE_MEMBER(hyper_led_w);
@@ -55,16 +58,15 @@ public:
DECLARE_WRITE8_MEMBER(orbit_noise_amp_w);
DECLARE_WRITE8_MEMBER(orbit_noise_rst_w);
- void orbit(machine_config &config);
- void orbit_map(address_map &map);
-protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
+ void orbit_map(address_map &map);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void update_misc_flags(address_space &space, uint8_t val);
+private:
/* memory pointers */
required_shared_ptr<uint8_t> m_playfield_ram;
required_shared_ptr<uint8_t> m_sprite_ram;
diff --git a/src/mame/includes/pcw16.h b/src/mame/includes/pcw16.h
index 1d225a19cab..3f4b1497ccd 100644
--- a/src/mame/includes/pcw16.h
+++ b/src/mame/includes/pcw16.h
@@ -5,10 +5,11 @@
* includes/pcw16.h
*
****************************************************************************/
-
#ifndef MAME_INCLUDES_PCW16_H
#define MAME_INCLUDES_PCW16_H
+#pragma once
+
#include "cpu/z80/z80.h"
#include "machine/upd765.h" /* FDC superio */
#include "machine/pc_lpt.h" /* PC-Parallel Port */
@@ -48,41 +49,9 @@ public:
m_io_extra(*this, "EXTRA")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<intel_e28f008sa_device> m_flash0;
- required_device<intel_e28f008sa_device> m_flash1;
- required_device<pc_fdc_superio_device> m_fdc;
- required_device<ns16550_device> m_uart2;
- required_device<beep_device> m_beeper;
- required_device<ram_device> m_ram;
- required_device<at_keyboard_device> m_keyboard;
- required_memory_region m_region_rom;
- required_ioport m_io_extra;
+ void pcw16(machine_config &config);
- unsigned long m_interrupt_counter;
- int m_banks[4];
- int m_4_bit_port;
- int m_fdc_int_code;
- int m_system_status;
- char *m_mem_ptr[4];
- unsigned char m_keyboard_data_shift;
- int m_keyboard_parity_table[256];
- int m_keyboard_bits;
- int m_keyboard_bits_output;
- int m_keyboard_state;
- int m_keyboard_previous_state;
- unsigned char m_rtc_seconds;
- unsigned char m_rtc_minutes;
- unsigned char m_rtc_hours;
- unsigned char m_rtc_days_max;
- unsigned char m_rtc_days;
- unsigned char m_rtc_months;
- unsigned char m_rtc_years;
- unsigned char m_rtc_control;
- unsigned char m_rtc_256ths_seconds;
- int m_previous_fdc_int_state;
- int m_colour_palette[16];
- int m_video_control;
+protected:
DECLARE_WRITE8_MEMBER(pcw16_palette_w);
DECLARE_READ8_MEMBER(pcw16_bankhw_r);
DECLARE_WRITE8_MEMBER(pcw16_bankhw_w);
@@ -141,9 +110,46 @@ public:
void pcw16_vh_decode_mode0(bitmap_ind16 &bitmap, int x, int y, unsigned char byte);
void pcw16_vh_decode_mode1(bitmap_ind16 &bitmap, int x, int y, unsigned char byte);
void pcw16_vh_decode_mode2(bitmap_ind16 &bitmap, int x, int y, unsigned char byte);
- void pcw16(machine_config &config);
+
void pcw16_io(address_map &map);
void pcw16_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<intel_e28f008sa_device> m_flash0;
+ required_device<intel_e28f008sa_device> m_flash1;
+ required_device<pc_fdc_superio_device> m_fdc;
+ required_device<ns16550_device> m_uart2;
+ required_device<beep_device> m_beeper;
+ required_device<ram_device> m_ram;
+ required_device<at_keyboard_device> m_keyboard;
+ required_memory_region m_region_rom;
+ required_ioport m_io_extra;
+
+ unsigned long m_interrupt_counter;
+ int m_banks[4];
+ int m_4_bit_port;
+ int m_fdc_int_code;
+ int m_system_status;
+ char *m_mem_ptr[4];
+ unsigned char m_keyboard_data_shift;
+ int m_keyboard_parity_table[256];
+ int m_keyboard_bits;
+ int m_keyboard_bits_output;
+ int m_keyboard_state;
+ int m_keyboard_previous_state;
+ unsigned char m_rtc_seconds;
+ unsigned char m_rtc_minutes;
+ unsigned char m_rtc_hours;
+ unsigned char m_rtc_days_max;
+ unsigned char m_rtc_days;
+ unsigned char m_rtc_months;
+ unsigned char m_rtc_years;
+ unsigned char m_rtc_control;
+ unsigned char m_rtc_256ths_seconds;
+ int m_previous_fdc_int_state;
+ int m_colour_palette[16];
+ int m_video_control;
};
#endif // MAME_INCLUDES_PCW16_H
diff --git a/src/mame/includes/pecom.h b/src/mame/includes/pecom.h
index bec69caea98..ddaa3daaac3 100644
--- a/src/mame/includes/pecom.h
+++ b/src/mame/includes/pecom.h
@@ -3,6 +3,8 @@
#ifndef MAME_INCLUDES_PECOM_H
#define MAME_INCLUDES_PECOM_H
+#pragma once
+
#include "cpu/cosmac/cosmac.h"
#include "imagedev/cassette.h"
#include "machine/ram.h"
@@ -17,8 +19,8 @@
class pecom_state : public driver_device
{
public:
- pecom_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ pecom_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_cdp1802(*this, CDP1802_TAG),
m_cdp1869(*this, CDP1869_TAG),
m_cassette(*this, "cassette"),
@@ -27,18 +29,13 @@ public:
m_bank2(*this, "bank2"),
m_bank3(*this, "bank3"),
m_bank4(*this, "bank4"),
- m_io_cnt(*this, "CNT") { }
-
- required_device<cosmac_device> m_cdp1802;
- required_device<cdp1869_device> m_cdp1869;
-
- std::unique_ptr<uint8_t[]> m_charram; /* character generator ROM */
- int m_reset; /* CPU mode */
- int m_dma; /* memory refresh DMA */
+ m_io_cnt(*this, "CNT")
+ { }
- /* timers */
- emu_timer *m_reset_timer; /* power on reset timer */
+ DECLARE_INPUT_CHANGED_MEMBER(ef_w);
+ void pecom64(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(pecom_cdp1869_charram_r);
DECLARE_WRITE8_MEMBER(pecom_cdp1869_charram_w);
DECLARE_READ8_MEMBER(pecom_cdp1869_pageram_r);
@@ -46,10 +43,6 @@ public:
DECLARE_WRITE8_MEMBER(pecom_bank_w);
DECLARE_READ8_MEMBER(pecom_keyboard_r);
DECLARE_WRITE8_MEMBER(pecom_cdp1869_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- DECLARE_VIDEO_START(pecom);
- DECLARE_INPUT_CHANGED_MEMBER(ef_w);
TIMER_CALLBACK_MEMBER(reset_tick);
DECLARE_READ_LINE_MEMBER(clear_r);
DECLARE_READ_LINE_MEMBER(ef2_r);
@@ -59,12 +52,26 @@ public:
CDP1869_CHAR_RAM_READ_MEMBER(pecom_char_ram_r);
CDP1869_CHAR_RAM_WRITE_MEMBER(pecom_char_ram_w);
CDP1869_PCB_READ_MEMBER(pecom_pcb_r);
- void pecom64(machine_config &config);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
void pecom_video(machine_config &config);
void cdp1869_page_ram(address_map &map);
void pecom64_io(address_map &map);
void pecom64_mem(address_map &map);
-protected:
+
+private:
+ required_device<cosmac_device> m_cdp1802;
+ required_device<cdp1869_device> m_cdp1869;
+
+ std::unique_ptr<uint8_t[]> m_charram; /* character generator ROM */
+ int m_reset; /* CPU mode */
+ int m_dma; /* memory refresh DMA */
+
+ /* timers */
+ emu_timer *m_reset_timer; /* power on reset timer */
+
required_device<cassette_image_device> m_cassette;
required_device<ram_device> m_ram;
required_memory_bank m_bank1;
diff --git a/src/mame/includes/poolshrk.h b/src/mame/includes/poolshrk.h
index 87750e421c0..d2dccbd175f 100644
--- a/src/mame/includes/poolshrk.h
+++ b/src/mame/includes/poolshrk.h
@@ -5,6 +5,10 @@
Atari Pool Shark hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_POOLSHRK_H
+#define MAME_INCLUDES_POOLSHRK_H
+
+#pragma once
#include "machine/watchdog.h"
#include "sound/discrete.h"
@@ -14,8 +18,8 @@
class poolshrk_state : public driver_device
{
public:
- poolshrk_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ poolshrk_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_gfxdecode(*this, "gfxdecode"),
@@ -23,21 +27,13 @@ public:
m_discrete(*this, "discrete"),
m_playfield_ram(*this, "playfield_ram"),
m_hpos_ram(*this, "hpos_ram"),
- m_vpos_ram(*this, "vpos_ram") { }
+ m_vpos_ram(*this, "vpos_ram")
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<watchdog_timer_device> m_watchdog;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- required_device<discrete_device> m_discrete;
-
- required_shared_ptr<uint8_t> m_playfield_ram;
- required_shared_ptr<uint8_t> m_hpos_ram;
- required_shared_ptr<uint8_t> m_vpos_ram;
-
- tilemap_t* m_bg_tilemap;
- int m_da_latch;
+ DECLARE_DRIVER_INIT(poolshrk);
+ void poolshrk(machine_config &config);
+protected:
DECLARE_WRITE8_MEMBER(da_latch_w);
DECLARE_WRITE8_MEMBER(led_w);
DECLARE_WRITE8_MEMBER(watchdog_w);
@@ -50,15 +46,29 @@ public:
TILE_GET_INFO_MEMBER(get_tile_info);
- DECLARE_DRIVER_INIT(poolshrk);
- virtual void video_start() override;
DECLARE_PALETTE_INIT(poolshrk);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void poolshrk(machine_config &config);
+ virtual void video_start() override;
void poolshrk_cpu_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<watchdog_timer_device> m_watchdog;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ required_device<discrete_device> m_discrete;
+
+ required_shared_ptr<uint8_t> m_playfield_ram;
+ required_shared_ptr<uint8_t> m_hpos_ram;
+ required_shared_ptr<uint8_t> m_vpos_ram;
+
+ tilemap_t* m_bg_tilemap;
+ int m_da_latch;
};
/*----------- defined in audio/poolshrk.c -----------*/
DISCRETE_SOUND_EXTERN( poolshrk );
+
+#endif // MAME_INCLUDES_POOLSHRK_H
diff --git a/src/mame/includes/rampart.h b/src/mame/includes/rampart.h
index 97989226612..5380deac1e2 100644
--- a/src/mame/includes/rampart.h
+++ b/src/mame/includes/rampart.h
@@ -5,6 +5,10 @@
Atari Rampart hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_RAMPART_H
+#define MAME_INCLUDES_RAMPART_H
+
+#pragma once
#include "machine/atarigen.h"
#include "sound/okim6295.h"
@@ -14,30 +18,36 @@
class rampart_state : public atarigen_state
{
public:
- rampart_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_mob(*this, "mob"),
- m_oki(*this, "oki"),
- m_ym2413(*this, "ymsnd"),
- m_bitmap(*this, "bitmap") { }
-
- required_device<atari_motion_objects_device> m_mob;
- required_device<okim6295_device> m_oki;
- required_device<ym2413_device> m_ym2413;
+ rampart_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_mob(*this, "mob"),
+ m_oki(*this, "oki"),
+ m_ym2413(*this, "ymsnd"),
+ m_bitmap(*this, "bitmap")
+ { }
- required_shared_ptr<uint16_t> m_bitmap;
+ DECLARE_DRIVER_INIT(rampart);
+ void rampart(machine_config &config);
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_WRITE16_MEMBER(latch_w);
- DECLARE_DRIVER_INIT(rampart);
- DECLARE_MACHINE_START(rampart);
- DECLARE_MACHINE_RESET(rampart);
- DECLARE_VIDEO_START(rampart);
uint32_t screen_update_rampart(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void rampart_bitmap_render(bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void rampart(machine_config &config);
void main_map(address_map &map);
+
+private:
+ required_device<atari_motion_objects_device> m_mob;
+ required_device<okim6295_device> m_oki;
+ required_device<ym2413_device> m_ym2413;
+
+ required_shared_ptr<uint16_t> m_bitmap;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_RAMPART_H
diff --git a/src/mame/includes/relief.h b/src/mame/includes/relief.h
index 9e34b00fdb9..5baff3d6c97 100644
--- a/src/mame/includes/relief.h
+++ b/src/mame/includes/relief.h
@@ -5,6 +5,10 @@
Atari "Round" hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_RELIEF_H
+#define MAME_INCLUDES_RELIEF_H
+
+#pragma once
#include "machine/atarigen.h"
#include "video/atarimo.h"
@@ -14,36 +18,42 @@
class relief_state : public atarigen_state
{
public:
- relief_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_vad(*this, "vad"),
- m_oki(*this, "oki"),
- m_ym2413(*this, "ymsnd"),
- m_okibank(*this, "okibank")
- { }
+ relief_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_vad(*this, "vad"),
+ m_oki(*this, "oki"),
+ m_ym2413(*this, "ymsnd"),
+ m_okibank(*this, "okibank")
+ { }
- required_device<atari_vad_device> m_vad;
- required_device<okim6295_device> m_oki;
- required_device<ym2413_device> m_ym2413;
- required_memory_bank m_okibank;
+ DECLARE_DRIVER_INIT(relief);
+ void relief(machine_config &config);
- uint8_t m_ym2413_volume;
- uint8_t m_overall_volume;
- uint8_t m_adpcm_bank;
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
DECLARE_READ16_MEMBER(special_port2_r);
DECLARE_WRITE16_MEMBER(audio_control_w);
DECLARE_WRITE16_MEMBER(audio_volume_w);
- DECLARE_DRIVER_INIT(relief);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
- DECLARE_MACHINE_START(relief);
- DECLARE_MACHINE_RESET(relief);
- DECLARE_VIDEO_START(relief);
uint32_t screen_update_relief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void relief(machine_config &config);
void main_map(address_map &map);
void oki_map(address_map &map);
+
+private:
+ required_device<atari_vad_device> m_vad;
+ required_device<okim6295_device> m_oki;
+ required_device<ym2413_device> m_ym2413;
+ required_memory_bank m_okibank;
+
+ uint8_t m_ym2413_volume;
+ uint8_t m_overall_volume;
+ uint8_t m_adpcm_bank;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_RELIEF_H
diff --git a/src/mame/includes/shuuz.h b/src/mame/includes/shuuz.h
index 6c09c899af8..ec68e364145 100644
--- a/src/mame/includes/shuuz.h
+++ b/src/mame/includes/shuuz.h
@@ -5,6 +5,10 @@
Atari Shuuz hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_SHUUZ_H
+#define MAME_INCLUDES_SHUUZ_H
+
+#pragma once
#include "machine/atarigen.h"
#include "video/atarimo.h"
@@ -13,13 +17,13 @@ class shuuz_state : public atarigen_state
{
public:
shuuz_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_vad(*this, "vad") { }
-
- required_device<atari_vad_device> m_vad;
+ : atarigen_state(mconfig, type, tag)
+ , m_vad(*this, "vad")
+ { }
- int m_cur[2];
+ void shuuz(machine_config &config);
+protected:
virtual void update_interrupts() override;
DECLARE_WRITE16_MEMBER(latch_w);
@@ -32,7 +36,14 @@ public:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void shuuz(machine_config &config);
void main_map(address_map &map);
+
+private:
+ required_device<atari_vad_device> m_vad;
+
+ int m_cur[2];
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_SHUUZ_H
diff --git a/src/mame/includes/skullxbo.h b/src/mame/includes/skullxbo.h
index f04719a4d12..215ded21617 100644
--- a/src/mame/includes/skullxbo.h
+++ b/src/mame/includes/skullxbo.h
@@ -5,6 +5,10 @@
Atari Skull & Crossbones hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_SKULLXBO_H
+#define MAME_INCLUDES_SKULLXBO_H
+
+#pragma once
#include "machine/atarigen.h"
#include "machine/timer.h"
@@ -14,34 +18,29 @@
class skullxbo_state : public atarigen_state
{
public:
- skullxbo_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_scanline_timer(*this, "scan_timer"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob"),
- m_playfield_latch(-1) { }
+ skullxbo_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_scanline_timer(*this, "scan_timer"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob"),
+ m_playfield_latch(-1)
+ { }
- required_device<atari_jsa_ii_device> m_jsa;
- required_device<timer_device> m_scanline_timer;
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
- int m_playfield_latch;
+ DECLARE_DRIVER_INIT(skullxbo);
+ void skullxbo(machine_config &config);
+protected:
+ virtual void machine_reset() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_WRITE16_MEMBER(skullxbo_halt_until_hblank_0_w);
DECLARE_WRITE16_MEMBER(skullxbo_mobwr_w);
- DECLARE_DRIVER_INIT(skullxbo);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
WRITE16_MEMBER(playfield_latch_w);
WRITE16_MEMBER(playfield_latched_w);
- DECLARE_MACHINE_START(skullxbo);
- DECLARE_MACHINE_RESET(skullxbo);
- DECLARE_VIDEO_START(skullxbo);
uint32_t screen_update_skullxbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
void skullxbo_scanline_update(int scanline);
@@ -49,7 +48,17 @@ public:
DECLARE_WRITE16_MEMBER( skullxbo_yscroll_w );
DECLARE_WRITE16_MEMBER( skullxbo_mobmsb_w );
- static const atari_motion_objects_config s_mob_config;
- void skullxbo(machine_config &config);
void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_ii_device> m_jsa;
+ required_device<timer_device> m_scanline_timer;
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+ int m_playfield_latch;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_SKULLXBO_H
diff --git a/src/mame/includes/skydiver.h b/src/mame/includes/skydiver.h
index d4075bba2ea..fa04ad4f9f2 100644
--- a/src/mame/includes/skydiver.h
+++ b/src/mame/includes/skydiver.h
@@ -5,6 +5,10 @@
Atari Skydiver hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_SKYDIVER_H
+#define MAME_INCLUDES_SKYDIVER_H
+
+#pragma once
#include "machine/74259.h"
#include "machine/watchdog.h"
@@ -26,29 +30,20 @@
class skydiver_state : public driver_device
{
public:
- skydiver_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ skydiver_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_latch3(*this, "latch3"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_videoram(*this, "videoram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<watchdog_timer_device> m_watchdog;
- required_device<f9334_device> m_latch3;
- required_device<discrete_device> m_discrete;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ m_videoram(*this, "videoram")
+ { }
- required_shared_ptr<uint8_t> m_videoram;
-
- int m_nmion;
- tilemap_t *m_bg_tilemap;
- int m_width;
+ void skydiver(machine_config &config);
+protected:
DECLARE_WRITE_LINE_MEMBER(nmion_w);
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_READ8_MEMBER(wram_r);
@@ -77,9 +72,24 @@ public:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(interrupt);
- void skydiver(machine_config &config);
void skydiver_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<watchdog_timer_device> m_watchdog;
+ required_device<f9334_device> m_latch3;
+ required_device<discrete_device> m_discrete;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+
+ required_shared_ptr<uint8_t> m_videoram;
+
+ int m_nmion;
+ tilemap_t *m_bg_tilemap;
+ int m_width;
};
/*----------- defined in audio/skydiver.c -----------*/
DISCRETE_SOUND_EXTERN( skydiver );
+
+#endif // MAME_INCLUDES_SKYDIVER_H
diff --git a/src/mame/includes/skyraid.h b/src/mame/includes/skyraid.h
index e01b8ed7d54..4b16968ceb9 100644
--- a/src/mame/includes/skyraid.h
+++ b/src/mame/includes/skyraid.h
@@ -1,30 +1,29 @@
// license:BSD-3-Clause
// copyright-holders:Stefan Jokisch
+#ifndef MAME_INCLUDES_SKYRAID_H
+#define MAME_INCLUDES_SKYRAID_H
+
+#pragma once
+
#include "sound/discrete.h"
class skyraid_state : public driver_device
{
public:
- skyraid_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ skyraid_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_pos_ram(*this, "pos_ram"),
m_alpha_num_ram(*this, "alpha_num_ram"),
m_obj_ram(*this, "obj_ram"),
m_discrete(*this, "discrete"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
-
- int m_analog_range;
- int m_analog_offset;
+ m_palette(*this, "palette")
+ { }
- int m_scroll;
+ void skyraid(machine_config &config);
- required_shared_ptr<uint8_t> m_pos_ram;
- required_shared_ptr<uint8_t> m_alpha_num_ram;
- required_shared_ptr<uint8_t> m_obj_ram;
- required_device<discrete_device> m_discrete;
- bitmap_ind16 m_helper;
+protected:
DECLARE_READ8_MEMBER(skyraid_port_0_r);
DECLARE_WRITE8_MEMBER(skyraid_range_w);
DECLARE_WRITE8_MEMBER(skyraid_offset_w);
@@ -38,12 +37,27 @@ public:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_missiles(bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_trapezoid(bitmap_ind16& dst, bitmap_ind16& src);
+
+ void skyraid_map(address_map &map);
+
+private:
+ int m_analog_range;
+ int m_analog_offset;
+
+ int m_scroll;
+
+ required_shared_ptr<uint8_t> m_pos_ram;
+ required_shared_ptr<uint8_t> m_alpha_num_ram;
+ required_shared_ptr<uint8_t> m_obj_ram;
+ required_device<discrete_device> m_discrete;
+ bitmap_ind16 m_helper;
+
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void skyraid(machine_config &config);
- void skyraid_map(address_map &map);
};
/*----------- defined in audio/skyraid.c -----------*/
DISCRETE_SOUND_EXTERN( skyraid );
+
+#endif // MAME_INCLUDES_SKYRAID_H
diff --git a/src/mame/includes/sprint8.h b/src/mame/includes/sprint8.h
index 70b03b0f328..f7ce8afc8ee 100644
--- a/src/mame/includes/sprint8.h
+++ b/src/mame/includes/sprint8.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Stefan Jokisch
+#ifndef MAME_INCLUDES_SPRINT8_H
+#define MAME_INCLUDES_SPRINT8_H
+
+#pragma once
#include "machine/74259.h"
#include "machine/timer.h"
@@ -19,32 +23,12 @@ public:
m_video_ram(*this, "video_ram"),
m_pos_h_ram(*this, "pos_h_ram"),
m_pos_v_ram(*this, "pos_v_ram"),
- m_pos_d_ram(*this, "pos_d_ram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- required_device<discrete_device> m_discrete;
-
- required_shared_ptr<uint8_t> m_video_ram;
- required_shared_ptr<uint8_t> m_pos_h_ram;
- required_shared_ptr<uint8_t> m_pos_v_ram;
- required_shared_ptr<uint8_t> m_pos_d_ram;
-
- int m_steer_dir[8];
- int m_steer_flag[8];
- int m_collision_reset;
- int m_collision_index;
- uint8_t m_dial[8];
- int m_team;
+ m_pos_d_ram(*this, "pos_d_ram")
+ { }
- tilemap_t* m_tilemap1;
- tilemap_t* m_tilemap2;
- bitmap_ind16 m_helper1;
- bitmap_ind16 m_helper2;
- emu_timer *m_collision_timer;
+ void sprint8(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(collision_r);
DECLARE_READ8_MEMBER(input_r);
DECLARE_WRITE8_MEMBER(lockout_w);
@@ -67,10 +51,36 @@ public:
void set_pens();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void set_collision(int n);
- void sprint8(machine_config &config);
void sprint8_audio(machine_config &config);
void sprint8_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ required_device<discrete_device> m_discrete;
+
+ required_shared_ptr<uint8_t> m_video_ram;
+ required_shared_ptr<uint8_t> m_pos_h_ram;
+ required_shared_ptr<uint8_t> m_pos_v_ram;
+ required_shared_ptr<uint8_t> m_pos_d_ram;
+
+ int m_steer_dir[8];
+ int m_steer_flag[8];
+ int m_collision_reset;
+ int m_collision_index;
+ uint8_t m_dial[8];
+ int m_team;
+
+ tilemap_t* m_tilemap1;
+ tilemap_t* m_tilemap2;
+ bitmap_ind16 m_helper1;
+ bitmap_ind16 m_helper2;
+ emu_timer *m_collision_timer;
};
/*----------- defined in audio/sprint8.c -----------*/
DISCRETE_SOUND_EXTERN( sprint8 );
+
+#endif // MAME_INCLUDES_SPRINT8_H
diff --git a/src/mame/includes/starshp1.h b/src/mame/includes/starshp1.h
index 2006c8ba674..6f4784d2807 100644
--- a/src/mame/includes/starshp1.h
+++ b/src/mame/includes/starshp1.h
@@ -25,6 +25,10 @@
* Horizontal Visible Area 384 (0x180) 768 (0x300)
* Horizontal Blanking Time 128 (0x080) 256 (0x100)
*/
+#ifndef MAME_INCLUDES_STARSHP1_H
+#define MAME_INCLUDES_STARSHP1_H
+
+#pragma once
#include "sound/discrete.h"
#include "screen.h"
@@ -44,8 +48,8 @@
class starshp1_state : public driver_device
{
public:
- starshp1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ starshp1_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_playfield_ram(*this, "playfield_ram"),
m_hpos_ram(*this, "hpos_ram"),
m_vpos_ram(*this, "vpos_ram"),
@@ -54,32 +58,14 @@ public:
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette")
+ { }
- int m_analog_in_select;
- int m_attract;
- required_shared_ptr<uint8_t> m_playfield_ram;
- required_shared_ptr<uint8_t> m_hpos_ram;
- required_shared_ptr<uint8_t> m_vpos_ram;
- required_shared_ptr<uint8_t> m_obj_ram;
- int m_ship_explode;
- int m_ship_picture;
- int m_ship_hoffset;
- int m_ship_voffset;
- int m_ship_size;
- int m_circle_hpos;
- int m_circle_vpos;
- int m_circle_size;
- int m_circle_mod;
- int m_circle_kill;
- int m_phasor;
- int m_collision_latch;
- int m_starfield_kill;
- int m_mux;
- int m_inverse;
- std::unique_ptr<uint16_t[]> m_LSFR;
- bitmap_ind16 m_helper;
- tilemap_t *m_bg_tilemap;
+ DECLARE_CUSTOM_INPUT_MEMBER(starshp1_analog_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(collision_latch_r);
+ void starshp1(machine_config &config);
+
+protected:
DECLARE_WRITE8_MEMBER(starshp1_collision_reset_w);
DECLARE_WRITE8_MEMBER(starshp1_analog_in_w);
DECLARE_WRITE_LINE_MEMBER(ship_explode_w);
@@ -93,8 +79,6 @@ public:
DECLARE_WRITE8_MEMBER(starshp1_ssadd_w);
DECLARE_WRITE8_MEMBER(starshp1_sspic_w);
DECLARE_WRITE8_MEMBER(starshp1_playfield_w);
- DECLARE_CUSTOM_INPUT_MEMBER(starshp1_analog_r);
- DECLARE_CUSTOM_INPUT_MEMBER(collision_latch_r);
DECLARE_WRITE_LINE_MEMBER(attract_w);
DECLARE_WRITE_LINE_MEMBER(phasor_w);
DECLARE_WRITE8_MEMBER(starshp1_analog_out_w);
@@ -119,13 +103,39 @@ public:
int spaceship_collision(bitmap_ind16 &bitmap, const rectangle &rect);
int point_in_circle(int x, int y, int center_x, int center_y, int r);
int circle_collision(const rectangle &rect);
+ void starshp1_map(address_map &map);
+
+private:
+ int m_analog_in_select;
+ int m_attract;
+ required_shared_ptr<uint8_t> m_playfield_ram;
+ required_shared_ptr<uint8_t> m_hpos_ram;
+ required_shared_ptr<uint8_t> m_vpos_ram;
+ required_shared_ptr<uint8_t> m_obj_ram;
+ int m_ship_explode;
+ int m_ship_picture;
+ int m_ship_hoffset;
+ int m_ship_voffset;
+ int m_ship_size;
+ int m_circle_hpos;
+ int m_circle_vpos;
+ int m_circle_size;
+ int m_circle_mod;
+ int m_circle_kill;
+ int m_phasor;
+ int m_collision_latch;
+ int m_starfield_kill;
+ int m_mux;
+ int m_inverse;
+ std::unique_ptr<uint16_t[]> m_LSFR;
+ bitmap_ind16 m_helper;
+ tilemap_t *m_bg_tilemap;
+
required_device<cpu_device> m_maincpu;
required_device<discrete_device> m_discrete;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void starshp1(machine_config &config);
- void starshp1_map(address_map &map);
};
/*----------- defined in audio/starshp1.c -----------*/
@@ -143,3 +153,5 @@ DISCRETE_SOUND_EXTERN( starshp1 );
#define STARSHP1_KICKER NODE_08
#define STARSHP1_PHASOR_ON NODE_09
#define STARSHP1_ATTRACT NODE_10
+
+#endif // MAME_INCLUDES_STARSHP1_H
diff --git a/src/mame/includes/super6.h b/src/mame/includes/super6.h
index ea55d0fc938..0963c5187f0 100644
--- a/src/mame/includes/super6.h
+++ b/src/mame/includes/super6.h
@@ -46,6 +46,12 @@ public:
m_j7(*this, "J7")
{ }
+ void super6(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
DECLARE_READ8_MEMBER( fdc_r );
DECLARE_WRITE8_MEMBER( fdc_w );
DECLARE_WRITE8_MEMBER( s100_w );
@@ -61,15 +67,12 @@ public:
DECLARE_READ8_MEMBER(io_read_byte);
DECLARE_WRITE8_MEMBER(io_write_byte);
- void super6(machine_config &config);
void super6_io(address_map &map);
void super6_mem(address_map &map);
-protected:
- virtual void machine_start() override;
- virtual void machine_reset() override;
void bankswitch();
+private:
required_device<cpu_device> m_maincpu;
required_device<z80ctc_device> m_ctc;
required_device<z80dart_device> m_dart;
diff --git a/src/mame/includes/tank8.h b/src/mame/includes/tank8.h
index 0ae4bc03d91..9666cd6cde1 100644
--- a/src/mame/includes/tank8.h
+++ b/src/mame/includes/tank8.h
@@ -5,6 +5,10 @@
Atari tank8 hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_TANK8_H
+#define MAME_INCLUDES_TANK8_H
+
+#pragma once
#include "sound/discrete.h"
#include "screen.h"
@@ -34,8 +38,8 @@ public:
TIMER_COLLISION
};
- tank8_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ tank8_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
@@ -45,27 +49,13 @@ public:
m_pos_h_ram(*this, "pos_h_ram"),
m_pos_v_ram(*this, "pos_v_ram"),
m_pos_d_ram(*this, "pos_d_ram"),
- m_team(*this, "team") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<discrete_device> m_discrete;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- required_shared_ptr<uint8_t> m_video_ram;
- required_shared_ptr<uint8_t> m_pos_h_ram;
- required_shared_ptr<uint8_t> m_pos_v_ram;
- required_shared_ptr<uint8_t> m_pos_d_ram;
- required_shared_ptr<uint8_t> m_team;
+ m_team(*this, "team")
+ { }
- int m_collision_index;
- tilemap_t *m_tilemap;
- bitmap_ind16 m_helper1;
- bitmap_ind16 m_helper2;
- bitmap_ind16 m_helper3;
- emu_timer *m_collision_timer;
+ DECLARE_DRIVER_INIT(decode);
+ void tank8(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(collision_r);
DECLARE_WRITE8_MEMBER(lockout_w);
DECLARE_WRITE8_MEMBER(int_reset_w);
@@ -79,7 +69,6 @@ public:
TILE_GET_INFO_MEMBER(get_tile_info);
- DECLARE_DRIVER_INIT(decode);
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(tank8);
@@ -93,12 +82,32 @@ public:
void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect);
void set_collision(int index);
- void tank8(machine_config &config);
- void tank8_cpu_map(address_map &map);
-protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ void tank8_cpu_map(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<discrete_device> m_discrete;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ required_shared_ptr<uint8_t> m_video_ram;
+ required_shared_ptr<uint8_t> m_pos_h_ram;
+ required_shared_ptr<uint8_t> m_pos_v_ram;
+ required_shared_ptr<uint8_t> m_pos_d_ram;
+ required_shared_ptr<uint8_t> m_team;
+
+ int m_collision_index;
+ tilemap_t *m_tilemap;
+ bitmap_ind16 m_helper1;
+ bitmap_ind16 m_helper2;
+ bitmap_ind16 m_helper3;
+ emu_timer *m_collision_timer;
};
/*----------- defined in audio/tank8.c -----------*/
DISCRETE_SOUND_EXTERN( tank8 );
+
+#endif // MAME_INCLUDES_TANK8_H
diff --git a/src/mame/includes/thunderj.h b/src/mame/includes/thunderj.h
index f450952994e..1c871e076c2 100644
--- a/src/mame/includes/thunderj.h
+++ b/src/mame/includes/thunderj.h
@@ -5,6 +5,10 @@
Atari ThunderJaws hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_THUNDERJ_H
+#define MAME_INCLUDES_THUNDERJ_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,31 +17,37 @@
class thunderj_state : public atarigen_state
{
public:
- thunderj_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_vad(*this, "vad"),
- m_extra(*this, "extra") { }
+ thunderj_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_vad(*this, "vad"),
+ m_extra(*this, "extra")
+ { }
- required_device<atari_jsa_ii_device> m_jsa;
- required_device<atari_vad_device> m_vad;
- required_device<cpu_device> m_extra;
+ DECLARE_DRIVER_INIT(thunderj);
+ void thunderj(machine_config &config);
- uint8_t m_alpha_tile_bank;
+protected:
+ virtual void machine_start() override;
virtual void update_interrupts() override;
DECLARE_READ16_MEMBER(special_port2_r);
DECLARE_WRITE16_MEMBER(latch_w);
- DECLARE_DRIVER_INIT(thunderj);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
- DECLARE_MACHINE_START(thunderj);
- DECLARE_MACHINE_RESET(thunderj);
- DECLARE_VIDEO_START(thunderj);
uint32_t screen_update_thunderj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void thunderj(machine_config &config);
void extra_map(address_map &map);
void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_ii_device> m_jsa;
+ required_device<atari_vad_device> m_vad;
+ required_device<cpu_device> m_extra;
+
+ uint8_t m_alpha_tile_bank;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_THUNDERJ_H
diff --git a/src/mame/includes/toobin.h b/src/mame/includes/toobin.h
index b40887fc854..43b530497c8 100644
--- a/src/mame/includes/toobin.h
+++ b/src/mame/includes/toobin.h
@@ -5,6 +5,10 @@
Atari Toobin' hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_TOOBIN_H
+#define MAME_INCLUDES_TOOBIN_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,24 +17,19 @@
class toobin_state : public atarigen_state
{
public:
- toobin_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob"),
- m_interrupt_scan(*this, "interrupt_scan") { }
-
- required_device<atari_jsa_i_device> m_jsa;
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
-
- required_shared_ptr<uint16_t> m_interrupt_scan;
+ toobin_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob"),
+ m_interrupt_scan(*this, "interrupt_scan")
+ { }
- double m_brightness;
- bitmap_ind16 m_pfbitmap;
+ void toobin(machine_config &config);
+protected:
+ virtual void video_start() override;
virtual void update_interrupts() override;
DECLARE_WRITE16_MEMBER(interrupt_scan_w);
@@ -43,13 +42,22 @@ public:
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(toobin);
- DECLARE_MACHINE_RESET(toobin);
- DECLARE_VIDEO_START(toobin);
-
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- static const atari_motion_objects_config s_mob_config;
- void toobin(machine_config &config);
void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_i_device> m_jsa;
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+
+ required_shared_ptr<uint16_t> m_interrupt_scan;
+
+ double m_brightness;
+ bitmap_ind16 m_pfbitmap;
+
+ static const atari_motion_objects_config s_mob_config;
};
+
+#endif // MAME_INCLUDES_TOOBIN_H
diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h
index a8577afb061..bab6e60d32e 100644
--- a/src/mame/includes/triplhnt.h
+++ b/src/mame/includes/triplhnt.h
@@ -5,6 +5,10 @@
Atari Triple Hunt hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_TRIPLHNT_H
+#define MAME_INCLUDES_TRIPLHNT_H
+
+#pragma once
#include "machine/74259.h"
#include "machine/watchdog.h"
@@ -29,8 +33,8 @@ public:
TIMER_HIT
};
- triplhnt_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ triplhnt_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_latch(*this, "latch"),
m_watchdog(*this, "watchdog"),
@@ -43,8 +47,37 @@ public:
m_vpos_ram(*this, "vpos_ram"),
m_hpos_ram(*this, "hpos_ram"),
m_orga_ram(*this, "orga_ram"),
- m_code_ram(*this, "code_ram") { }
+ m_code_ram(*this, "code_ram")
+ { }
+
+ DECLARE_DRIVER_INIT(triplhnt);
+ void triplhnt(machine_config &config);
+
+protected:
+ DECLARE_WRITE_LINE_MEMBER(ram_2_w);
+ DECLARE_WRITE_LINE_MEMBER(sprite_zoom_w);
+ DECLARE_WRITE_LINE_MEMBER(sprite_bank_w);
+ DECLARE_WRITE_LINE_MEMBER(lamp1_w);
+ DECLARE_WRITE_LINE_MEMBER(coin_lockout_w);
+ DECLARE_WRITE_LINE_MEMBER(tape_control_w);
+
+ DECLARE_READ8_MEMBER(cmos_r);
+ DECLARE_READ8_MEMBER(input_port_4_r);
+ DECLARE_READ8_MEMBER(misc_r);
+ DECLARE_READ8_MEMBER(da_latch_r);
+
+ TILE_GET_INFO_MEMBER(get_tile_info);
+ virtual void video_start() override;
+ DECLARE_PALETTE_INIT(triplhnt);
+
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void set_collision(int code);
+
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ void triplhnt_map(address_map &map);
+private:
required_device<cpu_device> m_maincpu;
required_device<f9334_device> m_latch;
required_device<watchdog_timer_device> m_watchdog;
@@ -69,34 +102,10 @@ public:
bitmap_ind16 m_helper;
emu_timer *m_hit_timer;
tilemap_t* m_bg_tilemap;
-
- DECLARE_WRITE_LINE_MEMBER(ram_2_w);
- DECLARE_WRITE_LINE_MEMBER(sprite_zoom_w);
- DECLARE_WRITE_LINE_MEMBER(sprite_bank_w);
- DECLARE_WRITE_LINE_MEMBER(lamp1_w);
- DECLARE_WRITE_LINE_MEMBER(coin_lockout_w);
- DECLARE_WRITE_LINE_MEMBER(tape_control_w);
-
- DECLARE_READ8_MEMBER(cmos_r);
- DECLARE_READ8_MEMBER(input_port_4_r);
- DECLARE_READ8_MEMBER(misc_r);
- DECLARE_READ8_MEMBER(da_latch_r);
-
- DECLARE_DRIVER_INIT(triplhnt);
- TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(triplhnt);
-
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
- void set_collision(int code);
-
- void triplhnt(machine_config &config);
- void triplhnt_map(address_map &map);
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
/*----------- defined in audio/triplhnt.cpp -----------*/
DISCRETE_SOUND_EXTERN( triplhnt );
extern const char *const triplhnt_sample_names[];
+
+#endif // MAME_INCLUDES_TRIPLHNT_H
diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h
index c07a808fc37..21d566c7999 100644
--- a/src/mame/includes/ultratnk.h
+++ b/src/mame/includes/ultratnk.h
@@ -5,6 +5,10 @@
Atari Ultra Tank hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_ULTRATNK_H
+#define MAME_INCLUDES_ULTRATNK_H
+
+#pragma once
#include "machine/watchdog.h"
#include "sound/discrete.h"
@@ -18,31 +22,22 @@ public:
TIMER_NMI
};
- ultratnk_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ultratnk_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_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_videoram(*this, "videoram") { }
+ m_videoram(*this, "videoram")
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<watchdog_timer_device> m_watchdog;
- required_device<discrete_device> m_discrete;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- required_shared_ptr<uint8_t> m_videoram;
-
- int m_da_latch;
- int m_collision[4];
- tilemap_t* m_playfield;
- bitmap_ind16 m_helper;
- emu_timer *m_nmi_timer;
+ DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
+ DECLARE_CUSTOM_INPUT_MEMBER(get_joystick);
+ void ultratnk(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(wram_r);
DECLARE_READ8_MEMBER(analog_r);
DECLARE_READ8_MEMBER(coin_r);
@@ -55,8 +50,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(led_2_w);
DECLARE_WRITE_LINE_MEMBER(lockout_w);
DECLARE_WRITE8_MEMBER(video_ram_w);
- DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
- DECLARE_CUSTOM_INPUT_MEMBER(get_joystick);
DECLARE_WRITE8_MEMBER(attract_w);
DECLARE_WRITE8_MEMBER(explosion_w);
@@ -70,8 +63,23 @@ public:
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
TIMER_CALLBACK_MEMBER(nmi_callback);
- void ultratnk(machine_config &config);
- void ultratnk_cpu_map(address_map &map);
-protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ void ultratnk_cpu_map(address_map &map);
+
+ required_device<cpu_device> m_maincpu;
+ required_device<watchdog_timer_device> m_watchdog;
+ required_device<discrete_device> m_discrete;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ required_shared_ptr<uint8_t> m_videoram;
+
+ int m_da_latch;
+ int m_collision[4];
+ tilemap_t* m_playfield;
+ bitmap_ind16 m_helper;
+ emu_timer *m_nmi_timer;
};
+
+#endif // MAME_INCLUDES_ULTRATNK_H
diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h
index 14b23a503e7..c0231170895 100644
--- a/src/mame/includes/vertigo.h
+++ b/src/mame/includes/vertigo.h
@@ -5,6 +5,10 @@
Exidy Vertigo hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_VERTIGO_H
+#define MAME_INCLUDES_VERTIGO_H
+
+#pragma once
#include "audio/exidy440.h"
#include "machine/74148.h"
@@ -18,96 +22,23 @@
#define MC_LENGTH 512
-struct am2901
-{
- uint32_t ram[16]; /* internal ram */
- uint32_t d; /* direct data D input */
- uint32_t q; /* Q register */
- uint32_t f; /* F ALU result */
- uint32_t y; /* Y output */
-};
-
-class vector_generator
-{
-public:
- uint32_t sreg; /* shift register */
- uint32_t l1; /* latch 1 adder operand only */
- uint32_t l2; /* latch 2 adder operand only */
- uint32_t c_v; /* vertical position counter */
- uint32_t c_h; /* horizontal position counter */
- uint32_t c_l; /* length counter */
- uint32_t adder_s; /* slope generator result and B input */
- uint32_t adder_a; /* slope generator A input */
- uint32_t color; /* color */
- uint32_t intensity; /* intensity */
- uint32_t brez; /* h/v-counters enable */
- uint32_t vfin; /* drawing yes/no */
- uint32_t hud1; /* h-counter up or down (stored in L1) */
- uint32_t hud2; /* h-counter up or down (stored in L2) */
- uint32_t vud1; /* v-counter up or down (stored in L1) */
- uint32_t vud2; /* v-counter up or down (stored in L2) */
- uint32_t hc1; /* use h- or v-counter in L1 mode */
- uint32_t ven; /* vector intensity enable */
-};
-
-struct microcode
-{
- uint32_t x;
- uint32_t a;
- uint32_t b;
- uint32_t inst;
- uint32_t dest;
- uint32_t cn;
- uint32_t mreq;
- uint32_t rsel;
- uint32_t rwrite;
- uint32_t of;
- uint32_t iif;
- uint32_t oa;
- uint32_t jpos;
- uint32_t jmp;
- uint32_t jcon;
- uint32_t ma;
-};
-
-struct vproc
-{
- uint16_t sram[64]; /* external sram */
- uint16_t ramlatch; /* latch between 2901 and sram */
- uint16_t rom_adr; /* vector ROM/RAM address latch */
- uint32_t pc; /* program counter */
- uint32_t ret; /* return address */
-
-};
-
class vertigo_state : public driver_device
{
public:
- vertigo_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_custom(*this, "custom"),
- m_ttl74148(*this, "74148"),
- m_vector(*this, "vector"),
- m_vectorram(*this, "vectorram")
+ vertigo_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_custom(*this, "custom"),
+ m_ttl74148(*this, "74148"),
+ m_vector(*this, "vector"),
+ m_vectorram(*this, "vectorram")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
- required_device<exidy440_sound_device> m_custom;
- required_device<ttl74148_device> m_ttl74148;
- required_device<vector_device> m_vector;
- required_shared_ptr<uint16_t> m_vectorram;
- attotime m_irq4_time;
- uint8_t m_irq_state;
- uint8_t m_adc_result;
- vproc m_vs;
- am2901 m_bsp;
- vector_generator m_vgen;
- uint16_t *m_vectorrom;
- microcode m_mc[MC_LENGTH];
+ void vertigo(machine_config &config);
+
+protected:
DECLARE_READ16_MEMBER(vertigo_io_convert);
DECLARE_READ16_MEMBER(vertigo_io_adc);
DECLARE_READ16_MEMBER(vertigo_coin_r);
@@ -115,23 +46,103 @@ public:
DECLARE_WRITE16_MEMBER(vertigo_audio_w);
DECLARE_READ16_MEMBER(vertigo_sio_r);
DECLARE_WRITE16_MEMBER(vertigo_motor_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
INTERRUPT_GEN_MEMBER(vertigo_interrupt);
TIMER_CALLBACK_MEMBER(sound_command_w);
DECLARE_WRITE_LINE_MEMBER(v_irq4_w);
DECLARE_WRITE_LINE_MEMBER(v_irq3_w);
TTL74148_OUTPUT_CB(update_irq);
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
void exidy440_audio(machine_config &config);
+ void vertigo_map(address_map &map);
+ void vertigo_motor(address_map &map);
+ void exidy440_audio_map(address_map &map);
+
+private:
+ struct am2901
+ {
+ uint32_t ram[16]; /* internal ram */
+ uint32_t d; /* direct data D input */
+ uint32_t q; /* Q register */
+ uint32_t f; /* F ALU result */
+ uint32_t y; /* Y output */
+ };
+
+ class vector_generator
+ {
+ public:
+ uint32_t sreg; /* shift register */
+ uint32_t l1; /* latch 1 adder operand only */
+ uint32_t l2; /* latch 2 adder operand only */
+ uint32_t c_v; /* vertical position counter */
+ uint32_t c_h; /* horizontal position counter */
+ uint32_t c_l; /* length counter */
+ uint32_t adder_s; /* slope generator result and B input */
+ uint32_t adder_a; /* slope generator A input */
+ uint32_t color; /* color */
+ uint32_t intensity; /* intensity */
+ uint32_t brez; /* h/v-counters enable */
+ uint32_t vfin; /* drawing yes/no */
+ uint32_t hud1; /* h-counter up or down (stored in L1) */
+ uint32_t hud2; /* h-counter up or down (stored in L2) */
+ uint32_t vud1; /* v-counter up or down (stored in L1) */
+ uint32_t vud2; /* v-counter up or down (stored in L2) */
+ uint32_t hc1; /* use h- or v-counter in L1 mode */
+ uint32_t ven; /* vector intensity enable */
+ };
+
+ struct microcode
+ {
+ uint32_t x;
+ uint32_t a;
+ uint32_t b;
+ uint32_t inst;
+ uint32_t dest;
+ uint32_t cn;
+ uint32_t mreq;
+ uint32_t rsel;
+ uint32_t rwrite;
+ uint32_t of;
+ uint32_t iif;
+ uint32_t oa;
+ uint32_t jpos;
+ uint32_t jmp;
+ uint32_t jcon;
+ uint32_t ma;
+ };
+
+ struct vproc
+ {
+ uint16_t sram[64]; /* external sram */
+ uint16_t ramlatch; /* latch between 2901 and sram */
+ uint16_t rom_adr; /* vector ROM/RAM address latch */
+ uint32_t pc; /* program counter */
+ uint32_t ret; /* return address */
+
+ };
+
+ void am2901x4(am2901 &bsp, microcode const &mc);
+ void vertigo_vgen(vector_generator &vg);
void vertigo_vproc_init();
void vertigo_vproc_reset();
- void am2901x4 (am2901 *bsp, microcode *mc);
- void vertigo_vgen (vector_generator *vg);
void vertigo_vproc(int cycles, int irq4);
void update_irq_encoder(int line, int state);
- void vertigo(machine_config &config);
- void vertigo_map(address_map &map);
- void vertigo_motor(address_map &map);
- void exidy440_audio_map(address_map &map);
+
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_audiocpu;
+ required_device<exidy440_sound_device> m_custom;
+ required_device<ttl74148_device> m_ttl74148;
+ required_device<vector_device> m_vector;
+ required_shared_ptr<uint16_t> m_vectorram;
+ attotime m_irq4_time;
+ uint8_t m_irq_state;
+ uint8_t m_adc_result;
+ vproc m_vs;
+ am2901 m_bsp;
+ vector_generator m_vgen;
+ uint16_t *m_vectorrom;
+ microcode m_mc[MC_LENGTH];
};
+
+#endif // MAME_INCLUDES_VERTIGO_H
diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h
index c69f17c440e..0db8f44943c 100644
--- a/src/mame/includes/victory.h
+++ b/src/mame/includes/victory.h
@@ -5,6 +5,10 @@
Victory system
****************************************************************************/
+#ifndef MAME_INCLUDES_VICTORY_H
+#define MAME_INCLUDES_VICTORY_H
+
+#pragma once
#include "screen.h"
@@ -20,63 +24,27 @@
#define VICTORY_VBSTART (0x100)
-/* microcode state */
-struct micro_t
-{
- uint16_t i;
- uint16_t pc;
- uint8_t r,g,b;
- uint8_t xp,yp;
- uint8_t cmd,cmdlo;
- emu_timer * timer;
- uint8_t timer_active;
- attotime endtime;
-};
-
class victory_state : public driver_device
{
public:
- victory_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ victory_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
- m_charram(*this, "charram") { }
-
- required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
+ m_charram(*this, "charram")
+ {
+ }
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_charram;
-
- uint16_t m_paletteram[0x40];
- std::unique_ptr<uint8_t[]> m_bgbitmap;
- std::unique_ptr<uint8_t[]> m_fgbitmap;
- std::unique_ptr<uint8_t[]> m_rram;
- std::unique_ptr<uint8_t[]> m_gram;
- std::unique_ptr<uint8_t[]> m_bram;
- uint8_t m_vblank_irq;
- uint8_t m_fgcoll;
- uint8_t m_fgcollx;
- uint8_t m_fgcolly;
- uint8_t m_bgcoll;
- uint8_t m_bgcollx;
- uint8_t m_bgcolly;
- uint8_t m_scrollx;
- uint8_t m_scrolly;
- uint8_t m_video_control;
- struct micro_t m_micro;
- emu_timer *m_bgcoll_irq_timer;
+ void victory(machine_config &config);
+protected:
DECLARE_WRITE8_MEMBER(lamp_control_w);
DECLARE_WRITE8_MEMBER(paletteram_w);
DECLARE_READ8_MEMBER(video_control_r);
DECLARE_WRITE8_MEMBER(video_control_w);
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_interrupt);
@@ -92,9 +60,54 @@ public:
int command7();
void update_background();
void update_foreground();
- void victory(machine_config &config);
+
+ virtual void video_start() override;
void victory_audio(machine_config &config);
void main_io_map(address_map &map);
void main_map(address_map &map);
void victory_audio_map(address_map &map);
+
+private:
+ /* microcode state */
+ struct micro_t
+ {
+ uint16_t i;
+ uint16_t pc;
+ uint8_t r,g,b;
+ uint8_t xp,yp;
+ uint8_t cmd,cmdlo;
+ emu_timer * timer;
+ uint8_t timer_active;
+ attotime endtime;
+
+ void count_states(int states);
+ };
+
+ required_device<cpu_device> m_maincpu;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_charram;
+
+ uint16_t m_paletteram[0x40];
+ std::unique_ptr<uint8_t[]> m_bgbitmap;
+ std::unique_ptr<uint8_t[]> m_fgbitmap;
+ std::unique_ptr<uint8_t[]> m_rram;
+ std::unique_ptr<uint8_t[]> m_gram;
+ std::unique_ptr<uint8_t[]> m_bram;
+ uint8_t m_vblank_irq;
+ uint8_t m_fgcoll;
+ uint8_t m_fgcollx;
+ uint8_t m_fgcolly;
+ uint8_t m_bgcoll;
+ uint8_t m_bgcollx;
+ uint8_t m_bgcolly;
+ uint8_t m_scrollx;
+ uint8_t m_scrolly;
+ uint8_t m_video_control;
+ micro_t m_micro;
+ emu_timer *m_bgcoll_irq_timer;
};
+
+#endif // MAME_INCLUDES_VICTORY_H
diff --git a/src/mame/includes/videopin.h b/src/mame/includes/videopin.h
index e8023c9b155..2ae279b8a07 100644
--- a/src/mame/includes/videopin.h
+++ b/src/mame/includes/videopin.h
@@ -5,6 +5,10 @@
Atari Video Pinball hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_VIDEOPIN_H
+#define MAME_INCLUDES_VIDEOPIN_H
+
+#pragma once
#include "sound/discrete.h"
#include "screen.h"
@@ -26,32 +30,19 @@ public:
TIMER_INTERRUPT
};
- videopin_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ videopin_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_video_ram(*this, "video_ram") { }
+ m_video_ram(*this, "video_ram")
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<discrete_device> m_discrete;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
-
- required_shared_ptr<uint8_t> m_video_ram;
-
- attotime m_time_pushed;
- attotime m_time_released;
- uint8_t m_prev;
- uint8_t m_mask;
- int m_ball_x;
- int m_ball_y;
- tilemap_t* m_bg_tilemap;
- emu_timer *m_interrupt_timer;
+ void videopin(machine_config &config);
+protected:
DECLARE_READ8_MEMBER(misc_r);
DECLARE_WRITE8_MEMBER(led_w);
DECLARE_WRITE8_MEMBER(ball_w);
@@ -66,6 +57,8 @@ public:
virtual void machine_start() override;
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;
+ void main_map(address_map &map);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -73,11 +66,26 @@ public:
void update_plunger();
double calc_plunger_pos();
- void videopin(machine_config &config);
- void main_map(address_map &map);
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<discrete_device> m_discrete;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+
+ required_shared_ptr<uint8_t> m_video_ram;
+
+ attotime m_time_pushed;
+ attotime m_time_released;
+ uint8_t m_prev;
+ uint8_t m_mask;
+ int m_ball_x;
+ int m_ball_y;
+ tilemap_t* m_bg_tilemap;
+ emu_timer *m_interrupt_timer;
};
/*----------- defined in audio/videopin.c -----------*/
DISCRETE_SOUND_EXTERN( videopin );
+
+#endif // MAME_INCLUDES_VIDEOPIN_H
diff --git a/src/mame/includes/vindictr.h b/src/mame/includes/vindictr.h
index 958ebffbe75..92173ef0977 100644
--- a/src/mame/includes/vindictr.h
+++ b/src/mame/includes/vindictr.h
@@ -5,6 +5,10 @@
Atari Vindicators hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_VINDICTR_H
+#define MAME_INCLUDES_VINDICTR_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,33 +17,39 @@
class vindictr_state : public atarigen_state
{
public:
- vindictr_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob"),
- m_jsa(*this, "jsa") { }
+ vindictr_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob"),
+ m_jsa(*this, "jsa")
+ { }
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
- required_device<atari_jsa_i_device> m_jsa;
- uint8_t m_playfield_tile_bank;
- uint16_t m_playfield_xscroll;
- uint16_t m_playfield_yscroll;
+ DECLARE_DRIVER_INIT(vindictr);
+ void vindictr(machine_config &config);
+
+protected:
+ virtual void machine_reset() override;
+ virtual void video_start() override;
virtual void update_interrupts() override;
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_READ16_MEMBER(port1_r);
- DECLARE_DRIVER_INIT(vindictr);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(vindictr);
- DECLARE_MACHINE_RESET(vindictr);
- DECLARE_VIDEO_START(vindictr);
uint32_t screen_update_vindictr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE16_MEMBER( vindictr_paletteram_w );
static const atari_motion_objects_config s_mob_config;
- void vindictr(machine_config &config);
void main_map(address_map &map);
+
+private:
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+ required_device<atari_jsa_i_device> m_jsa;
+ uint8_t m_playfield_tile_bank;
+ uint16_t m_playfield_xscroll;
+ uint16_t m_playfield_yscroll;
};
+
+#endif // MAME_INCLUDES_VINDICTR_H
diff --git a/src/mame/includes/wrally.h b/src/mame/includes/wrally.h
index e670b047a81..3966cfe93b6 100644
--- a/src/mame/includes/wrally.h
+++ b/src/mame/includes/wrally.h
@@ -24,6 +24,9 @@ public:
{
}
+ void wrally(machine_config &config);
+
+protected:
DECLARE_READ8_MEMBER(shareram_r);
DECLARE_WRITE8_MEMBER(shareram_w);
DECLARE_WRITE16_MEMBER(vram_w);
@@ -39,13 +42,11 @@ public:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void wrally(machine_config &config);
+ virtual void machine_start() override;
+ virtual void video_start() override;
void mcu_hostmem_map(address_map &map);
void oki_map(address_map &map);
void wrally_map(address_map &map);
-protected:
- virtual void machine_start() override;
- virtual void video_start() override;
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
diff --git a/src/mame/includes/wswan.h b/src/mame/includes/wswan.h
index c256d1eaf31..79f09e2a345 100644
--- a/src/mame/includes/wswan.h
+++ b/src/mame/includes/wswan.h
@@ -5,10 +5,11 @@
* includes/wswan.h
*
****************************************************************************/
-
#ifndef MAME_INCLUDES_WSWAN_H
#define MAME_INCLUDES_WSWAN_H
+#pragma once
+
#define WSWAN_TYPE_MONO 0
#define WSWAN_TYPE_COLOR 1
@@ -22,19 +23,11 @@
#include "bus/wswan/rom.h"
-struct SoundDMA
-{
- uint32_t source; /* Source address */
- uint16_t size; /* Size */
- uint8_t enable; /* Enabled */
-};
-
-
class wswan_state : public driver_device
{
public:
- wswan_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ wswan_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_vdp(*this, "vdp"),
m_sound(*this, "custom"),
@@ -44,36 +37,8 @@ public:
m_buttons(*this, "BUTTONS")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<wswan_video_device> m_vdp;
- required_device<wswan_sound_device> m_sound;
- required_device<ws_cart_slot_device> m_cart;
- DECLARE_READ8_MEMBER(bios_r);
- DECLARE_READ8_MEMBER(port_r);
- DECLARE_WRITE8_MEMBER(port_w);
-
- uint8_t m_ws_portram[256];
- uint8_t m_internal_eeprom[INTERNAL_EEPROM_SIZE];
- uint8_t m_system_type;
- SoundDMA m_sound_dma;
- std::unique_ptr<uint8_t[]> m_ws_bios_bank;
- uint8_t m_bios_disabled;
- uint8_t m_rotate;
-
- void set_irq_line(int irq);
- void dma_sound_cb();
- void common_start();
- virtual void machine_start() override;
- virtual void machine_reset() override;
- DECLARE_PALETTE_INIT(wswan);
- DECLARE_MACHINE_START(wscolor);
- DECLARE_PALETTE_INIT(wscolor);
-
- void wscolor(machine_config &config);
void wswan(machine_config &config);
- void wscolor_mem(address_map &map);
- void wswan_io(address_map &map);
- void wswan_mem(address_map &map);
+
protected:
/* Interrupt flags */
static const uint8_t WSWAN_IFLAG_STX = 0x01;
@@ -95,14 +60,59 @@ protected:
static const uint8_t WSWAN_INT_VBL = 6;
static const uint8_t WSWAN_INT_HBLTMR = 7;
+ struct SoundDMA
+ {
+ uint32_t source; /* Source address */
+ uint16_t size; /* Size */
+ uint8_t enable; /* Enabled */
+ };
+
+ required_device<cpu_device> m_maincpu;
+ required_device<wswan_video_device> m_vdp;
+ required_device<wswan_sound_device> m_sound;
+ required_device<ws_cart_slot_device> m_cart;
+
+ uint8_t m_ws_portram[256];
+ uint8_t m_internal_eeprom[INTERNAL_EEPROM_SIZE];
+ uint8_t m_system_type;
+ SoundDMA m_sound_dma;
+ std::unique_ptr<uint8_t[]> m_ws_bios_bank;
+ uint8_t m_bios_disabled;
+ uint8_t m_rotate;
+
required_ioport m_cursx;
required_ioport m_cursy;
required_ioport m_buttons;
+ DECLARE_READ8_MEMBER(bios_r);
+ DECLARE_READ8_MEMBER(port_r);
+ DECLARE_WRITE8_MEMBER(port_w);
+
+ void set_irq_line(int irq);
+ void dma_sound_cb();
+ void common_start();
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ DECLARE_PALETTE_INIT(wswan);
+
+ void wswan_io(address_map &map);
+ void wswan_mem(address_map &map);
+
void register_save();
void handle_irqs();
void clear_irq_line(int irq);
};
+class wscolor_state : public wswan_state
+{
+public:
+ using wswan_state::wswan_state;
+ void wscolor(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ void wscolor_mem(address_map &map);
+ DECLARE_PALETTE_INIT(wscolor);
+};
#endif // MAME_INCLUDES_WSWAN_H
diff --git a/src/mame/includes/xybots.h b/src/mame/includes/xybots.h
index 6c81d8b4e26..f0fa2a0ccc6 100644
--- a/src/mame/includes/xybots.h
+++ b/src/mame/includes/xybots.h
@@ -5,6 +5,10 @@
Atari Xybots hardware
*************************************************************************/
+#ifndef MAME_INCLUDES_XYBOTS_H
+#define MAME_INCLUDES_XYBOTS_H
+
+#pragma once
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
@@ -13,30 +17,34 @@
class xybots_state : public atarigen_state
{
public:
- xybots_state(const machine_config &mconfig, device_type type, const char *tag)
- : atarigen_state(mconfig, type, tag),
- m_jsa(*this, "jsa"),
- m_playfield_tilemap(*this, "playfield"),
- m_alpha_tilemap(*this, "alpha"),
- m_mob(*this, "mob") { }
+ xybots_state(const machine_config &mconfig, device_type type, const char *tag) :
+ atarigen_state(mconfig, type, tag),
+ m_jsa(*this, "jsa"),
+ m_playfield_tilemap(*this, "playfield"),
+ m_alpha_tilemap(*this, "alpha"),
+ m_mob(*this, "mob")
+ { }
- required_device<atari_jsa_i_device> m_jsa;
- required_device<tilemap_device> m_playfield_tilemap;
- required_device<tilemap_device> m_alpha_tilemap;
- required_device<atari_motion_objects_device> m_mob;
+ DECLARE_DRIVER_INIT(xybots);
+ void xybots(machine_config &config);
- uint16_t m_h256;
+protected:
virtual void update_interrupts() override;
DECLARE_READ16_MEMBER(special_port1_r);
- DECLARE_DRIVER_INIT(xybots);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
- DECLARE_MACHINE_START(xybots);
- DECLARE_MACHINE_RESET(xybots);
- DECLARE_VIDEO_START(xybots);
uint32_t screen_update_xybots(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void main_map(address_map &map);
+
+private:
+ required_device<atari_jsa_i_device> m_jsa;
+ required_device<tilemap_device> m_playfield_tilemap;
+ required_device<tilemap_device> m_alpha_tilemap;
+ required_device<atari_motion_objects_device> m_mob;
+
+ uint16_t m_h256;
static const atari_motion_objects_config s_mob_config;
- void xybots(machine_config &config);
- void main_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_XYBOTS_H
diff --git a/src/mame/includes/z88.h b/src/mame/includes/z88.h
index c1f3e4d3f7a..5697cf90672 100644
--- a/src/mame/includes/z88.h
+++ b/src/mame/includes/z88.h
@@ -35,15 +35,6 @@
#define Z88_SCR_HW_CURS (Z88_SCR_HW_HRS|Z88_SCR_HW_FLS|Z88_SCR_HW_REV)
#define Z88_SCR_HW_NULL (Z88_SCR_HW_HRS|Z88_SCR_HW_GRY|Z88_SCR_HW_REV)
-enum
-{
- Z88_BANK_ROM = 1,
- Z88_BANK_RAM,
- Z88_BANK_CART,
- Z88_BANK_UNMAP
-};
-
-
class z88_state : public driver_device
{
public:
@@ -54,9 +45,16 @@ public:
m_palette(*this, "palette")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<ram_device> m_ram;
- required_device<palette_device> m_palette;
+ void z88(machine_config &config);
+
+protected:
+ enum
+ {
+ Z88_BANK_ROM = 1,
+ Z88_BANK_RAM,
+ Z88_BANK_CART,
+ Z88_BANK_UNMAP
+ };
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -81,6 +79,16 @@ public:
void vh_render_6x8(bitmap_ind16 &bitmap, int x, int y, uint16_t pen0, uint16_t pen1, uint8_t *gfx);
void vh_render_line(bitmap_ind16 &bitmap, int x, int y, uint16_t pen);
+ DECLARE_PALETTE_INIT(z88);
+
+ void z88_io(address_map &map);
+ void z88_mem(address_map &map);
+
+private:
+ required_device<cpu_device> m_maincpu;
+ required_device<ram_device> m_ram;
+ required_device<palette_device> m_palette;
+
struct
{
uint8_t slot;
@@ -91,10 +99,6 @@ public:
uint8_t * m_bios;
uint8_t * m_ram_base;
z88cart_slot_device * m_carts[4];
- DECLARE_PALETTE_INIT(z88);
- void z88(machine_config &config);
- void z88_io(address_map &map);
- void z88_mem(address_map &map);
};
#endif /* MAME_INCLUDES_Z88_H */