Add CI script to compare recompiled assembly with original code (#24)

* add test to compare assembly between functions

* ci: use abs path of wget

* ci: fix shell disambiguity

* ci: ensure capstone is installed

* ci: ensure correct filenames

* use better source for lego island files

* give me an idea of what the dir structure looks like

* make wine path function

* improved script and project

* fixed script on windows

* print debug info because now it literally only doesn't work on fucking github actions

* better source path resolving

For some reason, nmake compiles produce different symbols. I wonder if this affects the accuracy of the decomp.
This commit is contained in:
MattKC
2023-06-18 20:28:18 -07:00
committed by GitHub
parent f9a93406a8
commit 5aa7921e90
7 changed files with 269 additions and 11 deletions

View File

@@ -9,6 +9,7 @@
RECT windowRect = {0, 0, 640, 480};
// OFFSET: ISLE 0x401000
Isle::Isle()
{
m_hdPath = NULL;
@@ -51,6 +52,7 @@ Isle::Isle()
LegoOmni::CreateInstance();
}
// OFFSET: ISLE 0x4011a0
Isle::~Isle()
{
if (LegoOmni::GetInstance()) {
@@ -75,6 +77,7 @@ Isle::~Isle()
}
}
// OFFSET: ISLE 0x401260
void Isle::close()
{
MxDSAction ds;
@@ -109,6 +112,7 @@ void Isle::close()
}
}
// OFFSET: ISLE 0x402740
BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize)
{
HKEY hKey;
@@ -127,6 +131,7 @@ BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize)
return out;
}
// OFFSET: ISLE 0x4027b0
int readRegBool(LPCSTR name, BOOL *out)
{
char buffer[256];
@@ -146,6 +151,7 @@ int readRegBool(LPCSTR name, BOOL *out)
return FALSE;
}
// OFFSET: ISLE 0x402880
int readRegInt(LPCSTR name, int *out)
{
char buffer[256];
@@ -158,6 +164,7 @@ int readRegInt(LPCSTR name, int *out)
return FALSE;
}
// OFFSET: ISLE 0x4028d0
void Isle::loadConfig()
{
#define BUFFER_SIZE 1024
@@ -224,6 +231,7 @@ void Isle::loadConfig()
}
}
// OFFSET: ISLE 0x401560
void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
BOOL using8bit, BOOL m_using16bit, BOOL param_6, BOOL param_7,
BOOL wideViewAngle, char *deviceId)
@@ -244,6 +252,7 @@ void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
}
}
// OFFSET: ISLE 0x4013b0
BOOL Isle::setupLegoOmni()
{
char mediaPath[256];
@@ -258,6 +267,7 @@ BOOL Isle::setupLegoOmni()
return FALSE;
}
// OFFSET: ISLE 0x402e80
void Isle::setupCursor(WPARAM wParam)
{
switch (wParam) {
@@ -278,6 +288,7 @@ void Isle::setupCursor(WPARAM wParam)
SetCursor(m_cursorCurrent);
}
// OFFSET: ISLE 0x401d20
LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (!g_isle) {
@@ -447,6 +458,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return DefWindowProcA(hWnd,uMsg,wParam,lParam);
}
// OFFSET: ISLE 0x4023e0
MxResult Isle::setupWindow(HINSTANCE hInstance)
{
WNDCLASSA wndclass;
@@ -554,6 +566,7 @@ MxResult Isle::setupWindow(HINSTANCE hInstance)
return SUCCESS;
}
// OFFSET: ISLE 0x402c20
void Isle::tick(BOOL sleepIfNotNextFrame)
{
if (this->m_windowActive) {

View File

@@ -5,6 +5,7 @@
#include "isle.h"
#include "legoomni.h"
// OFFSET: ISLE 0x401ca0
BOOL findExistingInstance(void)
{
HWND hWnd = FindWindowA(WNDCLASS_NAME, WINDOW_TITLE);
@@ -17,6 +18,7 @@ BOOL findExistingInstance(void)
return 1;
}
// OFFSET: ISLE 0x401ce0
BOOL startDirectSound(void)
{
LPDIRECTSOUND lpDS = 0;
@@ -29,6 +31,7 @@ BOOL startDirectSound(void)
return FALSE;
}
// OFFSET: ISLE 0x401610
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
// Look for another instance, if we find one, bring it to the foreground instead