Public Member Functions | Static Public Member Functions | Properties

Romulus.Nes.pCpu Struct Reference

Represents a 16-bit CPU pointer. More...

List of all members.

Public Member Functions

 pCpu (byte low, byte high)
 Creates a pCpu pointer from the specified bytes.
 pCpu (byte[] data, int ptrOffset)
 Loads a pointer from the specified buffer, low byte first.
 pCpu (ushort address)
 Creates a new pCpu object with the specified address.
 pCpu (int address)
 Creates a new pCpu object with the specified address.
void Write (byte[] data, int offset)
 Copies this pointer to the specified buffer.
pUhRom ToRomPointer (Bank16 RamBank)
 Converts the CPU pointer to a ROM offset.
pHRom ToHRomPointer (Bank16 RamBank)
 Converts the CPU pointer to a ROM offset.
pUhRom ToRomPointer (Bank32 RamBank)
 Converts the CPU pointer to a ROM offset.
pHRom ToHRomPointer (Bank32 RamBank)
 Converts the CPU pointer to a ROM offset.
override string ToString ()
 Gets the offset as a string.

Static Public Member Functions

static pCpu operator+ (pCpu ptr, int offset)
 Defines the + operator between a pointer and an integer.
static pCpu operator- (pCpu ptr, int offset)
 Defines the - operator between a pointer and an integer.

Properties

ushort Address [get, set]
 Gets/sets the address of the pointer.
byte Low [get, set]
 Gets/sets the low byte of this pointer.
byte High [get, set]
 Gets/sets the high byte of this pointer.

Detailed Description

Represents a 16-bit CPU pointer.


Constructor & Destructor Documentation

Romulus.Nes.pCpu.pCpu ( byte  low,
byte  high 
)

Creates a pCpu pointer from the specified bytes.

Parameters:
low The low byte.
high The high byte.
Romulus.Nes.pCpu.pCpu ( byte[]  data,
int  ptrOffset 
)

Loads a pointer from the specified buffer, low byte first.

Romulus.Nes.pCpu.pCpu ( ushort  address  ) 

Creates a new pCpu object with the specified address.

Parameters:
address The address this pointer will represent.
Romulus.Nes.pCpu.pCpu ( int  address  ) 

Creates a new pCpu object with the specified address.

Parameters:
address The address this pointer will represent. If the value is beyond the valid 16-bit range, it will be truncated.

Member Function Documentation

static pCpu Romulus.Nes.pCpu.operator+ ( pCpu  ptr,
int  offset 
) [static]

Defines the + operator between a pointer and an integer.

Parameters:
ptr The pointer to add.
offset The integer to add.
Returns:
The result of the addition.
static pCpu Romulus.Nes.pCpu.operator- ( pCpu  ptr,
int  offset 
) [static]

Defines the - operator between a pointer and an integer.

Parameters:
ptr The pointer to subtract.
offset The integer to subtract.
Returns:
The result of the subtraction.
pHRom Romulus.Nes.pCpu.ToHRomPointer ( Bank32  RamBank  ) 

Converts the CPU pointer to a ROM offset.

Parameters:
RamBank The 32k bank the pointer references.
Returns:
A rom offset.
pHRom Romulus.Nes.pCpu.ToHRomPointer ( Bank16  RamBank  ) 

Converts the CPU pointer to a ROM offset.

Parameters:
RamBank The 16k bank the pointer references.
Returns:
A rom offset.
pUhRom Romulus.Nes.pCpu.ToRomPointer ( Bank32  RamBank  ) 

Converts the CPU pointer to a ROM offset.

Parameters:
RamBank The 32k bank the pointer references.
Returns:
A rom offset.
pUhRom Romulus.Nes.pCpu.ToRomPointer ( Bank16  RamBank  ) 

Converts the CPU pointer to a ROM offset.

Parameters:
RamBank The 16k bank the pointer references.
Returns:
A rom offset.
override string Romulus.Nes.pCpu.ToString (  ) 

Gets the offset as a string.

Returns:
The offset as a string.
void Romulus.Nes.pCpu.Write ( byte[]  data,
int  offset 
)

Copies this pointer to the specified buffer.

Parameters:
data Buffer to copy the pointer to.
offset Location within the buffer to copy the pointer to.

Property Documentation

ushort Romulus.Nes.pCpu.Address [get, set]

Gets/sets the address of the pointer.

byte Romulus.Nes.pCpu.High [get, set]

Gets/sets the high byte of this pointer.

byte Romulus.Nes.pCpu.Low [get, set]

Gets/sets the low byte of this pointer.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events