RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Apple::PEFFormat::PatternInitialization Class Reference

Pattern initialization data. More...

#include <pefexe.h>

Public Types

enum  opcode_type {
  Zero = 0 , BlockCopy = 1 , RepeatedBlock = 2 , InterleaveRepeatBlockWithBlockCopy = 3 ,
  InterleaveRepeatBlockWithZero = 4
}
 

Public Member Functions

void ReadFile (Linker::Reader &rd)
 Reads an initialization pattern and initializes this structure.
 
void WriteFile (Linker::Writer &wr) const
 Writes the initialization pattern to a stream.
 
offset_t CodeSize () const
 Size of the packed data, as stored in the file.
 
offset_t DataSize () const
 Size of the unpacked data, as loaded into memory.
 
void ExpandData (Linker::Buffer &buffer) const
 Expand the pattern into unpacked data and append it to the buffer.
 

Static Public Member Functions

static uint32_t ReadValue (Linker::Reader &rd)
 Reads a variable length value as used by some patterns.
 
static size_t GetValueSize (uint32_t value, size_t size_hint=0)
 Determines the required number of bytes to store this value, with an optional minimum size.
 
static void WriteValue (Linker::Writer &wr, uint32_t value, size_t size_hint=0)
 Writes a variable length value, with an optional minimum size.
 

Public Attributes

offset_t file_offset
 Offset at which this pattern is stored in the file (only relevant for dumping)
 
opcode_type opcode
 The pattern type.
 
uint32_t count
 Generic count parameter, used for repeating or zero filling data.
 
std::vector< uint8_t > common_data
 Sequence of data to be used, possibly repeatedly.
 
std::vector< std::vector< uint8_t > > custom_data
 Equal sized sequences of data to be inserted between repeated common data.
 

Detailed Description

Pattern initialization data.

For pattern initialized data sections (data sections that are not unpacked), they are stored in the file as a sequence of pattern initialization data. This class represents a single pattern in a stream of patterns.


The documentation for this class was generated from the following files: