C# Class Ypsilon.Emulation.Processor.YCPU

Datei anzeigen Open project: ZaneDubya/YCPU Class Usage Examples

Public Methods

Method Description
DebugReadMemory ( ushort address, SegmentIndex segmentType ) : ushort
Disassemble ( ushort address, int count, bool extendedFormat = true ) : string[]
InitializeMemory ( ) : void

Initializes arrays for memory banks, internal ram, and internal rom. Must be called before running any operations.

Interrupt_BusRefresh ( ) : void
Interrupt_Clock ( ) : void
Interrupt_DebugQuery ( ) : void
Interrupt_HWI ( ) : void
Interrupt_Reset ( ) : void
Interrupt_SWI ( ) : void
Pause ( ) : void

Pauses a currently executing YCPU.

ReadMemInt16 ( ushort address, SegmentIndex segment ) : ushort

Reads a 16-bit value from the address specified.

ReadMemInt8 ( ushort address, SegmentIndex segment ) : byte

Reads an 8-bit value from the address specified.

Run ( int cyclecount = -1 ) : void

Executes a set number of cycles, or infinite cycles.

RunOneInstruction ( ) : void

Executes one instruction and returns.

WriteMemInt16 ( ushort address, ushort value, SegmentIndex segment ) : void
WriteMemInt8 ( ushort address, byte value, SegmentIndex segment ) : void
YCPU ( ) : System.Threading

Initializes a new YCPU.

Private Methods

Method Description
ADC ( ushort operand ) : void
ADD ( ushort operand ) : void
ADI ( ushort operand ) : void
AND ( ushort operand ) : void
ASL ( ushort operand ) : void
ASR ( ushort operand ) : void
AppendMemoryContents ( string disasm, ushort mem ) : string
BAW ( ushort operand ) : void
BCC ( ushort operand ) : void
BCS ( ushort operand ) : void
BEQ ( ushort operand ) : void
BIT ( ushort operand ) : void
BMI ( ushort operand ) : void
BNE ( ushort operand ) : void
BPL ( ushort operand ) : void
BSG ( ushort operand ) : void
BTC ( ushort operand ) : void
BTS ( ushort operand ) : void
BTX ( ushort operand ) : void
BUG ( ushort operand ) : void
BVC ( ushort operand ) : void
BVS ( ushort operand ) : void
BitPatternALU ( ushort operand, ushort &value, RegGeneral &destination ) : void

Executes an ALU operation.

BitPatternBRA ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternBTI ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternFLG ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternHWQ ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternIMM ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternJMI ( ushort operand, ushort &address, uint &addressFar, bool &isFarJump ) : void
BitPatternSET ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternSHF ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternSTK ( ushort operand, ushort &value, RegGeneral &destination ) : void
BitPatternSTO ( ushort operand, ushort &destAddress, RegGeneral &source ) : void

Executes a STOre operation (same bit pattern as ALU, but writes a value from r0 to destination).

CLF ( ushort operand ) : void
CMP ( ushort operand ) : void
DIV ( ushort operand ) : void
DVI ( ushort operand ) : void
DisassembleALU ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleBRA ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleBTT ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleFLG ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleHWQ ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleINC ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleJMP ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleNoBits ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassemblePRX ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleSET ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleSHF ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleSTK ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleSTX ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
DisassembleXSG ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string
EOR ( ushort operand ) : void
GetSegment ( SegmentIndex segment ) : Segment
HWQ ( ushort operand ) : void
InitializeOpcodes ( ) : void
Interrupt ( Interrupts interrupt, ushort errorCode = null ) : void
Interrupt_DivZeroFault ( ushort opcode ) : void
Interrupt_DoubleFault ( ushort opcode ) : void
Interrupt_IsFault ( Interrupts interrupt ) : bool
Interrupt_SegFault ( SegmentIndex segmentType, ushort opcode, ushort address ) : void
Interrupt_StackFault ( ushort opcode, ushort address ) : void
Interrupt_UnPrivFault ( ushort opcode ) : void
Interrupt_UndefFault ( ushort opcode ) : void
JMP ( ushort operand ) : void
JSR ( ushort operand ) : void
LOD ( ushort operand ) : void
LSR ( ushort operand ) : void
MDI ( ushort operand ) : void
MLI ( ushort operand ) : void
MOD ( ushort operand ) : void
MUL ( ushort operand ) : void
NEG ( ushort operand ) : void
NOP ( ushort operand ) : void
NOT ( ushort operand ) : void
NameOfRegGP ( RegGeneral register ) : string
NameOfRegSP ( RegControl register ) : string
ORR ( ushort operand ) : void
POP ( ushort operand ) : void
PRX ( ushort operand ) : void
PSH ( ushort operand ) : void
RNL ( ushort operand ) : void
RNR ( ushort operand ) : void
ROL ( ushort operand ) : void
ROR ( ushort operand ) : void
RTI ( ushort operand ) : void
RTS ( ushort operand, bool far ) : void
ReadControlRegister ( ushort operand, RegControl index ) : ushort
ReturnFromInterrupt ( ) : void
SBC ( ushort operand ) : void
SBI ( ushort operand ) : void
SEF ( ushort operand ) : void
SET ( ushort operand ) : void
SLP ( ushort operand ) : void
STO ( ushort operand ) : void
STX ( ushort operand ) : void
SUB ( ushort operand ) : void
SWI ( ) : void
StackPop ( ushort operand ) : ushort
StackPush ( ushort operand, ushort value ) : void
TripleFault ( ) : void
WriteControlRegister ( ushort operand, RegControl index, ushort value ) : void
XSG ( ushort operand ) : void

Method Details

DebugReadMemory() public method

public DebugReadMemory ( ushort address, SegmentIndex segmentType ) : ushort
address ushort
segmentType SegmentIndex
return ushort

Disassemble() public method

public Disassemble ( ushort address, int count, bool extendedFormat = true ) : string[]
address ushort
count int
extendedFormat bool
return string[]

InitializeMemory() public method

Initializes arrays for memory banks, internal ram, and internal rom. Must be called before running any operations.
public InitializeMemory ( ) : void
return void

Interrupt_BusRefresh() public method

public Interrupt_BusRefresh ( ) : void
return void

Interrupt_Clock() public method

public Interrupt_Clock ( ) : void
return void

Interrupt_DebugQuery() public method

public Interrupt_DebugQuery ( ) : void
return void

Interrupt_HWI() public method

public Interrupt_HWI ( ) : void
return void

Interrupt_Reset() public method

public Interrupt_Reset ( ) : void
return void

Interrupt_SWI() public method

public Interrupt_SWI ( ) : void
return void

Pause() public method

Pauses a currently executing YCPU.
public Pause ( ) : void
return void

ReadMemInt16() public method

Reads a 16-bit value from the address specified.
public ReadMemInt16 ( ushort address, SegmentIndex segment ) : ushort
address ushort
segment SegmentIndex
return ushort

ReadMemInt8() public method

Reads an 8-bit value from the address specified.
public ReadMemInt8 ( ushort address, SegmentIndex segment ) : byte
address ushort
segment SegmentIndex
return byte

Run() public method

Executes a set number of cycles, or infinite cycles.
public Run ( int cyclecount = -1 ) : void
cyclecount int How many cycles to run before stopping. Default value of -1 will run until Pause() is called.
return void

RunOneInstruction() public method

Executes one instruction and returns.
public RunOneInstruction ( ) : void
return void

WriteMemInt16() public method

public WriteMemInt16 ( ushort address, ushort value, SegmentIndex segment ) : void
address ushort
value ushort
segment SegmentIndex
return void

WriteMemInt8() public method

public WriteMemInt8 ( ushort address, byte value, SegmentIndex segment ) : void
address ushort
value byte
segment SegmentIndex
return void

YCPU() public method

Initializes a new YCPU.
public YCPU ( ) : System.Threading
return System.Threading