Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match HistoryBook::ReadyWorld() #1373

Merged
merged 9 commits into from
Jan 24, 2025

Conversation

jonschz
Copy link
Collaborator

@jonschz jonschz commented Jan 24, 2025

Closes #1369.

Matches to about 53 % on BETA10, though most of the mismatch comes from incorrect registers / entropy. The structural match isn't perfect, but quite decent.

I got LEGO1 to 91 %. Some of it appears to be entropy, but I can't make the beginning work:

0x1008271e : mov ecx, 'A_Bitmap' (STRING)
-0x10082723 : -cmp si, 0x1a
0x10082727 : lea edx, [esp + 0x40]
0x1008272b : mov cl, byte ptr [ecx + 8]
0x1008272e : mov dword ptr [edx], eax
0x10082730 : mov dword ptr [edx + 4], ebx
0x10082733 : mov byte ptr [edx + 8], cl
-0x10082736 : -jge 0x25
0x10082738 : lea eax, [esp + 0x40]
0x1008273c : mov ecx, dword ptr [esp + 0x18]
0x10082740 : push eax
0x10082741 : push 'MxStillPresenter' (STRING)
0x10082746 : call LegoWorld::Find(char const *, char const *) (FUNCTION)

It looks as if the code does something like

MxS16 i = 0;
char bitmap[] = "A_Bitmap";

for (; i < 26; i++) {
// [...]
}

but that only makes the match worse.

@foxtacles
Copy link
Member

foxtacles commented Jan 24, 2025

Matched it to 100% by adding another if (i < 26) check in the loop. Doesn't make any sense but I guess that's what they did. Could be that they added a new inline function to set the entry in m_alphabet which has that check in the body. Probably the same in RegistrationBook::ReadyWorld

@foxtacles foxtacles merged commit 82f2e2e into isledecomp:master Jan 24, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match HistoryBook::ReadyWorld
2 participants