void ApuDA() { // MOVW dp,YA S9xAPUSetByteZ(IAPU.Registers.YA.B.A, OP1); S9xAPUSetByteZ(IAPU.Registers.YA.B.Y, OP1 + 1); IAPU.PC += 2; }
void Apu8F() { // MOV dp,#00 uint8_t Work8 = OP1; S9xAPUSetByteZ(Work8, OP2); IAPU.PC += 3; }
void Apu4B() { // LSR dp uint8_t Work8 = S9xAPUGetByteZ(OP1); LSR(Work8); S9xAPUSetByteZ(Work8, OP1); IAPU.PC += 2; }
void Apu39() { // AND (X),(Y) uint8 Work8 = S9xAPUGetByteZ(IAPU.X) & S9xAPUGetByteZ(IAPU.YA.B.Y); APUSetZN8(Work8); S9xAPUSetByteZ(Work8, IAPU.X); IAPU.PC++; }
void Apu7B() { // ROR dp+X uint8_t Work8 = S9xAPUGetByteZ(OP1 + IAPU.Registers.X); ROR(Work8); S9xAPUSetByteZ(Work8, OP1 + IAPU.Registers.X); IAPU.PC += 2; }
void Apu5B() { // LSR dp+X uint8 Work8 = S9xAPUGetByteZ(OP1 + IAPU.X); LSR(Work8); S9xAPUSetByteZ(Work8, OP1 + IAPU.X); IAPU.PC += 2; }
void Apu19() { // OR (X),(Y) uint8 Work8 = S9xAPUGetByteZ(IAPU.X) | S9xAPUGetByteZ(IAPU.YA.B.Y); APUSetZN8(Work8); S9xAPUSetByteZ(Work8, IAPU.X); IAPU.PC++; }
void Apu0B() { // ASL dp uint8_t Work8 = S9xAPUGetByteZ(OP1); ASL(Work8); S9xAPUSetByteZ(Work8, OP1); IAPU.PC += 2; }
void Apu3B() { // ROL dp+X uint8 Work8 = S9xAPUGetByteZ(OP1 + IAPU.X); ROL(Work8); S9xAPUSetByteZ(Work8, OP1 + IAPU.X); IAPU.PC += 2; }
void Apu2B() { // ROL dp uint8 Work8 = S9xAPUGetByteZ(OP1); ROL(Work8); S9xAPUSetByteZ(Work8, OP1); IAPU.PC += 2; }
void Apu6B() { // ROR dp uint8_t Work8 = S9xAPUGetByteZ(OP1); ROR(Work8); S9xAPUSetByteZ(Work8, OP1); IAPU.PC += 2; }
void Apu1B() { // ASL dp+X uint8_t Work8 = S9xAPUGetByteZ(OP1 + IAPU.Registers.X); ASL(Work8); S9xAPUSetByteZ(Work8, OP1 + IAPU.Registers.X); IAPU.PC += 2; }
void Apu59() { // EOR (X),(Y) uint8_t Work8 = S9xAPUGetByteZ(IAPU.Registers.X) ^ S9xAPUGetByteZ( IAPU.Registers.YA.B.Y); APUSetZN8(Work8); S9xAPUSetByteZ(Work8, IAPU.Registers.X); IAPU.PC++; }
void Apu18() { // OR dp,#00 uint8_t Work8 = OP1; Work8 |= S9xAPUGetByteZ(OP2); S9xAPUSetByteZ(Work8, OP2); APUSetZN8(Work8); IAPU.PC += 3; }
void Apu58() { // EOR dp,#00 uint8 Work8 = OP1; Work8 ^= S9xAPUGetByteZ(OP2); S9xAPUSetByteZ(Work8, OP2); APUSetZN8(Work8); IAPU.PC += 3; }
void Apu49() { // EOR dp(dest),dp(src) uint8 Work8 = S9xAPUGetByteZ(OP1); Work8 ^= S9xAPUGetByteZ(OP2); S9xAPUSetByteZ(Work8, OP2); APUSetZN8(Work8); IAPU.PC += 3; }
void Apu99() { // ADC (X),(Y) uint8_t W1 = S9xAPUGetByteZ(IAPU.Registers.X); uint8_t Work8 = S9xAPUGetByteZ(IAPU.Registers.YA.B.Y); ADC(W1, Work8); S9xAPUSetByteZ(W1, IAPU.Registers.X); IAPU.PC++; }
void Apu38() { // AND dp,#00 uint8_t Work8 = OP1; Work8 &= S9xAPUGetByteZ(OP2); S9xAPUSetByteZ(Work8, OP2); APUSetZN8(Work8); IAPU.PC += 3; }
void Apu98() { // ADC dp,#00 uint8_t Work8 = OP1; uint8_t W1 = S9xAPUGetByteZ(OP2); ADC(W1, Work8); S9xAPUSetByteZ(W1, OP2); IAPU.PC += 3; }
void Apu09() { // OR dp(dest),dp(src) uint8_t Work8 = S9xAPUGetByteZ(OP1); Work8 |= S9xAPUGetByteZ(OP2); S9xAPUSetByteZ(Work8, OP2); APUSetZN8(Work8); IAPU.PC += 3; }
void Apu89() { // ADC dp(dest),dp(src) uint8_t Work8 = S9xAPUGetByteZ(OP1); uint8_t W1 = S9xAPUGetByteZ(OP2); ADC(W1, Work8); S9xAPUSetByteZ(W1, OP2); IAPU.PC += 3; }
void Apu3A() { // INCW dp uint16_t Work16 = S9xAPUGetByteZ(OP1) + (S9xAPUGetByteZ(OP1 + 1) << 8); Work16++; S9xAPUSetByteZ((uint8_t) Work16, OP1); S9xAPUSetByteZ(Work16 >> 8, OP1 + 1); APUSetZN16(Work16); IAPU.PC += 2; }
void Apu1A() { // DECW dp uint16 Work16 = S9xAPUGetByteZ(OP1) + (S9xAPUGetByteZ(OP1 + 1) << 8); Work16--; S9xAPUSetByteZ((uint8) Work16, OP1); S9xAPUSetByteZ(Work16 >> 8, OP1 + 1); APUSetZN16(Work16); IAPU.PC += 2; }
void Apu9B() { // DEC dp+X uint8_t Work8 = S9xAPUGetByteZ(OP1 + IAPU.Registers.X) - 1; S9xAPUSetByteZ(Work8, OP1 + IAPU.Registers.X); APUSetZN8(Work8); #ifdef SPC700_SHUTDOWN IAPU.WaitCounter++; #endif IAPU.PC += 2; }
void Apu8B() { // DEC dp uint8_t Work8 = S9xAPUGetByteZ(OP1) - 1; S9xAPUSetByteZ(Work8, OP1); APUSetZN8(Work8); #ifdef SPC700_SHUTDOWN IAPU.WaitCounter++; #endif IAPU.PC += 2; }
void ApuBB() { // INC dp+X uint8 Work8 = S9xAPUGetByteZ(OP1 + IAPU.X) + 1; S9xAPUSetByteZ(Work8, OP1 + IAPU.X); APUSetZN8(Work8); #ifdef SPC700_SHUTDOWN IAPU.WaitCounter++; #endif IAPU.PC += 2; }
void Apu6E() { // DBNZ dp,rel uint8_t Work8 = OP1; Relative2(); uint8_t W1 = S9xAPUGetByteZ(Work8) - 1; S9xAPUSetByteZ(W1, Work8); if (W1 != 0) { IAPU.PC = IAPU.RAM + (uint16_t) Int16; APU.Cycles += IAPU.TwoCycles; } else IAPU.PC += 3; }