goa / w3d on radeon cards
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12079 from 2003/5/22
    From: Germany
    > Have you tried this?
    > http://mos.aminet.net/package/game/patch/WipeoutLoader

    He mentioned "WipeoutLoader usage" in posting #20.
  • »26.11.13 - 16:54
    Profile
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 91 from 2007/7/25
    From: Krakow, Poland
    @Alain Thellier


    Check scenedemos by Encore,that both productions require Warp3D

    Sulaco
    By Night

    MorphOS.pl
    PowerBook G4 1.67GHz|2GB DDR2|ATI Radeon 9700M 128MB|SSD 80GB|TFT 17"|MorphOS 3.1x
    Core i7 Notebook|WinUAE 3.x/AmigaOS4.1x & Icaros Desktop 2.x & QEmu 6.x.x
  • »26.11.13 - 20:41
    Profile
  • MorphOS Developer
    kiero
    Posts: 129 from 2003/2/28
    Oh, one more thing. Are You using immediate mode or vertex arrays?

    kiero
  • »26.11.13 - 23:02
    Profile Visit Website
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    Hello

    @waldiamiga
    Ok will test those demos

    @Intuition
    I have used the patch but perhaps it dont works with the demo WipeOut_2097_Demo
    This demo works some time on os4/wazp3D but finally crash due to the memory hit bug

    @kiero
    I am using only glDrawArrays for all drawings (see below)
    Now Wazp3D convert all primitives (like say a W3D_DrawTriFan) to triangles/points/lines list so now only the "newdraw" code is still present

    /*==================================================================*/
    void HARD3D_DrawPrimitive(void *hc,void *p,unsigned long Pnb,unsigned long primitive)
    {
    struct point3D *P=p;
    struct HARD3D_context *HC=hc;
    unsigned char UsePersp =(HC->state->PerspMode!=0);
    struct TexCoord4f *V=(void*)HC->V;
    unsigned int mode;
    long int n;

    HFUNC(HARD3D_DrawPrimitive);
    OS_CurrentContext(hc);
    VAR(P)
    VAR(Pnb)

    if(Pnb>MAXPRIM)
    return;

    if(UsePersp)
    {
    NLOOP(Pnb)
    {

    V[n].s=P[n].w*P[n].u ;
    V[n].t=P[n].w*P[n].v ;
    V[n].r=0.0;
    V[n].q=P[n].w;
    if(1.0 if(P[n].z<0.0) P[n].z=0.0;
    }
    glTexCoordPointer(4, GL_FLOAT, 4*4,HC->V);
    }
    else
    {
    NLOOP(Pnb)
    {
    if(1.0 if(P[n].z<0.0) P[n].z=0.0;
    }
    glTexCoordPointer(2, GL_FLOAT,PSIZE,(void *)&(P->u));
    }

    NLOOP(Pnb)
    PrintP(&P[n]);

    if(primitive==W3D_PRIMITIVE_POINTS) {primitive=GL_POINTS; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_LINESTRIP) {primitive=GL_LINE_STRIP; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_LINELOOP) {primitive=GL_LINE_LOOP; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_LINES) {primitive=GL_LINES; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_TRISTRIP) {primitive=GL_TRIANGLE_STRIP; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_TRIFAN) {primitive=GL_TRIANGLE_FAN; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_TRIANGLES) {primitive=GL_TRIANGLES; goto newdraw;}
    if(primitive==W3D_PRIMITIVE_POLYGON) {primitive=GL_POLYGON; goto newdraw;}


    newdraw:
    REM(newdraw)
    VAR(primitive)

    if(currentP!=P)
    {
    REM(P changed)
    currentP=P;
    glVertexPointer(3, GL_FLOAT, PSIZE,(void *)&(P->x));
    glEnableClientState(GL_VERTEX_ARRAY);
    glColorPointer(4,GL_UNSIGNED_BYTE,PSIZE,(void *)&(P->RGBA));
    glEnableClientState(GL_COLOR_ARRAY);
    }

    glDrawArrays(primitive,0,Pnb);
    return;
    }
  • »27.11.13 - 09:08
    Profile Visit Website
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    @kiero

    Also I tried to draw the primitive this (old & slow) way

    glBegin(primitive);
    NLOOP(Pnb)
    {
    glVertex3f(P[n].x,P[n].y,P[n].z);

    if(UsePersp)
    glTexCoord4f(P[n].u,P[n].v,0.0,P[n].w);
    else
    glTexCoord2f(P[n].u,P[n].v);

    if(UseColors)
    glColor4f((float)P[n].RGBA[0]/255.0,(float)P[n].RGBA[1]/255.0,(float)P[n].RGBA[2]/255.0,(float)P[n].RGBA[3]/255.0);
    else
    glColor4f( (float)HC->state->CurrentRGBA[0]/255.0,(float)HC->state->CurrentRGBA[1]/255.0,(float)HC->state->CurrentRGBA[2]/255.0,(float)HC->state->CurrentRGBA[3]/255.0);

    }
    glEnd();

    But glTexCoord4f() dont seems to exist in TinyGL as the compiler said :-/

    @waldiamiga
    I have tested the 2 demos : after starting (window/screen mode ?) they just freeze : do they need some dependancies ? (I am using a basic install from morphos cd)

    Alain
  • »28.11.13 - 08:34
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1110 from 2013/5/24
    From: Nederland
    @Alain

    I could send you an iso image of the full game if you like?

    I gave the original CD to Karlos to help him test his BVision driver for OS4 but I'm sure he won't mind making you an iso if I ask him.

    [ Edited by Intuition 28.11.2013 - 13:10 ]
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »28.11.13 - 14:08
    Profile
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    @Intuition

    Thanks Would be great to have WipeOut to test as it is certainly the most wanted war/zp3d game

    Alain
  • »29.11.13 - 17:30
    Profile Visit Website
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    The Wipeout2097 demo works very fine on MorphOS. I just tried it a few minutes ago on my Pegasos2.
    AFAIR the demo has no "memory hit bug" and does not require a special loader. The illegal chip memory access is only a feature of the full game. So no need to pirate it...
  • »01.12.13 - 23:25
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cego
    Posts: 712 from 2006/5/28
    From: Germany
    so any update on this?
    Pegasos II G4 @1.0GHz, 1GB DDR Ram, Radeon 9200Pro, 240GB SSD+160GB HD, MorphOS 3.18, AmigaOS4.1 FE, Debian 8
  • »21.12.13 - 11:44
    Profile
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    >so any update on this?

    Not much :-/
    I have succeeded to make works the screenmode-requester in Wazp3D but the other problems remains (see below)
    As I have no ideas how to fix that I will release Wazp3D55 as it is (including Morphos version)
    Just give me some days to clean up the code

    I know that I promised Wazp3D for Christmas but I wanted to test it with latest Morphos3.4 : it is faster now but problems remains

    Alain Thellier

    From ReadMe:
    -------------------------------------------------------------------------------------------------------
    Beta 55
    o Bug fix about coloring (recent bug in GleXcess scene 4 )
    o OS4: Now Crisot demo "Universe#3 TheTrip" works (but without the bump-mapping effect of course)
    o Morphos: First Wazp3D for Morphos : GleXcess,Blitzquake,TheVague1,TheVague2,Cow3D,Microbe3D-demo,Nukleus-CowsNBubblesFeatVs4 demo works
    This version have software rendering and "renderer:hard" that use hardware TinyGL giving fast performances.
    W3D_MODULATE (texture coloring) dont works
    Perspective-texturing dont works because TinyGL dont know glTexCoordPointer(4,...)
    Lots of 3D progs dont works (cause unknown)
    Note: On Morphos OS4emu dont seems to emulate the Warp3D v5 functions so only old Warp3D progs may works (so Crisot demo draw nothing)
    -------------------------------------------------------------------------------------------------------
  • »27.12.13 - 10:08
    Profile Visit Website
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    Hello & Happy New Year 2014

    Wazp3D for Morphos is NOW on Aminet
    It use TinGL as hardware renderer so people without Goa3D drivers will benefit from it
    Certainly you will be disapointed as there are not much progs that works with it :-/
    And there are lesser progs that run 100% perfect :-(

    One of the major issue is the perspective-texturing that dont works because TinyGL dont support glTexCoordPointer(4,...);

    Alain Thellier - Wazp3D
    http://thellier.free.fr/Wazp3D.htm
  • »02.01.14 - 09:18
    Profile Visit Website
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 91 from 2007/7/25
    From: Krakow, Poland
    Quote:

    thellier wrote:
    Hello & Happy New Year 2014

    Wazp3D for Morphos is NOW on Aminet



    Yeahh, great. Happy New Year thellier.

    MorphOS.pl
    PowerBook G4 1.67GHz|2GB DDR2|ATI Radeon 9700M 128MB|SSD 80GB|TFT 17"|MorphOS 3.1x
    Core i7 Notebook|WinUAE 3.x/AmigaOS4.1x & Icaros Desktop 2.x & QEmu 6.x.x
  • »02.01.14 - 17:46
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Jambalah
    Posts: 820 from 2008/3/30
    From: Roma, Italy
    Hi Thellier and thanks for your work!
    A question: I run the Wazp3D config program, doing some settngs and close the window. Nothing is saved in Envarc and nothing could be loaded from there. So when I try WipeOut, for example, a window appears with a "Loading Wazp3D.cfg" message but nothing more happens. Is it a normal beta behaviour? Thanks!
    Pegasos II 1 ghz
    Powermac G4 Quicksilver with Sonnet Encore 1.8 ghz
    Powermac G4 MDD single 1.25 ghz, silenced for ears health...
    Powermac G5 dual 2.7 ghz I'll be back...
    Powermac G5 dual 2.0 ghz
    Powerbook G4 1.67 ghz 17
  • »03.01.14 - 18:18
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1110 from 2013/5/24
    From: Nederland
    Thanks Alain!
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »03.01.14 - 19:01
    Profile
  • Caterpillar
    Caterpillar
    Posts: 33 from 2013/6/20
    @Intuition

    wipeout dont works = i dont know why as it works with wazp3d/os4

    wazp3d-prefs change the parameters INSIDE the wazp3d library
    then when the prog end (ie w3d_destroycontext) then a wazp3d.cfg file is saved
    that will be used next run

    this way of working ensure to never save a crashing config

    Alain
  • »04.01.14 - 07:30
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Jambalah
    Posts: 820 from 2008/3/30
    From: Roma, Italy
    Thanks for answer Alain!
    The real problem is not WipeOut is that Wazp3d.prefs doesn't save any configuration file and so it won't load anything at start. And so will do the library. The only way I managed to save a config file was to launch prefs, run the cow demo and when I stopped demo it saves a configuration file (!!) which I put in Envarc:
    Pegasos II 1 ghz
    Powermac G4 Quicksilver with Sonnet Encore 1.8 ghz
    Powermac G4 MDD single 1.25 ghz, silenced for ears health...
    Powermac G5 dual 2.7 ghz I'll be back...
    Powermac G5 dual 2.0 ghz
    Powerbook G4 1.67 ghz 17
  • »04.01.14 - 10:10
    Profile
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    thellier,
    Quote:

    wipeout dont works = i dont know why as it works with wazp3d/os4

    As I told you on meta-morphos forum, warpup libs are no usual libs. You can not simply rename an amigaos/morphos lib to make a warpup one... The whole ABI is different, amongst other things. I guess all this must be explained somewhere in the old warpup docs from the 90'... The poweropen and systemv ABIs were even documented in the old morphos sdk for more than 10 years (and google knows about them anyway, as they are not some amiga creation)...

    As to why it works on hyperos... I imagine you also didn't write a proper warpup lib there... so I expect its powerpc.library has some kind of hardcoded warp3dppc.llibrary -> warp3d.library wrapper doing all the hard work for you. You tell me :)


    [ Edited by Henes 05.01.2014 - 00:37 ]
  • »05.01.14 - 00:35
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    So warpup programs can't use ABox API MorphOS libraries? Is the stock warp3dppc.library a warpup binary? I'm not having a go, but I couldn't tell, because the official libraries are encrypted.
    This is just like television, only you can see much further.
  • »05.01.14 - 13:19
    Profile Visit Website
  • MorphOS Developer
    zukow
    Posts: 642 from 2005/2/9
    From: Poland
    @BSzili

    Morphos 1.4.5 binaries aren't encrypted.
  • »05.01.14 - 13:35
    Profile Visit Website
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    Quote:

    BSzili wrote:
    So warpup programs can't use ABox API MorphOS libraries?


    They can and they all (directly or indirectly) do.

    Quote:


    Is the stock warp3dppc.library a warpup binary?


    It is a morphos native binary... respecting warpup abi and api.
    Same for powerpc.library and itix's rtgmaster.library (and I just noticed this one is opensource so it could really help wazp3d if alain can't search/read/understand warpup docs himself).
  • »05.01.14 - 13:50
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    @zukow
    Thanks for the tip. I grabbed the 1.4.5 ISO, and the warp3dppc.library is a "normal" MorphOS library there. I must have misunderstood something.

    @Henes
    I get it now, I'll dig into wup.c/wup.h.
    http://aminet.net/package/driver/video/rtgmaster_mos

    [ Edited by BSzili 05.01.2014 - 14:10 ]
    This is just like television, only you can see much further.
  • »05.01.14 - 13:50
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    WarpUp libraries are built like any native MorphOS library but must use function prologue and epilogue to switch r2 and ctr in PPC calls.
    1 + 1 = 3 with very large values of 1
  • »05.01.14 - 14:12
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    @itix
    I created the glue functions using your macros:
    Code:
    #define	RC_START(x)	ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; x rc; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define RC_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2; return rc;
    #define NR_START ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define NR_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2;

    The problem is that struct ETask no longer seem to have an EmulHandle field, so this doesn't compile with the latest SDK. Has the EmulHandle field in ETask became private?
    This is just like television, only you can see much further.
  • »09.01.14 - 10:36
    Profile Visit Website
  • MorphOS Developer
    Piru
    Posts: 576 from 2003/2/24
    From: finland, the l...
    Quote:

    BSzili wrote:
    @itix
    I created the glue functions using your macros:
    Code:
    #define	RC_START(x)	ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; x rc; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define RC_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2; return rc;
    #define NR_START ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define NR_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2;

    The problem is that struct ETask no longer seem to have an EmulHandle field, so this doesn't compile with the latest SDK. Has the EmulHandle field in ETask became private?


    It indeed is private. I think new code was supposed to use NewGetTaskAttrs() and NewSetTaskAttrs() with TASKINFOTYPE_EMULHANDLE. However after some checking it seems that NewGetTaskAttrs TASKINFOTYPE_EMULHANDLE doesn't always return the raw tc_ETask->EmulHandle value and thus it likely cannot be used as a direct replacement here.

    Anyway, this somewhat hackish solution should work:

    Code:

    #pragma pack(2)
    struct HackETask
    {
    UBYTE stuffbefore[130];
    struct EmulHandle *EmulHandle;
    };
    #pragma pack()
    #define TASKEMULHANDLE ((struct HackETask *)SysBase->ThisTask->tc_ETask)->EmulHandle


    Then use TASKEMULHANDLE instead of SysBase->ThisTask->tc_ETask->EmulHandle.

    [ Edited by Piru 09.01.2014 - 15:36 ]
  • »09.01.14 - 13:11
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    Thanks, for the time being I'll probably go with your workaround. Doing 3 New*TaskAttr() calls per function might add too much overhead. Then again, maybe it doesn't make much difference, we'll see when Wipeout 2097 is up and running with Wazp3D.
    This is just like television, only you can see much further.
  • »09.01.14 - 14:02
    Profile Visit Website