mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
m6502: IRQ fixes [O. Galibert]
This commit is contained in:
parent
8543c4a3b2
commit
87526c456a
@ -46,7 +46,9 @@
|
||||
class m6502_device : public cpu_device {
|
||||
public:
|
||||
enum {
|
||||
IRQ_LINE, NMI_LINE, V_LINE
|
||||
IRQ_LINE = INPUT_LINE_IRQ0,
|
||||
NMI_LINE = INPUT_LINE_NMI,
|
||||
V_LINE = 10
|
||||
};
|
||||
|
||||
m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
@ -273,9 +273,12 @@ brk_imp
|
||||
PC = read_direct(0xfffa);
|
||||
PC = set_h(PC, read_direct(0xfffb));
|
||||
nmi_state = false;
|
||||
standard_irq_callback(NMI_LINE);
|
||||
} else {
|
||||
PC = read_direct(0xfffe);
|
||||
PC = set_h(PC, read_direct(0xffff));
|
||||
if(irq_taken)
|
||||
standard_irq_callback(IRQ_LINE);
|
||||
}
|
||||
irq_taken = false;
|
||||
P |= F_I; // Do *not* move after the prefetch
|
||||
|
@ -202,9 +202,12 @@ brk_c_imp
|
||||
PC = read_direct(0xfffa);
|
||||
PC = set_h(PC, read_direct(0xfffb));
|
||||
nmi_state = false;
|
||||
standard_irq_callback(NMI_LINE);
|
||||
} else {
|
||||
PC = read_direct(0xfffe);
|
||||
PC = set_h(PC, read_direct(0xffff));
|
||||
if(irq_taken)
|
||||
standard_irq_callback(IRQ_LINE);
|
||||
}
|
||||
irq_taken = false;
|
||||
P = (P | F_I) & ~F_D; // Do *not* move after the prefetch
|
||||
|
Loading…
Reference in New Issue
Block a user