I downloaded the demo.
You've got a few problems in this code, mainly too many callbacks. Way too many. You should be program-controlling whether or not things run inside a "game_loop" function. You shouldn't need more than 1 callback for the game, and 1 for the video. The bad pointer is because you are working with too many callbacks, and removing some of them. I don't want to be too harsh, you definitely have something, and I wish you the best of skills.
Secondly, BACKGROUND.H is consuming too much memory. To be precise, it is consuming about 600KB of high memory. There simply is not enough memory for the video to play when you include the background like that. Even if Jo engine is passing it off to VDP2, since it is included in the program itself, it is not an area available to memory allocation by default.
You MUST use binary files for ALL models, sprites, textures, and background data. To do this you should look at XL2's model loading tools and demos.If you don't do this, you will continue to face mysterious crashes from SBL/SGL functions that basically destroy everything whenever they are out of sectors to run with, since Jo engine is front-loaded into high memory.
/e: When you move to program-controlled binary file loading, you should be able to use LWRAM for your project, even if the CPK eats up all of high memory you might not need that.
And, in that circumstance, your massive VDP2 background can be overwritten in LWRAM since it doesn't need to be there anymore.
Lastly, Jo Engine is not designed to have videos be program-controlled, as we thought it could be. You MUST load the CPK ONLY ONCE. Jo designed it to be a part of the program that is run, and then ignored. If it is inside a system callback, you're going to have trouble. As far as I have been able to test, this is the only correct way to play a video:
jo_core_init(JO_COLOR_Black);
if (jo_video_open_file("SAMPLE.CPK")){
jo_video_play(video_stop);
}
jo_core_add_callback(my_video);
Your error code 101 is the following:
CPK_ERR_OUT_OF_HANDLE = 0x00000101,/* ハンドル売り切れ */
Essentially that means when you have it as part of a system callback, too many CPK handles are created since it's running every frame.
I haven't fixed your problem, but hopefully I have armed you with enough information to proceed.
/e: a million edits