summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/coco3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/coco3.cpp')
-rw-r--r--src/mame/machine/coco3.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/mame/machine/coco3.cpp b/src/mame/machine/coco3.cpp
index 60595c3425d..5967617dbae 100644
--- a/src/mame/machine/coco3.cpp
+++ b/src/mame/machine/coco3.cpp
@@ -47,6 +47,34 @@
#include "includes/coco3.h"
//-------------------------------------------------
+// device_start
+//-------------------------------------------------
+
+void coco3_state::device_start()
+{
+ // call parent device_start
+ coco_state::device_start();
+
+ // save state support
+ save_item(NAME(m_pia1b_control_register));
+
+}
+
+//-------------------------------------------------
+// device_reset
+//-------------------------------------------------
+
+void coco3_state::device_reset()
+{
+ /* call parent device_start */
+ coco_state::device_reset();
+
+ /* reset state */
+ m_pia1b_control_register = 0;
+
+}
+
+//-------------------------------------------------
// ff20_write
//-------------------------------------------------
@@ -54,7 +82,11 @@ void coco3_state::ff20_write(offs_t offset, uint8_t data)
{
coco_state::ff20_write(offset, data);
- if (offset == 0x02)
+ if (offset == 0x03)
+ m_pia1b_control_register = data;
+
+ /* only pass ff22 to gime if the data register is addressed */
+ if (offset == 0x02 && ((m_pia1b_control_register & 0x04) == 0x04))
m_gime->ff22_write(data);
}