summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/cpu/m6502/m5074x.cpp32
-rw-r--r--src/devices/cpu/m6502/om740.lst12
2 files changed, 18 insertions, 26 deletions
diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp
index 8b0c879b554..46e6fffc9ae 100644
--- a/src/devices/cpu/m6502/m5074x.cpp
+++ b/src/devices/cpu/m6502/m5074x.cpp
@@ -164,16 +164,13 @@ void m5074x_device::execute_set_input(int inputnum, int state)
{
switch (inputnum)
{
- case M5074X_INT1_LINE:
- if (state == ASSERT_LINE)
- {
- m_intctrl |= IRQ_INTREQ;
- }
- else
- {
- m_intctrl &= ~IRQ_INTREQ;
- }
- break;
+ case M5074X_INT1_LINE:
+ // FIXME: edge-triggered
+ if (state == ASSERT_LINE)
+ {
+ m_intctrl |= IRQ_INTREQ;
+ }
+ break;
}
recalc_irqs();
@@ -442,12 +439,13 @@ void m5074x_device::tmrirq_w(offs_t offset, uint8_t data)
break;
case 5:
- m_intctrl = data;
+ // Interrupt request bits can only be reset
+ m_intctrl = data & (m_intctrl | ~(IRQ_CNTRREQ | IRQ_INTREQ));
recalc_irqs();
break;
case 6:
- m_tmrctrl = data;
+ m_tmrctrl = data & (m_tmrctrl | ~TMRC_TMRXREQ);
recalc_irqs();
break;
}
@@ -589,25 +587,19 @@ void m50753_device::execute_set_input(int inputnum, int state)
switch (inputnum)
{
case M50753_INT1_LINE:
+ // FIXME: edge-triggered
if (state == ASSERT_LINE)
{
m_intctrl |= IRQ_50753_INT1REQ;
}
- else
- {
- m_intctrl &= ~IRQ_50753_INT1REQ;
- }
break;
case M50753_INT2_LINE:
+ // FIXME: edge-triggered
if (state == ASSERT_LINE)
{
m_intctrl |= IRQ_50753_INT2REQ;
}
- else
- {
- m_intctrl &= ~IRQ_50753_INT2REQ;
- }
break;
}
diff --git a/src/devices/cpu/m6502/om740.lst b/src/devices/cpu/m6502/om740.lst
index 43b8cd39c10..9ece91d9913 100644
--- a/src/devices/cpu/m6502/om740.lst
+++ b/src/devices/cpu/m6502/om740.lst
@@ -126,16 +126,15 @@ rrf_zpg
prefetch();
bra_rel
- TMP = read_pc();
- read_pc_noinc();
- if(page_changing(PC, int8_t(TMP))) {
- read_arg(set_l(PC, PC+int8_t(TMP)));
- }
+ TMP = read_pc_noinc();
+ read_arg(set_l(PC, PC+1));
+ PC++;
+ read_arg(set_l(PC, PC+int8_t(TMP)));
PC += int8_t(TMP);
prefetch();
jmp_zpi
- TMP2 = read_pc();
+ TMP2 = read_pc_noinc();
TMP = read(TMP2 & 0xff);
TMP = set_h(TMP, read((TMP2+1) & 0xff));
PC = TMP;
@@ -359,6 +358,7 @@ andt_zpx
com_zpg
TMP = read_pc();
TMP2 = read(TMP);
+ read(TMP);
TMP2 ^= 0xff;
set_nz(TMP2);
write(TMP, TMP2);