José Pereira Posted March 26, 2010 Share Posted March 26, 2010 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. Quote Link to comment Share on other sites More sharing options...
pseudografx Posted March 27, 2010 Share Posted March 27, 2010 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: Why don't you just use the Windows calculator (in scientific mode)? It has all the logical functions you need. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted March 27, 2010 Share Posted March 27, 2010 or the Mac Calculator Quote Link to comment Share on other sites More sharing options...
PeteD Posted March 27, 2010 Share Posted March 27, 2010 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 Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 27, 2010 Author Share Posted March 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 27, 2010 Share Posted March 27, 2010 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 1 Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 27, 2010 Author Share Posted March 27, 2010 Thanks a lot. Without beeing... could you post also the other ones? (EOR,AND,...) José Pereira. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 27, 2010 Share Posted March 27, 2010 AND - just like it says, both bits have to be 1 for the output to be 1. EOR (XOR) - one, but not both bits has to be 1. 0 0 gives 0 0 1 gives 1 1 0 gives 1 1 1 gives 0 1 Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 27, 2010 Author Share Posted March 27, 2010 AND - just like it says, both bits have to be 1 for the output to be 1. EOR (XOR) - one, but not both bits has to be 1. 0 0 gives 0 0 1 gives 1 1 0 gives 1 1 1 gives 0 This is the normal you use in oftSprites? Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 27, 2010 Share Posted March 27, 2010 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. 1 Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 28, 2010 Author Share Posted March 28, 2010 I always been interested in knowing, for. ex. in an horiz. Scroller with SoftSprites moving around and the Bakgr.gfx(x). how is done the Logical operation between the two? Thanks. José Pereira. Quote Link to comment Share on other sites More sharing options...
PeteD Posted March 28, 2010 Share Posted March 28, 2010 (edited) 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 March 28, 2010 by PeteD 1 Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 28, 2010 Author Share Posted March 28, 2010 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...) Quote Link to comment Share on other sites More sharing options...
José Pereira Posted March 29, 2010 Author Share Posted March 29, 2010 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. Quote Link to comment Share on other sites More sharing options...
PeteD Posted March 29, 2010 Share Posted March 29, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.