23 April 2013, 10:34 | #1 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Clipping line for blitter fill
Hi all,
I'm still working on my blitter filling amiga routine I'm adding clipping. I know blitter is filling from right to left, so you should be carefull when clipping object to the right of the screen. My routine is working on the right edge: sometimes I have to add some vertical lines. Everything is working well. But, when I try to put my object on the left side of the screen, the fill is broken. I did't add vertical lines for left border, I guess I don't need to. I don't enderstand why it does not work, because my clip routine is not buggy (If I draw wireframe lines, the lines are perfectly cliped on the left border) Is there something special to do when cliping lines on left border? Where did I miss something? |
23 April 2013, 11:43 | #2 |
Rock Lobster
Join Date: Nov 2012
Location: Macclesfield
Age: 49
Posts: 40
|
Is it just a single row of pixels that isn't filling correctly? If so it could be a case of it drawing an extra pixel over the left border (and onto the right of your bitplane, which messes up the fill)
if you could post a screen shot maybe one of us will recognise an old bug or past mistake of our own |
23 April 2013, 12:11 | #3 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
I though about it but I did not see any "one" nasty pixel warping to the right border.
I'll post a screen shot tonight, but the effect is VERY similar as if you don't do RIGHT cliping properly (without drawing additional vertical lines). Last edited by leonard; 23 April 2013 at 14:02. |
23 April 2013, 16:42 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
does the blitter not continue filling on the next horizontal line up if you don't have a left edge pixel?
|
23 April 2013, 17:00 | #5 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
23 April 2013, 19:15 | #6 |
Rock Lobster
Join Date: Nov 2012
Location: Macclesfield
Age: 49
Posts: 40
|
|
23 April 2013, 20:37 | #7 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
I made some test drawing just one pixel vertical line on the screen and fill it. It appears the fill "wrap" if the line is in the first 16 pixels screen columns. (ex 0,0,0,255)
15,0,15,255 is fucked up too. As soon as the line is (16,0,16,255), everything is ok (the screen is filled at the left of the line). The first column stay black. I wonder if the problem came from the fact I fill the whole screen width, so maybe the blitter "don't know" my line is over? Did anyone of you noticed that??? Attached: a vertical line at column 0 (bad fill), and another one at line 17 (working) |
23 April 2013, 20:54 | #8 |
Rock Lobster
Join Date: Nov 2012
Location: Macclesfield
Age: 49
Posts: 40
|
there are 101 things that could be going wrong here, but at least it's not a screen full of garbage
My best guess right now is that you've given the blitter the wrong source/dest address for the buffer. The fill works in reverse mode, but you have to make it point at the first word of the buffer that needs filling, so you have to subtract 2 after adding the (width/8)*height offset to the buffer's base address. Did you do that already? |
23 April 2013, 21:01 | #9 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
24 April 2013, 05:42 | #10 |
Posts: n/a
|
Oh, and one more tip - I know the filler rubs backwards, but one trick I used to save memory was to sometimes only have 1 front buffer instead of 2, if it was interleaved, and then doing the filling from top right corner instead of bottom right corner (by messing with the modulo). This works without tearing if filling blit starts above the first raster of the object. Sometimes every byte matters
|
24 April 2013, 10:26 | #11 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
|
|
25 April 2013, 22:16 | #12 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Excellent tip Hannibal, I'll make a note of that as I'm sure I'll use in future ASM projects
|
27 April 2013, 12:03 | #13 |
Registered User
Join Date: Jul 2014
Location: Warsaw/Poland
Posts: 187
|
Hey Leonard
are you going to release your great vector demo also for Amiga? http://www.pouet.net/prod.php?which=1251 http://www.pouet.net/prod.php?which=1575 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitter fill timing | leonard | Coders. Asm / Hardware | 42 | 01 September 2014 11:00 |
One "hole" in each scan line to turn off blitter nasty? | mc6809e | Coders. Asm / Hardware | 1 | 03 July 2012 12:12 |
80 GB HD to fill! | fatboy | Amiga scene | 16 | 20 July 2011 14:13 |
Winuae RTG pointer clipping + artifacts | smoorke | support.WinUAE | 6 | 13 February 2010 14:54 |
Line mode blitter | absence | Coders. General | 4 | 25 September 2009 20:50 |
|
|