I only took a short look at your code (I didn't try to compile it), but the way you warp around the world doesn't work :
-If you say when you are > 32677, you become -32677, then the issue is that if you are in fact 32700, you will still go to -32677, which will look like it's jerking.
-You are warping the Y value, which will cause isses as the VDP2 plane will become "over" you.
-You are using stuff like : when you press right, rotation ++. The problem is that at 60 FPS it won't behave like at 30 FPS. You want to move at the same speed regardless of the framerate. Take a look at the code I gave you, use the framerate instead and multiply it with a value (slMulFX).
-You put everything in the main file. You will have issues at one point where it won't compile because you will have too much stuff in one file. I really suggest you take what I did last time an re-use that (I learned the hard way, I tried to avoid having you get in the same problems I had).
-You mix the Jo engine matrix functions with the SGL matrix functions. Be super careful : Jo Engine takes integers and multiply them by 65536.0 (toFIXED), while SGL takes in already fixed values. If you mix both, you will get issues.
-Functions like Jo_div_by_2 are OK for unsigned numbers, but not for signed numbers (it will cause issues where one direction goes faster than the other). You can either divide or, even better, multiply by 0.5 using the fixed library, like this : slMulFX(value, 32768)