chip8 emulation in ruby