yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::emu::anonymous_namespace{snes.cc} Namespace Reference

Classes

struct  ChunkHeader
 

Functions

void input_latch (Input *input, bool value)
 
uint8_t input_read (Input *input)
 
bool IsLittleEndianHost ()
 
constexpr uint32_t MakeTag (char a, char b, char c, char d)
 
absl::Status WriteBytes (std::ostream &out, const void *data, size_t size)
 
absl::Status ReadBytes (std::istream &in, void *data, size_t size)
 
absl::Status WriteUint32LE (std::ostream &out, uint32_t value)
 
absl::Status ReadUint32LE (std::istream &in, uint32_t *value)
 
template<typename T >
absl::Status WriteScalar (std::ostream &out, T value)
 
template<typename T >
absl::Status ReadScalar (std::istream &in, T *value)
 
absl::Status WriteChunk (std::ostream &out, uint32_t tag, uint32_t version, const std::string &payload)
 
absl::Status ReadChunkHeader (std::istream &in, ChunkHeader *header)
 

Variables

constexpr uint32_t kStateMagic = 0x59415A45
 
constexpr uint32_t kStateFormatVersion = 2
 
constexpr uint32_t kMaxChunkSize = 16 * 1024 * 1024
 

Function Documentation

◆ input_latch()

void yaze::emu::anonymous_namespace{snes.cc}::input_latch ( Input * input,
bool value )

Definition at line 34 of file snes.cc.

References yaze::emu::Input::current_state_, input_latch(), yaze::emu::Input::latch_line_, and yaze::emu::Input::latched_state_.

Referenced by input_latch().

Here is the call graph for this function:

◆ input_read()

uint8_t yaze::emu::anonymous_namespace{snes.cc}::input_read ( Input * input)

Definition at line 41 of file snes.cc.

References yaze::emu::Input::current_state_, input_read(), yaze::emu::Input::latch_line_, and yaze::emu::Input::latched_state_.

Referenced by input_read().

Here is the call graph for this function:

◆ IsLittleEndianHost()

bool yaze::emu::anonymous_namespace{snes.cc}::IsLittleEndianHost ( )

Definition at line 54 of file snes.cc.

References IsLittleEndianHost().

Referenced by IsLittleEndianHost().

Here is the call graph for this function:

◆ MakeTag()

constexpr uint32_t yaze::emu::anonymous_namespace{snes.cc}::MakeTag ( char a,
char b,
char c,
char d )
constexpr

Definition at line 63 of file snes.cc.

References MakeTag().

Referenced by MakeTag().

Here is the call graph for this function:

◆ WriteBytes()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::WriteBytes ( std::ostream & out,
const void * data,
size_t size )

Definition at line 68 of file snes.cc.

References WriteBytes().

Referenced by WriteBytes(), WriteChunk(), WriteScalar(), and WriteUint32LE().

Here is the call graph for this function:

◆ ReadBytes()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::ReadBytes ( std::istream & in,
void * data,
size_t size )

Definition at line 76 of file snes.cc.

References ReadBytes().

Referenced by ReadBytes(), ReadScalar(), and ReadUint32LE().

Here is the call graph for this function:

◆ WriteUint32LE()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::WriteUint32LE ( std::ostream & out,
uint32_t value )

Definition at line 84 of file snes.cc.

References WriteBytes(), and WriteUint32LE().

Referenced by WriteChunk(), and WriteUint32LE().

Here is the call graph for this function:

◆ ReadUint32LE()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::ReadUint32LE ( std::istream & in,
uint32_t * value )

Definition at line 92 of file snes.cc.

References ReadBytes(), and ReadUint32LE().

Referenced by ReadChunkHeader(), and ReadUint32LE().

Here is the call graph for this function:

◆ WriteScalar()

template<typename T >
absl::Status yaze::emu::anonymous_namespace{snes.cc}::WriteScalar ( std::ostream & out,
T value )

Definition at line 106 of file snes.cc.

References WriteBytes(), and WriteScalar().

Referenced by WriteScalar().

Here is the call graph for this function:

◆ ReadScalar()

template<typename T >
absl::Status yaze::emu::anonymous_namespace{snes.cc}::ReadScalar ( std::istream & in,
T * value )

Definition at line 115 of file snes.cc.

References ReadBytes(), and ReadScalar().

Referenced by ReadScalar().

Here is the call graph for this function:

◆ WriteChunk()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::WriteChunk ( std::ostream & out,
uint32_t tag,
uint32_t version,
const std::string & payload )

Definition at line 134 of file snes.cc.

References yaze::emu::render::CalculateCRC32(), kMaxChunkSize, RETURN_IF_ERROR, WriteBytes(), WriteChunk(), and WriteUint32LE().

Referenced by WriteChunk().

Here is the call graph for this function:

◆ ReadChunkHeader()

absl::Status yaze::emu::anonymous_namespace{snes.cc}::ReadChunkHeader ( std::istream & in,
ChunkHeader * header )

Variable Documentation

◆ kStateMagic

constexpr uint32_t yaze::emu::anonymous_namespace{snes.cc}::kStateMagic = 0x59415A45
constexpr

Definition at line 59 of file snes.cc.

◆ kStateFormatVersion

constexpr uint32_t yaze::emu::anonymous_namespace{snes.cc}::kStateFormatVersion = 2
constexpr

Definition at line 60 of file snes.cc.

◆ kMaxChunkSize

constexpr uint32_t yaze::emu::anonymous_namespace{snes.cc}::kMaxChunkSize = 16 * 1024 * 1024
constexpr

Definition at line 61 of file snes.cc.

Referenced by WriteChunk().