pouët.net

How to transform common sense and pixel configuration of channels into Blitter's minterms.

category: residue [glöplog]
 
Yo! pops!


When programming Blitter, there's another riddle. When we want use minterms for our specific function of channels or unusual set of channel contents.
In such case would be good to design set of minterms relevant to our configuration and interpretation of data in channels.

let's say we want to use usual masking for blitter object on a background, workbook says that minterms are in configuration $ca, however it is described for
situation, when we've got mask in channel A and object in channel B. If in our case channel B is mask and A is object, we have to reshuffle channels or develop
specific set of minterms for our case:


01) let's work the original case of set $ca, using Karnaugh's maps - theory found in "Basics of Digital Technology" by Andrzej Skorupski, or simply in some works of
Mr. Karnaugh or Wikipedia:

about the fact, what will be visible decides the mask. mask is channel a. if a has bit 1 then visible is channel a with the object (b),
when a=0 then in output channel D is cisible background from channel c.

simply, there are two cases depending on bit in channel a:

a=1, A

within one mask set, decides bits in channels B and C:

Code: b b B B B = 0 0 1 1 C = 0 1 0 1 c C c C


then in D, remains B:

D = 0 0 1 1


a=0, a

other way, when A=0

Code: b b B B B = 0 0 1 1 C = 0 1 0 1 c C c C


in this case in D, C gets through:

D = 0 1 0 1

to get from this plot to the minerms we use method of Karnaugh maps. Simply, for each 1 in channel D, we write configuration of bits in channels A, B and c,
where D=1 exists. We use small letter of channel name to describe 0 in that channel and capital letter for 1 in such channel.

so, when a=1 we write:

ABc+ABC

and for a=0:

abC+aBC

summarising: ABc+ABC+abC+aBC

then, using the table of truth with all configurations of minterms, we receive set of bits for our transmitantion of channels.

ABc - 6
ABC - 7
abC - 1
aBC - 3

so it is: 11001010 - $ca - famous $ca, quoted by many Blitter workbooks - there we know, that this reckon is right.


02) let's rework this case for our specific exaple, when A is object and B alters between A and C. C is the background.

for mask b=1 (B):

Code: a a A A A 0 0 1 1 C 0 1 0 1 c C c C


D = 0 0 1 1


for mask b=0 (b):

Code: a a A A A 0 0 1 1 C 0 1 0 1 c C c C


D = 0 1 0 1


ABc+ABC+abC+AbC - 6, 7, 1, 5 - 11100010 - gives magical value of $e2



03) for another exaple we will do simple D = A xor B:


Code:a a A A 0 0 1 1 0 1 0 1 b B b B


D = 0 1 1 0

aB(C+c)+Ab(C+c)=aBC+aBc+AbC+Abc

and it is: 3, 2, 5, 4 - 00111100 - which is: $3c


and so on, and so on...


if it wasn't in print, somewhere next to your hand already, here it is:


The Table of the Truth:

Code:ABC - 7 ABc - 6 AbC - 5 Abc - 4 aBC - 3 aBc - 2 abC - 1 abc - 0


(it's not only Jesus or Judge Judy...)


Cheers!!!
added on the 2023-03-31 15:46:05 by Laffik Laffik
Here is how I think about it:

The minterm word is just a 8-bit lookup table.
The blitter creates a 3-bit index by combining the bits from ABC and writes the fetched bit to D.

Just put together whatever lookup table you want.
added on the 2023-04-01 13:34:58 by bore bore
yes, that's shortest way! I had gotten this clue later.

if a is the object, b is the mask and c is the background, B conducts A and b conducts C:

abc - 0 x 1
abC - 1 x 2
aBc - 0 x 4
aBC - 0 x 8
Abc - 0 x 10
AbC - 1 x 20
ABc - 1 x 40
ABC - 1 x 80

it makes $e2 again, so it's right!

that elaborated way is more overt and versatile, though.
added on the 2023-04-01 19:35:37 by Laffik Laffik
There's a straightforward way to compute the minterm value from an arbitrary logical formula.

The minterm values for the plain channels are:

A = $F0
B = $CC
C = $AA

Now, you just substitute those values into the formula and compute the bitwise operations, e.g. for the classical cookie cut formula

(A & B) | (~A & C)

we get

($F0 & $CC) | (~$F0 & $AA) = $CA
added on the 2023-04-02 21:13:13 by Blueberry Blueberry
yeaaah... however it is all about more universal and versatile way for finding minterm basing only on bits, we want lit in a screen. including various, unusual configuration of bits and channels. and it is done. above...
added on the 2023-04-02 21:26:35 by Laffik Laffik
If it can help someone:
https://www.pouet.net/prod.php?which=91819
added on the 2023-04-02 21:46:21 by Soundy Soundy
Entertaining...
added on the 2023-04-03 01:17:32 by Laffik Laffik
Interesting, I've always been using the binary representation, i.e.:

Code: ; ++++----------------- ASH ; | |+---------------- USEA ; | || +------------- USED ; | || |++++++++----- MINTERM ; | || |AAAA---- ; | || |BB--BB-- ; | || |C-C-C-C- move.w #%0000111111001010,bltcon0(a6)


...and then put it together one channel after the other: Start with 1111000 for A, then take the digits into account where B is set (or not) etc. Tiny advantage (?): Makes it easy to put in an all-1 pattern, negate the output, or single out a specific channel for testing: Just overwrite the digits, no need to comment-out or alter a formula.

Then again, I believed they were called "MINI-terms" for twenty years...
added on the 2023-04-03 01:57:30 by losso losso
If you find it's good, it's good. I don't push myself.

Few days ago I hadn't idea how to describe minterms in general, so I recalled that Karnaugh maps can do. I tried, and they does. If someone else there doesn't know how, now he got looots of resources.

And that's what it is all about.
added on the 2023-04-05 12:07:40 by Laffik Laffik
dude if you have so much amiga coding question , don't troll all those non-amiga users here and find your new active demo coder friends at ADA / Code forum
https://ada.untergrund.net/?p=boardforums&forum=4
added on the 2023-04-05 13:28:56 by krabob krabob
Sorry?? Do I have a question? Do I troll? You're irrelevant. I've posted solution up there. It's not a question, buddy. It's solving.

Read it once, read it twice...
added on the 2023-04-05 14:31:06 by Laffik Laffik
Laffik, you should work on your attitude man.
added on the 2023-04-05 21:13:17 by v3nom v3nom
you mean masking?

$00x0?

sorry, but krabop shot of the @$$ and didn't say sorry.

question? trolling? he mistaken posts? I've heard lots of irrelevances against me. including police prevention mistaking coding with hacking and cracking.

slander got limits.
added on the 2023-04-05 22:35:55 by Laffik Laffik
Wouldn't all these blitter threads be better as one "Programming the Amiga Blitter" thread, than opening a new thread for every new finding, conclusion, test, etc. ...? Retro coding comes with lots of undocumented instructions as a hit wall for programmers, but that's also what many retro coders love about it! One has to ask themselves, when I'm coding something, I do it for what end? What am I trying to achieve?
added on the 2023-04-06 16:10:56 by Defiance Defiance
I don't pull the future from hyperspace. When wrote first topic I don't know there will be another ones.

I gave you three solutions. Pro bono.

Noone says about it, instead throwing a shayte or manifesting lack of any skills and ignorance.

What interest you on demo site? Mens' finese???

Normal folks would say thank you, so don't teach me bon-ton.

And why you picking a fight? Demonstration of western hostility I guess.
added on the 2023-04-06 16:26:16 by Laffik Laffik
Whatever... I agree with krabob on this one, you will find more like minded people on the ADA Forums than here willing to listen to your code solutions. Peace. :)
added on the 2023-04-06 16:58:04 by Defiance Defiance
Better keep your peas in.
added on the 2023-04-06 17:09:46 by Laffik Laffik
The correct way has already been shared in my tutorials. ABC|D, 8 down, 8 bit result. No need for minterms + all combinations available for creativity. :)
added on the 2023-04-07 01:27:27 by Photon Photon
Also photocopy stuff from back in the day here, but I wrote page 10 and it contains all. :)
added on the 2023-04-07 01:37:02 by Photon Photon
Maaan! That loooks!!!

Source Development Kit is far more detailed, though.

Pity there's none about BLTAPT in SING mode here either.

Very "museum" kind of thing. Bit of rubbish in fact...

8{D
added on the 2023-04-07 02:22:01 by Laffik Laffik

login