Saturn freeze on load

Hi everyone,

I have a big issue with my Sonic port, i will explain a little.

If it's about memory corruption or access time, I don't really know.

At first i'm using SGL.

The problem is related with sound, when I load two o more sounds (PCM files) to low work ram (0x200000) in the emulators (SFF and Yabause) works great, I debug with a ram watch and I see the data, but............ The console will freezes when try to load the second file.

If I only load one sound, the game works great.

Any advice?

Code:
typedef struct SOUNDS

{

char *p_Sound;

Uint32 size;

PCM type;

}Sounds;

/////////////////////////////

Sounds snd_sfx[6];

PCM chn_0_m8 = {(_Mono | _PCM8Bit) , 3 , 127 , 0 , 0x0 , 0 , 0 , 0 , 0};

PCM chn_1_m8 = {(_Mono | _PCM8Bit) , 3 , 127 , 0 , 0x0 , 0 , 0 , 0 , 0};

void snd_loadSound_PCM()

{

    

    snd_sfx[SFX_RING].p_Sound = (char *)0x210000;

    

    Sint32 load = GFS_Load(GFS_NameToId("SFX_RING.PCM"), 0, (Uint32 *)snd_sfx[SFX_RING].p_Sound , 27089);

	   if(load <= 0)

    	   	slPrint("ERROR loading file SFX_RING.pcm!", slLocate(2, 11));

    snd_sfx[SFX_RING].size = load; 

    snd_sfx[SFX_RING].type = chn_0_m8;

    snd_sfx[SFX_JUMP].p_Sound = (char *) snd_sfx[SFX_RING].p_Sound +   snd_sfx[SFX_RING].size ;

        

    load = GFS_Load(GFS_NameToId("SFX_JUMP.PCM"), 0, (Uint32 *)snd_sfx[SFX_JUMP].p_Sound , 19075);

	   if(load <= 0)

	       	slPrint("ERROR loading file SFX_JUMP.PCM!", slLocate(2, 11));

	       	

    snd_sfx[SFX_JUMP].size= load;

    snd_sfx[SFX_JUMP].type = chn_1_m8;

}
 
Hey Facundo,

It could be possible that you may ran out of ram as that's what happened to me sometime ago.

On SSF it worked fine but on real console not so much. I could only play/load one file at a time.

I found out it was due to low ram as my whole project was occupying it and there was only room for one file (both were the same size).

But someone may give you a straight answer here.
smile.gif


On a side note, your Sonic Jump for the 2011 saturn game entry was also freezing on my real saturn.

It's a chipped Victor model2. I couldn't get past the title screen. The "press start" one.
 
television2000 said:
Hey Facundo,

It could be possible that you may ran out of ram as that's what happened to me sometime ago.

On SSF it worked fine but on real console not so much. I could only play/load one file at a time.

I found out it was due to low ram as my whole project was occupying it and there was only room for one file (both were the same size).

But someone may give you a straight answer here.
smile.gif

Hi TV2K,

I tried with another positions of memory and I get the same error. if I make a unique file with all sounds, maybe works.

television2000 said:
On a side note, your Sonic Jump for the 2011 saturn game entry was also freezing on my real saturn.

It's a chipped Victor model2. I couldn't get past the title screen. The "press start" one.

Sorry for that It's the same error. :s
 

antime

Extra Hard Mid Boss
The documentation for GFS_Load states that the output buffer must be 4-byte aligned.
 
Top