Fix TWL touchscreen

Issue #13 resolved
Coto repo owner created an issue

As various users have reported, TGDS touchscreen is broken in real hardware in TWL mode.

NTR TSC works fine.

There seems to be 2 issues happening at the same time:

  • TWL mode touchscreen code is broken, as in reading pixel touchscreen coordinates in TWL mode

  • NTR API used in WoopsiSDK and SnemulDS, relies on a wrapper that translates TWL into NTR TSC bits

The first one takes priority

Comments (6)

  1. Coto reporter
    • Oct 5 2023: could reproduce the error in MelonDS (TWL mode) along no$gba.
    • Oct 8 2023 fixed it, but TWL mode require extensive testing, as soon as this is done, this issue will be resolved and changes will be upstream across all TGDS projects

  2. Coto reporter

    when moving from newlib-nds Windows to Linux a few days ago, new bugs emerged (as in correctly showing up), for instance not specifying proper ARM core flags, correctly emits wrong ARM code, and breaks things across ARM7 TWL libraries, like ToolchainGenericDS Filesystem API. This didn’t happen before, so the bug was hidden.

    touchscreen fixed!

    -Update TWL mode touchscreen code, ARM9: sync init to hardware depending on ARM7 state (4)

    -Update NTR API used in WoopsiSDK and SnemulDS, update TWL -> NTR TSC layer. Fixes touchscreen in WoopsiSDK

    -Layout base for upcoming VRAM ARM7 core

    -Update and cleanup TGDS-multiboot. NTR / TWL mode stable

    1)

    Superseded commits.

    -

    2)

    Coto88 / newlib-nds / Commit 7129072fc483 — Bitbucket

    Coto88 / toolchaingenericds / Commit 8d71fbdf3ffd — Bitbucket

    Coto88 / batallionnds / Commit 4f0a29180027 — Bitbucket

    Coto88 / toolchaingenericds-multiboot / Commit 612c6482d1d3 — Bitbucket

    Coto88 / snemulds / Commit 1eb23f546fc2 — Bitbucket

    Coto88 / toolchaingenericds-multimediaplayer / Commit 3723bf4806a0 — Bitbucket

    These commits are known to be stable, and will be merged into all TGDS Projects in the meantime and will most likely fix TGDS TWL touchscreen issues.

    -

    2.a)

    Coto88 / toolchaingenericds / Commit 07a06687a776 — Bitbucket

    Coto88 / snemulds / Commit e77a2569538f — Bitbucket

    -

    TWL unit arrived.

    Touchscreen & TWL compatibility issues will be resolved in the upcoming days.

  3. Coto reporter

    These bugs are required to be fixed before we can continue on this specific issue:

    Coto88 / ToolchainGenericDS / issues / #14 - Fix some issues in TGDS TWL mode on real hardware (2023) — Bitbucket

    done.

    -

    Todo: merge all previous commits into hardware stable branch (TGDS1.65)

    https://bitbucket.org/Coto88/toolchaingenericds-filedownload/commits/89031c99c85a313854f9097a63f3b2c22505ebfe

    Coto88 / snakegl / Commit 6c0651fc042b — Bitbucket

    done.

    -

    Todo: Reuse ARM7 VRAM code so it reloads ARM7 TGDS TWL binary from 0x02380000 in current SnemulDS branch. Last time I tried (from different commits), it booted everywhere except real hardware. Reference: Coto88 / ToolchainGenericDS / issues / #12 - implement TGDS ARM7 VRAM core — Bitbucket

    done.

    -

    update TGDS-mb to commit:
    https://bitbucket.org/Coto88/toolchaingenericds-multiboot/commits/298c7717447ecde2fd4079b01274e73d26e9c7b3

    -

    -Fixed a nasty bug where TGDS FS would be compiled and linked twice. Now it's compiled as standalone library, and linked once.
    -Fixed most TGDS compiler warnings, should fix random issues when linking to TGDS Projects

    -

    TWL:
    TGDS projects now reload its TWL ARM7 payload from 0x02800000

    -

    SnemulDS TWL now resembles 1:1 behavior tests and it's updated on TWL hardware, booting with the known Touchscreen problem.

    Coto88 / snemulds / Commit 8e314fae777f — Bitbucket

  4. Coto reporter

    -Restore SnemulDS TWL game compatibility to be the same as SnemulDS NTR mode. Fixes games like Donkey Kong Country 2 & 3 booting in TWL units.

    -Fixed touchscreen on TWL hardware + SnemulDS TWL!

    Note: It was a multiple level issue, but it was finally reduced to EWRAM extended from 4MB to 16M and overlapping pixel coordinates. This means for the time being rom hacks like Megaman X3 Zero Project won't run for the time being. But hey.

    https://bitbucket.org/Coto88/snemulds/commits/49778be2dc80b71e9f45f466e02b0acb55987c36

  5. Log in to comment