8 frames saved in Stage 8, Stage select in 15841.
While resyncing, please try to avoid as many item drops as possible until you kill the minibosses. This will improve entertain quality by allowing to hear better the original music stages.
Oh and we also need to save as many lag frames as possible, so don't get haste with these and ask help you get stuck (actually, until now I was the one who got help with many lag frames btw...)
Edit: Stage 7 resynced, Stage select in 23174.
I took some time for improving entertaining: no drop pickups before miniboss, killed as many enemies as possible after.
Oh and I also noticed that the Stage Select inputs were 1 frame later. Apparently, 1 lag frame was saved somewhere, uhm...
Edit 2: I've made jet more entertaining improvements to Stage 7, and now I'm working to resync Stage 1. Fixing the ammo refills before and after miniboss is taking a while, but nothing that I can't take care of.
What is making me stuck, is a research about Spikeball swapping. I'm wondering if the sparkles made by the bouncing Spikeball can be turned into Murder Barriers, because that would save 2 lag frames. Shot Counter glitch allowed me to turn them into 0-damage stationary bullets, but I'm still not sure if it could be possible to obtain actual Murder Barriers by adjusting weapon swaps order and timing. It would be simple if only there was a quick way to see if a bullet is a Murder Barrier, but after some searches, I've noted that it couldn't be determined from the
object data addresses of the bullets. Still, I've noticed that if freeze field_1C before swapping, the barrier's appearance will remain normal (except the palette). This value keeps increasing by 1 every frame. All other object addresses don't affect the murderability, despite when or how I freeze them. There must be other sections of memory telling more about the bullets.
Edit 3: News time. First, I found that Murder Barrier can't be triggered by Spikeball swapping. Second, I encountered a lag frame after killing Stage 1 Miniboss, and after some researches with FatRatKnight, we found that this was caused by memory leaks in the allocation of sprites for bullets.
FatRatKnight implemented an allocated memory viewer in
Team 4's script, then I've picked the code and rewritten an
ultra-light version for bad PCs as mine.
The interesting thing I found is that the lag frame wasn't caused by the huge amount of allocated memory, but rather by the amount of allocated chuncks of memory. See the image below:
These are two screenshots showing the current script by FatRatKnight in action. The only difference is the allocated memory, as you can note if you look in the upper left of both screenshots. The lag frame does appear only in one of these two situation... Guess which? Wrong! The lag frame occurs in the first case. When the miniboss sprite is loaded, the memory is allocated in every black zones, resulting in more chuncks of memory. When the miniboss gets defeated, the game does free the memory without wiping off the red zones. In the first case, there will result 4 chunks of memory to wipe, in second case only 3. So, despite having more memory allocated in the second case, the lag frame does not occur.
This information could allow to save some lag frames later in succesive stages.
Edit 4: Stage 1 resynced, Stage select in 29649. The new script helped, but in the end it still was a struggle with lots of trial and error. Two days of work just to avoid getting hit once in the boss fight... But I still need to add more swagstic to the boss fight movements. Any help is welcomed.