VOGONS


First post, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

When running inside DOSBox, Carmageddon only shows black screen when the movies are supposed to be shown. It works fine with dgVoodoo.
I figured out, Carmageddon issues a LFB lock but never bothers to unlock the buffer (as that would actually trigger buffer update in openglide, instead the buffer remains empty). Glide reference specifically states that an application can only call grLfbLock and grLfbUnlock when it holds a lock to a buffer and cannot use other commands.
The following patch issues a buffer unlock when grSwapBuffers is called and re-locks the buffer after the SwapBuffers. It's against what reference manual says (even if SwapBuffers implicitly unlocked the buffer on real hardware, the application could not expect the LFB pointer to remain valid after the buffer swap), but it makes the game work 😀

Attachments

  • Filename
    openglide-carma.diff
    File size
    557 Bytes
    Downloads
    1130 downloads
    File license
    Fair use/fair dealing exception
Last edited by gulikoza on 2010-10-26, 12:29. Edited 1 time in total.

http://www.si-gamer.net/gulikoza

Reply 4 of 7, by Glidos

User metadata
Rank l33t
Rank
l33t
thedoctor45 wrote:
hmm... with the hires and carmageddon patches the 3Dfx version of BLOOD now looks like this: […]
Show full quote

hmm... with the hires and carmageddon patches the 3Dfx version of BLOOD now looks like this:

.
.
.

any idea what could cause that and how to debug this?

Yep, You can't scale blood. The 3dfx patch is a bit of a hack: where the software version used to generate lots of one-pixel-wide lines, the 3dfx patch generates very thin triangles. Glidos has a way around it, but it's very complicated: Glidos reads in the little triangles, and stiches them together to make big ones; it also has to use linear regression to calulate good texture coords.

Reply 5 of 7, by Glidos

User metadata
Rank l33t
Rank
l33t
Miki Maus wrote:

Interesting, because Carmageddon works fine with openglide when using glidos.

Keep up the good work! 😉

I ran into similar problems, and implemented a similar solution. The fault is with Carmegeddon. Glidos uses several special cases in Carmageddon, and still it doesn't quite get it right.

Reply 6 of 7, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Updated and simplified the patch in the first post. There's really no good reason to wait for bufferswap and issue a full buffer lock since LFB is just allocated memory 😉

http://www.si-gamer.net/gulikoza

Reply 7 of 7, by azn

User metadata
Rank Newbie
Rank
Newbie

I know the topic is old and not sure if that's the right place. I used the patch but did not use the hi-res patch(not sure what is it doing). But is it normal in glide more that mirror does not work and you cannot see crushed cars after the race?

Take a look at my YouTube channel - totally dedicated to retro shooters