Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R_DrawSpanVBE2_386SX (And Probably others) crashes the game on certain newer platforms (686?) #160

Open
dougvj opened this issue Jan 8, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dougvj
Copy link
Contributor

dougvj commented Jan 8, 2024

I went down a rabbit hole thinking that there was a problem with the sound driver because when I changed the sound the game crashed, but FDSETUP wipes the rendering function setting whose default is 386SX

I am confident that the issue occurs with the Pentium II and the AMD Athlon. It does not appear to be a problem on early pentium, but I have not tested other CPUs or platforms. I will do more testing over the coming days.

I am also fairly confident that the issue is caused by the span function because sometimes a frame or two gets rendered before crashing and only the columns, which look correct, are on the frame.

One possible solution for now is to disable the 386 SX functions based on the processor type detection

0.9.8 is affected through Master

dougvj added a commit to dougvj/FastDoom that referenced this issue Jan 8, 2024
Avoids the problem encountered in viti95#160
@viti95 viti95 added bug Something isn't working help wanted Extra attention is needed labels Jan 9, 2024
@viti95
Copy link
Owner

viti95 commented Jan 9, 2024

The main difference in 386SX codepath is that CR2 register is used as scratchpad memory, read/write to this register is a bit faster compared to main memory (same goes for CR3). Maybe this is causing issues on Windows. I'll take a look.

@viti95 viti95 removed the help wanted Extra attention is needed label Jan 9, 2024
@viti95 viti95 added the help wanted Extra attention is needed label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants