vogons - very old games on new systems Last Visit : never :: 2013-5-24 @ 01:58 am : Now
?FAQ sSearch mMemberlist uUsergroups
rRegister pProfile "Messages lLog in
View posts : unanswered
Forum Index :: OpenGLide Development ::
up Carmageddon fix
Reply with quote Carmageddon fix :: 2010-10-25 @ 02:27 pm
gulikoza
Oldbie
[avatar]
Joined: 2004-06-25
Posts: 1519
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 Happy


Last edited by gulikoza on 2010-10-26 @ 12:29 pm; edited 1 time in total
openglide-carma.diff (557bytes) - Downloaded 690 Time(s)


_________________
http://www.si-gamer.net/gulikoza
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-25 @ 05:14 pm
Miki Maus
Member
[avatar]
Joined: 2004-10-18
Posts: 197
Location: Cave
Interesting, because Carmageddon works fine with openglide when using glidos.

Keep up the good work! Wink
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-25 @ 05:21 pm
thedoctor45
Newbie
[avatar]
Joined: 2010-07-12
Posts: 32
you can also fix the problem by adding the -vrush argument to carmav.exe.
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-26 @ 02:16 am
thedoctor45
Newbie
[avatar]
Joined: 2010-07-12
Posts: 32
hmm... with the hires and carmageddon patches the 3Dfx version of BLOOD now looks like this:

user image

any idea what could cause that and how to debug this?
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-26 @ 12:11 pm
Glidos
l33t
[avatar]
Joined: 2002-08-08
Posts: 3092
thedoctor45 wrote:
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.
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-26 @ 12:13 pm
Glidos
l33t
[avatar]
Joined: 2002-08-08
Posts: 3092
Miki Maus wrote:
Interesting, because Carmageddon works fine with openglide when using glidos.

Keep up the good work! Wink


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.
Post new topicReply to topic
Offline
Reply with quote Re: Carmageddon fix :: 2010-10-26 @ 12:32 pm
gulikoza
Oldbie
[avatar]
Joined: 2004-06-25
Posts: 1519
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 Wink

_________________
http://www.si-gamer.net/gulikoza
Post new topicReply to topic
Offline
page 1 of 1
All times are GMT
Moderate
Quick Reply & Options
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Powered by phpBB © 2001-2003 phpBB Group.
vogons and vogons site design and content herein is under a creative commons license 2002-2003 zetafleet.dom.
This site hosts no abandonware. There is no material that is knowingly illegal here.
zetafleet.dom will not be held responsible for users' posts.
This disclaimer is brought to you thanks to the BSA.