Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CHIP8_0NNN(C8, VNNN) { return; }
- void CHIP8_00E0(C8) { _CHIP8_MEMSET(cpu->display, 0, 64*32); }
- void CHIP8_00EE(C8) { cpu->PC = _CHIP8_POP(cpu); }
- void CHIP8_1NNN(C8, VNNN) { cpu->PC = NNN; }
- void CHIP8_2NNN(C8, VNNN) { _CHIP8_PUSH(cpu, cpu->PC+2); cpu->PC = NNN; }
- void CHIP8_3XNN(C8, VXNN) { if (cpu->V[X] == NN) cpu->PC += 2; }
- void CHIP8_4XNN(C8, VXNN) { if (cpu->V[X] != NN) cpu->PC += 2; }
- void CHIP8_5XY0(C8, VXY) { if (cpu->V[X] == cpu->V[Y]) cpu->PC += 2; }
- void CHIP8_6XNN(C8, VXNN) { cpu->V[X] = NN; }
- void CHIP8_7XNN(C8, VXNN) { cpu->V[X] += NN; }
- void CHIP8_8XY0(C8, VXY) { cpu->V[X] = cpu->V[Y]; }
- void CHIP8_8XY1(C8, VXY) { cpu->V[X] = cpu->V[X] | cpu->V[Y]; }
- void CHIP8_8XY2(C8, VXY) { cpu->V[X] = cpu->V[X] & cpu->V[Y]; }
- void CHIP8_8XY3(C8, VXY) { cpu->V[X] = cpu->V[X] ^ cpu->V[Y]; }
- void CHIP8_8XY4(C8, VXY) { cpu->V[X] += cpu->V[Y]; cpu->V[0xF] = (cpu->V[X] < cpu->V[Y]); }
- void CHIP8_8XY5(C8, VXY) { cpu->V[X] -= cpu->V[Y]; cpu->V[0xF] = /*borrow*/0; }
- void CHIP8_8XY6(C8, VXY) { cpu->V[0xF] = /*LSB*/0; cpu->V[X] = cpu->V[X] >> 1; }
- void CHIP8_8XY7(C8, VXY) { cpu->V[X] = cpu->V[Y] - cpu->V[X]; cpu->V[0xF] = /*borrow*/0; }
- void CHIP8_8XYE(C8, VXY) { cpu->V[0xF] = /*MSB*/0; cpu->V[X] = cpu->V[X] << 1; }
- void CHIP8_9XY0(C8, VXY) { if (cpu->V[X] != cpu->V[Y]) cpu->PC += 2; }
- void CHIP8_ANNN(C8, VNNN) { cpu->I = NNN; }
- void CHIP8_BNNN(C8, VNNN) { cpu->PC = NNN + cpu->V[0x0]; }
- void CHIP8_CXNN(C8, VXNN) { cpu->V[X] = (/*rand*/0 & NN); }
- void CHIP8_DXYN(C8, VXYN) { cpu->V[0xF] = CHIP8_DRAWSPRITE(X, Y, cpu->mem + cpu->I, N); }
- void CHIP8_EX9E(C8, VX) { if (cpu->input[X] == 0xFF) cpu->PC += 2; }
- void CHIP8_EXA1(C8, VX) { if (cpu->input[X] == 0x00) cpu->PC += 2; }
- void CHIP8_FX07(C8, VX) { cpu->V[X] = cpu->delaytimer; }
- void CHIP8_FX0A(C8, VX) { BYTE i = 0; for (i = 0; i < 0xF; i++) if (cpu->input[i] == 0xFF) cpu->V[X] = i; }
- void CHIP8_FX15(C8, VX) { cpu->delaytimer = cpu->V[X]; }
- void CHIP8_FX18(C8, VX) { cpu->soundtimer = cpu->V[X]; }
- void CHIP8_FX1E(C8, VX) { cpu->I += cpu->V[X]; }
- void CHIP8_FX29(C8, VX) { cpu->I = 0x000 + (cpu->V[X] * 5); }
- void CHIP8_FX33(C8, VX) { /*not implemented*/ }
- void CHIP8_FX55(C8, VX) { BYTE i = 0; for (i = 0; i < 0xF; i++) *(cpu->mem + cpu->I + i) = cpu->V[i]; }
- void CHIP8_FX65(C8, VX) { BYTE i = 0; for (i = 0; i < 0xF; i++) cpu->V[i] = *(cpu->mem + cpu->I + i); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement