Si par hasard tu veux faire un scrolling qui ne serait pas pixel par pixel (ça n'est pas ce que tu veux faire, mais je te le signale car il pourrait t'intéresser si tu changes de méthodes, ou dans un autre projet), il y a aussi FastScroll de Scott Noveck. Cependant, pour le scrolling pixel par pixel, FastScroll est beaucoup plus lent:
// SPEED ANALYSIS
//
// Each shift requires 8+6 = 14 clocks (including effective address calculation)
// for a TOTAL of 210*n clocks to scroll one line by n pixels
// COMPARISON - for all 128 lines:
// Note that the method varies larger shifts -- don't make assumptions from the first few comparisons
// These numbers are valid for the 92+/v200 only; the results must be adjusted for the 89
//
// To scroll ONE pixel:
// Method 1: Simple Scroll (from ExtGraph) Approx. 26,880 clocks
// Method 2: Advanced Scroll (above) Approx. 60,160 clocks
// Result - use Simple Scroll
//
// To scroll TWO pixels:
// Method 1: Simple Scroll Approx. 53,760 clocks
// Method 2: Advanced Scroll Approx. 62,208 clocks
// Result - use Simple Scroll
//
// To scroll THREE pixels:
// Method 1: Simple Scroll Approx. 80,640 clocks
// Method 2: Advanced Scroll Approx. 64,256 clocks
// Result - use Advanced Scroll
//
// To scroll FOUR pixels:
// Method 1: Simple Scroll Approx. 107,520 clocks
// Method 2: Advanced Scroll Approx. 66,304 clocks
// Result - use Advanced Scroll
//
// To scroll FIVE pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 3 px in opposite direction Approx. 128,700 clocks
// Method 2: Advanced Scroll Approx. 68,352 clocks
// Result - use Advanced Scroll
//
// To scroll SIX pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 2 px in opposite direction Approx. 99,840 clocks
// Method 2: Advanced Scroll Approx. 70,400 clocks
// Result - use Advanced Scroll
//
// To scroll SEVEN pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 1 px in opposite direction Approx. 72,960 clocks
// Method 2: Advanced Scroll Approx. 72,448 clocks
// Result - use Advanced Scroll
//
// To scroll EIGHT pixels:
// Shift the screen by a full byte 46,080 clocks
//
// To scroll NINE pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 1 px in same direction Approx. 72,960 clocks
// Method 2: Advanced Scroll Approx. 76,544 clocks
// Result - shift by a full byte, then use Simple Scroll
//
// To scroll TEN pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 2 px in same direction Approx. 99,840 clocks
// Method 2: Advanced Scroll Approx. 78,592 clocks
// Result - use Advanced Scroll
//
// To scroll ELEVEN pixels:
// Method 1: Shift screen by a full byte (8 pixels), [46,080 clocks]
// then Simple Scroll 3 px in same direction Approx. 128,700 clocks
// Method 2: Advanced Scroll Approx. 80,640 clocks
// Result - use Advanced Scroll
//
// To scroll TWELVE pixels:
// Method 1: Shift screen by a full word (16 pixels), [23,040 clocks]
// then Simple Scroll 4 px in opposite direction Approx. 130,560 clocks
// Method 2: Advanced Scroll Approx. 82,688 clocks
// Result - use Advanced Scroll
//
// To scroll THIRTEEN pixels:
// Method 1: Shift screen by a full word (16 pixels), [23,040 clocks]
// then Simple Scroll 3 px in opposite direction Approx. 103,680 clocks
// Method 2: Advanced Scroll Approx. 84,736 clocks
// Result - use Advanced Scroll
//
// To scroll FOURTEEN pixels:
// Method 1: Shift screen by a full word (16 pixels), [23,040 clocks]
// then Simple Scroll 3 px in opposite direction Approx. 76,800 clocks
// Method 2: Advanced Scroll Approx. 86,784 clocks
// Result - shift by a full word, then use Simple Scroll
//
// To scroll FIFTEEN pixels:
// Method 1: Shift screen by a full word (16 pixels), [23,040 clocks]
// then Simple Scroll 3 px in opposite direction Approx. 49,920 clocks
// Method 2: Advanced Scroll Approx. 88,832 clocks
// Result - shift by a full word, then use Simple Scroll
//
// To scroll SIXTEEN pixels:
// Shift the screen by a full word 23,040 clocks
//
//
// So, for the fastest possible scrolling:
//
// 1 pixel - Simple Scroll
// 2 pixels - Simple Scroll
// 3 pixels - Advanced Scroll
// 4 pixels - Advanced Scroll
// 5 pixels - Advanced Scroll
// 6 pixels - Advanced Scroll
// 7 pixels - Advanced Scroll
// 8 pixels - Shift by a full byte
// 9 pixels - Shift by a full byte, then use Simple Scroll
// 10 pixels - Advanced Scroll
// 11 pixels - Advanced Scroll
// 12 pixels - Advanced Scroll
// 13 pixels - Advanced Scroll
// 14 pixels - Shift by a full word, then use Simple Scroll in opposite direction
// 15 pixels - Shift by a full word, then use Simple Scroll in opposite direction
// 16 pixels - Shift by a full word
Je n'ai pas de lien (c'est sur scott.ticalc.org, mais je n'ai pas le lien exact). Kevin ?
