English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 28 January 2014, 23:40   #1
71M
 
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
 
Old 29 January 2014, 02:17   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,187
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.
Leffmann is offline  
Old 29 January 2014, 09:58   #3
71M
 
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?
 
Old 29 January 2014, 14:01   #4
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 812
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.
hooverphonique is offline  
Old 29 January 2014, 15:27   #5
71M
 
Posts: n/a
Yup, that's the one.

Thanks for clarifying, seems so obvious!
 
Old 29 January 2014, 18:53   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,187
Quote:
Originally Posted by Leffmann View Post
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.
I realized earlier that you can actually do this in a single Blitter pass, because you typically use the same bitplane as both source and destination. It still takes up to 50% more time than regular horizontal filling though.
Leffmann is offline  
Old 27 May 2016, 01:41   #7
BroFistMcfury
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
Attached Thumbnails
Click image for larger version

Name:	good.png
Views:	169
Size:	509 Bytes
ID:	48613  
Attached Images
 
BroFistMcfury is offline  
Old 27 May 2016, 11:19   #8
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
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)
DanScott is offline  
Old 27 May 2016, 12:06   #9
BroFistMcfury
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!
BroFistMcfury is offline  
Old 28 May 2016, 23:26   #10
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
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)
DanScott is offline  
Old 30 May 2016, 14:57   #11
BroFistMcfury
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...
Attached Files
File Type: rar test.rar (17.0 KB, 78 views)
BroFistMcfury is offline  
Old 30 May 2016, 22:44   #12
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
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?
DanScott is offline  
Old 31 May 2016, 06:53   #13
Hannibal
Registered User

 
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 15
I think minterm should be $3c, not $14 - 14 assumes blitter c data is 0, and it looks like it is not
Hannibal is offline  
Old 31 May 2016, 09:38   #14
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
You could be right

But what about the OP's original version? It seems to have the same "effect" happening
DanScott is offline  
Old 31 May 2016, 13:23   #15
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
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.
Mrs Beanbag is offline  
Old 31 May 2016, 15:10   #16
BroFistMcfury
Registered User

 
Join Date: May 2016
Location: London
Posts: 14
Quote:
Originally Posted by DanScott View Post
If you disable the call to the BlitterVerticalFill, do you get dotted horizontal lines or solid horizontal lines?
I get a solid line...here's an exe with half the screen filled as an example.
Attached Files
File Type: rar test.rar (1.3 KB, 65 views)
BroFistMcfury is offline  
Old 31 May 2016, 15:11   #17
BroFistMcfury
Registered User

 
Join Date: May 2016
Location: London
Posts: 14
Quote:
Originally Posted by Hannibal View Post
I think minterm should be $3c, not $14 - 14 assumes blitter c data is 0, and it looks like it is not
Sorry, that was my fault merging the code incorrectly!
BroFistMcfury is offline  
Old 31 May 2016, 23:03   #18
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
Minterm is $14 in the code I posted above, but it was really old code.. from 1991
DanScott is offline  
Old 03 June 2016, 21:30   #19
BroFistMcfury
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?
BroFistMcfury is offline  
Old 04 June 2016, 19:29   #20
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 39
Posts: 1,919
Which version of WinUAE are you using?
Lonewolf10 is offline  
 


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 12:00
Clipping line for blitter fill leonard Coders. Asm / Hardware 12 27 April 2013 13:03
80 GB HD to fill! fatboy Amiga scene 16 20 July 2011 15:13
Sector fill pattern absence Coders. General 7 21 March 2009 22:50
Fill 'em Tim Janssen request.Old Rare Games 1 27 June 2003 10:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.18774 seconds with 16 queries