Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Laaca(R)

Homepage

Czech republic,
08.10.2016, 14:50
 

Minimal 3DFX program via Glide3x.DXE library (Developers)

Thanks to Sezero, Neozeed and Maraakate we have now the possibility to use the 3DFX acceleration in DJGPP environment. We only need some tutorials how to work with it.
The other thing I want to mention is the fact that .DXE files can be loaded not only in DJGPP but also in Freebasic (it is simplier because it uses C library) and in Freepascal (it is maybe more difficult as it does not use the C library).
If we would have a minimal example how to use th GLide3.DXE we could try to make a Freebasic or Freepascal wrapper.
(maybe Marcov could help?)

---
DOS-u-akbar!

marcov(R)

10.10.2016, 20:51

@ Laaca

Minimal 3DFX program via Glide3x.DXE library

> (maybe Marcov could help?)

DXE is quite a while ago for me. The only thing I could quickly find is www.stack.nl/~marcov/dxe.zip and considering the dates in that archive it's quite old.

RayeR(R)

Homepage

CZ,
10.10.2016, 22:28

@ Laaca

Minimal 3DFX program via Glide3x.DXE library

I think it would be better to interface with Mesa 3D library and let user choose 3dfx accelerated driver or software renderer instad of direct messing with 3dfx driver. Loading a DXE and calling some function from a C code is not complicated, there are some examples.

---
DOS gives me freedom to unlimited HW access.

marcov(R)

11.10.2016, 21:27

@ marcov

Minimal 3DFX program via Glide3x.DXE library

> DXE is quite a while ago for me. The only thing I could quickly find is
> www.stack.nl/~marcov/dxe.zip and considering the dates in that archive it's
> quite old.

A day more to ponder about it, and I seem to recall there are multiple versions of DXE, iow not all DXE is the same.

The above is probably for DXE1, the .dxe of djgpp in that times, while more modern GCC djgpp's use newer versions (called DXE2, but maybe even there was more progress after that).

RayeR(R)

Homepage

CZ,
12.10.2016, 21:19

@ marcov

Minimal 3DFX program via Glide3x.DXE library

> The above is probably for DXE1, the .dxe of djgpp in that times, while more
> modern GCC djgpp's use newer versions (called DXE2, but maybe even there
> was more progress after that).

Yes, I think current is DXE3.

---
DOS gives me freedom to unlimited HW access.

Laaca(R)

Homepage

Czech republic,
13.10.2016, 20:58

@ RayeR

Minimal 3DFX program via Glide3x.DXE library

> I think it would be better to interface with Mesa 3D library and let user
> choose 3dfx accelerated driver or software renderer instad of direct
> messing with 3dfx driver. Loading a DXE and calling some function from a C
> code is not complicated, there are some examples.


Interfacing with Mesa3D library would assume a programming in DJGPP or calling .A library from f.e. Freepascal.
Calling a DJGPP .A libraries is possible but not trivial, especially when it is a huge library like Mesa3D cetainly is.

---
DOS-u-akbar!

Laaca(R)

Homepage

Czech republic,
13.10.2016, 21:06

@ marcov

Minimal 3DFX program via Glide3x.DXE library

All sources about DXE files in Freepascal I have suffer by problem that they can't use external units.
I have never seen in DXE module something like "uses Dos" or "uses Graph".
It seems that even functions from unit Systém don't work.

The only way is the use of procedural variables.

In DXE:
var my_getmem_proc = procedure (p:pointer;size:longint);
...
my_getmem_proc(buffer,65536);


-----------------------------------------------------------------------

in main source:
my_getmem_proc:=@GetMem;


I don't know how to do it in other way.

---
DOS-u-akbar!

marcov(R)

14.10.2016, 11:19

@ Laaca

Minimal 3DFX program via Glide3x.DXE library

> All sources about DXE files in Freepascal I have suffer by problem that
> they can't use external units.
> I have never seen in DXE module something like "uses Dos" or "uses Graph".
> It seems that even functions from unit Systém don't work.
>

That is true. Stronger even, even for other OSes this is something that is currently still being worked on in trunk, called "packages", both when dynamically loaded, or dynamically linked (but need to be there on startup)

IOW making sure that there is only one instance of compiletime (VMTs) or runtime state (variables) in a EXE + dll/so/dxe system, and everything under control of the compiler, iow so that all versions match and are recompiled if necessary. (not just blindly linking some symbol without knowing what it is)

I don't know what (current) DXE's possibilities in that regard are, iow can the DXE reference symbols in the main EXE ?

RayeR(R)

Homepage

CZ,
14.10.2016, 20:21

@ Laaca

Minimal 3DFX program via Glide3x.DXE library

> Calling a DJGPP .A libraries is possible but not trivial, especially when
> it is a huge library like Mesa3D cetainly is.

Aha, I didn't know how FP can use .A libs, I though it use same linker as DJGPP. But it may use a different stack calling convention than C functions uses...

---
DOS gives me freedom to unlimited HW access.

marcov(R)

14.10.2016, 23:28

@ RayeR

Minimal 3DFX program via Glide3x.DXE library

> > Calling a DJGPP .A libraries is possible but not trivial, especially
> when
> > it is a huge library like Mesa3D cetainly is.
>
> Aha, I didn't know how FP can use .A libs, I though it use same linker as
> DJGPP. But it may use a different stack calling convention than C functions
> uses...

The problem is not the calling convention, but decrypting the .h header into something understandable.

It is really sad that .idl or some other parsable general header format never caught on.....

Laaca(R)

Homepage

Czech republic,
16.10.2016, 00:24

@ marcov

Minimal 3DFX program via Glide3x.DXE library

The most advanced use of DXE libraries in Freepascal I found is used in KVision package: http://laaca.sweb.cz/kvision.zip

---
DOS-u-akbar!

Back to the board
Thread view  Mix view  Order
15113 Postings in 1359 Threads, 249 registered users, 16 users online (0 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum