The fact is... it takes around 15-20 seconds to checksum 4MegaBytes
So my question is... Is that normal for GCC code?
I want my checksum to be done in less than 1 second... is that possible in C? Should I jump 16bytes by 16bytes to make it faster (and also less accurate :/ )
I must admit I'm quite shocked by the time it takes to browse 4MB of bytes... wow.
Ok Thx.
I just passed to word to twice a bit the speed...
Well, i'll have to make something more fancy for the ultra 64MEG of power checksumming ^^ Don't want to wait 30 seconds haha.
Why you want to make checksum for whole ROM every time? It's slightly pointless. If you want to have this function to ensure that cartridge isn't damaged, you can make this test optional (executed only while hold some buttons on power-up or reset), and describe that in the manual.
Shiru wrote:Why you want to make checksum for whole ROM every time? It's slightly pointless. If you want to have this function to ensure that cartridge isn't damaged, you can make this test optional (executed only while hold some buttons on power-up or reset), and describe that in the manual.
Even with really optimized ASM checksummer, you have to wait 10 seconds before 32Mbit gets calculated, somewhat less if you use Longs instead of Words.
If you really want to calculate the checksum, why stop everything else to do it?
Have the checksum run incrementally as the game and title screens run, or in the vblank, then do whatever you want when it finishes and finds the wrong checksum.
Shiru wrote:Why you want to make checksum for whole ROM every time? It's slightly pointless. If you want to have this function to ensure that cartridge isn't damaged, you can make this test optional (executed only while hold some buttons on power-up or reset), and describe that in the manual.
Thx for all the answers... It is exactly for that, I just run the checksum a single time, when you play the game for the first time.
In that way, I can be sure that nobody start playing with a defective cartridge (that a simple checksum would not especially detect with a bit of bad luck).
So Long does speed up compared to words... interesting...