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

Read one saved remix off a card. More...

#include <loadremixmct.h>

Inheritance diagram for LoadRemixMCT:
Collaboration diagram for LoadRemixMCT:

Public Member Functions

 LoadRemixMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, const HxStr &remixName)
 Construct an idle load of one remix.
virtual ~LoadRemixMCT ()
void ListRemixDir ()
 List every remix save directory on the card.
virtual void OnCheckInfo (CheckInfoOp *pOp)
 Start the listing unless the card reported that it cannot be read.
virtual void Finish ()
 Report the finished load through MemcardUser::OnRemixLoaded().
virtual void Execute ()
 Enquire about the card and start the load.
virtual void OnListDir (ListDirOp *pOp)
 Collect the listed directories and read the first one's index.
virtual void OnFileLoaded (int nStatus)
 Search one index for the remix, or finish the payload read.
Public Member Functions inherited from MemcardTask
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle task against one card slot.
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nCookie)
 Construct an idle task that does not address a single card slot.
virtual void UnusedHook ()
 Do nothing.
Public Member Functions inherited from MemcardCBHandler
virtual ~MemcardCBHandler ()
 Release the receiver.
virtual void OnEntSpace (EntSpaceOp *pOp)
 Report a finished free-entry enquiry.
virtual void OnFormat (FormatOp *pOp)
 Report a finished format.
virtual void OnUnformat (UnformatOp *pOp)
 Report a finished unformat.
virtual void OnCreateDir (CreateDirOp *pOp)
 Report a finished directory creation.
virtual void OnRead (ReadOp *pOp)
 Report a finished read.
virtual void OnWrite (WriteOp *pOp)
 Report a finished write.
virtual void OnOpenWrite (OpenWriteOp *pOp)
 Report a finished open for writing.
virtual void OnOpenRead (OpenReadOp *pOp)
 Report a finished open for reading.
virtual void OnClose (CloseOp *pOp)
 Report a finished close.
virtual void OnSeek (SeekOp *pOp)
 Report a finished seek.
virtual void OnDeleteFile (DeleteFileOp *pOp)
 Report a finished file deletion.
virtual void OnRenameFile (RenameFileOp *pOp)
 Report a finished rename.
Public Member Functions inherited from MemcardUser
virtual ~MemcardUser ()
 Release the receiver.
virtual void OnConnectState (MemcardConnectState state, int nStatus)
 Report the state of one slot.
virtual void OnAllConnectStates ()
 Report that every slot has been enquired about.
virtual void OnMinimumSaveSpace (int nPortSlot, int nSpace)
 Report the space a save would need against the space a card has.
virtual void OnCardFormatted (int nPortSlot, int nStatus)
 Report a finished format.
virtual void OnCardUnformatted (int nPortSlot, int nStatus)
 Report a finished unformat.
virtual void OnPersonasSaved (int nPortSlot, int nStatus)
 Report a finished save of the FreQ roster.
virtual void OnRemixSaved (int nPortSlot, int nStatus)
 Report a finished save of one remix.
virtual void OnGlobalSettingsSaved (int nPortSlot, int nStatus)
 Report a finished save of the global settings.
virtual void OnJukeboxPlayListSaved (int nPortSlot, int nStatus)
 Report a finished save of a jukebox playlist.
virtual void OnRemixesListed (int nPortSlot, int nStatus)
 Report a finished listing of the saved remixes.
virtual void OnRemixLoaded (int nPortSlot, int nStatus)
 Report a finished load of one remix.
virtual void OnPersonasLoaded (int nPortSlot, int nStatus)
 Report a finished load of the FreQ roster.
virtual void OnGlobalSettingsLoaded (int nPortSlot, int nStatus)
 Report a finished load of the global settings.
virtual void OnJukeboxPlayListLoaded (int nPortSlot, int nStatus)
 Report a finished load of a jukebox playlist.
virtual void OnRemixDeleted (int nPortSlot, int nStatus)
 Report a finished deletion of one remix.
virtual void UnusedFirstReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void UnusedSecondReport (int nPortSlot, int nStatus)
 Do nothing.
virtual void OnFileSaved (int nStatus)
 Report a finished save of one file.

Additional Inherited Members

Protected Member Functions inherited from MemcardTask
void HandleError ()
 Abandon the task when the last operation reported a failure.
Protected Attributes inherited from MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Read one saved remix off a card.

Its RTTI descriptor is at 0x008ef048. It has two public non-virtual bases, MemcardTask at offset 0 and MemcardUser at offset 28. Two vtables belong to the class, the 19-entry primary at 0x007da7e8 and the 21-entry MemcardUser table at 0x007da738. Only the first two entries and slot 19 of the second table adjust this; slot 20 is the inherited MemcardUser::OnFileSaved() body and therefore needs no thunk. An instance is 0x6c bytes, from the constructor's highest store at +0x68. Nothing derives from the class. The size 0x6c is therefore a lower bound rather than a settled size.

The task enquires about the card, lists /BASCUS-97125r*, and then reads the index out of each remix save directory through a LoadFileMCT of its own until it finds the requested remix. It receives that inner task's report as a MemcardUser, which is why it derives from both interfaces.

mStep is 1 while indexes are being read and 2 once the payload read is under way. The payload lands in the shared log stream that Globals::GetResetLog() rewinds, not in mStream.

The method titles ListRemixDir(), Execute(), and Finish() are inferred. No string in the image identifies any of them.

Constructor & Destructor Documentation

◆ LoadRemixMCT()

LoadRemixMCT::LoadRemixMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
const HxStr & remixName )

Construct an idle load of one remix.

MemcardManager::CreateLoadRemixTask() at 0x001f36c8 is the one caller. Not written, for the reason recorded in the class documentation.

Parameters
pUserThe receiver Finish() reports to.
pCardThe queue the task submits operations to.
nPortSlotThe packed port and slot.
nCookieThe tag that abandons exactly this task's operations.
remixNameThe remix to read, copied into mRemixName.
Ghidra address:
NTSC-U/C: 0x0017be28
Ghidra address:
PAL: 0x00180288

◆ ~LoadRemixMCT()

virtual LoadRemixMCT::~LoadRemixMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x00185380
Ghidra address:
PAL: 0x0018acb8

Member Function Documentation

◆ ListRemixDir()

void LoadRemixMCT::ListRemixDir ( )

List every remix save directory on the card.

Clears mStep first, so the listing always restarts the walk from its first step.

Ghidra address:
NTSC-U/C: 0x0017c060
Ghidra address:
PAL: 0x00180500

◆ OnCheckInfo()

virtual void LoadRemixMCT::OnCheckInfo ( CheckInfoOp * pOp)
virtual

Start the listing unless the card reported that it cannot be read.

Unlike SaveRemixMCT, the enquiry does not test the free space, because a load writes nothing.

Parameters
pOpThe finished enquiry.
Ghidra address:
NTSC-U/C: 0x00186bd0
Ghidra address:
PAL: 0x0018c3a8

Reimplemented from MemcardCBHandler.

◆ Finish()

virtual void LoadRemixMCT::Finish ( )
virtual

Report the finished load through MemcardUser::OnRemixLoaded().

Ghidra address:
NTSC-U/C: 0x00186c50
Ghidra address:
PAL: 0x0018c428

Implements MemcardTask.

◆ Execute()

virtual void LoadRemixMCT::Execute ( )
virtual

Enquire about the card and start the load.

Ghidra address:
NTSC-U/C: 0x00186ba0
Ghidra address:
PAL: 0x0018c378

Implements MemcardTask.

◆ OnListDir()

virtual void LoadRemixMCT::OnListDir ( ListDirOp * pOp)
virtual

Collect the listed directories and read the first one's index.

A failed listing abandons the task, and the body then carries on over the entries all the same. An empty listing reports kMemcardStatusNoFile. Otherwise the first name moves into mCurrentDir and a fresh LoadFileMCT reads <dir>/index into mBuffer.

Parameters
pOpThe finished listing.
Ghidra address:
NTSC-U/C: 0x0017c210
Ghidra address:
PAL: 0x00180728

Reimplemented from MemcardCBHandler.

◆ OnFileLoaded()

virtual void LoadRemixMCT::OnFileLoaded ( int nStatus)
virtual

Search one index for the remix, or finish the payload read.

A failed read abandons the task, and the body then carries on all the same. In step 1 the index is parsed from mStream. The first element whose RemixName matches mRemixName starts the payload read of <dir>/<FileName> into mPayload and moves to step 2. With no match the next directory's index is read, and with none left the task reports kMemcardStatusNoFile. In step 2 mPayload's size is set from the read and the task reports.

Parameters
nStatusThe inner read's status.
Ghidra address:
NTSC-U/C: 0x0017c650
Ghidra address:
PAL: 0x00180c40

Reimplemented from MemcardUser.


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