mirror of https://github.com/mgba-emu/mgba.git
LR35902: Implement RRCA and RRA
This commit is contained in:
parent
81cd68cbac
commit
4e64b4fde4
|
@ -25,7 +25,7 @@
|
|||
DECLARE_INSTRUCTION_LR35902(EMITTER, INCC), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, DECC), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDC_), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, STUB), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, RRCA_), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, STUB), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDDE), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDDE_A), \
|
||||
|
@ -41,7 +41,7 @@
|
|||
DECLARE_INSTRUCTION_LR35902(EMITTER, INCE), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, DECE), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDE_), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, STUB), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, RRA_), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, JRNZ), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDHL), \
|
||||
DECLARE_INSTRUCTION_LR35902(EMITTER, LDIHLA), \
|
||||
|
|
|
@ -628,6 +628,22 @@ DEFINE_INSTRUCTION_LR35902(RLCA_,
|
|||
cpu->f.n = 0;
|
||||
cpu->f.c = cpu->a & 1;)
|
||||
|
||||
DEFINE_INSTRUCTION_LR35902(RRA_,
|
||||
int low = cpu->a & 1;
|
||||
cpu->a = (cpu->a >> 1) | (cpu->f.c << 7);
|
||||
cpu->f.z = 0;
|
||||
cpu->f.h = 0;
|
||||
cpu->f.n = 0;
|
||||
cpu->f.c = cpu->f.c = low;)
|
||||
|
||||
DEFINE_INSTRUCTION_LR35902(RRCA_,
|
||||
int low = cpu->a & 1;
|
||||
cpu->a = (cpu->a >> 1) | (low << 7);
|
||||
cpu->f.z = 0;
|
||||
cpu->f.h = 0;
|
||||
cpu->f.n = 0;
|
||||
cpu->f.c = low;)
|
||||
|
||||
DEFINE_INSTRUCTION_LR35902(DI, cpu->irqh.setInterrupts(cpu, false));
|
||||
DEFINE_INSTRUCTION_LR35902(EI, cpu->irqh.setInterrupts(cpu, true));
|
||||
DEFINE_INSTRUCTION_LR35902(HALT, cpu->cycles = cpu->nextEvent);
|
||||
|
|
Loading…
Reference in New Issue