Chip-8 emulator in C