View Single Post
Old 01 January 2006, 18:45   #11
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
Quote:
Originally Posted by Toni Wilen
Mysterious world of blitter line mode..

- D-channel can be disabled. No effect on anything.. (even speed of blit stays the same)
- C must be enabled (nothing is drawn without C)
- B (not tested)
- disabling A stops BLTAPT from updating (result is incorrect lines)
- BLTDMOD is not used in line mode. BLTCMOD is used for both C and D.

And here is the most interesting undocumented feature ever:

- First pixel is written to address pointed by BLTDPT, all following pixels are written to address pointed by BLTCPT! (Demos Cardamon and Cardamom)
This is most interesting, because you normally want 1 pixel of the line to be omitted if you want to fill the poly afterwards... Otherwise you get double pixels plotted at the corner points of the poly, resulting in the infamous horizontal lines emanating from the corners when it's filled.

I did it by subtracting 1 from the blit height in the linedraw routine just before drawing, Slayer did it by XOR'ing an extra pixel so it goes away, but could this mean that by pointing BLTDPT to a trash area, the pixel goes there and the rest of the line goes to BLTCPT and is correct for filling?

If it's true, then a bunch of cycles would be saved in the linedraw routine

1) one register saved and one sub.w (up to 12 cycles on A500)
2) one longword or word write to memory for the BLTDPT. UNLESS BLTDPT is increased after the blit to point to just beyond the last pixel. (up to 12 cycles more)
Photon is offline  
 
Page generated in 0.04361 seconds with 11 queries