summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/pk8020.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2019-07-20 12:31:21 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2019-07-20 12:31:21 +1000
commitd2926fa02cef5bf728eac74c9e5586aced02a80b (patch)
tree820d62305954ff68c7c8bb87c8a08d1b7ce4b2c3 /src/mame/machine/pk8020.cpp
parent24c462dbdb4ed2992af2f8767bf9c56979e7f1be (diff)
parent68139508715a0375e657add4197582271ef446ec (diff)
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/emu/digfx.h
Diffstat (limited to 'src/mame/machine/pk8020.cpp')
-rw-r--r--src/mame/machine/pk8020.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mame/machine/pk8020.cpp b/src/mame/machine/pk8020.cpp
index e81857cd095..57bcb5d9f08 100644
--- a/src/mame/machine/pk8020.cpp
+++ b/src/mame/machine/pk8020.cpp
@@ -95,7 +95,7 @@ void pk8020_state::memory_w(offs_t offset, uint8_t data)
uint8_t pk8020_state::ppi_porta_r()
{
- return 0xf0 | (m_takt <<1) | (m_text_attr)<<3;
+ return 0xf0 | (m_takt <<1) | (m_text_attr<<3) | ((m_cass->input() > +0.04) ? 1 : 0);
}
void pk8020_state::floppy_control_w(uint8_t data)
@@ -125,6 +125,9 @@ void pk8020_state::floppy_control_w(uint8_t data)
void pk8020_state::ppi_2_portc_w(uint8_t data)
{
+ static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 };
+ m_cass->output(levels[data & 3]);
+
m_sound_gate = BIT(data,3);
m_speaker->level_w(m_sound_gate ? m_sound_level : 0);