New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D rendering bug in Pokémon - Mystery Dungeon - Explorers of Sky (also present in no$gba, formerly present in desmume) #299

Closed
wyatt8740 opened this Issue Dec 13, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@wyatt8740
Copy link

wyatt8740 commented Dec 13, 2018

Hi. I reported a bug in Desmume a while back on IRC where this particular scene in Pokémon: Mystery Dungeon: Explorers of Sky would render improperly. I just tested it today, and it also impacts your emulator, as well as No$GBA. Here's what it looks like:
2dbug-melonds

My guess is this is impacting all of your emulators because all of them use gbatek as a reference. I think this is because the section titled 'Semi-Transparent OBJs' is inaccurate, but I am not an expert on the DS GPU so take that with a grain of salt.

Here's a save file from immediately before it happens, in raw (.sav) format:
PMD-sky-2dbug.sav.zip

Here's the bug report from DeSmuMe:
TASVideos/desmume#92
Where Zeromus took a picture of the scene on a fat DS:
Zeromus' picture of a real DS

And a description of how they think the bug worked:
TASVideos/desmume#92 (comment)

And the commit that fixed it (see line 2011):
TASVideos/desmume@48f0f69

@StapleButter

This comment has been minimized.

Copy link
Owner

StapleButter commented Dec 13, 2018

this is interesting.

I have a quick idea how to fix this (basically swapping around some if statements in the special effect code), but I'd like to test this against hardware before (if semi-transparent OBJs have priority over the window color-effect flags, does that also apply to 3D-layer blending?)

@StapleButter

This comment has been minimized.

Copy link
Owner

StapleButter commented Dec 13, 2018

'd like to say, thanks for all the notes on this, btw

@wyatt8740

This comment has been minimized.

Copy link

wyatt8740 commented Dec 14, 2018

Not a problem. Were they helpful and relatively accurate?
I'm sort of at that stage where I feel like I essentially understand at some abstract level what the hardware does, but at which I still get bogged down by implementation details.

Also, if you have any way to contact Martin Korth, my email must not have reached him because it's still present in No$GBA 2.9. So if you know how to contact him, would you let him know about this?

@StapleButter

This comment has been minimized.

Copy link
Owner

StapleButter commented Dec 14, 2018

yeah, it was! saved a whole lotta time there. otherwise I'd have had to go down the standard path of examining what is displayed, the modes/blending/window/etc and why it's not rendering properly, etc

also, nope, don't know how to contact Martin :/

I know one of my fixes somehow made it to him tho (the bit where 3D matrix push/pop/store/restore in mode1 works same as in mode2), but dunno how. and this is another thing that was independently figured out and fixed in DeSmuME ages ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment