English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 November 2018, 14:28   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 14:41   #2
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 15 November 2018, 14:49   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 14:56   #4
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
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, 14:57   #5
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 16:41   #6
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
IIRC, somebody has mentioned doing chunky->planar conversion using blitter line mode here on EAB before..
hooverphonique is offline  
Old 16 November 2018, 08:04   #7
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 16 November 2018, 08:12   #8
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 09:45   #9
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 16 November 2018, 12:31   #10
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 12:56   #11
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 16 November 2018, 16:23   #12
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
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, 16:28   #13
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 16:49   #14
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 03 December 2018, 09:32   #15
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 15:02   #16
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 03 December 2018, 15:36   #17
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 15:42   #18
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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, 20:01   #19
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
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 offline  
Old 03 December 2018, 22:16   #20
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
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 22: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 14:29
Blitter C2P? How? Samurai_Crow Coders. Asm / Hardware 21 24 April 2018 19:12
Irq Blitter LeCaravage Coders. Asm / Hardware 9 16 June 2017 10:21
Blitter busy flag with blitter DMA off? NorthWay Coders. Asm / Hardware 9 23 February 2014 21:05
Blitter using the copper... h0ffman Coders. Asm / Hardware 9 23 February 2012 08: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 18:03.

Top

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