void Chip8::emulateCycle() { // fetch opcode u16int opcode = memory[regPc] << 8 | memory[regPc + 1]; // decode opcode decodeOpcode(opcode); } // fin du emulateCycle
Instruction::Ptr InstructionDecoderImpl::decode(InstructionDecoder::buffer& b) { //setMode(m_Arch == Arch_x86_64); const unsigned char* start = b.start; decodeOpcode(b); unsigned int decodedSize = b.start - start; return make_shared(singleton_object_pool<Instruction>::construct( m_Operation, decodedSize, start, m_Arch)); }