momiji

m68k emulator infrastructure

About Source code

Table of contents

momiji::Cpu

Defined in header <momiji/System.h>

struct Cpu

Class describing a generic MC68000 CPU.

Member fields

Field Type Notes Default value
dataRegisters

std::array<momiji::DataRegister, 8>

Array of eight data registers indexed from zero (d0) to seven (d7).

All zeros.

addressRegisters

std::array<momiji::AddressRegister, 8>

Array of eight address registers indexed from zero (a0) to seven (a7). The last one (a7) is the stack pointer.

All zeros.

statusRegister

momiji::StatusRegister

The status register.

All flags cleared out.

programCounter

momiji::ProgramCounter

The current program counter.

0

Notes

The emulated CPU has no concept of a “clock”, each instruction is executed “instantaneously”, as if it took 1 clock to execute.