|
| | ToolStream () |
| | Construct an empty stream over a 0x4000-byte buffer from the untagged heap.
|
| void | Connect () |
| | Report to the debug console where the transport should deliver.
|
| virtual | ~ToolStream () |
| virtual Stream & | Read (void *pDest, int nSize) |
| virtual Stream & | Write (const void *pSrc, int nSize) |
| virtual Stream & | Flush () |
| virtual Stream & | Seek (int nOffset, int nWhence) |
| virtual int | Tell () |
| virtual int | Eof () |
| virtual int | Fail () |
| virtual Stream & | ReadLE (void *pDest, int nSize) |
| | Move nSize bytes into pDest, correcting the byte order for the host.
|
| virtual Stream & | WriteLE (const void *pSrc, int nSize) |
| | Move nSize bytes out of pSrc, correcting the byte order for the file.
|
| virtual | ~Stream () |
| | Close the stream.
|
| Stream & | ReadString (HxStr &name) |
| | Read a NUL-terminated name and append it to a string.
|
Stream over a refilling transport.
Its RTTI descriptor is at 0x008eefe8. It has single inheritance from Rnd::Stream at offset 0. Its vtable is at 0x00826118.
The stream reads a source that arrives in instalments. Read() spins on Eof() until data is present, copies what the buffer already holds, then calls Flush() to refill and spins again, repeating until the request is satisfied. Eof() compares mArrived with mConsumed, and the destructor releases mBuffer.
Flush() resets mCursor and copies mArrived into mConsumed, which makes Eof() true again. The pair is a delivery counter the transport advances and the snapshot of it taken at the last refill. The constructor's highest store is +0x14, so the object is 0x18 bytes.
The stream is read-only in the shipped build. Write() reports "Can't write to a PS ToolStream" and stops the machine, and both Tell() and Fail() always report 0.
| void Rnd::ToolStream::Connect |
( |
| ) |
|
Report to the debug console where the transport should deliver.
Prints "ToolStream connect:" followed by the addresses of mFill, mArrived, and mConsumed and of the buffer, so the host tool can write into them. No call site survives in the shipped program, and the name is inferred from the text.
- Ghidra address:
- NTSC-U/C: 0x00510480
- Ghidra address:
- PAL: 0x0054fa68