Fix TGDSProject3D using OpenGL in real hardware

Issue #16 resolved
Coto repo owner created an issue

It’s been a year since I tried running several TGDSProject3D projects on real hardware (DS Lite), and as expected, they work properly on emulators, but on TWL Unit, they cause issues:

SnakeGL: Missing textures on TWL Unit

TGDSProject3D: Black screen, but still ARM7 core working

AquariumGL: Missing textures on TWL Unit

BatallionNDS: boots but locks up after a while (possible GX FIFO overflow error, due to either malformed or overflowed triangles/quads count.

Comments (20)

  1. Coto reporter

    culprit is an untested ndsdisplaylistutils.

    Todo:

    roll back to ndsdisplaylistutils which used to work on real hardware (September-October 2022) which was SnakeGL on NDS Lite, then re-do all commits until it’s working in TWL unit.

    Note:

    TexturedBlenderModelNDSRender also shows blackscreens on real hardware whereas on emulators they work, this means the lighting code is broken on NDS hardware as of at least September-October 2022 ndsdisplaylistutils):

    Coto88 / cgmodels / Commit 378224da11b5 — Bitbucket

  2. Coto reporter

    tests so far: Codebase pertaining to TGDS, newlib-nds and TexturedBlenderModelRender from this commit: 26 sept 2021:

    • ARM9: restore adpcm decoder to armv5te

    is broken on real hardware, so it’s 2 years of commits I have to re-do. I tried building against newer newlib-nds, TGDS but lighting code is broken.

  3. Coto reporter

    merge VideoGL 0.2 from 2021 into TGDS1.65, thus, very old but stable code base to begin integrating OpenGL + DisplayList + Lighting fixes into GX 3D hardware across TGDS Projects.
    Both Env_Mapping & TexturedBlenderModelNDSRender working properly in NTR/TWL mode along TWL hardware, including GX DisplayLists + Normals + Vertices + Light sources + Texture Coordinates: Coto88 / toolchaingenericds / Commit c5aabeaee4d5 — Bitbucket / Coto88 / cgmodels / Commit 8114ae3e5f47 — Bitbucket

  4. Coto reporter

    NDSDisplayListUtils (TGDS OpenGL driver) has been fixed on real hardware! (again). Working stable on TWL unit.

    -Fixed OpenGL (1.0) Display Lists on GX 3D hardware.
    -Fixed texture detection, any OpenGL call will correctly map 1:1 Texture offsets according to spec.
    -Remove legacy VideoGL code (non standard OpenGL spec)

    https://bitbucket.org/Coto88/toolchaingenericds/commits/a01c67ccb2427f0b03638fcb04f627276eb46ab3

    https://bitbucket.org/Coto88/cgmodels/commits/8fee6e40ae048f50c39956edcb3ea39bae52f297

    todo:

    • Port the fixes across TGDSProject3Ds.
    • TGDS-unittest no longer has the OpenGL Display List utils code, it's in cgmodels/targetClientRenderers/NintendoDS/TexturedBlenderModelNDSRender now.

  5. Log in to comment