Class: Processor (Component)

Method and Variable Index

Public:

Protected:

Method Descriptions

Processor(Machine *machine)

Creates a Processor object.

void interrupt(uint16 vector)

Generate a hardware interrupt. vector will have different meanings, depending on the processor, so check out the class for the CPU you are using.

void NMI(void)

Generate a non-maskable interrupt. The effect will depend on the processor type.

void reset(void)

Resets the CPU. Register values and run time are set to their inital values.

void execute(void)

Run the processor for the number of cycles set by setRunTime().

void setRunTime(uint32 time)

Sets the length of time (in emulated cycles) that the processor will run for next time execute() is called.

void setRegister(uint8 register, uint8 value)

Set the given register to the given value. The register names are defined in the CPU implentation.

uint32 getTime(void)

Returns the number of cycles which have ellapsed so far since the last execute() call. This can only be called meaningfully by functions which are called by execute(), since execute() won't return until the elapsed cycles equals the required cycles.