Reply 320 of 1046, by ecksemmess
Thanks gerwin and VileRancour. Looks like this crashing is probably a result of some finicky detail of how D3D is implemented through certain video chipsets versus others, or perhaps it depends on the exact version of DX being used? In any case, I'm in the process of debugging it on one of my machines that does suffer from the crashing, so it shouldn't be too hard to hack out a resolution even without understanding exactly why the crash is happening. I'll report back if I accomplish anything.
EDIT: I've traced it about as far as I can without knowing more about the nuts and bolts of D3D. The specific line of code that triggers the crash is:
win-d3d.cc : d3d_blit_memtoscreen_8 () : hr = d3ddev->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 2);
My extremely uneducated guess is that some subtle bug somewhere is resulting in a slight corruption in the vertex calculations after the emulated pc has been running for some time and is then reset. The important thing to note is that the Hercules also calls win-d3d.cc : d3d_blit_memtoscreen_8 (), and executes that same line of code, and functions perfectly. It appears to be the only emulated video card capable of running that code without triggering the crash. Therefore, the question to ask is, what does Hercules do with the vertices that no other card does (or perhaps, what does every other card do with the vertices that Hercules doesn't)? Unfortunately, this is where my knowledge of D3D and the PCem source hits a brick wall, but hopefully someone can take this info and run with it. If someone who can't reproduce the symptoms notices a calculation somewhere that looks like it might be relevant, I'll be happy to make any suggested changes and report on whether that fixes the problem.