summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/upd7725/upd7725.cpp
diff options
context:
space:
mode:
author Lord-Nightmare <Lord-Nightmare@users.noreply.github.com>2017-03-15 19:33:09 -0400
committer Lord-Nightmare <Lord-Nightmare@users.noreply.github.com>2017-03-15 19:33:09 -0400
commit830d02ada0b4c831838481a5dab04fa2c6b0f7a3 (patch)
tree8936533141cece687006f29a2b035b4c98e6a6d4 /src/devices/cpu/upd7725/upd7725.cpp
parentcb1a5c91e8f4722d2fa9292ccacf2d6bdea4ed80 (diff)
upd7725: add preliminary IRQ support [Lord Nightmare]
Diffstat (limited to 'src/devices/cpu/upd7725/upd7725.cpp')
-rw-r--r--src/devices/cpu/upd7725/upd7725.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp
index 96c4fdd6814..6753c75866c 100644
--- a/src/devices/cpu/upd7725/upd7725.cpp
+++ b/src/devices/cpu/upd7725/upd7725.cpp
@@ -277,7 +277,10 @@ void necdsp_device::execute_set_input(int inputnum, int state)
switch (inputnum)
{
case NECDSP_INPUT_LINE_INT:
- //TODO: detect rising edge; if rising edge found AND IE = 1, push PC, pc = 0x100; else do nothing
+ if ( ((m_irq == 0) && (state == 1)) && (regs.sr.ei == 1)) // detect rising edge AND if EI == 1;
+ {
+ regs.stack[regs.sp++] = regs.pc; regs.pc = 0x0100; regs.sp &= 0xf; regs.sr.ei = 0; return; //push PC, pc = 0x100
+ }
m_irq = state; // set old state to current state
break;
// add more when needed