Epok Engine

PSYQO SDK

psyqo::GTE::write

Function template · 2 overloads

Function template

Writes a 32-bits value to a GTE register from memory.

Belongs to
psyqo::GTE
Header
gte-registers.hh
Overloads
2

Declaration 1 of 2

static · template
Declaration
template <Register reg, Safety safety = Safe> static inline void write(const uint32_t* ptr)

Writes a 32-bits value to a GTE register from memory.

ParameterTypeMeaning
ptrconst uint32_t *The pointer to the value to write.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Replace these template arguments with types or values accepted by the declaration:
// reg, safety

// Assume these named values have been initialized with valid data:
// const uint32_t * ptr

psyqo::GTE::write<reg, safety>(ptr);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:346

Declaration 2 of 2

static · template
Declaration
template <Register reg, Safety safety = Safe> static inline void write(uint32_t value)

Write a 32-bits value to a GTE register.

ParameterTypeMeaning
valueuint32_tThe value to write.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Replace these template arguments with types or values accepted by the declaration:
// reg, safety

// Assume these named values have been initialized with valid data:
// uint32_t value

psyqo::GTE::write<reg, safety>(value);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:184

Related members