VOGONS


Quake2 + Acebot for DOSBox (128mb)

Topic actions

Reply 380 of 862, by szo

User metadata
Rank Newbie
Rank
Newbie
ggorts_ wrote:

There was just one type of error among many lines in the glide3x source code. I tried to typecast the pointer as intended, but attached is a patch for verification.

That patch is wrong. The intention of the original code is to do pointer math as if the pointer is of the casted type. You want something like this:

-        (float *)pointers += 3; 
+ pointers = (float *)pointers + 3;

Reply 383 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie
szo wrote:
That patch is wrong. The intention of the original code is to do pointer math as if the pointer is of the casted type. You want […]
Show full quote
ggorts_ wrote:

There was just one type of error among many lines in the glide3x source code. I tried to typecast the pointer as intended, but attached is a patch for verification.

That patch is wrong. The intention of the original code is to do pointer math as if the pointer is of the casted type. You want something like this:

-        (float *)pointers += 3; 
+ pointers = (float *)pointers + 3;

Your solution did not fix the problem. There is still the linker error. Thanks for trying to help.

Reply 384 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie
ggorts_ wrote:
Here is a hint on the fenceVar once the warnings were enabled in gcc: […]
Show full quote

Here is a hint on the fenceVar once the warnings were enabled in gcc:

h5/minihwc/minihwc.c:994:14: warning: 'fenceVar' defined but not used [-Wunused-variable]
static FxU32 fenceVar;

Edit: I'll try to define this outside the condition block (specific to djgpp):
#define P6FENCE __asm __volatile ("xchg %%eax, fenceVar":::"%eax")

For a project like this you should certainly be compiling with -Wall and capturing the output. It may produce a lot of a junk. Sometimes you get lucky and it's only like 10 or 20 small warnings, but one of those warnings could be quite serious.

Also if fenceVar is defined as static is it called in any other file? If it's static it's obviously only local to that specific file (or even function if it's inside one).

Reply 385 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie

I should have built it with the recommended gcc/djgpp version, at least to verify a good build. But this is the only issue. It's only called in minihwc.c, at least I think so. It's referenced in the code block for P6FENCE(). My guess is that the code block isn't read by the compiler or something similar. That would cause the warning, too....

Reply 387 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie

It probably just requires a single line change, but it may be related to the inline assembly format between the older and newer gcc.

Edit:
this is the line that's probably causing the issue in minihwc-
#define P6FENCE __asm__ __volatile__ ("xchg %%eax, fenceVar":::"%eax")

Reply 391 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

also i'm not sure if such a thing needs to be declared volatile still as it was previously. Or if just fenceVar should be static volatile? Szo would have a more definitive answer on that.

Reply 392 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie

Yes, I'll attach the patch now and then a minute or two attach binaries for h5 (voodoo4/5?). This issue was the assembly inline which was likely older gcc. Please verify patch (includes szo pointer fixes).

I'll post glide3x and tests shortly....

I'll declare it volatile, you are right, I missed that....

Attachments

  • Filename
    glide3x_dj205.diff
    File size
    13.46 KiB
    Downloads
    49 downloads
    File comment
    glide3x patch for dj205
    File license
    Fair use/fair dealing exception

Reply 393 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie

These glide3x libraries should work (attached).

There are 49 tests to make, but please try test00 (also just attached).
It seems to work as it produces input and output about have no device.

Edit: attached are 49 of the 50 tests (sorting out an error in one of the test's source files).

Attachments

  • Filename
    sdk_tests.7z
    File size
    600.03 KiB
    Downloads
    45 downloads
    File comment
    glide3x sdk tests (49 of 50)
    File license
    Fair use/fair dealing exception
  • Filename
    test00.7z
    File size
    74.46 KiB
    Downloads
    45 downloads
    File comment
    test00 for testing
    File license
    Fair use/fair dealing exception
  • Filename
    glide3x.7z
    File size
    138.34 KiB
    Downloads
    63 downloads
    File comment
    glide3x libs
    File license
    Fair use/fair dealing exception

Reply 394 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

It works, with it's classic ugly bilinear text filtering and all.

Has to be run in actual DOS. It hard crashed in Windows 98 as soon as it rendered the screen.

Reply 396 of 862, by ggorts_

User metadata
Rank Newbie
Rank
Newbie

SDK Test #26, attached patch to build Test26 along with a binary. It requires verification.

Attachments

  • Filename
    test-26.7z
    File size
    75.61 KiB
    Downloads
    47 downloads
    File comment
    SDK Test #26
    File license
    Fair use/fair dealing exception

Reply 397 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

Well that or clashing with 3dfx drivers actually being loaded in win32 as well. I assumed such an exotic feature as this will be a true DOS only thing if it worked at all...

Reply 398 of 862, by Maraakate

User metadata
Rank Oldbie
Rank
Oldbie

I'm actually in the middle of reading a book right now, but I intend to test all of this more thoroughly later on.

You should be able to run the tests yourself in pcem (or maybe even newer dosbox?). I don't know, but I assumed the glide3x.dxe is required in the same directory as that's where I put it just in case.