This site is no longer active and is available for archival purposes only. Registration and login is disabled.

ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Floatin


Re: ARGH!!!! Get the Floating Pointies Fixed!!!

Postby Matt Keys » Sep 9, 2001 @ 10:55pm

lets show some respect and gratitude.
Matt Keys
Co-Founder
PocketMatrix.com
User avatar
Matt Keys
Site Co-Founder
 
Posts: 3243
Joined: Jan 24, 2001 @ 7:29pm
Location: Michigan, USA


Re: ARGH!!!! Get the Floating Pointies Fixed!!!

Postby Robotbeat » Sep 9, 2001 @ 11:02pm

Yes, I'm sorry. But... But...<br>At least it might have gotten Dan E. to start thinkin'. That was (is) the point, anyways. I love Dan. I just want to know how far he is, or if he abandoned the project.
Die, Palm, Die. If that offended you, then get rid of your Palm OS device.
User avatar
Robotbeat
pm Member
 
Posts: 827
Joined: Jan 28, 2001 @ 4:52pm
Location: In your mind...


ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Floatin

Postby Robotbeat » Sep 9, 2001 @ 11:04pm

Alright. I don't care that Dan is busy. I want him to get it finished. I want a playable PocketQuake. (Notice the word "pocket"? That means no more comments from people who think they are cool and mention that you can play Quake from the PC.) I want to show it off to people. It is hardly worth showing anyone this slideshow. Either that, or I want a new 400 MHz Pocket PC. <br><br>I overclocked my crap-I/O-Pee-a to 168 Mhz. It still sucks. I don't like iPAQs because I am going to wait for a faster model. <br><br>Please, Dan? Please? (shut up, Moose)
Die, Palm, Die. If that offended you, then get rid of your Palm OS device.
User avatar
Robotbeat
pm Member
 
Posts: 827
Joined: Jan 28, 2001 @ 4:52pm
Location: In your mind...


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Jaybot » Sep 10, 2001 @ 4:03am

Simmer down.  Did you know that the source code is available?  And doing floating point to fixed point math really isn't all that complicated (Dan has explained it in several threads), it just takes a LONG time.  It's basically just doing a few calculations and a LOT of typing, reading, guessing, screwing up, and starting all over again.  So, if you are willing to give up about 36,000 hours of your life to coding it (if you'll be doing it by yourself), you might be able to have it done possible by the time the 400Mhz Casios come out (next June). :D
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Phantom » Sep 10, 2001 @ 8:20am

I know you don't wanna hear this, but I spoke to a guy from a GBADev forum the other day who did a port of Quake to some obscure ARM home computer (archimedes, I believe). ANYway, he first simply compiled the source code after adding display management stuff for the particular platform, wich was a piece of cake, then he replaced 'float' by 'FLOAT', and all operations by macro's (a * a became FLOATMUL(a,b)), while initially using floats in the FLOAT macro's. Once he did that for the entire Quake source (this is a monumental task), he replaced the FLOAT macro code by 64bit fixed point code (equally slow, but closer to the final goal). Finally, he replaced the 64bit C fixed point stuff by StrongARM asm. Once he completed that, he scored 20fps on the first room of Quake. This was on a 206Mhz StrongARM processor.<br><br>So I asked him, can I have that source code?
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Phantom » Sep 10, 2001 @ 8:20am

Oh yeah, I forgot: The answer was no.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby jon » Sep 10, 2001 @ 8:57am

wouldn't he legally have to realese it. unless he did it for himself and didn't make it available to other people
jon
 


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Phantom » Sep 10, 2001 @ 9:03am

Well in fact he did want to give me the code, but he lost it. But that wouldn't have sounded as funny in the second post. :)
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Dan East » Sep 10, 2001 @ 10:06am

Jacco. I did that with PQ as a first attempt at optimizing it. I globally replaced all floating point with my own type, including the operators. I was going to use fixed point before I realized that a static nn.nn 32 bit fixed point was not nearly enough to handle the range and precision Quake needs. Those changes may be a bit mangled in some places, because I abandoned them early on in the project. All that is really needed then is the 64 bit code to handle the operations.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Phantom » Sep 10, 2001 @ 10:36am

So you basically have a version of PocketQuake that uses only your own version of float?
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Phantom » Sep 10, 2001 @ 10:38am

BTW, I was thinking about making a class 'FLOAT', and use operator overloading to get PQ to work with it almost without modifications. However, I suppose I can't just mix classes and operator overloading with pure C, am I right? I really suck at C++, you see. :)
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Dan East » Sep 10, 2001 @ 11:03am

Right, to my knowledge you can't just overload operators in C. However, being that the floating point is handled by emulation, I assume that there is a library that is linked to that contains the floating point software code. One could hack that library to replace the existing floating point math with their own code.<br><br>Early in the PQ project, after version 0.02 I think, I attempted a global replacement of all floating point math. I created duplicate vars / structs with FPM appended to the name. If you look through the PQ source, you will find thousands of such vars. They will all resolve down to fixedpoint_t in place of float. Check out the FixedPointMath.h header, which contains all the prototypes and macros I used in replacing the operators. I replaced the actual operators with macros, most of which resolve to functions.<br><br>So, for example, Quake's original dot product macro was:<br>[fixed]#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])[/fixed]<br><br>My converted version (as found in mathlib.h) is:<br>[fixed]#define DotProductFPM(x,y) FPM_ADD3(FPM_MUL(x[0],y[0]),FPM_MUL(x[1],y[1]),FPM_MUL(x[2],y[2]))[/fixed]<br><br>I spent a very, very long time doing such conversions back in February. I converted everything, but there may of course be errors due to the tremendous volume involved. After the conversion it quickly became apparent that no single fixed point precision could meet the range requirement of every float in Quake, so I began smaller, localized conversions using varied fixed point precision depending on the needed range / precision, and the operators involved (just like you did with the optimizations you performed).<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Dan East » Sep 10, 2001 @ 11:08am

Also, the idea has been kicked around of converting the Quake source to C++, which would then allow replacement of the float type by a class. In that case operator overloading would be possible. Digby has achieved some degree of success creating a fixed point C++ Class which dynamically adjusts precision as needed. While the improvement is not the 10x or so increase realized with hand-coded fixed point replacements, it at least is twice as fast.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby suchiaruzu » Sep 10, 2001 @ 11:09am

Dan, <br>I've just recieved an eMail:<br>From: John Romero<br>To: Björn Eike Schwarz<br>Subject: Re: PocketQuake<br><br>Yeah, I tried that stuff -- very impressive on the platform. (...)<br>- John<br><br>>Hello John,<br>>have you had the time to try PocketQuake yet? ><br>>(...)<br>>Ciao,<br>>Eike<br><br>Isnt that great? Isnt it? :)
<div align="center">Image<br></div>
User avatar
suchiaruzu
pm Insider
 
Posts: 2570
Joined: May 3, 2001 @ 9:29am
Location: BFE


Re: ARGH!!!!(Edit:ARGH in a non-threatening way) Get the Flo

Postby Moose or Chuck » Sep 10, 2001 @ 7:40pm

And the reason you did not release this improvement would be because ... ?
Moose or Chuck
 


Next

Return to Pocket Quake 1 and 2


Sort


Forum Description

Discuss Pocket Quake 1 and 2 by Dan East

Moderators:

Dan East, sponge, James S

Forum permissions

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 post attachments in this forum