[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sprite card?



Ben wrote:

>Ernest <leucoplast@seanet.NOSPAM.com> wrote in message
>news:<srECb.380792$275.1230943@attbi_s53>...
>> What does a Sprite video card do?
>> 
>> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2772834489&category=4610
>
>That _particular_ model has a TMS9918A VDP, the same used in the
>TI-99/4A and MSX-1 computers.
>Modes:
>Graphics-1: 32x24, 768 character position, 256 characters (definable).
>Characters divided into 32 character sets (8 each). Each set has a
>foreground/background color (2 colors per set), out of the 16
>available colors.
>Text: 40x24, two color (out of 16).
>Multicolor: 64x48 low-res blocks, each being one of 16 colors.
>Graphics-2: Like Graphics-1, but 768 characters definable. Each
>character is given a foreground/background color for each pixel line
>of the character. This is the "bitmap" or high-res mode.
>Various other undocumented modes.
>
>Sprites are available in all modes except Text. There are 32 sprites,
>with a foreground color (out of 16).
>Four magnifications:
>1 : single-size, one character cell sprite (8x8)
>2 : single-size magnified - same as 1, but twice the size
>3 : double-size - 4 character cells (16x16)
>4 : double-size, magnified - same as 3, twice the size.
>
>Sprites have priority - sprite 1 passes over sprite 2. Only four
>sprites allowed per horizontal line, higher ones "disappear".
>
>The TMS9918A allows an external video signal for the backplane. A
>feature I would love to play with, but it requires external
>synchronization.
>
>I had a magazine detailing a hardware/software combo that used a card
>with the same chip to add sprites to the Apple-II - I wonder if this
>is the card?
>You could use both the TI graphics AND Apple graphics...
>Wonder if it used the external video pin for the Apple graphics - had
>to, I guess...

I have never seen a 9918 card for the Apple that supported external
video.  The problem is, as you noted earlier, that the external video
source must be synchronized to the card (or vice versa), and there
is no provision for doing so.  All the sprite cards I have seen have a
separate crystal oscillator.

This is one of the reasons that the sprite cards were so uninteresting
to the market--they require you to use two displays with your Apple,
or to sacrifice one while viewing the other.  A second problem, entirely
within the 9918, is that _everything_ on the display is generated from
"character cells", which means that drawing an arbitrary straight line
on the display requires "synthesizing" a lot of "characters" which are
used up just to create the line display.  There are not enough "character"
blocks to permit an arbitrary bit-mapped display!

Terrapin Logo had a version that used a sprite card for its "turtles" and
when the character map was exhausted it gave the error "Out of Paint"!

If you wish to conserve this scarce resource, you must pre-synthesize
the required character block (including any other lines that this one
crosses) and then search all available character blocks to see if this
one already exists before allocating a new one.

Since each character has a limited color choice, lines of arbitrary
colors may not cross (a similar problem to the hi-res color set problem
of the Apple II, but with more sets of fewer colors).

If you thought that generating addresses for Apple hi-res was wierd,
the 9918, with its character maps and indirections, will drive you up
the wall.  ;-)

On a hardware note, the Apple cannot directly access the video memory
(which holds the character maps, pointers, etc.), but must make every
access indirectly through a register in the 9918.

The 9918 is a great example of what happens when digital designers
create a video chip: lots of modes and features, but you can't even draw
a line without dynamically creating new characters (and risking running
out before the line can be completed)--programmers beware!

(Note that many early video games were designed in just this way: cost
of the chip is fundamental, so the chip is designed first, with as many
wierd bells and whistles as the designers can hack in, then the game
programmers get to look at it and see what they can learn to do, warts
and all.)

-michael

Check out amazing quality sound for 8-bit Apples on my
Home page:  http://members.aol.com/MJMahon/