Previous | 199869 Revisions | Next |
r18880 Tuesday 6th November, 2012 at 21:04:49 UTC by O. Galibert |
---|
m6502: IRQ fixes [O. Galibert] |
[src/emu/cpu/m6502] | m6502.h om6502.lst om65c02.lst |
r18879 | r18880 | |
---|---|---|
273 | 273 | PC = read_direct(0xfffa); |
274 | 274 | PC = set_h(PC, read_direct(0xfffb)); |
275 | 275 | nmi_state = false; |
276 | standard_irq_callback(NMI_LINE); | |
276 | 277 | } else { |
277 | 278 | PC = read_direct(0xfffe); |
278 | 279 | PC = set_h(PC, read_direct(0xffff)); |
280 | if(irq_taken) | |
281 | standard_irq_callback(IRQ_LINE); | |
279 | 282 | } |
280 | 283 | irq_taken = false; |
281 | 284 | P |= F_I; // Do *not* move after the prefetch |
r18879 | r18880 | |
---|---|---|
46 | 46 | class m6502_device : public cpu_device { |
47 | 47 | public: |
48 | 48 | enum { |
49 | IRQ_LINE, NMI_LINE, V_LINE | |
49 | IRQ_LINE = INPUT_LINE_IRQ0, | |
50 | NMI_LINE = INPUT_LINE_NMI, | |
51 | V_LINE = 10 | |
50 | 52 | }; |
51 | 53 | |
52 | 54 | m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
r18879 | r18880 | |
---|---|---|
202 | 202 | PC = read_direct(0xfffa); |
203 | 203 | PC = set_h(PC, read_direct(0xfffb)); |
204 | 204 | nmi_state = false; |
205 | standard_irq_callback(NMI_LINE); | |
205 | 206 | } else { |
206 | 207 | PC = read_direct(0xfffe); |
207 | 208 | PC = set_h(PC, read_direct(0xffff)); |
209 | if(irq_taken) | |
210 | standard_irq_callback(IRQ_LINE); | |
208 | 211 | } |
209 | 212 | irq_taken = false; |
210 | 213 | P = (P | F_I) & ~F_D; // Do *not* move after the prefetch |
Previous | 199869 Revisions | Next |