English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 November 2018, 15:28   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
New Blitter cp2

I all,

I dont' know if this technique was investingated before, and maybe left down. I only was looking to find out an new way to do so. This way is not meant to be fast, maybe it'll be, who knows.

As we know cp2 is a matter of rotation, and we can do it with blitter very easily. In my humble opinion the real "problem" is porelly design hw, that are only capable to works in x direction: Why they did design hw able to work good even in y direction?

Anyway, fisrt we have to set our planes pointer to interleaved way, which is some sort of y chuncky buffer, and then we have to map into them our chuncky pixel into the same direction: how to do that?

With blitter, we can map 4,(4bits planes) pixels at ones, or 2, (8bits planes) pixel, just by using line drawing! Since blitter is able to map a patter into line, we have to load BLTADAT with our chuncky pixels, ad draw vertical line 16 pixels height. That's all!

I dont' know if this way can be fast, maybe by using blitter + cpu + copper, someone could get the fastest possible cp2, or maybe we can do it with only cpu. Like I said, this technique it's meant only yo explore new way to do c2p

Just my 2 cents
sandruzzo is offline  
Old 15 November 2018, 15:41   #2
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Like I said, this technique it's meant only yo explore new way to do c2p
So, when can we see it in action?
britelite is online now  
Old 15 November 2018, 15:49   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
So, when can we see it in action?
So far it's on test, and not optimized. Since Blitters' line way, its possible to do 2x1 very easly!
sandruzzo is offline  
Old 15 November 2018, 15:56   #4
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 107
Quote:
Originally Posted by sandruzzo View Post
With blitter, we can map 4,(4bits planes) pixels at ones, or 2, (8bits planes) pixel, just by using line drawing! Since blitter is able to map a patter into line, we have to load BLTADAT with our chuncky pixels, ad draw vertical line 16 pixels height. That's all!
That will very likely be awfully slow compared to the classic blitter c2p. But no harm in trying, though you may want to use BLTBDAT for the pattern instead, even if BLTADAT might give some funky results.
chb is offline  
Old 15 November 2018, 15:57   #5
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by chb View Post
That will very likely be awfully slow compared to the classic blitter c2p. But no harm in trying, though you may want to use BLTBDAT for the pattern instead, even if BLTADAT might give some funky results.
My fault, was BLTBDAT. Like I said, just to try an exotic way to do cp2!
sandruzzo is offline  
Old 15 November 2018, 17:41   #6
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 818
IIRC, somebody has mentioned doing chunky->planar conversion using blitter line mode here on EAB before..
hooverphonique is offline  
Old 16 November 2018, 09:04   #7
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Since Blitters' line way, its possible to do 2x1 very easly!
Indeed, it's just a shame that easy doesn't always equal fast
britelite is online now  
Old 16 November 2018, 09:12   #8
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
Indeed, it's just a shame that easy doesn't always equal fast
Maybe we can do it very fast by using only cpu... 2x1 would be almost equal ad 1x1 or better, since blitter line mapping
sandruzzo is offline  
Old 16 November 2018, 10:45   #9
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Maybe we can do it very fast by using only cpu... 2x1 would be almost equal ad 1x1 or better, since blitter line mapping
Especially when using the CPU you don't want to be setting individual bits at a time, but rather use large chunks (like the cpu c2p's are already doing).
britelite is online now  
Old 16 November 2018, 13:31   #10
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
Especially when using the CPU you don't want to be setting individual bits at a time, but rather use large chunks (like the cpu c2p's are already doing).
Maybe coupling this line mapping with Ray casting could speed up all!
sandruzzo is offline  
Old 16 November 2018, 13:56   #11
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Maybe coupling this line mapping with Ray casting could speed up all!
Sorry, but it won't
britelite is online now  
Old 16 November 2018, 17:23   #12
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 107
Quote:
Originally Posted by britelite View Post
Indeed, it's just a shame that easy doesn't always equal fast
I'd even bet that if you'd substitute 0x8000 in BPLADAT by 0xC000, 2x1 would come for free. But it's very likely still slow as hell.
chb is offline  
Old 16 November 2018, 17:28   #13
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by chb View Post
I'd even bet that if you'd substitute 0x8000 in BPLADAT by 0xC000, 2x1 would come for free. But it's very likely still slow as hell.
It take 8 cycles for pixel, so to map 4 complete 4bits pixel we need 16*8 = 128 cycles
sandruzzo is offline  
Old 16 November 2018, 17:49   #14
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
It take 8 cycles for pixel, so to map 4 complete 4bits pixel we need 16*8 = 128 cycles
Which is way too slow. For a 160x100 pixels screen this would already amount to 512000 cycles, which is over 3 frames, and this is just the conversion. So unfortunately it's way slower than currently used methods.
britelite is online now  
Old 03 December 2018, 10:32   #15
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Just uploaded in the zone! my demo. Feel free to use it, and if someone need help, I'm here!
sandruzzo is offline  
Old 03 December 2018, 16:02   #16
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Just uploaded in the zone! my demo.
How about also making an executable for us lazy ones?
britelite is online now  
Old 03 December 2018, 16:36   #17
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
How about also making an executable for us lazy ones?
ok.
sandruzzo is offline  
Old 03 December 2018, 16:42   #18
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
How about also making an executable for us lazy ones?
Done. Exe plus all files. If you need more, let me know
sandruzzo is offline  
Old 03 December 2018, 21:01   #19
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 470
Quote:
Originally Posted by sandruzzo View Post
Done. Exe plus all files. If you need more, let me know
Alright, only tried it in WinUAE, and the executable crashes on a standard A500-configuration. It did work with an expanded conf though, so I was able to run it. I must admit I was hoping to see at least something move

I hope this was a good exercise for you, as you probably now see why this isn't a very efficient way of doing a c2p conversion. You should probably leave this approach alone now, and for example try making a more traditional blitter c2p next.
britelite is online now  
Old 03 December 2018, 23:16   #20
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,255
Quote:
Originally Posted by britelite View Post
Alright, only tried it in WinUAE, and the executable crashes on a standard A500-configuration. It did work with an expanded conf though, so I was able to run it. I must admit I was hoping to see at least something move

I hope this was a good exercise for you, as you probably now see why this isn't a very efficient way of doing a c2p conversion. You should probably leave this approach alone now, and for example try making a more traditional blitter c2p next.
Like I said, I was curious to try it, and explore new way to do stuff. I like to do that, like I did with sprites' parallax on Rygar, which is the fastest way to do on Amiga ocs/ecs.

Last edited by sandruzzo; 03 December 2018 at 23:27.
sandruzzo 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
A500 cp2 need help sandruzzo Coders. General 7 12 November 2018 15:29
Blitter C2P? How? Samurai_Crow Coders. Asm / Hardware 21 24 April 2018 20:12
Irq Blitter LeCaravage Coders. Asm / Hardware 9 16 June 2017 11:21
Blitter busy flag with blitter DMA off? NorthWay Coders. Asm / Hardware 9 23 February 2014 22:05
Blitter using the copper... h0ffman Coders. Asm / Hardware 9 23 February 2012 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 10:03.


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