Previous 199869 Revisions Next

r26256 Monday 18th November, 2013 at 09:49:04 UTC by Alex Jackson
Fix mametesters 5371 [Alex Jackson]
[src/emu/cpu/spc700]spc700.c

trunk/src/emu/cpu/spc700/spc700.c
r26255r26256
480480   ((!FLAG_Z) << 1)        |   \
481481   CFLAG_AS_1())
482482
483/* Get Processor Status Register with B flag set (when executing BRK instruction) */
484#define GET_REG_P_BRK()         \
485   ((FLAG_N & 0x80)        |   \
486   ((FLAG_V & 0x80) >> 1)  |   \
487   (FLAG_P>>3)             |   \
488   FLAGPOS_B               |   \
489   (FLAG_H & HFLAG_SET)        |   \
490   FLAG_I                  |   \
491   ((!FLAG_Z) << 1)        |   \
492   CFLAG_AS_1())
493
494/* Get Processor Status Register with B flag cleared (when servicing an interrupt) */
495#define GET_REG_P_INT()         \
496   ((FLAG_N & 0x80)        |   \
497   ((FLAG_V & 0x80) >> 1)  |   \
498   (FLAG_P>>3)             |   \
499   (FLAG_H & HFLAG_SET)        |   \
500   FLAG_I                  |   \
501   ((!FLAG_Z) << 1)        |   \
502   CFLAG_AS_1())
503
504483INLINE void SET_FLAG_I(spc700i_cpu *cpustate, uint value);
505484
506485/* Set the Process Status Register */
r26255r26256
700679#define OP_BRK(BCLK)                                                        \
701680         CLK(BCLK);                                                      \
702681         PUSH_16(cpustate, REG_PC);                                              \
703         PUSH_8(cpustate, GET_REG_P_BRK());                                      \
682         PUSH_8(cpustate, GET_REG_P());                                      \
704683         FLAG_B |= FLAGPOS_B;                                                \
705684         FLAG_I = IFLAG_CLEAR;                                               \
706685         JUMP(cpustate, read_16_VEC(VECTOR_BRK))
r26255r26256
13281307      LINE_NMI = 1;
13291308      CLK(7);
13301309      PUSH_16(cpustate, REG_PC);
1331      PUSH_8(cpustate, GET_REG_P_INT());
1310      PUSH_8(cpustate, GET_REG_P());
13321311      JUMP(cpustate, read_16_VEC(VECTOR_NMI));
13331312   }
13341313#endif /* SPC700_OPTIMIZE_SNES */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team