Raymai97 / vbox-d3d-on-w2k

VirtualBox Direct3D support for Windows 2000
GNU General Public License v3.0
4 stars 0 forks source link

multiplatform support issue #1

Closed FutoTan closed 1 year ago

FutoTan commented 1 year ago

Dear Raymai97,

A few days ago, I found that Windows 2000 is DirectX9.0c's final supported version. So I tried to play some games with D3D. Unfortunately, it didn't work. Then I found this repo.

Seeing this repo does only support virtual box, I got the idea to enhance it so that it can support both physical machines and virtual machines. So I did some tricks to the KERNEL32.DLL.I modified this file's export table as well adding your repo's 4 functions' assembler. But it keeps the loop that blue screen and reboots. Through my debug, I found that the function GetModuleHandleExA caused it. But I have no idea to correct it. Could you do me some help?

This's dll I edited. kernel32.zip 20220720235449

Raymai97 commented 1 year ago

Hi Tao0Lu,

Based on your screenshot, you seems to know Chinese so let me reply you in that language for easier communication.

根据你的描述,我觉得你想做的东西是行不通的。你想做的东西和我这个 repo 做的东西,可以说完全不一样。

我做的东西是让 virtualbox 针对 WinXP 的硬件3D实现得以在 Win2K 下运行。 因为我认为 Win2K SP4 和 WinXP SP2 相差不大。 所以猜想 virtualbox 3D acceleration for WinXP 的实现可以很容易弄给 Win2K 用。

我的做法是弄一个 kernel31.dll,导出所有当前 kernel32.dll 有导出的函数,然后再导出一些新系统才有的函数。 所有 kernel32.dll 本来就有的 API 在我的 kernel31.dll 里都是单纯的重定向。 新的函数实现则尽可能满足 virtualbox 的需求。

有了 kernel31.dll 后我篡改 virtualbox DLL 让它依赖 kernel31.dll,不再直接依赖 kernel32.dll。 这样 virtualbox DLL 就能正常运行,从而实现 Win2K 跑硬件 3D。

而你的,根据你的描述

So I did some tricks to the KERNEL32.DLL.I modified this file's export table as well adding your repo's 4 functions' assembler.

你是直接修改 kernel32.dll,对吧?我不认为那是很容易成功的东西。很可能会弄坏系统,导致无法启动/无限重启。

为什么你不考虑 KernelEx 或 黑翼猫(BlackWingCat )弄的各种扩展呢?我感觉已经有很多为 真机Win2K系统续命 的方案了,不是吗?

FutoTan commented 1 year ago

好吧,我确实是理解错这个项目的意义了。

黑翼猫扩展 确实是一种好的解决方案,但是 黑翼猫 对中文系统支持差,还会出现一些奇怪的bug。不过 黑翼猫 也是对 kernel32.dll 文件进行了修改,并且没有造成内核损坏,这说明其实这个方案是可行的。

不过感谢你的耐心回复了!