summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/copsnrob.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/copsnrob.h')
-rw-r--r--src/mame/includes/copsnrob.h38
1 files changed, 26 insertions, 12 deletions
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