Page 1 of 1

Programming the Falcon030 - dusting off an old document

Posted: Mon Sep 03, 2018 12:14 am
by dhedberg
Many years ago I started writing on a document on how to write efficient code for the Falcon030. 20+ years later I found the document on my hard disk. I dusted it off and decided to publish at least parts of it. Perhaps it will be useful to somebody. The first part is about the 68030 caches and is now online at http://nb.atari.org/main.php?page=progr ... _falcon030

Re: Programming the Falcon030 - dusting off an old document

Posted: Mon Sep 03, 2018 7:51 am
by mikro
Very nice summary. Interesting idea with the interrupt code, although one has to be careful there - for instance if your code doesn't do anything else than having a tight loop receiving data from the DSP (and writing it directly to ST RAM), it may make sense to have interrupts in cached area as well simply because the loop is small enough to leave room for the interrupt routine(s). But that rarely occurs.

Re: Programming the Falcon030 - dusting off an old document

Posted: Mon Sep 03, 2018 8:17 am
by dhedberg
mikro wrote:
Mon Sep 03, 2018 7:51 am
Very nice summary. Interesting idea with the interrupt code, although one has to be careful there - for instance if your code doesn't do anything else than having a tight loop receiving data from the DSP (and writing it directly to ST RAM), it may make sense to have interrupts in cached area as well simply because the loop is small enough to leave room for the interrupt routine(s). But that rarely occurs.
Thanks! Yes, it's hard to give general advice that work in all cases. Although, even if your main loop is small, and the interrupt handlers are small, they may very well collide in the cache still. The caches are only 256 bytes. The last 8 bits of an address are used to create a hash for the cache line and to index the individual cache lines.