Looks as if it is the same code as before, so the change I made did nothing towards fixing this bug.
Seems like the section of code from Automap that is buggy is this in particular, the code at bank 6 from lines 432 up to 625:https://github.com/ShadowOne333/The-Legend-of-Zelda-Redux/blob/master/MMC5/code/gameplay/automap.asm#L432-L625
I am still not sure how to go about fixing it, as I am not even sure what is causing the overflow for Automap to occur in the first place.
So, unfortunately, I am not sure how to go about fixing this particular bug.
This might take long to fix, that's if I do find a solution for it.
Also, not to mention the MMC1 Automap is still pending (the one that behaves the same as Snarfblam's), as the bank swapping for the MMC1 Automap to work properly with the MMC1 animation is not done.
The MMC1 version is reusing the MMC5 Automap, so that means both MMC1 and MMC5 will share the bug :/
March 15, 2021, 02:49:49 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
gave some insight on what the real issue might be to fix the MMC5 Automap bug.
Here's what he had to say about it:
"Debugger shows "Scanline: 0" , which means you're out of vblank time
So even if $0000 = DB, write goes to 20DE because of currently busy and unreliable PPU.
Code is correct, but by doing these calculations inside the NMI handler you are wasting vblank time. You need to execute this routine and write the result to a common PPU buffer while being outside of NMI, instead of writing directly to PPU inside NMI"
It seems like the culprit of the issue is the vblank being too busy, due to doing the calculations inside of the NMI handler. I am still not sure how to fix the issue yet, but at least this could help to narrow down the bug to do the solution.