Jump to content
IGNORED

Someone can do some Overlap/Ored for me


Recommended Posts

Something is f... my head but cannot use G2F all Day (just MACs. around me...):

 

Someone can sendind me the results of thhe Overlap/Ored colour in PRIOR0 like this:

 

PM0(colour-3C)+PF0(06)

PM0(3C)+PF0(16)

PM0(3C)+PF0(26)

PM0(3C)+PF0(96)

 

or:

 

PM0(FC)+PF0(06)

PM0(FC)+PF0(16)

PM0(FC)+PF0(26)

PM0(FC)+PF0(96)

 

 

If someone here could, please (this is getting me crazy,...)

 

 

 

Now a totally different thinng. In Games what woul be the best in A8 Palette to the Skin colur?

Normally C64 and A8 using Pink, but I think It could look better a sort of Brown/Pale Brownisn(1...,F...)

 

 

Thanks to be taking your time...

Greetings.

José Pereira.

Link to comment
Share on other sites

Or just use that computer in your head ;)

 

 

PM0(colour-3C)+PF0(06) = 3e

PM0(3C)+PF0(16) = 3e

PM0(3C)+PF0(26) = 3e

PM0(3C)+PF0(96) = be

 

or:

 

PM0(FC)+PF0(06) = fe

PM0(FC)+PF0(16) = fe

PM0(FC)+PF0(26) = fe

PM0(FC)+PF0(96) = fe

 

 

Pete

 

 

Thanks, but I never get how the formula to calculate Ored works.

Probably many more here don't know.

how about explain how you get the result (just put the Formula).

 

greetings.

José Pereira.

Link to comment
Share on other sites

It's not a "formula".

 

It's a logical bitwise operation.

 

Convert your hex to binary to make it easier.

 

Hex to binary, and back is easy... that's why we use Hex in the first place.

 

0 = 0000

1 = 0001

2 = 0010

3 = 0011

4 = 0100

...

9 = 1001

A = 1010

...

F = 1111

 

OR is just like it suggests. If one or both bits are set in a bit-position, then the output for that bit-position is 1.

 

0010 or 0011 = 0011

1000 or 1010 = 1010

0000 or 0001 = 0001

  • Like 1
Link to comment
Share on other sites

Not "normal"... XOR sprites are just one way of doing them.

 

The advantage is that you don't need to do any masking because when you XOR again it restores the background to what it was. So, that gives extra speed and memory savings.

 

The disadvantage is that they often don't look good, and if there are lots of them bunched together, you can end up with a mess and/or blanked out areas.

 

Best use is probably something like a Galaxian type game where the background is mostly blank, the odd glitch doesn't matter too much and the objects don't overlap very often.

 

Worst use is probably a platformer type with background objects.

 

Asteroids is a good example of XORed objects - in that game you sometimes have most of 2 asteroids disappear when they overlap.

  • Like 1
Link to comment
Share on other sites

You usually have the background graphics, the sprite graphics and a solid mask for the sprite (can be done with a lookup or some more complex logic, depending on how the graphics are drawn eg do you want 0 pixels in the sprite to show background graphics or background colour). You take the background AND it with the mask (which is basically an inverse of the sprite, eg 0 for every pixel where your sprite would be, 1 for every pixel outside the sprite, obviously that's simplifying the fact that in multicolour it's 2bpp) which makes a hole in the background graphics which is sprite shaped, then OR the sprite data onto the result.

 

Found a decent Wikipedia page whilst searching for a graphic to explain it (hate gfx apps too much to do one myself). Stuff near the bottom about image masks with examples.

 

 

Pete

Edited by PeteD
  • Like 1
Link to comment
Share on other sites

You usually have the background graphics, the sprite graphics and a solid mask for the sprite (can be done with a lookup or some more complex logic, depending on how the graphics are drawn eg do you want 0 pixels in the sprite to show background graphics or background colour). You take the background AND it with the mask (which is basically an inverse of the sprite, eg 0 for every pixel where your sprite would be, 1 for every pixel outside the sprite, obviously that's simplifying the fact that in multicolour it's 2bpp) which makes a hole in the background graphics which is sprite shaped, then OR the sprite data onto the result.

 

Found a decent Wikipedia page whilst searching for a graphic to explain it (hate gfx apps too much to do one myself). Stuff near the bottom about image masks with examples.

 

 

Pete

 

 

Thank you, thank you so much for you and Rybags.

Read yours and "Wiki" and is simple, very simple.

I don't know why n~but on the times (some Months ago) I went to "Wiki" and all this "Logical" Operations seemed so strange and didn't understand.

Probably because I've been learning new things almost all days.

 

 

I'm doing some pictures in Paper and a Pen. Like if I was the Computer and the Pictures are Game Gfx./SoftSprites.

(do all this but, also in the Bit-Pair Mode...=

 

 

Thanks again.

Greetings.

José Pereira.

 

 

(P.s. - Probably this is the first/most important thing to Enter in some more tricky things? Probably if learned this on the Past, Assembly possible for me? I don't consider me as a Stupid, soo I will try and see what I would get...)

Link to comment
Share on other sites

Thank you verry, very much. I now understand how this thingss work.

 

I also discouver myself the bir-pair way of and some more specific things,

This is very usefull forr all my Screen remaking.

Thanks again.

 

Now I am trying to discouver when I move a SoftSprite to the other Char how to have the old/last Char displayed again...

 

I would like to see one thing, if possible:

 

(Just 1 line in Bit-Pair as an Ex.)

CHAR1: 01 01 10 00 / CHAR2: 11 11 11 11 / SOFTSPRITE: 00 01 00 10 / INVERSE SOFTSPRITE: 11 00 00 00

 

Just our SoftSprite simple move 1Char at a time, overlap char1 (that I've already know) but than move it to overlap Char2 and restoring Char1. How to? I woul like to see this (if it is a small Listing) done and explained in Assembly, could you do that for me (and others, too...)?

 

 

 

 

Thanks.

Greetings.

José Pereira.

Link to comment
Share on other sites

There's no need for code to understand that (and it's not really a small listing, that's basically a whole sprite routine).

 

The background graphics are always intact somewhere in RAM. When a sprite moves from one char to another you simply don't do anything with the previous char, it's no longer in the equation, at least in a software sprite routine that writes to new chars and puts those onto the screen with the background+sprite. All you do on the next frame when the sprite has moved is put that original char number (not the graphic, that already exists indexed by the char) back onto the screen which you'd be doing anyway as part of your software sprite routine.

 

 

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...