The relationship between data-fetch start and stop is; DDFSTRT = DDFSTOP-(8*(word count-1))for low resolution DDFSTRT = DDFSTOP-(4*(word count-2))for high resolution The normal low-resolution DDFSTOP is ($00D0). The normal high-resolution DDFSTOP is ($00D4) The following example sets data-fetch start to $0038 and data-fetch stop to $00D0 for a basic playfield. LEA CUSTOM,a0 ; Point to base hardware address MOVE.W #$0038,DDFSTRT(a0) ; Write to DDFSTRT MOVE.W #$00D0,DDFSTOP(a0) ; Write to DDFSTOP You also need to tell the system exactly which bytes in memory belong on each horizontal line of the display. To do this, you specify the modulo value.
Modulo refers to the number of bytes in memory between the last word on one horizontal line and the beginning of the first word on the next line. Thus, the modulo enables the system to convert bit-plane data stored in linear form (each data byte at a sequentially increasing memory address) into rectangular form (one "line" of sequential data followed by another line). For the basic playfield, where the playfield in memory is the same size as the display window, the modulo is zero because the memory area contains exactly the same number of bytes as you want to display on the screen.
Figures 3-10 and 3-11 show the basic bit-plane layout in memory and how to make sure the correct data is retrieved. The bit-plane address pointers (BPLxPTH and BPLxPTL) are used by the system to fetch the data to the screen. These pointers are dynamic; once the data fetch begins, the pointers are continuously incremented to point to the next word to be fetched (data is fetched two bytes at a time). When the end-of-line condition is reached (defined by the data-fetch register, DDFSTOP) the modulo is added to the bit-plane pointers, adjusting the pointer to the first word to be fetched for the next horizontal line. Data for Line 1: Location:
START START+2 START+4 .....START+38 Leftmost Next Word Next Word Last Display Display Word Word ^ Screen data fetch stops (DDFSTOP) for | each horizontal line after the last word on the line has been fetched. Figure 3-10: Data Fetched for the First Line When Modulo = 0 - 54 Playfield Hardware -