momiji

m68k emulator infrastructure

About Source code

Table of contents

Decoder

Component dedicated to decoding an instruction (located at a specific offset) from an executable program.

UNSTABLE API
Incomplete information ahead!

Notes

Basic usage example

momiji::ExecutableMemory binary = momiji::compile(/* ... */);

// Decode the instruction at offset zero
momiji::DecodedInstruction instr0 = momiji::decode(binary, 0);

// Print the string of the instruction
std::cout << instr0.string << '\n';

// Create an emulated system where the instruction will be executed
momiji::System system;

// Execute the instruction
instr0.exec(system, instr0.data);

// system is now modified

Classes

momiji::DecodedInstruction

A class representing a decoded instruction generated from the decoder.

momiji::InstructionData

A compact class representing the data inside an instruction. This class is filled in by the decoder and it’s used in the implementation of the instruction to retrieve the correct parameters.

Free functions

momiji::decode

Decodes one instruction at a specific offset inside an executable memory.

Typedefs

Type Definition Notes
InstructionString

std::string

Describes the original “string” form of an instruction.

DecodedInstructionFn

momiji::System (*)(momiji::System&, const momiji::InstructionData&)

A function pointer to the implementation of a specific instruction.