summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/video.lua12
-rw-r--r--scripts/target/mame/arcade.lua1
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/video/hlcd0515.cpp44
-rw-r--r--src/devices/video/hlcd0515.h8
-rw-r--r--src/devices/video/hlcd0538.cpp29
-rw-r--r--src/devices/video/hlcd0538.h12
-rw-r--r--src/devices/video/mm5445.cpp106
-rw-r--r--src/devices/video/mm5445.h101
-rw-r--r--src/mame/drivers/hh_tms1k.cpp6
-rw-r--r--src/mame/drivers/hh_ucom4.cpp6
-rw-r--r--src/mame/drivers/k28.cpp84
-rw-r--r--src/mame/drivers/novag_cforte.cpp10
-rw-r--r--src/mame/layout/k28.lay48
14 files changed, 329 insertions, 139 deletions
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index 3508f260eff..069c2fc802d 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -605,6 +605,18 @@ end
--------------------------------------------------
--
+--@src/devices/video/mm5445.h,VIDEOS["MM5445"] = true
+--------------------------------------------------
+
+if (VIDEOS["MM5445"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/video/mm5445.cpp",
+ MAME_DIR .. "src/devices/video/mm5445.h",
+ }
+end
+
+--------------------------------------------------
+--
--@src/devices/video/msm6222b.h,VIDEOS["MSM6222B"] = true
--------------------------------------------------
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 41c6d9ce8f9..23ed0f9fcc3 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -323,6 +323,7 @@ VIDEOS["MB90082"] = true
VIDEOS["MB_VCU"] = true
VIDEOS["MC6845"] = true
--VIDEOS["MC6847"] = true
+--VIDEOS["MM5445"] = true
--VIDEOS["MSM6222B"] = true
--VIDEOS["MSM6255"] = true
--VIDEOS["MOS6566"] = true
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index ffab589c5b6..e63a2dd22c2 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -337,6 +337,7 @@ VIDEOS["IMS_CVC"] = true
--VIDEOS["MB_VCU"] = true
VIDEOS["MC6845"] = true
VIDEOS["MC6847"] = true
+VIDEOS["MM5445"] = true
VIDEOS["MSM6222B"] = true
VIDEOS["MSM6255"] = true
VIDEOS["MOS6566"] = true
diff --git a/src/devices/video/hlcd0515.cpp b/src/devices/video/hlcd0515.cpp
index b7730332bfd..87abf50bc0e 100644
--- a/src/devices/video/hlcd0515.cpp
+++ b/src/devices/video/hlcd0515.cpp
@@ -26,27 +26,23 @@ DEFINE_DEVICE_TYPE(HLCD0530, hlcd0530_device, "hlcd0530", "Hughes HLCD 0530 LCD
// constructor
//-------------------------------------------------
-hlcd0515_device::hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 colmax)
- : device_t(mconfig, type, tag, owner, clock)
- , m_colmax(colmax)
- , m_write_cols(*this), m_write_data(*this)
-{
-}
+hlcd0515_device::hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 colmax) :
+ device_t(mconfig, type, tag, owner, clock),
+ m_colmax(colmax),
+ m_write_cols(*this), m_write_data(*this)
+{ }
-hlcd0515_device::hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : hlcd0515_device(mconfig, HLCD0515, tag, owner, clock, 25)
-{
-}
+hlcd0515_device::hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ hlcd0515_device(mconfig, HLCD0515, tag, owner, clock, 25)
+{ }
-hlcd0569_device::hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : hlcd0515_device(mconfig, HLCD0569, tag, owner, clock, 24)
-{
-}
+hlcd0569_device::hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ hlcd0515_device(mconfig, HLCD0569, tag, owner, clock, 24)
+{ }
-hlcd0530_device::hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : hlcd0515_device(mconfig, HLCD0530, tag, owner, clock, 24)
-{
-}
+hlcd0530_device::hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ hlcd0515_device(mconfig, HLCD0530, tag, owner, clock, 24)
+{ }
@@ -66,7 +62,7 @@ void hlcd0515_device::device_start()
// zerofill
m_cs = 0;
- m_pclock = 0;
+ m_clk = 0;
m_data = 0;
m_count = 0;
m_control = 0;
@@ -79,7 +75,7 @@ void hlcd0515_device::device_start()
// register for savestates
save_item(NAME(m_cs));
- save_item(NAME(m_pclock));
+ save_item(NAME(m_clk));
save_item(NAME(m_data));
save_item(NAME(m_count));
save_item(NAME(m_control));
@@ -157,12 +153,12 @@ void hlcd0515_device::clock_data(int col)
}
-WRITE_LINE_MEMBER(hlcd0515_device::write_clock)
+WRITE_LINE_MEMBER(hlcd0515_device::clock_w)
{
state = (state) ? 1 : 0;
// clock/shift data on falling edge
- if (!m_cs && !state && m_pclock)
+ if (!m_cs && !state && m_clk)
{
if (m_count < 5)
{
@@ -179,11 +175,11 @@ WRITE_LINE_MEMBER(hlcd0515_device::write_clock)
m_count++;
}
- m_pclock = state;
+ m_clk = state;
}
-WRITE_LINE_MEMBER(hlcd0515_device::write_cs)
+WRITE_LINE_MEMBER(hlcd0515_device::cs_w)
{
state = (state) ? 1 : 0;
diff --git a/src/devices/video/hlcd0515.h b/src/devices/video/hlcd0515.h
index 5018978226d..1108890a1fb 100644
--- a/src/devices/video/hlcd0515.h
+++ b/src/devices/video/hlcd0515.h
@@ -50,9 +50,9 @@ public:
auto write_cols() { return m_write_cols.bind(); } // COL/ROW pins (offset for ROW)
auto write_data() { return m_write_data.bind(); } // DATA OUT pin, don't use on HLCD0569
- DECLARE_WRITE_LINE_MEMBER(write_clock);
- DECLARE_WRITE_LINE_MEMBER(write_cs);
- DECLARE_WRITE_LINE_MEMBER(write_data) { m_data = (state) ? 1 : 0; }
+ DECLARE_WRITE_LINE_MEMBER(clock_w);
+ DECLARE_WRITE_LINE_MEMBER(cs_w);
+ DECLARE_WRITE_LINE_MEMBER(data_w) { m_data = (state) ? 1 : 0; }
protected:
hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 colmax);
@@ -67,7 +67,7 @@ protected:
const u8 m_colmax; // number of column pins
int m_cs; // input pin state
- int m_pclock; // "
+ int m_clk; // "
int m_data; // "
int m_count;
u8 m_control;
diff --git a/src/devices/video/hlcd0538.cpp b/src/devices/video/hlcd0538.cpp
index c409e6be528..12a188d07a0 100644
--- a/src/devices/video/hlcd0538.cpp
+++ b/src/devices/video/hlcd0538.cpp
@@ -23,22 +23,18 @@ DEFINE_DEVICE_TYPE(HLCD0539, hlcd0539_device, "hlcd0539", "Hughes HLCD 0539 LCD
// constructor
//-------------------------------------------------
-hlcd0538_device::hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, type, tag, owner, clock)
- , m_write_cols(*this), m_write_interrupt(*this)
-{
-}
-
-hlcd0538_device::hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : hlcd0538_device(mconfig, HLCD0538, tag, owner, clock)
-{
-}
+hlcd0538_device::hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
+ device_t(mconfig, type, tag, owner, clock),
+ m_write_cols(*this), m_write_interrupt(*this)
+{ }
-hlcd0539_device::hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : hlcd0538_device(mconfig, HLCD0539, tag, owner, clock)
-{
-}
+hlcd0538_device::hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ hlcd0538_device(mconfig, HLCD0538, tag, owner, clock)
+{ }
+hlcd0539_device::hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ hlcd0538_device(mconfig, HLCD0539, tag, owner, clock)
+{ }
//-------------------------------------------------
@@ -65,12 +61,11 @@ void hlcd0538_device::device_start()
}
-
//-------------------------------------------------
// handlers
//-------------------------------------------------
-WRITE_LINE_MEMBER(hlcd0538_device::write_clk)
+WRITE_LINE_MEMBER(hlcd0538_device::clk_w)
{
state = (state) ? 1 : 0;
@@ -81,7 +76,7 @@ WRITE_LINE_MEMBER(hlcd0538_device::write_clk)
m_clk = state;
}
-WRITE_LINE_MEMBER(hlcd0538_device::write_lcd)
+WRITE_LINE_MEMBER(hlcd0538_device::lcd_w)
{
state = (state) ? 1 : 0;
diff --git a/src/devices/video/hlcd0538.h b/src/devices/video/hlcd0538.h
index 187523e1076..bc1a78d16fc 100644
--- a/src/devices/video/hlcd0538.h
+++ b/src/devices/video/hlcd0538.h
@@ -43,15 +43,15 @@
class hlcd0538_device : public device_t
{
public:
- hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// configuration helpers
- auto write_cols_callback() { return m_write_cols.bind(); } // C/R pins (0538: d0-d7 for rows)
- auto write_interrupt_callback() { return m_write_interrupt.bind(); } // INTERRUPT pin
+ auto write_cols() { return m_write_cols.bind(); } // C/R pins (0538: d0-d7 for rows)
+ auto write_interrupt() { return m_write_interrupt.bind(); } // INTERRUPT pin
- DECLARE_WRITE_LINE_MEMBER(write_clk);
- DECLARE_WRITE_LINE_MEMBER(write_lcd);
- DECLARE_WRITE_LINE_MEMBER(write_data) { m_data = (state) ? 1 : 0; }
+ DECLARE_WRITE_LINE_MEMBER(clk_w);
+ DECLARE_WRITE_LINE_MEMBER(lcd_w);
+ DECLARE_WRITE_LINE_MEMBER(data_w) { m_data = (state) ? 1 : 0; }
protected:
hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
diff --git a/src/devices/video/mm5445.cpp b/src/devices/video/mm5445.cpp
new file mode 100644
index 00000000000..6b857ed19b3
--- /dev/null
+++ b/src/devices/video/mm5445.cpp
@@ -0,0 +1,106 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ National Semiconductor MM5445 series VFD Driver
+
+ TODO:
+ - brightness control input pin (sets output voltage level)
+
+*/
+
+#include "emu.h"
+#include "video/mm5445.h"
+
+
+DEFINE_DEVICE_TYPE(MM5445, mm5445_device, "mm5445", "MM5445 VFD Driver")
+DEFINE_DEVICE_TYPE(MM5446, mm5446_device, "mm5446", "MM5446 VFD Driver")
+DEFINE_DEVICE_TYPE(MM5447, mm5447_device, "mm5447", "MM5447 VFD Driver")
+DEFINE_DEVICE_TYPE(MM5448, mm5448_device, "mm5448", "MM5448 VFD Driver")
+
+//-------------------------------------------------
+// constructor
+//-------------------------------------------------
+
+mm5445_device::mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 outpins) :
+ device_t(mconfig, type, tag, owner, clock),
+ m_outmask((u64(1) << outpins) - 1),
+ m_write_output(*this)
+{ }
+
+mm5445_device::mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ mm5445_device(mconfig, MM5445, tag, owner, clock, 33)
+{ }
+
+mm5446_device::mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ mm5445_device(mconfig, MM5446, tag, owner, clock, 34)
+{ }
+
+mm5447_device::mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ mm5445_device(mconfig, MM5447, tag, owner, clock, 34)
+{ }
+
+mm5448_device::mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ mm5445_device(mconfig, MM5448, tag, owner, clock, 35)
+{ }
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void mm5445_device::device_start()
+{
+ // resolve callbacks
+ m_write_output.resolve_safe();
+
+ // zerofill
+ m_clk = 0;
+ m_enable = 0;
+ m_data = 0;
+ m_shiftreg = 0;
+ m_shiftcount = 0;
+
+ // register for savestates
+ save_item(NAME(m_clk));
+ save_item(NAME(m_enable));
+ save_item(NAME(m_data));
+ save_item(NAME(m_shiftreg));
+ save_item(NAME(m_shiftcount));
+}
+
+
+//-------------------------------------------------
+// handlers
+//-------------------------------------------------
+
+WRITE_LINE_MEMBER(mm5445_device::clock_w)
+{
+ state = (state) ? 1 : 0;
+ bool rise = state && !m_clk;
+ m_clk = state;
+
+ // clock on rising edge
+ if (rise)
+ {
+ u64 data_in = u64(m_data & ~m_enable) << 34;
+ u64 lead_in = ~m_shiftreg & data_in;
+ m_shiftreg = (m_shiftreg & ((u64(1) << 34) - 1)) | data_in;
+
+ // leading 1 triggers shift start
+ if (m_shiftcount == 0 && !lead_in)
+ return;
+
+ // output on 35th clock
+ if (m_shiftcount == 35)
+ {
+ m_shiftcount = 0;
+ m_write_output(0, m_shiftreg & m_outmask, ~u64(0));
+ }
+ else
+ {
+ m_shiftreg >>= 1;
+ m_shiftcount++;
+ }
+ }
+}
diff --git a/src/devices/video/mm5445.h b/src/devices/video/mm5445.h
new file mode 100644
index 00000000000..2ee2b8ed8cb
--- /dev/null
+++ b/src/devices/video/mm5445.h
@@ -0,0 +1,101 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/*
+
+ National Semiconductor MM5445 series VFD Driver
+
+*/
+
+#ifndef MAME_VIDEO_MM5445_H
+#define MAME_VIDEO_MM5445_H
+
+#pragma once
+
+// pinout reference
+
+/*
+ ____ ____
+ VDD 1 |* \_/ | 40 O18
+ O17 2 | | 39 O19
+ O16 3 | | 38 O20
+ O15 4 | | 37 O21
+ O14 5 | | 36 O22
+ O13 6 | | 35 O23
+ O12 7 | | 34 O24
+ O11 8 | | 33 O25
+ O10 9 | | 32 O26
+ O9 10 | MM5445N | 31 O27
+ O8 11 | | 30 O28
+ O7 12 | | 29 O29
+ O6 13 | | 28 O30
+ O5 14 | | 27 O31
+ O4 15 | | 26 O32
+ O3 16 | | 25 O33
+ O2 17 | | 24 BRIGHTNESS CONTROL
+ O1 18 | | 23 _DATA ENABLE
+ VGG 19 | | 22 DATA IN
+ VSS 20 |___________| 21 CLOCK IN
+
+ O# = OUTPUT BIT #
+ MM5446, MM5448 don't have the brightness control pin, an extra output pin instead
+ MM5447, MM5448 don't have the data enable pin(always enabled), but another extra output pin
+*/
+
+
+class mm5445_device : public device_t
+{
+public:
+ mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+
+ // configuration helpers
+ auto output_cb() { return m_write_output.bind(); }
+
+ DECLARE_WRITE_LINE_MEMBER(clock_w);
+ DECLARE_WRITE_LINE_MEMBER(enable_w) { m_enable = (state) ? 1 : 0; } // active low, unused on MM5447 and MM5448
+ DECLARE_WRITE_LINE_MEMBER(data_w) { m_data = (state) ? 1 : 0; }
+
+protected:
+ mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 outpins);
+
+ // device-level overrides
+ virtual void device_start() override;
+
+ const u64 m_outmask;
+
+ int m_clk; // input pin state
+ int m_enable; // "
+ int m_data; // "
+
+ u64 m_shiftreg;
+ int m_shiftcount;
+
+ // callbacks
+ devcb_write64 m_write_output;
+};
+
+
+class mm5446_device : public mm5445_device
+{
+public:
+ mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+class mm5447_device : public mm5445_device
+{
+public:
+ mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+class mm5448_device : public mm5445_device
+{
+public:
+ mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+
+DECLARE_DEVICE_TYPE(MM5445, mm5445_device)
+DECLARE_DEVICE_TYPE(MM5446, mm5446_device)
+DECLARE_DEVICE_TYPE(MM5447, mm5447_device)
+DECLARE_DEVICE_TYPE(MM5448, mm5448_device)
+
+#endif // MAME_VIDEO_MM5445_H
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 72800bb84fc..37b19a1b17d 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -5931,9 +5931,9 @@ WRITE16_MEMBER(horseran_state::write_r)
// R0: HLCD0569 clock
// R1: HLCD0569 data in
// R2: HLCD0569 _CS
- m_lcd->write_cs(data >> 2 & 1);
- m_lcd->write_data(data >> 1 & 1);
- m_lcd->write_clock(data & 1);
+ m_lcd->cs_w(data >> 2 & 1);
+ m_lcd->data_w(data >> 1 & 1);
+ m_lcd->clock_w(data & 1);
// R3-R10: input mux
m_inp_mux = data >> 3 & 0xff;
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index a0f4da1952e..448090a126c 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -1829,9 +1829,9 @@ WRITE8_MEMBER(mcompgin_state::lcd_w)
// E0: HLCD0530 _CS
// E1: HLCD0530 clock
// E2: HLCD0530 data in
- m_lcd->write_cs(data & 1);
- m_lcd->write_data(data >> 2 & 1);
- m_lcd->write_clock(data >> 1 & 1);
+ m_lcd->cs_w(data & 1);
+ m_lcd->data_w(data >> 2 & 1);
+ m_lcd->clock_w(data >> 1 & 1);
}
// config
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index 8f3131ccfbc..8b8ed7136d3 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -16,7 +16,6 @@
TODO:
- external module support (no dumps yet)
- - make MM5445N a device
***************************************************************************/
@@ -25,6 +24,7 @@
#include "machine/timer.h"
#include "machine/tms6100.h"
#include "sound/votrax.h"
+#include "video/mm5445.h"
#include "speaker.h"
#include "k28.lh"
@@ -38,6 +38,7 @@ public:
m_maincpu(*this, "maincpu"),
m_tms6100(*this, "tms6100"),
m_speech(*this, "speech"),
+ m_vfd(*this, "vfd"),
m_onbutton_timer(*this, "on_button"),
m_inp_matrix(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u", 0U, 0U),
@@ -57,6 +58,7 @@ private:
required_device<i8021_device> m_maincpu;
required_device<tms6100_device> m_tms6100;
required_device<votrax_sc01_device> m_speech;
+ required_device<mm5445_device> m_vfd;
required_device<timer_device> m_onbutton_timer;
required_ioport_array<7> m_inp_matrix;
output_finder<0x20, 0x20> m_out_x;
@@ -89,11 +91,11 @@ private:
u64 m_vfd_shiftreg_out;
int m_vfd_shiftcount;
+ DECLARE_WRITE64_MEMBER(vfd_output_w);
DECLARE_WRITE8_MEMBER(mcu_p0_w);
DECLARE_READ8_MEMBER(mcu_p1_r);
DECLARE_READ8_MEMBER(mcu_p2_r);
DECLARE_WRITE8_MEMBER(mcu_p2_w);
- DECLARE_WRITE_LINE_MEMBER(mcu_prog_w);
void power_off();
@@ -252,10 +254,26 @@ void k28_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool upda
/***************************************************************************
- I/O, Address Map(s)
+ I/O
***************************************************************************/
+WRITE64_MEMBER(k28_state::vfd_output_w)
+{
+ // O1-O16: digit segment data
+ // O17-O25: digit select
+ u16 seg_data = bitswap<16>(data,15,14,2,6,5,3,1,7,12,11,10,13,0,4,9,8);
+ u16 digit_sel = data >> 16 & 0x1ff;
+
+ set_display_segmask(0x1ff, 0x3fff);
+ display_matrix(16, 9, seg_data, digit_sel);
+
+ // O26: power-off request on falling edge
+ if (~data & m_vfd_shiftreg_out & 0x2000000)
+ power_off();
+ m_vfd_shiftreg_out = data;
+}
+
WRITE8_MEMBER(k28_state::mcu_p0_w)
{
// d0,d1: phoneme high bits
@@ -270,9 +288,7 @@ WRITE8_MEMBER(k28_state::mcu_p0_w)
m_speech_strobe = strobe;
// d5: VFD driver data enable
- m_vfd_data_enable = ~data >> 5 & 1;
- if (m_vfd_data_enable)
- m_vfd_shiftreg = (m_vfd_shiftreg & ~u64(1)) | m_vfd_data_in;
+ m_vfd->enable_w(data >> 5 & 1);
// d4: VSM chip enable
// d6: VSM M0
@@ -311,9 +327,7 @@ READ8_MEMBER(k28_state::mcu_p2_r)
WRITE8_MEMBER(k28_state::mcu_p2_w)
{
// d0: VFD driver serial data
- m_vfd_data_in = data & 1;
- if (m_vfd_data_enable)
- m_vfd_shiftreg = (m_vfd_shiftreg & ~u64(1)) | m_vfd_data_in;
+ m_vfd->data_w(data & 1);
// d0-d3: VSM data, input mux and SC-01 phoneme lower nibble
m_tms6100->add_w(space, 0, data);
@@ -321,46 +335,6 @@ WRITE8_MEMBER(k28_state::mcu_p2_w)
m_phoneme = (m_phoneme & ~0xf) | (data & 0xf);
}
-WRITE_LINE_MEMBER(k28_state::mcu_prog_w)
-{
- // 8021 PROG: clock VFD driver
- bool rise = state == 1 && !m_vfd_clock;
- m_vfd_clock = state;
-
- // on rising edge
- if (rise)
- {
- // leading 1 triggers shift start
- if (m_vfd_shiftcount == 0 && ~m_vfd_shiftreg & 1)
- return;
-
- // output shiftreg on 35th clock
- if (m_vfd_shiftcount == 35)
- {
- m_vfd_shiftcount = 0;
-
- // output 0-15: digit segment data
- u16 seg_data = (u16)(m_vfd_shiftreg >> 19);
- seg_data = bitswap<16>(seg_data,0,1,13,9,10,12,14,8,3,4,5,2,15,11,6,7);
-
- // output 16-24: digit select
- u16 digit_sel = (u16)(m_vfd_shiftreg >> 10) & 0x1ff;
- set_display_segmask(0x1ff, 0x3fff);
- display_matrix(16, 9, seg_data, digit_sel);
-
- // output 25: power-off request on falling edge
- if (~m_vfd_shiftreg & m_vfd_shiftreg_out & 0x200)
- power_off();
- m_vfd_shiftreg_out = m_vfd_shiftreg;
- }
- else
- {
- m_vfd_shiftreg <<= 1;
- m_vfd_shiftcount++;
- }
- }
-}
-
/***************************************************************************
@@ -457,15 +431,19 @@ void k28_state::k28(machine_config &config)
m_maincpu->p1_in_cb().set(FUNC(k28_state::mcu_p1_r));
m_maincpu->p2_in_cb().set(FUNC(k28_state::mcu_p2_r));
m_maincpu->p2_out_cb().set(FUNC(k28_state::mcu_p2_w));
- m_maincpu->prog_out_cb().set(FUNC(k28_state::mcu_prog_w));
- m_maincpu->t1_in_cb().set("speech", FUNC(votrax_sc01_device::request)); // SC-01 A/R pin
+ m_maincpu->prog_out_cb().set("vfd", FUNC(mm5445_device::clock_w));
+ m_maincpu->t1_in_cb().set("speech", FUNC(votrax_sc01_device::request));
- TMS6100(config, m_tms6100, 3.579545_MHz_XTAL); // CLK tied to 8021 ALE pin
+ TMS6100(config, m_tms6100, 3.579545_MHz_XTAL / 15); // CLK tied to 8021 ALE pin
TIMER(config, "on_button").configure_generic(timer_device::expired_delegate());
- TIMER(config, "display_decay").configure_periodic(FUNC(k28_state::display_decay_tick), attotime::from_msec(1));
+
+ /* video hardware */
+ MM5445(config, m_vfd).output_cb().set(FUNC(k28_state::vfd_output_w));
config.set_default_layout(layout_k28);
+ TIMER(config, "display_decay").configure_periodic(FUNC(k28_state::display_decay_tick), attotime::from_msec(1));
+
/* sound hardware */
SPEAKER(config, "mono").front_center();
VOTRAX_SC01(config, "speech", 760000).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin
diff --git a/src/mame/drivers/novag_cforte.cpp b/src/mame/drivers/novag_cforte.cpp
index e17b7407b67..64c0564f214 100644
--- a/src/mame/drivers/novag_cforte.cpp
+++ b/src/mame/drivers/novag_cforte.cpp
@@ -111,9 +111,9 @@ WRITE8_MEMBER(cforte_state::control_w)
// d0: HLCD0538 data in
// d1: HLCD0538 clk
// d2: HLCD0538 lcd
- m_hlcd0538->write_data(data & 1);
- m_hlcd0538->write_clk(data >> 1 & 1);
- m_hlcd0538->write_lcd(data >> 2 & 1);
+ m_hlcd0538->data_w(data & 1);
+ m_hlcd0538->clk_w(data >> 1 & 1);
+ m_hlcd0538->lcd_w(data >> 2 & 1);
// d3: unused?
@@ -216,8 +216,8 @@ void cforte_state::cforte(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
/* video hardware */
- HLCD0538(config, m_hlcd0538, 0);
- m_hlcd0538->write_cols_callback().set(FUNC(cforte_state::lcd_output_w));
+ HLCD0538(config, m_hlcd0538);
+ m_hlcd0538->write_cols().set(FUNC(cforte_state::lcd_output_w));
TIMER(config, "display_decay").configure_periodic(FUNC(cforte_state::display_decay_tick), attotime::from_msec(1));
config.set_default_layout(layout_novag_cforte);
diff --git a/src/mame/layout/k28.lay b/src/mame/layout/k28.lay
index 60898d8fde0..dd314e6f11e 100644
--- a/src/mame/layout/k28.lay
+++ b/src/mame/layout/k28.lay
@@ -27,41 +27,41 @@
<!-- 9 digits -->
- <bezel name="digit8" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
- <bezel name="8.14" element="lamp_dp"><bounds x="-1.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="8.15" element="lamp_ct"><bounds x="-0.8" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
+ <bezel name="0.14" element="lamp_dp"><bounds x="-1.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.15" element="lamp_ct"><bounds x="-0.8" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit7" element="digit"><bounds x="11" y="0" width="10" height="15" /></bezel>
- <bezel name="7.14" element="lamp_dp"><bounds x="9.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="7.15" element="lamp_ct"><bounds x="10.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="11" y="0" width="10" height="15" /></bezel>
+ <bezel name="1.14" element="lamp_dp"><bounds x="9.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.15" element="lamp_ct"><bounds x="10.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit6" element="digit"><bounds x="22" y="0" width="10" height="15" /></bezel>
- <bezel name="6.14" element="lamp_dp"><bounds x="20.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="6.15" element="lamp_ct"><bounds x="21.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="22" y="0" width="10" height="15" /></bezel>
+ <bezel name="2.14" element="lamp_dp"><bounds x="20.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="2.15" element="lamp_ct"><bounds x="21.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit5" element="digit"><bounds x="33" y="0" width="10" height="15" /></bezel>
- <bezel name="5.14" element="lamp_dp"><bounds x="31.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="5.15" element="lamp_ct"><bounds x="32.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="33" y="0" width="10" height="15" /></bezel>
+ <bezel name="3.14" element="lamp_dp"><bounds x="31.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="3.15" element="lamp_ct"><bounds x="32.2" y="13.5" width="0.75" height="1.5" /></bezel>
<bezel name="digit4" element="digit"><bounds x="44" y="0" width="10" height="15" /></bezel>
<bezel name="4.14" element="lamp_dp"><bounds x="42.5" y="11" width="1.5" height="1.5" /></bezel>
<bezel name="4.15" element="lamp_ct"><bounds x="43.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="55" y="0" width="10" height="15" /></bezel>
- <bezel name="3.14" element="lamp_dp"><bounds x="53.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="3.15" element="lamp_ct"><bounds x="54.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit5" element="digit"><bounds x="55" y="0" width="10" height="15" /></bezel>
+ <bezel name="5.14" element="lamp_dp"><bounds x="53.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="5.15" element="lamp_ct"><bounds x="54.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="66" y="0" width="10" height="15" /></bezel>
- <bezel name="2.14" element="lamp_dp"><bounds x="64.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="2.15" element="lamp_ct"><bounds x="65.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit6" element="digit"><bounds x="66" y="0" width="10" height="15" /></bezel>
+ <bezel name="6.14" element="lamp_dp"><bounds x="64.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="6.15" element="lamp_ct"><bounds x="65.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="77" y="0" width="10" height="15" /></bezel>
- <bezel name="1.14" element="lamp_dp"><bounds x="75.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="1.15" element="lamp_ct"><bounds x="76.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit7" element="digit"><bounds x="77" y="0" width="10" height="15" /></bezel>
+ <bezel name="7.14" element="lamp_dp"><bounds x="75.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="7.15" element="lamp_ct"><bounds x="76.2" y="13.5" width="0.75" height="1.5" /></bezel>
- <bezel name="digit0" element="digit"><bounds x="88" y="0" width="10" height="15" /></bezel>
- <bezel name="0.14" element="lamp_dp"><bounds x="86.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="0.15" element="lamp_ct"><bounds x="87.2" y="13.5" width="0.75" height="1.5" /></bezel>
+ <bezel name="digit8" element="digit"><bounds x="88" y="0" width="10" height="15" /></bezel>
+ <bezel name="8.14" element="lamp_dp"><bounds x="86.5" y="11" width="1.5" height="1.5" /></bezel>
+ <bezel name="8.15" element="lamp_ct"><bounds x="87.2" y="13.5" width="0.75" height="1.5" /></bezel>
</view>
</mamelayout>