summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/upd7810/upd7810_opcodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/upd7810/upd7810_opcodes.cpp')
-rw-r--r--src/devices/cpu/upd7810/upd7810_opcodes.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/devices/cpu/upd7810/upd7810_opcodes.cpp b/src/devices/cpu/upd7810/upd7810_opcodes.cpp
index 7df4a498fdc..f9580278be5 100644
--- a/src/devices/cpu/upd7810/upd7810_opcodes.cpp
+++ b/src/devices/cpu/upd7810/upd7810_opcodes.cpp
@@ -309,7 +309,10 @@ void upd7810_device::DIV_A()
A = remainder;
}
else
- EA = 0xffff; /* guess */
+ {
+ A = EAL;
+ EA = 0xffff;
+ }
}
/* 48 3e: 0100 1000 0011 1110 */
@@ -1042,6 +1045,11 @@ void upd7810_device::MOV_TMM_A()
void upd7810_device::MOV_MM_A()
{
MM = A;
+
+ if (BIT(A, 3))
+ m_ram_view.select(0);
+ else
+ m_ram_view.disable();
}
/* 4d d1: 0100 1101 1101 0001 */
@@ -9454,7 +9462,7 @@ void upd7810_device::STM_7801()
upd7810_to_output_change(1);
/* Reload the timer */
- m_ovc0 = 16 * ( TM0 + ( ( TM1 & 0x0f ) << 8 ) );
+ m_ovc0 = 8 * ( TM0 + ( ( TM1 & 0x0f ) << 8 ) );
}
void upd7810_device::MOV_MC_A_7801()
@@ -9469,5 +9477,8 @@ void upd7810_device::MOV_MC_A_7801()
/* PC5 Output IO/-M Output */
/* PC6 Output HLDA Output */
/* PC7 Input HOLD Input */
- MC = 0x84 | ( ( A & 0x02 ) ? 0x02 : 0x00 ) | ( ( A & 0x01 ) ? 0x01 : 0x00 );
+ if (MC == A)
+ return;
+ MC = A;
+ WP(UPD7810_PORTC, m_pc_out);
}