Article View: net.micro.atari
Article #1674Re: Modified Display Lists
From: Ron Perloff
Date: Wed, 04 Dec 1985 02:52
Date: Wed, 04 Dec 1985 02:52
139 lines
5855 bytes
5855 bytes
The short answer to the question of why the ATARI seems to
behave properly even when garbage is written into the JVB
instruction at the bottom of the Display List is that the
6502 initializes ANTIC's program counter during every
Vertical Blank Interval, thus overwriting the garbage with
"good stuff".
For those of you that are interested and to whom the above
paragraph raises more questions than answers, I have
included the long answer below.
Enjoy
Ron Perloff
Burroughs DSG
619-485-4519
Home: 17040 Oculto Court
San Diego, CA 92127
The ANTIC chip is a special purpose microcomputer that
happens to execute graphics-oriented instructions
instead of computational instructions. The
instructions consist of a one-byte op-code which in
some cases is accompanied by a two-byte operand. The
op-codes take the form:
IOOOMMMM
|-v---v-
| | |
| | |
| | +-- 4-bit mode field
| +------ 3-bit option field
+-------- interrupt request
When the interrupt request flag is on, ANTIC generates
a Display List Interrupt, DLI, to the 6502 at the
beginning of the last horizontal scan line caused by
the instruction. The interpretation of the option
field depends upon the value of the mode field.
ANTIC interprets the 4-bit mode field as follows:
MODE 0 --> DISPLAY n+1 BLANK LINES
The three bit option field specifies the number,
n, of lines to be displayed in the background
color; e.g.:
00000000 ==> DISPLAY 1 BLANK LINE
00010000 ==> DISPLAY 2 BLANK LINES
10100000 ==> DISPLAY 3 BLANK LINES,
DLI AT START OF 3rd LINE
MODE 1 --> JUMP INSTRUCTIONS
The jump instruction always includes a two-byte
operand field, in low/high format, which
indicates the location from which ANTIC will
take its next instruction. ANTIC performs the
jump like any microprocessor, reloading its
program counter with the value in the operand
field.
When the left-most bit of the option field holds
a "0", ANTIC displays one blank line and
performs the jump. When the left-most bit of
the option field holds a "1", ANTIC suspends
operation until the end of the vertical blank
interval. In both cases, ANTIC ignores the
remaining two bits in the option field.
ATARI calls the first form of the instruction
"JMP" and the second form JUMP VERTICAL BLANK or
"JVB".
MODES 2-F --> DISPLAY INSTRUCTIONS
ANTIC interprets all of the remaining
instructions as display instructions. In the
character modes, 2 through 7, each byte of
screen data indicates an offset into a character
set. The character modes differ from one
another in the interpretation of the bits in the
character set and the height and width of the
characters.
In the map modes, 8 through F, the bits of
screen data identify which the register whose
8-bit color description is to be displayed. The
various map modes differ in the number of bits
included in each pixel and the height and width
of each pixel. Pixels may contain either 1 or 2
or 4 bits.
The option field contains three independent
flags:
LVH
|||
||+-- enable Horizontal scrolling
|+--- enable Vertical scrolling
+---- Load data pointer
When the LOAD flag is on, ANTIC loads its data
pointer from the operand field of the
instruction before beginning to fetch screen
data. When the LOAD flag is off, ANTIC merely
continues taking screen data from the place that
the previous instruction left off.
The Horizontal and Vertical scrolling flags
allow ANTIC to perform fine scrolling on the
display. ANTIC takes the scrolling offsets from
on chip registers. from where the previous
instruction left off.
The 6502 gives ANTIC's program counter its initial
value, the top of the Display List, by storing low-
byte/high-byte into DLISTL/DLISTH, D402H/D403H. Once
ANTIC begins executing the display list, ANTIC can
theoretically keep going because the JVB instruction
at the bottom of the display list brings it back to
the top.
The designers of the ROM-resident operating system for
the ATARI very wisely decided to load a new value for
the starting Display List location as part of the
vertical blank interrupt procedure. They take the
address from a "shadow" location in RAM, SDLSTL/SDLSTH
or 230H/231H. Of course this overwrites the address
that the JVB instruction at the bottom of the display
list places in the ANTIC chip's program counter.
Technical Details
Message-ID:
<2019@bmcg.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!bmcg!raspReferences:
<8511252100.AA22014@ucbvax.berkeley.edu>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bmcg.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!bmcg!rasp From: rasp@bmcg.UUCP (Ron Perloff) Newsgroups: net.micro.atari Subject: Re: Modified Display Lists Message-ID: <2019@bmcg.UUCP> Date: Tue, 3-Dec-85 21:52:16 EST Article-I.D.: bmcg.2019 Posted: Tue Dec 3 21:52:16 1985 Date-Received: Sat, 7-Dec-85 14:41:43 EST References: <8511252100.AA22014@ucbvax.berkeley.edu> Reply-To: rasp@bmcg.UUCP (Ron Perloff) Organization: Burroughs Corp. ASG, San Diego, CA. Lines: 139