Value supplied for data. Keep referenced or pointed-to data valid for the complete call.
address
uint32_t
Value supplied for address. Keep referenced or pointed-to data valid for the complete call.
bytes
uint32_t
Value supplied for bytes. Keep referenced or pointed-to data valid for the complete call.
budget
uint32_t
Value supplied for budget. Keep referenced or pointed-to data valid for the complete call.
Returns:bool. Check the value before continuing when it represents success, availability or a resource handle.
Example
C++ example
#include "spu_transfer.hpp"
// Replace these template arguments with types or values accepted by the declaration:
// H
// Assume these named values have been initialized with valid data:
// const void * data
// uint32_t address
// uint32_t bytes
// uint32_t budget
epok::spu& object = /* obtain a valid instance */;
auto result = object.upload<H>(data, address, bytes, budget);
Why use it
Template dispatch is resolved at compile time and normally adds no runtime indirection. The boolean result makes success, availability or state explicit without exceptions. The API exposes the hardware service without hiding latency or bounded memory.
Trade-offs and warnings
Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Check the return value; `false` is part of normal control flow for many PSX resource operations. Treat device absence, busy state and I/O failure as expected outcomes; do not block the frame loop waiting for hardware. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.