Jo Engine Forum

Sega Saturn Development => Share your code => Topic started by: hbeira on August 10, 2018, 03:42:59 am

Title: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: hbeira on August 10, 2018, 03:42:59 am
Hi Friends.

I burn my ISO on one CD, but it's don't run on my Saturn... :-(
On Yabause runs from my CD. :-)

On my Saturn, just freeze on this screen below.

(https://scontent.fcwb1-1.fna.fbcdn.net/v/t1.0-9/38391682_10217234075509762_5559591317903769600_n.jpg?_nc_cat=0&oh=82a5161559b97594bfba81d674f3bc60&oe=5C110B72)

I have try Swap Trick and Pseudo Saturn Kai...

Someone can help me about what is wrong?
I have attached my files in this topic.

Thanks in advance. ;-)
Title: Re: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: ponut64 on August 10, 2018, 05:25:50 am
Is this a PAL or NTSC system?
Is it "Model 1" or "Model 2" system? What version is the CD drive board? [JVC, Hitachi, or Sanyo]
Preliminary tests indicate the engine is running into invalid memory ranges. You'll have to dig into the "jo_tga_loader" function and mandate that it always start at a specified memory address to use it the way you want to.
This, however, is not the explicit cause for your freeze.

Your functions are also out-of-order. my_gamepad calls functions that have yet to be defined. Move it above jo_main, but below all else.
In combination with memory range overflow, this might be the cause of the crash.

Another thing you should do is ensure jo_tga_loader will only be struck when it is incomplete. If jo_tga_loader is ever finished, it should not be called anymore, as it isn't meant to be used asynchronously. Jo engine might be tolerant of the current usage, but I would try to control it more strictly to prevent unseen memory shenanigans.

Of course, you may wonder: "We use jo_free_img to free the memory range specified for the background image. Why doesn't that work?"
Those are not meant to be used in conjunction with loading functions asynchronously. You must only free once, before the next image is loaded. This is probably the cause of the crash.
Title: Re: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: 20EnderDude20 on August 10, 2018, 04:35:02 pm
Huh, I've never realized how similar the structure of the Saturn was with the Dreamcast. I thought they were completely different.
Title: Re: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: hbeira on August 12, 2018, 12:03:47 am
Huh, I've never realized how similar the structure of the Saturn was with the Dreamcast. I thought they were completely different.

It's good ;-)

Is this a PAL or NTSC system?
Is it "Model 1" or "Model 2" system? What version is the CD drive board? [JVC, Hitachi, or Sanyo]
Preliminary tests indicate the engine is running into invalid memory ranges. You'll have to dig into the "jo_tga_loader" function and mandate that it always start at a specified memory address to use it the way you want to.
This, however, is not the explicit cause for your freeze.

Your functions are also out-of-order. my_gamepad calls functions that have yet to be defined. Move it above jo_main, but below all else.
In combination with memory range overflow, this might be the cause of the crash.

Another thing you should do is ensure jo_tga_loader will only be struck when it is incomplete. If jo_tga_loader is ever finished, it should not be called anymore, as it isn't meant to be used asynchronously. Jo engine might be tolerant of the current usage, but I would try to control it more strictly to prevent unseen memory shenanigans.

Of course, you may wonder: "We use jo_free_img to free the memory range specified for the background image. Why doesn't that work?"
Those are not meant to be used in conjunction with loading functions asynchronously. You must only free once, before the next image is loaded. This is probably the cause of the crash.

Hey, I did it and works! :-D
Many thanks ponut64 ;-D

PS: works with Swap Trick, not with Pseudo Saturn Kai Cartridge, even this ISO was patched. :-P
Title: Re: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: ponut64 on August 12, 2018, 10:22:04 am
That's very odd, I don't patch my ISOs and I don't need to enable pseudo saturn support, yet I can get things to boot in Pseudo Saturn just peachy.

Try adding this to your makefile:
JO_PSEUDO_SATURN_KAI_SUPPORT = 1
Title: Re: I burn my ISO on one CD, but it's don't run on my Saturn... :-(
Post by: XL2 on August 12, 2018, 07:38:41 pm
If your pseudo Saturn has ram, it will crash with Jo Engine becauseJo engine tries to allocate memory to a non-existant adress.
Use the workaround in the makefile or change the adress of the ram to the correct values.