revision 2023.11.24 for EmuHawk ≥ 2.9.2
While this script is running, you'll be able to use the left analog stick on your gamepad to more precisely control Yoshi and the plumbers, similar to the original SM64. It also lets you control the camera with either the bumpers or the right analog stick. As a bonus, you can exit course without a mouse since it's in the same spot as the camera controls.
At time of writing, the default binds have the DPad bound to the left stick and L/R bound to the bumpers—you'll need to rebind those to the DPad and triggers. And make sure your controls are set to the default 'Standard Mode' in the pause menu. You don't need to unbind X or Y, though you are free to rearrange the face buttons.
Prior art: https://github.com/pants64DS/ToxInput