Home | Forums | What's new | Resources | |
Need Some Help On An Inexplicable Issue |
kronikoverkill - May 13, 2023 |
Ponut | May 13, 2023 | |||
Oh, oh, this is simpler than I expected! Inputs are captured from the controller ports at Vblank. It is not necessarily always the case, but that's how the SMPC is usually set up. Because of that, when you hit pad A, it will be hit for the duration of that vblank. To capture and hold on the next wait, you must change the button used or change how the inputs are sampled. I also think in SBL there is a ``wait_vlank`` function. Changing the button is going to be far simpler. |
kronikoverkill | May 13, 2023 | |||||
Many thanks Ponut! Changing the button was the easy solution. But now I'm trying to figure out how to properly sample the SMPC to sample the button release. I couldn't find "wait_vblank" like function in SBL, but after reading the documentation, I would've thought SCL_DisplayFrame() was the right function to put after the first loop. But no dice. Gonna keep digging but many thanks!! |
Ponut | May 14, 2023 | |||
Trying to stop button presses from carrying over after first sampled in a frame is folley without being aware of when the inputs are sampled and being able to decouple "check if button pressed" from "sample inputs from port". I'm sure in SBL there is some way to do this, but I have a way of doing it which might be helpful to you (though I admit it's not going to solve this exact problem without modification). (you can find the respective header there too, and ofc, operate_digital_pad1 goes at vblank) |