diff --git a/scripts/src/video.lua b/scripts/src/video.lua index 0bda85053a7..a5f12c2c565 100644 --- a/scripts/src/video.lua +++ b/scripts/src/video.lua @@ -328,6 +328,18 @@ if (VIDEOS["HD66421"]~=null) then } end +-------------------------------------------------- +-- +--@src/devices/video/hlcd0515.h,VIDEOS["HLCD0515"] = true +-------------------------------------------------- + +if (VIDEOS["HLCD0515"]~=null) then + files { + MAME_DIR .. "src/devices/video/hlcd0515.cpp", + MAME_DIR .. "src/devices/video/hlcd0515.h", + } +end + -------------------------------------------------- -- --@src/devices/video/huc6202.h,VIDEOS["HUC6202"] = true diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 3d56c5c5c1c..704cb345343 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -296,6 +296,7 @@ VIDEOS["HD44780"] = true VIDEOS["HD61830"] = true VIDEOS["HD63484"] = true --VIDEOS["HD66421"] = true +--VIDEOS["HLCD0515"] = true VIDEOS["HUC6202"] = true VIDEOS["HUC6260"] = true --VIDEOS["HUC6261"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 96cfc02d53c..aa7bf43fb49 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -296,6 +296,7 @@ VIDEOS["HD44780"] = true VIDEOS["HD61830"] = true --VIDEOS+= HD63484"] = true VIDEOS["HD66421"] = true +VIDEOS["HLCD0515"] = true VIDEOS["HUC6202"] = true VIDEOS["HUC6260"] = true VIDEOS["HUC6261"] = true diff --git a/src/devices/video/hlcd0515.cpp b/src/devices/video/hlcd0515.cpp new file mode 100644 index 00000000000..638d18f95dd --- /dev/null +++ b/src/devices/video/hlcd0515.cpp @@ -0,0 +1,67 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Hughes HLCD 0515/0569 LCD Driver + + TODO: + - x + +*/ + +#include "video/hlcd0515.h" + + +const device_type HLCD0515 = &device_creator; +const device_type HLCD0569 = &device_creator; + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +hlcd0515_device::hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, HLCD0515, "HLCD 0515 LCD Driver", tag, owner, clock, "hlcd0515", __FILE__) +{ +} + +hlcd0515_device::hlcd0515_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) +{ +} + +hlcd0569_device::hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : hlcd0515_device(mconfig, HLCD0569, "HLCD 0569 LCD Driver", tag, owner, clock, "hlcd0569", __FILE__) +{ +} + + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void hlcd0515_device::device_start() +{ + // resolve callbacks + + // zerofill + m_cs = 0; + + // register for savestates + save_item(NAME(m_cs)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void hlcd0515_device::device_reset() +{ +} + + + +//------------------------------------------------- +// handlers +//------------------------------------------------- diff --git a/src/devices/video/hlcd0515.h b/src/devices/video/hlcd0515.h new file mode 100644 index 00000000000..f0637e7ff9a --- /dev/null +++ b/src/devices/video/hlcd0515.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/* + + Hughes HLCD 0515/0569 LCD Driver + +*/ + +#ifndef _HLCD0515_H_ +#define _HLCD0515_H_ + +#include "emu.h" + + +class hlcd0515_device : public device_t +{ +public: + hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0515_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source); + + // static configuration helpers + //template static devcb_base &set_write_x_callback(device_t &device, _Object object) { return downcast(device).m_write_x.set_callback(object); } + + //DECLARE_WRITE_LINE_MEMBER(write_cs); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + int m_cs; + + // callbacks + //devcb_write32 m_write_x; +}; + + +class hlcd0569_device : public hlcd0515_device +{ +public: + hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); +}; + + + +extern const device_type HLCD0515; +extern const device_type HLCD0569; + + +#endif /* _HLCD0515_H_ */ diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index e1dae12e696..415a208fc3e 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -132,6 +132,7 @@ #include "includes/hh_tms1k.h" #include "machine/tms1024.h" +#include "video/hlcd0515.h" #include "sound/beep.h" #include "sound/sn76477.h" #include "sound/s14001a.h" @@ -4555,6 +4556,8 @@ static MACHINE_CONFIG_START( horseran, horseran_state ) MCFG_TMS1XXX_READ_K_CB(READ8(horseran_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(horseran_state, write_r)) + /* video hardware */ + MCFG_DEVICE_ADD("lcd", HLCD0569, 1115) // 223nf cap //MCFG_DEFAULT_LAYOUT(layout_horseran) /* no sound! */