1
0
mirror of synced 2024-11-14 14:57:36 +01:00

Add iDmacDrv stub building

This commit is contained in:
Poliwrath 2019-04-07 15:29:04 -04:00
parent 870da14163
commit 757b4b04fe
4 changed files with 157 additions and 1 deletions

29
iDmacDrv/premake5.lua Normal file
View File

@ -0,0 +1,29 @@
project "iDmacDrv"
targetname "iDmacDrv"
language "C++"
kind "SharedLib"
files
{
"src/**.cpp", "src/**.h",
"deps/cpp/**.cpp", "deps/inc/**.h"
}
includedirs { "src", }
linkoptions { "/DEF:iDmacDrv/src/Source.def" }
prebuildcommands {
"if not exist $(TargetDir)output mkdir $(TargetDir)output",
}
postbuildcommands {
"if exist $(TargetDir)iDmacDrv32.dll xcopy /y $(TargetDir)iDmacDrv32.dll $(TargetDir)output\\",
"if exist $(TargetDir)iDmacDrv64.dll xcopy /y $(TargetDir)iDmacDrv64.dll $(TargetDir)output\\"
}
filter "platforms:x86"
targetsuffix "32"
filter "platforms:x64"
targetsuffix "64"

16
iDmacDrv/src/Source.def Normal file
View File

@ -0,0 +1,16 @@
EXPORTS
iDmacDrvOpen @1
iDmacDrvClose @2
iDmacDrvDmaRead @3
iDmacDrvDmaWrite @4
iDmacDrvRegisterRead @5
iDmacDrvRegisterWrite @6
iDmacDrvRegisterBufferRead @7
iDmacDrvRegisterBufferWrite @8
iDmacDrvMemoryRead @9
iDmacDrvMemoryWrite @10
iDmacDrvMemoryReadExt @11
iDmacDrvMemoryWriteExt @12
iDmacDrvMemoryBufferRead @13
iDmacDrvMemoryBufferWrite @14

110
iDmacDrv/src/main.cpp Normal file
View File

@ -0,0 +1,110 @@
#pragma optimize("", off)
#include <Windows.h>
int main();
BOOL WINAPI DllMain(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpReserved ) // reserved
{
// Perform actions based on the reason for calling.
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
// Initialize once for each new process.
// Return FALSE to fail DLL load.
return main();
break;
case DLL_THREAD_ATTACH:
// Do thread-specific initialization.
break;
case DLL_THREAD_DETACH:
// Do thread-specific cleanup.
break;
case DLL_PROCESS_DETACH:
// Perform any necessary cleanup.
break;
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}
bool initOK = false;
extern "C" __declspec(dllexport) DWORD __cdecl iDmacDrvOpen(int deviceId, LPVOID outBuffer, LPVOID lpSomeFlag)
{
return 0;
}
extern "C" __declspec(dllexport) DWORD __cdecl iDmacDrvClose(int deviceId, LPVOID lpWriteAccess)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvDmaRead(int a1, LPVOID lp, UINT_PTR ucb, LPVOID a4)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvDmaWrite(int a1, void *lp, UINT_PTR ucb, LPVOID a4)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvRegisterRead(int DeviceId, DWORD CommandCode, LPVOID OutBuffer, LPVOID DeviceResult)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvRegisterWrite(int deviceId, DWORD CommandCode, int unused, LPVOID DeviceResult)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvRegisterBufferRead(int a1, DWORD BytesReturned, LPVOID lp, UINT_PTR ucb, LPVOID a5)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvRegisterBufferWrite(int a1, DWORD BytesReturned, void *lp, UINT_PTR ucb, LPVOID a5)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryRead(int a1, DWORD BytesReturned, LPVOID lp, LPVOID a4)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryWrite(int a1, DWORD BytesReturned, int a3, LPVOID lp)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryReadExt(int a1, DWORD BytesReturned, int a3, LPVOID lp, DWORD nOutBufferSize, LPVOID a6)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryWriteExt(int a1, int a2, int a3, void *Src, rsize_t DstSize, LPVOID lp)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryBufferRead(int a1, DWORD BytesReturned, LPVOID lp, UINT_PTR ucb, LPVOID a5)
{
return 0;
}
extern "C" __declspec(dllexport) int __cdecl iDmacDrvMemoryBufferWrite(int a1, int a2, void *lp, UINT_PTR ucb, LPVOID a5)
{
return 0;
}
int main()
{
return 1;
}
#pragma optimize("", on)

View File

@ -69,4 +69,5 @@ project "udis86"
include "OpenParrot"
include "OpenParrotLoader"
include "OpenParrotKonamiLoader"
include "OpenParrotKonamiLoader"
include "iDmacDrv"