Forum

64 bit software rendering?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

64 bit software rendering?

Postby dreadlorde » Wed Dec 08, 2010 3:44 pm

Has anyone built the original winquake src on a 64 bit linux machine and have it work? I've been able to build it, but the render seems to be messed up.

I can post a video of what I'm talking about later if that helps.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Re: 64 bit software rendering?

Postby frag.machine » Wed Dec 08, 2010 4:24 pm

dreadlorde wrote:Has anyone built the original winquake src on a 64 bit linux machine and have it work? I've been able to build it, but the render seems to be messed up.

I can post a video of what I'm talking about later if that helps.


The obvious question comes to my mind: is this code using x86 ASM or is entirely in C ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby dreadlorde » Wed Dec 08, 2010 6:54 pm

It's entirely C. Also, using x86_64 and i686 versions of gcc produce the same problem.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby revelator » Wed Dec 08, 2010 7:58 pm

not sure anyones done that yet.

i suspect a lot of the code would need a rework as 64 bit sizes are different (probably also why the render barfs).

that in mind glquake compiles fine to 64 bit.

the software renderer was ported from the dos quake source right ?.

might be some left over 16 bit code is one guess as to why it breaks.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby dreadlorde » Wed Dec 08, 2010 8:07 pm

reckless wrote:not sure anyones done that yet.

i suspect a lot of the code would need a rework as 64 bit sizes are different (probably also why the render barfs).
That's what I suspected. I will take a look at it and mash on the keyboard to see if I can get anything to work (I wouldn't count on it).

the software renderer was ported from the dos quake source right ?.

might be some left over 16 bit code is one guess as to why it breaks.

Uh, I think so.
that in mind glquake compiles fine to 64 bit.
Yeah, I'm able to compile and play the id demos with it (haven't tried any else), but it segfaults whenever I try and load a map. I haven't had time to look into it.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby Spike » Thu Dec 09, 2010 4:02 am

the only 16bit code in quake is dos dpmi stuff, and the startup code. windows builds contain no 16bit code (except for the 16bit legacy dos exe stub that all 64bit progs still have)
if the i686 version of gcc has the same problem, then its hardly a 64-bit issue.
there are 64bit portability bugs, yes. I remember one in the sprite code somewhere. the qcvm usually works, but if you're unlucky it can blow up quite nicely.
disable the demos, and it'll get into the console/menus without any fixes for the 64bit bugs, but yeah, that's not actually doing anything.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby qbism » Thu Dec 09, 2010 5:51 pm

Using the lastest compilers and libs, will original 1999 winquake code even compile to 32-bit anymore w/o significant tweaks?

Starting with a more modern code base might help. tochris (2003), BJP's winquake (2007) or Makaqu 1.3 (2009) will have many known bug fixes built-in to them.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby revelator » Fri Dec 10, 2010 1:07 am

can compile winquake just fine with msvc 10 and it also runs on my win7 64 bit machine hmm.

gcc barfs loudly on the assembler files (bit mysterious as i thought that quakes asm code was gas "short for gnu assembler" compatible hence the gas2masm converter).
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby dreadlorde » Wed Dec 22, 2010 10:11 pm

qbism wrote:Using the lastest compilers and libs, will original 1999 winquake code even compile to 32-bit anymore w/o significant tweaks?
It does. There's no sound (on linux), but it compiles and plays fine otherwise (with the exception of the mouse not working :/)
Starting with a more modern code base might help. tochris (2003), BJP's winquake (2007) or Makaqu 1.3 (2009) will have many known bug fixes built-in to them.
Bjp's winquake quake doesn't seem to have any of the linux cd_*, sys_*, &c files. I'll see if copying them over from winquake works.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby revelator » Wed Dec 22, 2010 11:39 pm

will need to edit makefiles also just copying them over wont work :)

and you will probably have to change a few things in the source itself also for it to know which files to use.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby dreadlorde » Thu Dec 23, 2010 1:07 am

reckless wrote:will need to edit makefiles also just copying them over wont work :)
I know. :P
and you will probably have to change a few things in the source itself also for it to know which files to use.
I hope not, I hate dancing with ifdef.

The only problems I've had to far are there are a lot of heads missing, some r_* and d_* files missing, and I get this error when make gets around to compiling vid_x.c:
Code: Select all
common.h:60: error: expected ‘)’ before numeric constant
common.h:60: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’


Which is weird, because none of the other files that include quakedef.h, which includes common.h (need to fix that...) complain about this.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest