Jump to content

Instability in big binaries


Recommended Posts

Hi folks!


I'm having a strange problem. Once a binary reaches a certain size, my project gets instable and crashes.

I believe it may have something to do with graphics and code parts being too far apart in memory.

Sometimes I got things fixed by rearranging my data.

Have you ever noticed anything like that?

I'm currently using RLN, but have noticed similar problems with the original tools back in the day.




Link to comment
Share on other sites

Hi !


It could come from corrupt data by an overlapped memory for exemple.


What is the size of your project ? (text, data, bss sections)

Does it run from DRAM or cartridge ?

Do you use Equates to set predefine memory address ?




Link to comment
Share on other sites

Some reorganizing of the data fixed it for now, but it's still strange.


It's running from RAM. Maybe it's an alignment problem, but I doubt it.

Do I remember correctly that a 68k instruction is a word in size?


TEXT: 82688 bytes

DATA: 680064 bytes

BSS: 0 bytes



Link to comment
Share on other sites

So as it's probably an alignment problem, can you tell me some alignment ciritical things to look out for?


If I remember correctly the RISC processors need longword alignment of main ram locations to savely read from and write to.

The 68k probably even addresses to branch to and use word/longword operations on.

Then there is the alignment of the Object List which needs to be QPhrase aligned for scaled objects to work, right?


When I say things crash, what I mean is the display goes blank (to background color). So it may be that just the OP crashes in that case.

Link to comment
Share on other sites

OP list should have :

- Bitmap object in double phrase aligned

- Scaled bitmap in quad phrase aligned

- others in phrase aligned.


when accessing internal RISC ram with the DSP/GPU :

- loadb, loadw and loadp is replaced by a load

- storeb, storew and storp is replaced by a store





Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...