English Amiga Board


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

 
 
Thread Tools
Old 04 June 2016, 18:49   #21
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
I'm using an old version 2.3.3 but I just tried latest 3.2.2 and get the same result.
BroFistMcfury is offline  
Old 04 June 2016, 18:59   #22
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
It was already answered. It uses BLTCDAT which is uninitialized. (=garbage depends on KS version and what you did before you run the code)
Toni Wilen is online now  
Old 04 June 2016, 19:10   #23
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
Oh, so you're saying I should change the function to include BLTCDAT initialization like this?

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 #0,BLTADAT(a5)
move.w #0,BLTCDAT(a5)
move.w #0,BLTDDAT(a5)
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
BroFistMcfury is offline  
Old 06 June 2016, 11:25   #24
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
My minterm is $5a by the way, which I believe to be correct.
BroFistMcfury is offline  
Old 06 June 2016, 12:52   #25
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Something like that. Probably. I will only debug existing binary code
Toni Wilen is online now  
Old 06 June 2016, 13:41   #26
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
Heh - fair enough!
BroFistMcfury is offline  
Old 08 June 2016, 15:09   #27
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
Found the problem!

A_XOR_C EQU NABC|ABNC | NANBC|ANBNC

Can you see the mistake?
BroFistMcfury is offline  
Old 08 June 2016, 17:31   #28
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by BroFistMcfury View Post
Found the problem!

A_XOR_C EQU NABC|ABNC | NANBC|ANBNC

Can you see the mistake?
I can.
StingRay is offline  
Old 09 June 2016, 20:29   #29
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
Thanks StingRay for pointing out that the minterm wasn't compiled correctly because of the space between the constants!

...thanks to everyone else as well!
BroFistMcfury is offline  
Old 09 June 2016, 23:30   #30
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
If your assembler gives you a different result when adding a space in there, you need to find a better assembler
Leffmann is offline  
Old 11 June 2016, 10:55   #31
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
Too right!!!
BroFistMcfury is offline  
Old 12 June 2016, 06:31   #32
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
what would be the advantage to have vertical fill?
sandruzzo is offline  
Old 12 June 2016, 10:30   #33
BroFistMcfury
Registered User
 
Join Date: May 2016
Location: London
Posts: 14
As Dan said, you can do huge sin scrollers
BroFistMcfury is offline  
Old 16 November 2017, 21:55   #34
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
I'm trying to realize the following function using the blitter. It effectively fills one 16-bit column of a 28-byte wide bitmap. The height is 256 rows.

This loop does the job:
Code:
		eor.w d0,(a0)		; first row

		move.w #HEIGHT-2,d1
.loop
			move.w (a0),d0
			lea 28(a0),a0
			eor.w 	d0,(a0)

			dbf d1,.loop
So I wrote this piece of blitter code to do the same thing, and it simply doesn't do the job:
Code:
		move.w	#$0b5a,bltcon0(a1) ; D = A~C + ~AC
		move.w	#$0000,bltcon1(a1)

		move.w	#$ffff,bltafwm(a1)
		move.w	#$ffff,bltalwm(a1)

		move.w	#26,bltamod(a1)
		move.w	#26,bltcmod(a1)
		move.w	#26,bltdmod(a1)

		move.l	a0,bltapt(a1)
		lea	28(a0),a0
		move.l	a0,bltcpt(a1)
		move.l	a0,bltdpt(a1)

		move.w	#64*(HEIGHT-1)+1,bltsize(a1)
Prior to calling the routine, A1 is set to $dff00, and blitter done is asserted. It's a single threaded program and multi-tasking has been disabled. There are also other blitter operations in the program which works as intended. I've tried rearranging the order of blitter operations with no improvement.

I have some very similar code to clear the very same area, and that works just fine.

Code:
		move.w	#$01f0,bltcon0(a1) ; D = A~C + ~AC
		move.w	#$0000,bltcon1(a1)

		move.w	#$ffff,bltafwm(a1)
		move.w	#$ffff,bltalwm(a1)

		move.w	(a0),bltadat(a1)

		move.w	#26,bltdmod(a1)

		lea	28(a0),a0
		move.l	a0,bltdpt(a1)

		move.w	#64*(HEIGHT-1)+1,bltsize(a1)
Is there perhaps some special consideration that should be taken for one column blitter operations?

I'm banging my head against the wall here.
dalton is offline  
Old 16 November 2017, 22:31   #35
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
I believe I figured it out. Due to pipelining in the blitter, the sources are fetched twice before the destination is written. Effectively making it impossible to do vertical fill on just one column.
dalton 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 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

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 19:45.

Top

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