NDS 2D rendering issue - gbatek mistake?

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
User avatar
wyatt8740
Posts: 89
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)
Contact:

NDS 2D rendering issue - gbatek mistake?

Post by wyatt8740 »

Hi, glad to see the forum is up again.

I wanted to mention this here, primarily because I know nocash/Martin checks this forum, and I have had little luck contacting him directly.

No$GBA - and until i reported it in 2018, also MelonDS (bug) and Desmume (bug) - feature a 2D rendering bug that seems to have been overlooked for a long time. It appears, based on my understanding, that this is actually due to an error in the gbatek document in the section "Semi-Transparent OBJ's." I am not sure I am "parsing" the document correctly, but in any case the exact bug is documented rather thoroughly in the bug reports themselves, and I suspect gbatek has a flaw because every major DS emulator seemed to exhibit the same behavior.

In Desmume, this was the description of what triggered the bug:
zeromus wrote:in short the problem here was: the scene enabled color effects on a OBJ window (gleam on water), and also used a transparent sprite outside that window (black sprite with sun on it), and the window was mistakenly interpreted to exclude the transparent sprite from blending with the forced blending system.

the fix: remove test of enableColorEffect from line 2011 of gpu.cpp
Zeromus' explanation
Arisotura's MelonDS patch
Zeromus' Desmume patch (line 2011 - this patch is messy because they also did refactoring in the same diff).

In No$GBA (this occurs on real Windows, as well as in Wine):
Image
Versus on a real DS:
Image

There's a save file you can use to make this issue appear, almost immediately after the save point (just a few A presses), if you have a copy of Explorers of Sky handy.
No matter what year it is, 1980 was about 20 years ago, and you can't change my mind.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: NDS 2D rendering issue - gbatek mistake?

Post by tepples »

Martin hasn't posted since July 7, and I suspect that the server's incompatibility with TLS versions prior to 1.2 (see Qualys SSL Labs test result) combined with the lack of TLS 1.2 clients for Windows 98 is to blame. I emailed him about it 5 weeks ago and he hasn't replied.
Post Reply