28 January 2014, 22:40 | #1 |
Posts: n/a
|
Blitter Vertical Fill
Hi,
I was wondering, is it possible to set the blitter so that it fills vertical lines instead of horizontal? Cheers, 71M |
29 January 2014, 01:17 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Yes, but it requires one Blitter pass per line and will be much slower. However, if you're on AGA then with this kind of vertical filling you can let both the CPU and the Blitter do the work, and it will theoretically be faster than doing regular horizontal filling with only the Blitter.
|
29 January 2014, 08:58 | #3 |
Posts: n/a
|
Wow, I never knew this existed! Could you point me at any docs for that please or is it noted in the Hardware Manual?
|
29 January 2014, 13:01 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
Do you mean if you can make the blitter fill from top to bottom instead of from right to left?
then the answer is yes and requires no special mode, you just need to set one source one line below the other and set the minterm to xor them. |
29 January 2014, 14:27 | #5 |
Posts: n/a
|
Yup, that's the one.
Thanks for clarifying, seems so obvious! |
29 January 2014, 17:53 | #6 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
|
|
27 May 2016, 00:41 | #7 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
I've got vertical filling working! ...but, I'm seeing different results when using WinUAE quickstart to run the exe (see attachments)
Here's the routine I'm using...anyone know what I'm doing wrong? Thanks a million! ;-------------------------------------- ; a0 = address to fill ; d0 = area to fill ; d1 = fill width (in bytes) ; d2 = modulo ;-------------------------------------- BlitFillVertical: bsr BlitWait move.w d2,BLTAMOD(a5) ;set modulo A move.w d2,BLTCMOD(a5) ;set modulo C move.w d2,BLTDMOD(a5) ;set modulo D move.w #SRCA|SRCC|DEST|A_XOR_C,BLTCON0(a5) move.w #0,BLTCON1(a5) ;fill mode move.l #-1,BLTAFWM(a5) move.l a0,BLTAPT(a5) ;source A add.l d1,a0 move.l a0,BLTCPT(a5) ;source C move.l a0,BLTDPT(a5) ;destination D move.w d0,BLTSIZE(a5) rts |
27 May 2016, 10:19 | #8 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
|
I am not 100% sure, but I may have been the first to do blitter vertical fill on the Amiga, in the Digital Innovation demo (the huge sine scroller)
|
27 May 2016, 11:06 | #9 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
Yay!
Maybe you know if the code is correct or what could cause the problem? Muchos gracias! |
28 May 2016, 22:26 | #10 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
|
move.l ScreenPtr,a0
lea 40(a0),a1 BlitWait_Inline move.l #$0d140000,BLTCON0(a6) move.l #$ffffffff,BLTAFWM(a6) move.l a0,BLTBPTH(a6) move.l a1,BLTAPTH(a6) move.l a1,BLTDPTH(a6) move.w #0,BLTAMOD(a6) move.w #0,BLTBMOD(a6) move.w #0,BLTDMOD(a6) move.w #(255<<6)+20,BLTSIZE(a6) |
30 May 2016, 13:57 | #11 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
Nice one, thanks Dan!
I tried with your version but same results Attached is a simple hack test that should show the problem... |
30 May 2016, 21:44 | #12 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
|
When I copy the test.exe to my virtual DH0: and run it in WinUAE from CLI, it runs fine (solid white rectangle)
If I drag the test.exe into the WinUAE window, I get the vertical lines patterned rectangle. Not sure what is causing this.. If you disable the call to the BlitterVerticalFill, do you get dotted horizontal lines or solid horizontal lines? |
31 May 2016, 05:53 | #13 |
Registered User
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
|
I think minterm should be $3c, not $14 - 14 assumes blitter c data is 0, and it looks like it is not
|
31 May 2016, 08:38 | #14 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
|
You could be right
But what about the OP's original version? It seems to have the same "effect" happening |
31 May 2016, 12:23 | #15 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
i have pondered this technique before, but it's a shame there is no "single pixel per column" line-drawing mode that would be required for doing filled polygons.
|
31 May 2016, 14:10 | #16 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
I get a solid line...here's an exe with half the screen filled as an example.
|
31 May 2016, 14:11 | #17 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
|
31 May 2016, 22:03 | #18 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
|
Minterm is $14 in the code I posted above, but it was really old code.. from 1991
|
03 June 2016, 20:30 | #19 |
Registered User
Join Date: May 2016
Location: London
Posts: 14
|
So...do you think this is a WinUAE bug or something I'm doing wrong with my setup?
|
04 June 2016, 18:29 | #20 |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Which version of WinUAE are you using?
|
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 |
Clipping line for blitter fill | leonard | Coders. Asm / Hardware | 12 | 27 April 2013 12:03 |
80 GB HD to fill! | fatboy | Amiga scene | 16 | 20 July 2011 14:13 |
Sector fill pattern | absence | Coders. General | 7 | 21 March 2009 21:50 |
Fill 'em | Tim Janssen | request.Old Rare Games | 1 | 27 June 2003 09:25 |
|
|