Skip to content
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

Still HDMA issues with Touhou-BadApple!30FPS4ColInterlace.sfc #4

Open
TheShadowRunner opened this issue Mar 27, 2017 · 7 comments
Open

Comments

@TheShadowRunner
Copy link

TheShadowRunner commented Mar 27, 2017

Hi Peter,
I'm using your fixed player for "Touhou-BadApple!30FPS4ColInterlace" from 2 years ago (Fix HDMA Starting Mid-Screen), but still having issues.
About half the time playing the video, it starts "badly" and flashes constantly.
A reset usually fixes it, which seems to point (still) to an HDMA issue.
I'm using SD2SNES with latest fw (but the bug occurs on all firmwares I tested it on).
My SNESs are fat 1CHIP-1/3 (JPN 60Hz).
Ikari recently posted a new player which fixes HDMA issues completely, sadly it doesn't work with your video at all (completely scrambled).
Is a fix possible?

@mrehkopf
Copy link

mrehkopf commented Mar 28, 2017

Well the player is completely different. Remember MSU1 has no video extension but a data streaming extension - how the data is composed is completely up to the software that processes it. ;)

As far as I can see the player uses ch.0 for GPDMA (image data), ch.1 for GPDMA (palette) and ch.2 for HDMA (target: forced blanking).
I may still be on the wrong track about this but I "recently" figured out a strange quirk with SNES DMA that only affects HDMA going to B-Bus address $00 (hence, $2100 -> forced blanking).
I took somewhat confusing notes while fiddling:

MDMA seems to fail after HDMA of the adjacent higher channel (e.g. MDMA ch.0 / HDMA ch.1)
completes on the previous scanline IF the HDMA copy starts less than ~1.6us after the previous
HBlank signal goes high, and ONLY IF HDMA target is B Bus address $00.
Forced blanking (dest $00) seems to be involved particularly! (HBlank vs Force Blank?!)

Changing the target address of the HDMA channel from $00 to anything else fixed the issue completely and permanently. Tough luck if you want to use HDMA for blanking.
However, another fix is to put an unused channel (or another HDMA channel) inbetween, e.g. moving blanking from ch.2 to ch.3 or higher should do the trick.

...and, of course, this might not even be the issue here.

@PeterLemon
Copy link
Owner

Thanks TheShadowRunner for trying out my SNES MSU interlaced video player, I have always wanted to know what was up with that!
I always thought it was a prob with SD2SNES firmware, not behaving exactly like a reset SNES, when booting my rom, hence needing to reset if it starts buggy...
I will experiment with the help from mrehkopf, to see if I can make this more stable, by moving the blanking HDMA channel from ch.2 to ch.3.
I will update you guys here when I have tested this out, thanks so much mrehkopf for your help with this =D

@mrehkopf
Copy link

mrehkopf commented Apr 4, 2017

I have fiddled around a bit myself to no avail... It seems in this case it misses the blanking HDMA and the screen remains blanked for a complete frame sometimes. Doesn't make an awful lot of sense to me.
What did help was to increase the blanking by a number of scanlines but even then it would (very rarely) flicker.
I didn't try moving the GPDMA channel above the HDMA channels yet...

@PeterLemon
Copy link
Owner

Hi mrehkopf,
Thanks for your testing, & responses.
It does seem to be a very strange problem, I am in contact with ikari who makes the SD2SNES firmware, & we have noticed this problem lots lol
I'll see what I can do... In the meantime if you manage to fix it, please tell me how you did it =D

@TheShadowRunner
Copy link
Author

Thank you guys for trying to tackle this one!
Peter, mrehkopf is the legendary Ikari ;))

@mrehkopf
Copy link

mrehkopf commented Apr 4, 2017

That is correct ;)

@PeterLemon
Copy link
Owner

lol I am so dumb, I should have known mrehkopf is Ikari!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants