4 ms·
Oh, there were some badly written programs for 68000 Amigas that didn't run on the 68020 or later. One "clever" trick was to store data in the highest byte of
by Findecanor 4y ago
Oh, there were some badly written programs for 68000 Amigas that didn't run on the 68020 or later.
One "clever" trick was to store data in the highest byte of 32-bit pointers — which had worked on the 68000 because it had only a 24-bit address bus.
Another thing that didn't work was self-modifying code. The 68020 introduced an instruction cache, which would have had to be cleared first.
- vardump 4y agoYeah, that upper 8-bit address tagging thing was a "clever"... waste of cycles. Just rotating/shifting 32-bit registers by 8 places costs 24 cycles (8 + 2 * n) on 68000, like if the value was passed in a register. Shifting the value by 24 places is even worse, massive 56 cycles... You could also do "move.b (a0), d0" directly from the pointer to pointer address. That'd cost just 8 cycles. Self-modifying code wasn't all that beneficial nor popular on 68k because of ample number of usable registers, 16, including a7, that is used as a stack pointer, but nothing prevented you from using it for something else for a while. I think copy protections and such used weird tricks like SMC. Machine code generators (kind of limited JITs) were useful, but those usually generated large enough blocks of code to flush a small cache by default. There were also some race conditions with DMA (like blitter and perhaps with disk), when DMA completion wasn't properly checked. But 99%+ of code didn't use those tricks and was perfectly compatible.