Contributed by Yoshifanatic. This prevents song uploading from re-enabling NMI
during V-Blank by ensuring that V-Blank was not only not active, but also not
about to occur. As a side effect of doing this, the upload time does increase by
a frame for safety reasons, but it also ensures that certain sensitive
operations set up during V-Blank, such as HDMA, don't get interfered with.
Contributed by Yoshifanatic. This prevents song uploading from re-enabling NMI during V-Blank by ensuring that V-Blank was not only not active, but also not about to occur. As a side effect of doing this, the upload time does increase by a frame for safety reasons, but it also ensures that certain sensitive operations set up during V-Blank, such as HDMA, don't get interfered with.
This commit closes https://github.com/KungFuFurby/AddMusicKFF/issues/426.