resonance 1.0.1
Loading...
Searching...
No Matches
discswap.h
Go to the documentation of this file.
1#pragma once
2
15class DiscSwap {
16public:
30
40 void Reset();
41
55
62 void BeginEject();
63
75 int PollEject();
76
86
99
108
118
119private:
120 // Sub-states of the eject and insert sequences. The values are the ones the image stores.
121 enum Phase {
122 kPhaseStart = 0,
123 kPhaseStopping = 1,
124 kPhaseOpenTray = 2,
125 kPhaseOpened = 4,
126 kPhaseCloseTray = 5,
127 kPhaseSpinUp = 6,
128 kPhaseClassify = 7,
129 };
130
131 // PollInsert() and CheckDisc() expand the same classification of sceCdGetDiskType().
132 inline int ClassifyDisc();
133
134 int phase_;
135 int polls_;
136 int pollLimit_;
137 int discOnly_; // Non-zero when GetHostMode() reports kHostModeCdOnly.
138 int noDisc_; // Set when the tray closed empty. The image does not read it back.
139 int configValue_; // Configuration value 0x514. The image does not read it back.
140};
Disc exchange that MetExpansionPakScreen runs to swap the game disc for the expansion disc.
Definition discswap.h:15
void Reset()
Prepare a new exchange.
void BeginInsert()
Restart the insert sequence.
int CheckDisc()
Classify the disc once the drive is ready, without moving the tray.
int ReleaseDisc()
Let go of the current disc once the asynchronous reader is idle.
int PollInsert()
Advance the insert sequence by one poll.
int MountDisc()
Mount the archives from the new disc and run script template 205.
int PollEject()
Advance the eject sequence by one poll.
Step
A screen state that a polling routine returns.
Definition discswap.h:18
@ kStepEjectFailed
Definition discswap.h:20
@ kStepNoDisc
Definition discswap.h:28
@ kStepTrayOpen
Definition discswap.h:21
@ kStepEjecting
Definition discswap.h:19
@ kStepDiscReady
Definition discswap.h:24
@ kStepMounted
Definition discswap.h:26
@ kStepBadDisc
Definition discswap.h:27
@ kStepCloseFailed
Definition discswap.h:23
@ kStepClosing
Definition discswap.h:22
@ kStepNotReady
Definition discswap.h:25
void BeginEject()
Restart the eject sequence.