Compare commits

...

5 Commits

Author SHA1 Message Date
coah
26090e7222 cleanup(NWC24MsgObj): rename unk_0x50/58 to charsetData/encodingData
Content-Type charset and Content-Transfer-Encoding string spans.
2026-10-02 14:03:52 -05:00
coah
99d6fe20a2 cleanup(eZiText): rename work unk_0x1410 to formats (#858)
Saved/restored as savedFormats; assigned from formats arrays.
2026-10-02 14:03:44 -05:00
coah
00013016df cleanup(iplBS2Manager): name tick/update/abort/restart flags (#857)
unk_0x0C -> mbTickEnabled
unk_0x0D -> mbUpdateRequested
unk_0x0E -> mbAbortRequested
unk_0x0F -> mbRestartRequested

Matching 100% before/after; DOL sha1 unchanged.
2026-10-02 14:03:18 -05:00
coah
3e279ef189 cleanup(eZiText): rename work unk_0x17F0 to dawgGroup (#856)
Holds NextDawgGroup() cursor in Matching zi8dawg.
2026-10-02 14:02:52 -05:00
coah
32417fe8a2 cleanup(eZiText): rename work unk_0x01 to countOnly (#855)
Assigned/compared with options->countOnly in zi8getc2.
2026-10-02 14:02:44 -05:00
11 changed files with 64 additions and 64 deletions

View File

@@ -89,10 +89,10 @@ namespace ipl {
int mIPLState; // 0x04 int mIPLState; // 0x04
volatile BS2State mState; // 0x08 volatile BS2State mState; // 0x08
bool unk_0x0C; bool mbTickEnabled; // 0x0C
bool unk_0x0D; bool mbUpdateRequested; // 0x0D
bool unk_0x0E; bool mbAbortRequested; // 0x0E
bool unk_0x0F; bool mbRestartRequested; // 0x0F
bool mbIsDiagDisc; // 0x10 bool mbIsDiagDisc; // 0x10
bool mbIncludesSeatTitles; // 0x11 bool mbIncludesSeatTitles; // 0x11
u8* mpBannerBuffer; // 0x14 u8* mpBannerBuffer; // 0x14

View File

@@ -205,7 +205,7 @@ typedef struct _ziUwdNode {
struct __zi8_work_data_s { struct __zi8_work_data_s {
ziU8 unk_0x00; ziU8 unk_0x00;
ziU8 unk_0x01; ziU8 countOnly; // 0x01
ziU8 unk_0x02[2]; ziU8 unk_0x02[2];
ziLanguageEntry* langEntries; // 0x04 ziLanguageEntry* langEntries; // 0x04
ziU8 unk_0x08; ziU8 unk_0x08;
@@ -265,7 +265,7 @@ struct __zi8_work_data_s {
ziPtr unk_0x11FC; ziPtr unk_0x11FC;
ziPtr userKeys[0x83]; // 0x1200 ziPtr userKeys[0x83]; // 0x1200
ziU8 unk_0x140C[4]; ziU8 unk_0x140C[4];
ziU32 unk_0x1410; ziU32 formats; // 0x1410
ziU8 unk_0x1414[4]; ziU8 unk_0x1414[4];
ziU8 unk_0x1418; ziU8 unk_0x1418;
ziU8 unk_0x1419; ziU8 unk_0x1419;
@@ -283,7 +283,7 @@ struct __zi8_work_data_s {
ziU16 unk_0x17EA; ziU16 unk_0x17EA;
ziU8 unk_0x17EC; ziU8 unk_0x17EC;
ziU8 unk_0x17ED[3]; ziU8 unk_0x17ED[3];
ziU8* unk_0x17F0; ziU8* dawgGroup; // 0x17F0
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874 ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
ziU16 unk_0x1874; ziU16 unk_0x1874;
ziU8 unk_0x1876; ziU8 unk_0x1876;

View File

@@ -306,7 +306,7 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
} else { } else {
if (status == 0) { if (status == 0) {
ZI_WORK->unk_0x17EC = 0; ZI_WORK->unk_0x17EC = 0;
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK); ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
} else if (ZI_WORK->unk_0x17EC != 0) { } else if (ZI_WORK->unk_0x17EC != 0) {
Zi8LogError(100, ZI_WORK); Zi8LogError(100, ZI_WORK);
goto finish_match; goto finish_match;
@@ -316,30 +316,30 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
result = Zi8MatchROMdata2(elements, count, language, output, capacity, result = Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK); mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
} else { } else {
while (ZI_WORK->unk_0x17F0 != 0) { while (ZI_WORK->dawgGroup != 0) {
result = Zi8MatchROMdata2(elements, count, language, output, capacity, result = Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, ZI_WORK->unk_0x17F0, mode, status, reservedMode, ZI_WORK->dawgGroup,
acceptPrefix, ZI_WORK); acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) break; if ((ziU8)result != 0) break;
status = 0; status = 0;
if (count <= 1 && language == 0x36) break; if (count <= 1 && language == 0x36) break;
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK); ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
} }
} }
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) { if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
mode = 0; mode = 0;
ZI_WORK->unk_0x17EC = 1; ZI_WORK->unk_0x17EC = 1;
if (tableSize != 0) { if (tableSize != 0) {
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK); ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
while (ZI_WORK->unk_0x17F0 != 0) { while (ZI_WORK->dawgGroup != 0) {
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity, if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
mode, status, reservedMode, ZI_WORK->unk_0x17F0, mode, status, reservedMode, ZI_WORK->dawgGroup,
acceptPrefix, ZI_WORK) != 0) { acceptPrefix, ZI_WORK) != 0) {
*output = *elements; *output = *elements;
result = 1; result = 1;
break; break;
} }
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK); ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
} }
} else { } else {
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity, if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,

View File

@@ -50,10 +50,10 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) {
ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) { ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) {
if (searchArray == 0 || *searchArray == 0) { if (searchArray == 0 || *searchArray == 0) {
ZI_WORK->unk_0x1410 = (ziU32)Zi8SOdefaultArray; ZI_WORK->formats = (ziU32)Zi8SOdefaultArray;
ZI_WORK->unk_0x1418 = 9; ZI_WORK->unk_0x1418 = 9;
} else { } else {
ZI_WORK->unk_0x1410 = (ziU32)searchArray; ZI_WORK->formats = (ziU32)searchArray;
ZI_WORK->unk_0x1418 = searchSize; ZI_WORK->unk_0x1418 = searchSize;
} }
return 1; return 1;
@@ -339,11 +339,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) { if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
switch (parameters->language) { switch (parameters->language) {
case 1: case 1:
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) { if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) { switch(ZI_WORK->unk_0x00) {
case '\0': case '\0':
if (parameters->elements[0] == 0xEF04) { if (parameters->elements[0] == 0xEF04) {
ZI_WORK->unk_0x01 = options->countOnly; ZI_WORK->countOnly = options->countOnly;
ZI_WORK->unk_0x00 = '\x01'; ZI_WORK->unk_0x00 = '\x01';
} }
break; break;
@@ -400,11 +400,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
break; break;
case 0x11: case 0x11:
default: default:
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) { if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) { switch(ZI_WORK->unk_0x00) {
case '\0': case '\0':
if (parameters->elements[0] == 0xEFF2) { if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->unk_0x01 = options->countOnly; ZI_WORK->countOnly = options->countOnly;
ZI_WORK->unk_0x00 = '\x01'; ZI_WORK->unk_0x00 = '\x01';
} }
break; break;

View File

@@ -45,7 +45,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
ziWChar* cursor; ziWChar* cursor;
ziU8* data; ziU8* data;
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0}; ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
ziU32 savedFormats = ZI_WORK->unk_0x1410; ziU32 savedFormats = ZI_WORK->formats;
ziU8 savedCount = ZI_WORK->unk_0x1418; ziU8 savedCount = ZI_WORK->unk_0x1418;
ziSearchState search = {0}; ziSearchState search = {0};
Zi8LogError(100, __zi8_work_data); Zi8LogError(100, __zi8_work_data);
@@ -73,7 +73,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
request.candidates = ordinals; request.candidates = ordinals;
request.maxCandidates = 1; request.maxCandidates = 1;
request.firstCandidate = 0; request.firstCandidate = 0;
ZI_WORK->unk_0x1410 = (ziU32)formats; ZI_WORK->formats = (ziU32)formats;
if (ZI_WORK->unk_0x1C[0] == 2) { if (ZI_WORK->unk_0x1C[0] == 2) {
ZI_WORK->unk_0x1418 = 0; ZI_WORK->unk_0x1418 = 0;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1; if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1;
@@ -87,7 +87,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2; } else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2;
else ZI_WORK->unk_0x1418 = 1; else ZI_WORK->unk_0x1418 = 1;
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data); count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
ZI_WORK->unk_0x1410 = savedFormats; ZI_WORK->formats = savedFormats;
ZI_WORK->unk_0x1418 = savedCount; ZI_WORK->unk_0x1418 = savedCount;
if (count != 0) return 1; if (count != 0) return 1;
} }

View File

@@ -50,8 +50,8 @@ typedef struct NWC24MsgObjPrivate {
NWC24Data unk_0x38; NWC24Data unk_0x38;
NWC24Data subject; // 0x40 NWC24Data subject; // 0x40
NWC24Data text; // 0x48 NWC24Data text; // 0x48
NWC24Data unk_0x50; NWC24Data charsetData; // 0x50
NWC24Data unk_0x58; NWC24Data encodingData; // 0x58
NWC24Charset charset; // 0x60 NWC24Charset charset; // 0x60
NWC24Encoding encoding; // 0x64 NWC24Encoding encoding; // 0x64
NWC24Data attached[NWC24_MSG_ATTACHMENT_MAX]; // 0x68 NWC24Data attached[NWC24_MSG_ATTACHMENT_MAX]; // 0x68

View File

@@ -950,8 +950,8 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr
u32 field1 = ((u32)msg->unk_0x30.ptr & 0xFFFFF) | (msg->unk_0x30.size << 20); u32 field1 = ((u32)msg->unk_0x30.ptr & 0xFFFFF) | (msg->unk_0x30.size << 20);
u32 field2 = ((u32)msg->unk_0x38.ptr & 0xFFFFF) | (msg->unk_0x38.size << 20); u32 field2 = ((u32)msg->unk_0x38.ptr & 0xFFFFF) | (msg->unk_0x38.size << 20);
u32 field3 = ((u32)msg->subject.ptr & 0xFFFFF) | (msg->subject.size << 20); u32 field3 = ((u32)msg->subject.ptr & 0xFFFFF) | (msg->subject.size << 20);
u32 field4 = ((u32)msg->unk_0x50.ptr & 0xFFFFF) | (msg->unk_0x50.size << 20); u32 field4 = ((u32)msg->charsetData.ptr & 0xFFFFF) | (msg->charsetData.size << 20);
u32 field5 = ((u32)msg->unk_0x58.ptr & 0xFFFFF) | (msg->unk_0x58.size << 20); u32 field5 = ((u32)msg->encodingData.ptr & 0xFFFFF) | (msg->encodingData.size << 20);
entry->msgId = msg->msgId; entry->msgId = msg->msgId;
entry->type = msg->type; entry->type = msg->type;
entry->length = msg->length; entry->length = msg->length;
@@ -1025,10 +1025,10 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
msg->unk_0x38.size = size2; msg->unk_0x38.size = size2;
msg->subject.ptr = (void*)offset3; msg->subject.ptr = (void*)offset3;
msg->subject.size = size3; msg->subject.size = size3;
msg->unk_0x50.ptr = (void*)offset4; msg->charsetData.ptr = (void*)offset4;
msg->unk_0x50.size = size4; msg->charsetData.size = size4;
msg->unk_0x58.ptr = (void*)offset5; msg->encodingData.ptr = (void*)offset5;
msg->unk_0x58.size = size5; msg->encodingData.size = size5;
msg->attached[0].ptr = entry->attached[0].ptr; msg->attached[0].ptr = entry->attached[0].ptr;
msg->attached[0].size = entry->attached[0].size; msg->attached[0].size = entry->attached[0].size;
msg->attachedSize[0] = entry->attachedSize[0]; msg->attachedSize[0] = entry->attachedSize[0];

View File

@@ -811,16 +811,16 @@ static NWC24Err WriteContentTypeField(NWC24MsgObjPrivate* msg) {
name = NWC24GetCharsetStr(msg->charset); name = NWC24GetCharsetStr(msg->charset);
if (name != NULL) { if (name != NULL) {
Mail_sprintf(buffer, (char*)ContentTypeTP, name); Mail_sprintf(buffer, (char*)ContentTypeTP, name);
msg->unk_0x50.ptr = (const void*)(msg->length + 34); msg->charsetData.ptr = (const void*)(msg->length + 34);
msg->unk_0x50.size = Mail_strlen(name) + 1; msg->charsetData.size = Mail_strlen(name) + 1;
total = Mail_strlen(buffer); total = Mail_strlen(buffer);
buffer += total; buffer += total;
} }
encoding = NWC24GetEncodingStr(msg->encoding); encoding = NWC24GetEncodingStr(msg->encoding);
if (encoding != NULL) { if (encoding != NULL) {
Mail_sprintf(buffer, (char*)ContentTxEncT, encoding); Mail_sprintf(buffer, (char*)ContentTxEncT, encoding);
msg->unk_0x58.ptr = (const void*)(total + msg->length + 27); msg->encodingData.ptr = (const void*)(total + msg->length + 27);
msg->unk_0x58.size = Mail_strlen(encoding) + 1; msg->encodingData.size = Mail_strlen(encoding) + 1;
total += Mail_strlen(buffer); total += Mail_strlen(buffer);
} }
if (total == 0) if (total == 0)

View File

@@ -75,8 +75,8 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
NWC24Data_Init(&msgObj->unk_0x30); NWC24Data_Init(&msgObj->unk_0x30);
NWC24Data_Init(&msgObj->unk_0x38); NWC24Data_Init(&msgObj->unk_0x38);
NWC24Data_Init(&msgObj->unk_0x50); NWC24Data_Init(&msgObj->charsetData);
NWC24Data_Init(&msgObj->unk_0x58); NWC24Data_Init(&msgObj->encodingData);
NWC24Data_Init(&msgObj->unk_0xD0); NWC24Data_Init(&msgObj->unk_0xD0);
NWC24Data_Init(&msgObj->faceData); NWC24Data_Init(&msgObj->faceData);
NWC24Data_Init(&msgObj->altName); NWC24Data_Init(&msgObj->altName);

View File

@@ -426,19 +426,19 @@ static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capa
return result; return result;
} }
Mail_memset(charset, 0, charsetCapacity); Mail_memset(charset, 0, charsetCapacity);
if (privateMsg->unk_0x50.size >= charsetCapacity) if (privateMsg->charsetData.size >= charsetCapacity)
result = NWC24_ERR_FORMAT; result = NWC24_ERR_FORMAT;
else { else {
if (privateMsg->unk_0x50.size != 0) { if (privateMsg->charsetData.size != 0) {
NWC24FSeek(&file, (u32)privateMsg->unk_0x50.ptr, NWC24_SEEK_BEG); NWC24FSeek(&file, (u32)privateMsg->charsetData.ptr, NWC24_SEEK_BEG);
result = NWC24FRead(charset, privateMsg->unk_0x50.size, &file); result = NWC24FRead(charset, privateMsg->charsetData.size, &file);
if (result != NWC24_OK) if (result != NWC24_OK)
goto close; goto close;
} }
if (privateMsg->unk_0x58.size != 0 && privateMsg->unk_0x58.size < 32) { if (privateMsg->encodingData.size != 0 && privateMsg->encodingData.size < 32) {
Mail_memset(buffer, 0, 32); Mail_memset(buffer, 0, 32);
NWC24FSeek(&file, (u32)privateMsg->unk_0x58.ptr, NWC24_SEEK_BEG); NWC24FSeek(&file, (u32)privateMsg->encodingData.ptr, NWC24_SEEK_BEG);
result = NWC24FRead(buffer, privateMsg->unk_0x58.size, &file); result = NWC24FRead(buffer, privateMsg->encodingData.size, &file);
if (result != NWC24_OK) if (result != NWC24_OK)
goto close; goto close;
result = NWC24ParseEncodingStr(encoding, buffer); result = NWC24ParseEncodingStr(encoding, buffer);

View File

@@ -14,7 +14,7 @@
namespace ipl { namespace ipl {
namespace bs2 { namespace bs2 {
Manager::Manager(EGG::Heap* pHeap) Manager::Manager(EGG::Heap* pHeap)
: mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), unk_0x0C(true), unk_0x0D(false), unk_0x0E(false), unk_0x0F(false), : mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), mbTickEnabled(true), mbUpdateRequested(false), mbAbortRequested(false), mbRestartRequested(false),
mbIsDiagDisc(false), mbIncludesSeatTitles(false), mbHasBanner(FALSE), mUnlockedState(BS2_STT_NO_DISK), mbStartUpdate(false), mbIsDiagDisc(false), mbIncludesSeatTitles(false), mbHasBanner(FALSE), mUnlockedState(BS2_STT_NO_DISK), mbStartUpdate(false),
mEntries(NULL), mEntrySize(1), mEntryOffset(0) { mEntries(NULL), mEntrySize(1), mEntryOffset(0) {
mpBannerBuffer = new (pHeap, DEFAULT_ALIGN) u8[BS2_DEFAULT_BANNER_SIZE]; mpBannerBuffer = new (pHeap, DEFAULT_ALIGN) u8[BS2_DEFAULT_BANNER_SIZE];
@@ -30,13 +30,13 @@ namespace ipl {
return mIPLState; return mIPLState;
} }
if (unk_0x0F && !System::isNandFull()) { if (mbRestartRequested && !System::isNandFull()) {
BS2RestartStateMachine(); BS2RestartStateMachine();
unk_0x0C = true; mbTickEnabled = true;
mIPLState = IPL_STATE_NO_DISK; mIPLState = IPL_STATE_NO_DISK;
unk_0x0F = false; mbRestartRequested = false;
} else if (unk_0x0C) { } else if (mbTickEnabled) {
BOOL old = OSDisableInterrupts(); BOOL old = OSDisableInterrupts();
mState = BS2Tick(); mState = BS2Tick();
@@ -51,7 +51,7 @@ namespace ipl {
if (mbIsDiagDisc && System::isRsrcLoaded()) { if (mbIsDiagDisc && System::isRsrcLoaded()) {
__WPADReconnect(TRUE); __WPADReconnect(TRUE);
unk_0x0C = false; mbTickEnabled = false;
bootNewSystem(); bootNewSystem();
} }
} }
@@ -65,7 +65,7 @@ namespace ipl {
} }
void Manager::startUpdate() { void Manager::startUpdate() {
unk_0x0D = true; mbUpdateRequested = true;
mbStartUpdate = true; mbStartUpdate = true;
mPrevEntry = 0; mPrevEntry = 0;
mPrevFound = 0; mPrevFound = 0;
@@ -88,11 +88,11 @@ namespace ipl {
} }
void Manager::reserveRVLGame() { void Manager::reserveRVLGame() {
unk_0x0C = false; mbTickEnabled = false;
} }
void Manager::reserveGCGame() { void Manager::reserveGCGame() {
unk_0x0C = false; mbTickEnabled = false;
} }
void Manager::startRVLGame() { void Manager::startRVLGame() {
@@ -103,13 +103,13 @@ namespace ipl {
} }
void Manager::abort() { void Manager::abort() {
unk_0x0E = true; mbAbortRequested = true;
unk_0x0F = false; mbRestartRequested = false;
} }
void Manager::restart() { void Manager::restart() {
unk_0x0E = false; mbAbortRequested = false;
unk_0x0F = true; mbRestartRequested = true;
System::checkNandOverFlowFlagAsync(); System::checkNandOverFlowFlagAsync();
} }
@@ -195,7 +195,7 @@ namespace ipl {
break; break;
} }
case BS2_STT_64: { case BS2_STT_64: {
unk_0x0C = false; mbTickEnabled = false;
mIPLState = IPL_STATE_8; mIPLState = IPL_STATE_8;
break; break;
} }
@@ -216,25 +216,25 @@ namespace ipl {
} }
void Manager::execTick(BS2State state) { void Manager::execTick(BS2State state) {
if (unk_0x0D) { if (mbUpdateRequested) {
if (state == BS2_STT_UPDATE_DISK) { if (state == BS2_STT_UPDATE_DISK) {
BS2StartUpdate(); BS2StartUpdate();
} else { } else {
mbStartUpdate = false; mbStartUpdate = false;
} }
} else if (unk_0x0E) { } else if (mbAbortRequested) {
if (state == BS2_STT_NO_DISK || state == BS2_STT_COVER_OPEN || state == BS2_STT_55 || state == BS2_STT_WRONG_DISK || if (state == BS2_STT_NO_DISK || state == BS2_STT_COVER_OPEN || state == BS2_STT_55 || state == BS2_STT_WRONG_DISK ||
state == BS2_STT_66 || state == BS2_STT_67 || state == BS2_STT_68 || state == BS2_STT_FATAL_ERROR || state == BS2_STT_66 || state == BS2_STT_67 || state == BS2_STT_68 || state == BS2_STT_FATAL_ERROR ||
state == BS2_STT_UPDATE_FAILED || state == BS2_STT_DIRTY_DISK) { state == BS2_STT_UPDATE_FAILED || state == BS2_STT_DIRTY_DISK) {
unk_0x0C = false; mbTickEnabled = false;
mIPLState = IPL_STATE_8; mIPLState = IPL_STATE_8;
} else { } else {
BS2AbortStateMachine(); BS2AbortStateMachine();
} }
} }
unk_0x0D = false; mbUpdateRequested = false;
unk_0x0E = false; mbAbortRequested = false;
} }
void Manager::updateTick() { void Manager::updateTick() {