English Amiga Board


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

 
 
Thread Tools
Old 10 March 2018, 10:27   #1
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 304
Complicted Blitter Help Required :)

Hi All,

I am blitting some words (1024 words in 4 blits of 256) of data using D = A where the source data is in the format: 0x111111abcde00000

Source data is one word wide.

I am using the source A mask in the format: 0xabcdef1111100000 so that i can set the top 6 bits to any combination in the final data.

If you must know, i am actually creating bitplane pointer addresses for each scanline, by having my bitplanes within a 64k boundary, and just writing the low word of the bitplane pointer using the copper. This data is being blitted into the copper list.

what I would like to do in addition to this is also effectively do an "add" too, to 2 of the bits in the source...

So for example, bits "a" and "b" in the soure:

0x00 -> 0x01
0x01 -> 0x10
0x10 -> 0x11
0x11 -> 0x00

efectively, it will be a = a xor 1 , b = b xor a

but I can't figure out if i can do this (combining it with the A mask stuff) in one blit.

Feel free to ask any other questions if i have not explained it well enough
DanScott is offline  
Old 10 March 2018, 14:45   #2
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,161
Do those two bits in the output need to step through values 0-3 in order, or can you shuffle the bitplane data around so any order is fine?

Enable channel B DMA and point it to channel A, use a B shift value of 1, set channel C data to %1100000000, and use minterm A^BC. This will make those two bits cycle through values 00 10 01 11, if that order works fine.

Last edited by Leffmann; 10 March 2018 at 15:53.
Leffmann is offline  
Old 10 March 2018, 16:11   #3
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 304
The bitplane data is fixed, as it is generated from a vertical fill

I would have to blit the data into a different order, to facilitate blitting the pointers in one blit.

Perhaps the only solution will be to do 2 blits for the pointers

I have been rackiny my brain all day trying to come up with a solution that works for 1 blit with the current bitplane data setup
DanScott is offline  
Old 10 March 2018, 16:41   #4
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,559
First thought was, will it beat a 68000? 256 words isn't a lot...

Especially since an add must be multiple operations to allow the carry to ripple. Two bits is a special case, but one and only one bit must change per frame for carry ripple replacement. If that can be, done the bitplanes can be mapped in shuffled order to accommodate.

But if you do many 256-word blit repeatedly and the single blits are similar it will beat the CPU.
Photon is offline  
Old 10 March 2018, 17:23   #5
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 304
The current blitter implementation saved around 32 to 40 scanlines of CPU time compared to the CPU implementation.

The reason I need to find a way to swizzle these 2 bits with the blitter is to save a lot of memory

Otherwise, I can work around this, just with a huge chip-mem overhead
DanScott is offline  
Old 10 March 2018, 17:36   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,161
The only other solution I see is if the c-bit can be guaranteed to be 1 after some reordering of data in memory, then you can do it with a single blit in descending mode. What's it supposed to look like when it's done, or would telling us jeopardize the #1 spot in the next demo compo?
Leffmann is offline  
Old 10 March 2018, 18:23   #7
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 304
Quote:
Originally Posted by Leffmann View Post
or would telling us jeopardize the #1 spot in the next demo compo?
3 weeks until Revision
DanScott is offline  
Old 12 March 2018, 14:20   #8
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 786
The checkerboard challenge is over already
hooverphonique is offline  
Old 12 March 2018, 23:06   #9
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 304
Quote:
Originally Posted by hooverphonique View Post
The checkerboard challenge is over already
Ain't no checkerboard
DanScott 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 Mimterm Help sandruzzo Coders. Asm / Hardware 7 19 April 2016 17:52
Blitter busy flag with blitter DMA off? NorthWay Coders. Asm / Hardware 9 23 February 2014 21:05
Please help me!! Blitter pain! h0ffman Coders. Asm / Hardware 5 15 June 2013 18:59
Blitter using the copper... h0ffman Coders. Asm / Hardware 9 23 February 2012 08:25
Blitter nasty or not? JackAsser Coders. Tutorials 5 28 March 2010 22:45

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 08:01.


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