momiji

m68k emulator infrastructure

About Source code

Table of contents

momiji::Emulator

Defined in header <momiji/Emulator.h>

struct Emulator

MISSING DESCRIPTION

Methods

(constructor)
constStates

Obtain a view of the current system states

getSettings

Obtain a copy of the current settings

getStates

Get all the current system states

loadNewSettings

Sets the new settings for the Emulator

newState

Creates a new state

reset

Resets the emulator to the initial state

rollback

Rollbacks to a previous system state

states

Obtain a span of the current system states

step

Executes the next instruction

A “System state” is a particular value in time of a momiji::System. This class simply manages a collection of Systems to allow rollback.

By default a new state is created when step() is invoked, this can be changed by tweaking EmulatorSettings::RetainStates. Creating a new state implies copying all the data from the previous System to the new one and executing the next instruction, this is unavoidable to implement non-destructive writes.

Future

In the future it may make sense to employ a persistent data structure to keep track of the states, maybe by making System COW.