summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/315-5838_317-0229_comp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/315-5838_317-0229_comp.h')
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h
index 1d741c73ac3..0990472fadb 100644
--- a/src/mame/machine/315-5838_317-0229_comp.h
+++ b/src/mame/machine/315-5838_317-0229_comp.h
@@ -1,16 +1,13 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_MACHINE_315_5838_371_0229_COMP_H
+#define MAME_MACHINE_315_5838_371_0229_COMP_H
#pragma once
-#ifndef __SEGA315_5838_COMP__
-#define __SEGA315_5838_COMP__
-
-#define CHANNELS 2
-
typedef device_delegate<uint16_t (uint32_t)> sega_dec_read_delegate;
-extern const device_type SEGA315_5838_COMP;
+DECLARE_DEVICE_TYPE(SEGA315_5838_COMP, sega_315_5838_comp_device)
#define MCFG_SET_5838_READ_CALLBACK_CH1( _class, _method) \
sega_315_5838_comp_device::set_read_cb_ch1(*device, sega_m2_read_delegate(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
@@ -24,8 +21,6 @@ public:
// construction/destruction
sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- sega_dec_read_delegate m_read_ch2;
-
static void set_read_cb_ch1(device_t &device,sega_dec_read_delegate readcb)
{
sega_315_5838_comp_device &dev = downcast<sega_315_5838_comp_device &>(device);
@@ -65,6 +60,10 @@ protected:
virtual void device_reset() override;
private:
+ static constexpr unsigned CHANNELS = 2;
+
+ sega_dec_read_delegate m_read_ch2;
+
uint16_t m_decathlt_prottable1[24];
uint16_t m_decathlt_dictionaryy[128];
@@ -84,12 +83,10 @@ private:
channel_type m_channel[2];
-
-
// Doa
int m_protstate;
int m_prot_a;
uint8_t m_protram[256];
};
-#endif
+#endif // MAME_MACHINE_315_5838_371_0229_COMP_H