summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-04-24 16:40:27 +0200
committer hap <happppp@users.noreply.github.com>2021-04-24 16:40:38 +0200
commit0c3cd2504b6bdd76721a712c67f678afe360cc35 (patch)
tree15c0e93a5ecac08965047f767c4e87444a878447
parent4e6cea2f8f33357f92a3790d99604b562ac443fc (diff)
mmdisplay2: hd44780_device is not optional_device
-rw-r--r--src/mame/video/mmdisplay1.cpp1
-rw-r--r--src/mame/video/mmdisplay2.cpp10
-rw-r--r--src/mame/video/mmdisplay2.h19
3 files changed, 13 insertions, 17 deletions
diff --git a/src/mame/video/mmdisplay1.cpp b/src/mame/video/mmdisplay1.cpp
index 09346fb2b67..cb0bd6ffc8b 100644
--- a/src/mame/video/mmdisplay1.cpp
+++ b/src/mame/video/mmdisplay1.cpp
@@ -9,7 +9,6 @@ with 4 4015 dual shift registers.
*********************************************************************/
#include "emu.h"
-
#include "mmdisplay1.h"
diff --git a/src/mame/video/mmdisplay2.cpp b/src/mame/video/mmdisplay2.cpp
index 0692c5d9c30..27171a733a4 100644
--- a/src/mame/video/mmdisplay2.cpp
+++ b/src/mame/video/mmdisplay2.cpp
@@ -9,9 +9,11 @@ but that part is emulated in the driver.
*********************************************************************/
#include "emu.h"
-
#include "mmdisplay2.h"
+#include "screen.h"
+#include "speaker.h"
+
DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device, "mdisplay2", "Mephisto Display Module 2")
@@ -19,7 +21,7 @@ DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device, "mdisplay
// constructor
//-------------------------------------------------
-mephisto_display2_device::mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mephisto_display2_device::mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, MEPHISTO_DISPLAY_MODULE2, tag, owner, clock)
, m_lcd(*this, "hd44780")
, m_dac(*this, "dac")
@@ -93,12 +95,12 @@ void mephisto_display2_device::device_reset()
// I/O handlers
//-------------------------------------------------
-void mephisto_display2_device::latch_w(uint8_t data)
+void mephisto_display2_device::latch_w(u8 data)
{
m_latch = data;
}
-void mephisto_display2_device::io_w(uint8_t data)
+void mephisto_display2_device::io_w(u8 data)
{
if (BIT(data, 1) && !BIT(m_ctrl, 1))
m_lcd->write(BIT(data, 0), m_latch);
diff --git a/src/mame/video/mmdisplay2.h b/src/mame/video/mmdisplay2.h
index b4d188d898c..23ea1f56cf3 100644
--- a/src/mame/video/mmdisplay2.h
+++ b/src/mame/video/mmdisplay2.h
@@ -11,26 +11,22 @@
#pragma once
-#include "video/hd44780.h"
#include "sound/dac.h"
+#include "video/hd44780.h"
#include "emupal.h"
-#include "screen.h"
-#include "speaker.h"
-
-// ======================> mephisto_display2_device
class mephisto_display2_device : public device_t
{
public:
// construction/destruction
- mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
hd44780_device *get() { return m_lcd; }
- void latch_w(uint8_t data);
- void io_w(uint8_t data);
+ void latch_w(u8 data);
+ void io_w(u8 data);
u8 io_r() { return m_ctrl; }
protected:
@@ -40,18 +36,17 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
private:
- optional_device<hd44780_device> m_lcd;
+ required_device<hd44780_device> m_lcd;
required_device<dac_byte_interface> m_dac;
void lcd_palette(palette_device &palette) const;
HD44780_PIXEL_UPDATE(lcd_pixel_update);
- uint8_t m_latch = 0;
- uint8_t m_ctrl = 0;
+ u8 m_latch = 0;
+ u8 m_ctrl = 0;
};
-// device type definition
DECLARE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device)
#endif // MAME_VIDEO_MMDISPLAY2_H