resonance 1.0.1
Loading...
Searching...
No Matches
SeekOp Class Reference

Move of the read and write position of an open memory-card file. More...

#include <seekop.h>

Inheritance diagram for SeekOp:
Collaboration diagram for SeekOp:

Public Member Functions

 SeekOp (MemcardCBHandler *pHandler, int nFile, int nOffset, int nOrigin, int nCookie)
 Construct a seek against an open descriptor.
virtual ~SeekOp ()
virtual void Execute ()
virtual void NotifyDone ()
virtual void InterpretResult ()
 Record the resulting position, or map the failure.
Public Member Functions inherited from MemcardOp
 MemcardOp (MemcardCBHandler *pHandler, int nPortSlot, int nCookie)
 Construct an operation against one card slot, with no libmc call issued yet.
 MemcardOp (MemcardCBHandler *pHandler, int nCookie)
 Construct an operation against an open descriptor alone.
virtual ~MemcardOp ()
 Release the operation.

Public Attributes

int mPosition
 The resulting position, valid once the seek has succeeded.
int mFile
 The descriptor to move.
int mOffset
 The offset to move by.
int mOrigin
 The origin the offset is measured from.
Public Attributes inherited from MemcardOp
int mCookie
 Ticket number Memcard::Cancel() matches on.
int mIssued
 Zero until Execute() has run, then 1 while libmc is servicing the call.
int mResult
 The libmc result, as sceMcSync() delivered it.
int mStatus
 One of MemcardStatus, written by InterpretResult().

Additional Inherited Members

Protected Attributes inherited from MemcardOp
int mPortSlot
MemcardCBHandler * mHandler

Detailed Description

Move of the read and write position of an open memory-card file.

Its RTTI descriptor is at 0x008ef330. It has single inheritance from MemcardOp at offset 0. An instance is 0x2c bytes and the vtable is at 0x0082bd00.

The constructor never writes MemcardOp::mPortSlot, which makes this class and CloseOp the two operations that address a descriptor alone. Memcard::Seek() has no caller in the image, so nothing exercises the class.

Constructor & Destructor Documentation

◆ SeekOp()

SeekOp::SeekOp ( MemcardCBHandler * pHandler,
int nFile,
int nOffset,
int nOrigin,
int nCookie )

Construct a seek against an open descriptor.

Parameters
pHandlerThe receiver NotifyDone() reports to.
nFileThe descriptor to move.
nOffsetThe offset to move by.
nOriginThe libmc origin, which uses the same three values as lseek().
nCookieThe tag Memcard::Cancel() matches on.
Ghidra address:
NTSC-U/C: 0x0055eaa8
Ghidra address:
PAL: 0x0059fd78

◆ ~SeekOp()

virtual SeekOp::~SeekOp ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055dba8
Ghidra address:
PAL: 0x0059ee20

Member Function Documentation

◆ Execute()

virtual void SeekOp::Execute ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055ead8
Ghidra address:
PAL: 0x0059fda8

Reimplemented from MemcardOp.

◆ NotifyDone()

virtual void SeekOp::NotifyDone ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055dbd8
Ghidra address:
PAL: 0x0059ee50

Reimplemented from MemcardOp.

◆ InterpretResult()

virtual void SeekOp::InterpretResult ( )
virtual

Record the resulting position, or map the failure.

On success the body writes mPosition and returns without writing MemcardOp::mStatus, which no constructor initialises. A successful seek therefore reports whatever that word stored when the block was allocated. The behaviour matches the binary.

Ghidra address:
NTSC-U/C: 0x0055eb10
Ghidra address:
PAL: 0x0059fde0

Reimplemented from MemcardOp.

Member Data Documentation

◆ mPosition

int SeekOp::mPosition

The resulting position, valid once the seek has succeeded.

+0x1c

◆ mFile

int SeekOp::mFile

The descriptor to move.

+0x20

◆ mOffset

int SeekOp::mOffset

The offset to move by.

+0x24

◆ mOrigin

int SeekOp::mOrigin

The origin the offset is measured from.

+0x28


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