Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

myendian.h File Reference

#include "compconf.h"
#include "mytypes.h"

Include dependency graph for myendian.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

union  cpuLBword
union  cpuLword
union  cpuWord

Defines

#define LO   0
#define HI   1
#define LOLO   0
#define LOHI   1
#define HILO   2
#define HIHI   3

Functions

uword readEndian (ubyte hi, ubyte lo)
 Convert high-byte and low-byte to 16-bit word.

udword readEndian (ubyte hihi, ubyte hilo, ubyte hi, ubyte lo)
 Convert high bytes and low bytes of MSW and LSW to 32-bit word.

uword readLEword (ubyte ptr[2])
void writeLEword (ubyte ptr[2], uword someWord)
 Write a big-endian 16-bit word to two bytes in memory.

uword readBEword (ubyte ptr[2])
 Read a big-endian 16-bit word from two bytes in memory.

udword readBEdword (ubyte ptr[4])
void writeBEword (ubyte ptr[2], uword someWord)
 Write a big-endian 16-bit word to two bytes in memory.

void writeBEdword (ubyte ptr[4], udword someDword)
 Write a big-endian 32-bit word to four bytes in memory.

uword convertEndianess (uword intelword)
 Convert 16-bit little-endian word to big-endian order or vice versa.

udword convertEndianess (udword inteldword)


Define Documentation

#define HI   1
 

Definition at line 41 of file myendian.h.

Referenced by Sample::channelProcess(), Envelope::enveEmuAttack(), Envelope::enveEmuDecay(), Envelope::enveEmuRelease(), Envelope::enveEmuShortAttack(), Envelope::enveEmuStartAttack(), Envelope::enveEmuStartRelease(), Envelope::enveEmuStartShortAttack(), Envelope::enveEmuSustainDecay(), Sample::GalwayReturnSample(), sidEmu::noiseAdvance(), sidEmu::noiseAdvanceHp(), sidEmu::sidEmuFastForwardReplay(), sidEmu::sidEmuFillBuffer(), sidEmu::sidEmuSet(), sidEmu::sidMode14(), sidEmu::sidMode34(), sidEmu::sidMode54(), sidEmu::sidMode74(), waveAdvance(), waveCalcCycleLen(), sidEmu::waveCalcNormal(), and sidEmu::waveCalcRangeCheck().

#define HIHI   3
 

Definition at line 45 of file myendian.h.

#define HILO   2
 

Definition at line 44 of file myendian.h.

Referenced by sidEmu::noiseAdvance(), and sidEmu::noiseAdvanceHp().

#define LO   0
 

Definition at line 40 of file myendian.h.

Referenced by Sample::channelProcess(), Envelope::enveEmuStartAttack(), Envelope::enveEmuStartRelease(), Envelope::enveEmuStartShortAttack(), sidEmu::noiseAdvance(), and sidEmu::noiseAdvanceHp().

#define LOHI   1
 

Definition at line 43 of file myendian.h.

Referenced by sidEmu::noiseAdvance(), and sidEmu::noiseAdvanceHp().

#define LOLO   0
 

Definition at line 42 of file myendian.h.

Referenced by sidEmu::noiseAdvance(), and sidEmu::noiseAdvanceHp().


Function Documentation

udword convertEndianess udword  inteldword  )  [inline]
 

Definition at line 178 of file myendian.h.

References udword.

Referenced by endianswitch_buffer(), and main().

uword convertEndianess uword  intelword  )  [inline]
 

Convert 16-bit little-endian word to big-endian order or vice versa.

Definition at line 167 of file myendian.h.

References uword.

udword readBEdword ubyte  ptr[4]  )  [inline]
 

Definition at line 126 of file myendian.h.

References udword.

Referenced by sidTune::PSID_fileSupport().

uword readBEword ubyte  ptr[2]  )  [inline]
 

Read a big-endian 16-bit word from two bytes in memory.

Definition at line 112 of file myendian.h.

References uword.

Referenced by sidTune::PSID_fileSupport(), and emuEngine::verifyEndianess().

udword readEndian ubyte  hihi,
ubyte  hilo,
ubyte  hi,
ubyte  lo
[inline]
 

Convert high bytes and low bytes of MSW and LSW to 32-bit word.

Used to read 32-bit words in little-endian order.

Definition at line 77 of file myendian.h.

References udword.

Referenced by bytestodword(), C6510::indx(), C6510::indy(), sidTune::INFO_fileSupport(), C6510::JMP_vec(), C6510::JMP_vec_plain(), C6510::JMP_vec_transp(), sidTune::MUS_fileSupport(), sidTune::MUS_installPlayer(), sidTune::PSID_fileSupport(), readLEword(), C6510::RTI_(), C6510::RTS_(), sidTune::SID_fileSupport(), and sidEmuInitializeSongOld().

uword readEndian ubyte  hi,
ubyte  lo
[inline]
 

Convert high-byte and low-byte to 16-bit word.

Used to read 16-bit words in little-endian order.

Definition at line 68 of file myendian.h.

References uword.

uword readLEword ubyte  ptr[2]  )  [inline]
 

Definition at line 88 of file myendian.h.

References readEndian(), and uword.

Referenced by C6510::abso(), C6510::absx(), C6510::absy(), Sample::channelTryInit(), Sample::GalwayInit(), sidEmu::sidEmuFillBuffer(), sidEmuInitializeSong(), sidEmu::sidEmuSet(), sidEmu::sidEmuSetReplayingSpeed(), and sidEmu::sidEmuUpdateReplayingSpeed().

void writeBEdword ubyte  ptr[4],
udword  someDword
[inline]
 

Write a big-endian 32-bit word to four bytes in memory.

Definition at line 150 of file myendian.h.

References ubyte, and udword.

void writeBEword ubyte  ptr[2],
uword  someWord
[inline]
 

Write a big-endian 16-bit word to two bytes in memory.

Definition at line 137 of file myendian.h.

References ubyte, and uword.

void writeLEword ubyte  ptr[2],
uword  someWord
[inline]
 

Write a big-endian 16-bit word to two bytes in memory.

Definition at line 97 of file myendian.h.

References ubyte, and uword.

Referenced by C6510::JSR_main(), and emuEngine::verifyEndianess().


Generated on Tue Feb 8 04:22:55 2005 for Esidplay by doxygen 1.3.3