1
0
mirror of synced 2025-02-23 05:29:15 +01:00

Ex-Board AH30 works

- Sloppy errors fixed, AH30 boots.
- Windowed / Fullscreen mode work needed for AH20 to work properly.
- Input injection needed from TPUI.
This commit is contained in:
Reaver 2018-09-11 02:18:59 +03:00
parent 35bdf690f7
commit 16c169b064

View File

@ -224,8 +224,6 @@ static HANDLE __stdcall CreateFileAWrapExBoard(LPCSTR lpFileName,
hTemplateFile); hTemplateFile);
} }
extern int* wheelSection;
BOOL __stdcall WriteFileWrapExBoard(HANDLE hFile, BOOL __stdcall WriteFileWrapExBoard(HANDLE hFile,
LPVOID lpBuffer, LPVOID lpBuffer,
DWORD nNumberOfBytesToWrite, DWORD nNumberOfBytesToWrite,
@ -259,7 +257,7 @@ BOOL __stdcall ClearCommErrorWrap(HANDLE hFile, LPDWORD lpErrors, LPCOMSTAT lpSt
if(lpStat) if(lpStat)
{ {
OutputDebugStringA("CLEAR COMM ERROR COM1"); OutputDebugStringA("CLEAR COMM ERROR COM1");
if(g_replyBuffers[hFile].empty()) if(!g_replyBuffers[hFile].empty())
{ {
lpStat->cbInQue = g_replyBuffers[hFile].size(); lpStat->cbInQue = g_replyBuffers[hFile].size();
} }
@ -268,16 +266,20 @@ BOOL __stdcall ClearCommErrorWrap(HANDLE hFile, LPDWORD lpErrors, LPCOMSTAT lpSt
lpStat->cbInQue = 0; lpStat->cbInQue = 0;
} }
lpStat->cbInQue += 8; if (is_addressedExBoard())
{
g_replyBuffers[hFile].push_back(0x76); lpStat->cbInQue += 8;
g_replyBuffers[hFile].push_back(0xFD);
g_replyBuffers[hFile].push_back(0x08); g_replyBuffers[hFile].push_back(0x76);
g_replyBuffers[hFile].push_back(0x00); // Control Byte 1 g_replyBuffers[hFile].push_back(0xFD);
g_replyBuffers[hFile].push_back(0x00); // Control Byte 2 g_replyBuffers[hFile].push_back(0x08);
g_replyBuffers[hFile].push_back(0x00); // Control Byte 3 g_replyBuffers[hFile].push_back(0x00); // Control Byte 1
g_replyBuffers[hFile].push_back(0x00); // Control Byte 4 g_replyBuffers[hFile].push_back(0x00); // Control Byte 2
g_replyBuffers[hFile].push_back(0x42); g_replyBuffers[hFile].push_back(0x00); // Control Byte 3
g_replyBuffers[hFile].push_back(0x00); // Control Byte 4
g_replyBuffers[hFile].push_back(0x42);
}
} }
return true; return true;
@ -412,6 +414,7 @@ static InitFunction ExBoardGenericFunc([]()
iatHook("user32.dll", SetWindowPosWrap, "SetWindowPos"); iatHook("user32.dll", SetWindowPosWrap, "SetWindowPos");
iatHook("user32.dll", CreateWindowExWWrap, "CreateWindowExW"); iatHook("user32.dll", CreateWindowExWWrap, "CreateWindowExW");
iatHook("user32.dll", CreateWindowExAWrap, "CreateWindowExA"); iatHook("user32.dll", CreateWindowExAWrap, "CreateWindowExA");
SRAM_load(); SRAM_load();
}, GameID::ExBoardGeneric); }, GameID::ExBoardGeneric);