The steps for defining a basic playfield are summarized below:
1. Define Playfield Characteristics
--------------------------------
a. Specify color for each pixel:
* Load desired colors in color table registers.
* Define color of each pixel in terms of the binary value
that points at the desired color register.
* Build bitplanes and set bitplane registers:
Bits 12-14 in BPLCON0 - number of bitplanes ( BPU2 - BPU0 ).
BPLxPTH - pointer to bitplane starting position in memory
(written as a long word).
b. Specify resolution :
* Low resolution:
320 pixels in each horizontal line.
Clear bit 15 in register BPLCON0 ( HIRES ).
* High resolution:
640 pixels in each horizontal line.
Set bit 15 in register BPLCON0 ( HIRES ).
c. Specify interlaced or non-interlaced mode :
* Interlaced mode:
400 vertical lines for NTSC, 512 for PAL.
Set bit 2 in register BPLCON0 ( LACE ).
* Non-interlaced mode:
200 vertical lines for NTSC, 256 for PAL.
Clear bit 2 in BPLCON0 ( LACE ).
2. Allocate Memory . To calculate data-bytes in the total bitplanes,
----------------- use the following formula:
Bytes per line * lines in playfield * number of bitplanes
3. Define Size of Display Window .
-------------------------------
* Write start position of display window in DIWSTRT :
Horizontal position in bits 0 through 7 (low order bits).
Vertical position in bits 8 through 15 (high order bits).
* Write stop position of display window in DIWSTOP :
Horizontal position in bits 0 through 7.
Vertical position in bits 8 through 15.
4. Define Data Fetch . Set registers DDFSTRT and DDFSTOP :
-------------------
* For DDFSTRT , use the horizontal position as shown in
Setting the Display Window Starting Position .
* For DDFSTOP , use the horizontal position as shown in
Setting the Display Window Stopping Position .
5. Define Modulo . Set registers BPL1MOD and BPL2MOD . Set modulo to 0
--------------- for non-interlaced, 40 for interlaced.
6. Write Copper Instructions To Handle Redisplay .
-----------------------------------------------
7. Enable Color Display .For the A1000: set bit 9 in BPLCON0 to enable the
---------------------- the color display on a composite video monitor.
RGB video is not affected. Only the A1000 has
color composite video output, other Amiga models
cannot enable this feature using standard
hardware.