Chip 8 emulation in swift