Commodore Amiga 1000 — Commodore Amiga 1000 Hardware Reference Manual PDF Download

SETTING THE DISPLAY WINDOW STARTING POSITION A horizontal starting position of approximately $81 and a vertical starting position of approximately $2C centers the display on most standard television screens. If you select high-resolution mode (640 pixels horizontally) or interlaced mode (400 lines NTSC, 512 PAL) the starting position does not change. The starting position is always interpreted in low-resolution, non-interlaced mode. In other words, you select a starting position that represents the correct coordinates in low-resolution, non-interlaced mode. The register DIWSTRT (for "Display Window Start") controls the display window starting position.

This register contains both the horizontal and vertical components of the display window starting positions, known respectively as HSTART and VSTART. The following example sets DIWSTRT for a basic playfield. You write $2C for VSTART and $81 for HSTART. LEA CUSTOM,a0 ; Get base address of custom hardware... MOVE.W #$2C81,DIWSTRT(a0) ; Display window start register... SETTING THE DISPLAY WINDOW STOPPING POSITION You also need to set the display window stopping position, which is the lower right-hand corner of the display window. If you select high-resolution or interlaced mode, the stopping position does not change.

Like the starting position, it is interpreted in low- resolution, non-interlaced mode. The register DIWSTOP (for Display Window Stop) controls the display window stopping position. This register contains both the horizontal and vertical components of the display window stopping positions, known respectively as HSTOP and VSTOP. The instructions below show how to set HSTOP and VSTOP for the basic playfield, assuming a starting position of ($81,$2C). Note that the HSTOP value you write is the actual value minus 256 ($100). The HSTOP position is restricted to the right-hand side of the screen. The normal HSTOP value is ($1C1) but is written as ($Cl). HSTOP is the same both for NTSC and for PAL.

The VSTOP position is restricted to the lower half of the screen. This is accomplished in the hardware by forcing the MSB of the stop position to be the complement of the next MSB. This allows for a VSTOP position greater than 256 ($100) using only 8 bits. Normally, the VSTOP is set to ($F4) for NTSC, ($2C) for PAL. The normal NTSC DIWSTRT is ($2C81). The normal NTSC DIWSTOP is ($F4C1). The normal PAL DIWSTRT is ($2C81). The normal PAL DIWSTOP is ($2CC1). - 52 Playfield Hardware -