José Pereira #1 Posted October 11, 2011 (edited) About Missiles what's the difference between (CPU/cycles, Assembly,...): 1.)- Have the four joined (5th Player) but as if they were one sprite (one next to the other)? 2.)- Have the same 5th Player enabled but they are eachone of the four at a different xPos and yPos on screen? 3.)- Use the more 'normal way' and they are Player and Missile (not 5th Player enabled) but they are not Player/Missile joined? 4.)- Use the more 'normal way' and they are Player and Missile (not 5th Player enabled) and they are joined in a single 10pixels wide? Thanks. José Pereira. Edited October 11, 2011 by José Pereira Quote Share this post Link to post Share on other sites
Rybags #2 Posted October 11, 2011 Seperate missiles means you have to AND/OR mask the individual missiles plus the seperate X/YPos calculations are needed for each. Joined 4 missiles means the draw can be done in a single set of operations and XPOS calculating is easy since the distance should always be constant. Joined M to P means the AND/OR should be needed but the XPOS is easy. Deliberate interaction with playfield for extra colours will add complexity no matter what the case, but a lot simpler for static stuff. Quote Share this post Link to post Share on other sites
José Pereira #3 Posted October 11, 2011 Seperate missiles means you have to AND/OR mask the individual missiles plus the seperate X/YPos calculations are needed for each. Joined 4 missiles means the draw can be done in a single set of operations and XPOS calculating is easy since the distance should always be constant. Joined M to P means the AND/OR should be needed but the XPOS is easy. Deliberate interaction with playfield for extra colours will add complexity no matter what the case, but a lot simpler for static stuff. Why the AND/OR? Missiles just put on screen, why AND/OR and with wich stuff is it needed to AND/OR? Quote Share this post Link to post Share on other sites
Rybags #4 Posted October 11, 2011 Missiles are 2 pixels across each, so they're packed into the 1 byte. Quote Share this post Link to post Share on other sites
José Pereira #5 Posted October 11, 2011 Missiles are 2 pixels across each, so they're packed into the 1 byte. Each Missile it's 2bits=2pixels and if you place it alone you waste 1byte (always working in coding with bytes width?), 4Missiles alone you'll waste 4bytes? If a Missile alone it will take the same cycles as if you're droping a Player 8pixels wide on screen, is it this? Quote Share this post Link to post Share on other sites
MaPa #6 Posted October 11, 2011 There is only one byte for missile data, missile 0 is bits 0,1. Missile 1 bits 2,3... missile 2 bits 4,5 and missile4 bits 6,7 so you have to AND/OR when working with individual missiles. Quote Share this post Link to post Share on other sites
José Pereira #7 Posted October 11, 2011 There is only one byte for missile data, missile 0 is bits 0,1. Missile 1 bits 2,3... missile 2 bits 4,5 and missile4 bits 6,7 so you have to AND/OR when working with individual missiles. Yes, I think I am begining to understand now why the AND/OR stuff. How many cycles would an AND/Or takes? If I have the 4Missiles in different places I would have to do the AND/OR how many times? Four, three? Quote Share this post Link to post Share on other sites
MaPa #8 Posted October 11, 2011 (edited) You need do AND/OR for each line of each missile. So when you want draw missile 0 for example 4 lines high you generally need to do 4 times: LDA pmg_missile_area AND #$FC ORA missile0_data STA pmg_missile_area .. to preserve other missile data at that position and put missile 0 data there. But it depends on the missile usage, if you know they are not at the same vertical positions, you can skip the AND/OR stuff. Edited October 11, 2011 by MaPa Quote Share this post Link to post Share on other sites
José Pereira #9 Posted October 11, 2011 You need do AND/OR for each line of each missile. So when you want draw missile 0 for example 4 lines high you generally need to do 4 times: LDA pmg_missile_area AND #$FC ORA missile0_data STA pmg_missile_area .. to preserve other missile data at that position and put missile 0 data there. But it depends on the missile usage, if you know they are not at the same vertical positions, you can skip the AND/OR stuff. Yes, I see now, that's exactly the same as in soft sprites Bitmap masking... Correct me if I'm wrong: For example M0 it's (11) Inverse it you'll get (00) same way as in soft sprites (then Missiles would take, like this same as soft sprites Bitmap Masking 'normal cost' 21cycles?: 'LDA/AND/OR/STA') (00000000) byte AND (11111100) Missile inverse ($FC) --------------- (00000000) OR (00000011) Missile real Data --------------- 000000011 Quote Share this post Link to post Share on other sites