diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 43 |
1 files changed, 2 insertions, 41 deletions
@@ -46,6 +46,8 @@ typedef struct } chip8; +#include "instr.c" + #define V mem.sys.v #define STACK mem.sys.stack #define DISPLAY mem.sys.disp @@ -64,47 +66,6 @@ void c8_reset(chip8* c8) c8->pc = C8_RESET_VECTOR; } -/* inst. fmts: - * Onnn = 0,1,2,A,B - * 00E0 - CLS - * 00EE - RET - * 0nnn - SYS addr - * 1nnn - JP addr - * 2nnn - CALL addr - * Annn - LD I, addr - * Bnnn - JP V0, addr - * Oxkk = 3,4,6,7,C,E,F - * 3xkk - SE Vx, byte - * 4xkk - SNE Vx, byte - * 6xkk - LD Vx, byte - * 7xkk - ADD Vx, byte - * Cxkk - RND Vx, byte - * Ex9E - SKP Vx - * ExA1 - SKNP Vx - * Fx07 - LD Vx, DT - * Fx0A - LD Vx, K - * Fx15 - LD DT, Vx - * Fx18 - LD ST, Vx - * Fx1E - ADD I, Vx - * Fx29 - LD F, Vx - * Fx33 - LD B, Vx - * Fx55 - LD [I], Vx - * Fx65 - LD Vx, [I] - * Oxyn = 5,8,9,D - * 5xy0 - SE Vx, Vy - * 8xy0 - LD Vx, Vy - * 8xy1 - OR Vx, Vy - * 8xy2 - AND Vx, Vy - * 8xy3 - XOR Vx, Vy - * 8xy4 - ADD Vx, Vy - * 8xy5 - SUB Vx, Vy - * 8xy6 - SHR Vx {, Vy} - * 8xy7 - SUBN Vx, Vy - * 8xyE - SHL Vx {, Vy} - * 9xy0 - SNE Vx, Vy - * Dxyn - DRW Vx, Vy, nibble - */ - void c8_dump_state(chip8* c8, bool stack) { int i = 0; |