summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-12-22 17:00:08 -0500
committer AJR <ajrhacker@users.noreply.github.com>2019-12-22 17:00:08 -0500
commit2e598d60f83c862ddf0cfb464433a313d24c4488 (patch)
tree4744dfd6611a92ab47514113f80c079d4f84740d
parentceb32d1a829006e1bdb3df4780ac9ecf70cbb331 (diff)
vt5x_cpu: Add more callbacks; note that VT52 doesn't seem to support the key click switch (nw)
-rw-r--r--src/devices/cpu/vt50/vt50.cpp12
-rw-r--r--src/devices/cpu/vt50/vt50.h4
-rw-r--r--src/mame/drivers/vt52.cpp5
3 files changed, 15 insertions, 6 deletions
diff --git a/src/devices/cpu/vt50/vt50.cpp b/src/devices/cpu/vt50/vt50.cpp
index a58c97fd8d6..c4d237b0f2f 100644
--- a/src/devices/cpu/vt50/vt50.cpp
+++ b/src/devices/cpu/vt50/vt50.cpp
@@ -30,6 +30,8 @@ vt5x_cpu_device::vt5x_cpu_device(const machine_config &mconfig, device_type type
, m_frq_callback(*this)
, m_bell_callback(*this)
, m_cen_callback(*this)
+ , m_csf_callback(*this)
+ , m_ccf_callback(*this)
, m_bbits(bbits)
, m_ybits(ybits)
, m_pc(0)
@@ -102,6 +104,8 @@ void vt5x_cpu_device::device_resolve_objects()
m_frq_callback.resolve_safe(1);
m_bell_callback.resolve_safe();
m_cen_callback.resolve_safe();
+ m_csf_callback.resolve_safe(1);
+ m_ccf_callback.resolve_safe(1);
}
void vt52_cpu_device::device_resolve_objects()
@@ -460,12 +464,12 @@ void vt5x_cpu_device::execute_th(u8 inst)
switch (inst & 0160)
{
case 0000:
- // M0: PSCJ (TODO: printer flag)
+ // M0: PSCJ
// M1: URJ
if (m_mode_ff)
m_load_pc = m_ur_flag_callback();
else
- m_load_pc = true;
+ m_load_pc = m_csf_callback();
break;
case 0020:
@@ -496,12 +500,12 @@ void vt5x_cpu_device::execute_th(u8 inst)
break;
case 0100:
- // M0: PRQJ (TODO: printer flag)
+ // M0: PRQJ
// M1: AEM2J
if (m_mode_ff)
m_load_pc = m_ac == m_ram_do;
else
- m_load_pc = true;
+ m_load_pc = m_ccf_callback();
break;
case 0120:
diff --git a/src/devices/cpu/vt50/vt50.h b/src/devices/cpu/vt50/vt50.h
index 6212874b496..fe46b556f99 100644
--- a/src/devices/cpu/vt50/vt50.h
+++ b/src/devices/cpu/vt50/vt50.h
@@ -27,6 +27,8 @@ public:
auto frq_callback() { return m_frq_callback.bind(); }
auto bell_callback() { return m_bell_callback.bind(); }
auto cen_callback() { return m_cen_callback.bind(); }
+ auto ccf_callback() { return m_ccf_callback.bind(); }
+ auto csf_callback() { return m_csf_callback.bind(); }
protected:
// construction/destruction
@@ -75,6 +77,8 @@ protected:
devcb_read_line m_frq_callback;
devcb_write_line m_bell_callback;
devcb_write_line m_cen_callback;
+ devcb_read_line m_csf_callback;
+ devcb_read_line m_ccf_callback;
// register dimensions
const u8 m_bbits;
diff --git a/src/mame/drivers/vt52.cpp b/src/mame/drivers/vt52.cpp
index 74aa84e39e2..82a659b062c 100644
--- a/src/mame/drivers/vt52.cpp
+++ b/src/mame/drivers/vt52.cpp
@@ -186,7 +186,7 @@ static INPUT_PORTS_START(vt52)
PORT_BIT(0x200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CHAR(UCHAR_SHIFT_1) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) // S49(L)/S60(R)
PORT_START("KEYCLICK")
- PORT_DIPNAME(1, 1, "Key Click") PORT_DIPLOCATION("S4:1") // actually two switches, but with only one effect
+ PORT_DIPNAME(1, 1, DEF_STR(Unused)) PORT_DIPLOCATION("S4:1") // not tested by VT52, and possibly not even populated
PORT_DIPSETTING(0, DEF_STR(Off))
PORT_DIPSETTING(1, DEF_STR(On))
@@ -215,10 +215,11 @@ void vt52_state::vt52(machine_config &mconfig)
screen_device &screen(SCREEN(mconfig, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(13.824_MHz_XTAL, 900, 0, 720, 256, 0, 240);
+ //screen.set_raw(13.824_MHz_XTAL, 900, 0, 720, 307.2, 0, 264); // not a whole number of scans
screen.set_screen_update(FUNC(vt52_state::screen_update));
SPEAKER(mconfig, "mono").front_center();
- SPEAKER_SOUND(mconfig, "bell").add_route(ALL_OUTPUTS, "mono", 0.05);
+ SPEAKER_SOUND(mconfig, "bell").add_route(ALL_OUTPUTS, "mono", 1.0);
}
ROM_START(vt52)