FreeMovementControlProc is not being properly initialized.
Because procs are placed in memory dynamically, there is no guarantee that the proc previously occupying the same space didn’t leave behind data. in pFMU_OnInit, it is assumed that FMUnit is initialized to 0. If a proc has previously placed a value here, then the unit pointer used ends up being junk data:
pFMU_InitTimer seems to run when changing units, meaning the currently controlled unit can’t change beyond the first in the unit array. Instead I initialized proc->FMUnit to 0 in a new function in the first block of the proc code. So far so good.
Really thought I was going mad with this one. The blue menu background is drawn on BG1.
The tiles are in VRAM.
Priority-wise it made sense, BG1 should be drawn over BG3.
Window0 was enabled, but disabling it still didn’t get BG1 to show.
No HBlankHandlers are active, LCDIOBuffer should reflect memory block 4 exactly.
Everything adds up, why doesn’t BG1 show!?
Turns out BG1 was blending with BG3, so much so that BG1 was invisible. Suddenly feel nostalgic; Somehow I always overlook blending as an option when it comes to these display errors. Anywho, the issue can be solved by clearing windows and blend/BLDY effects before starting the menu.