Jump to content
IGNORED

5200 Missiles -- pain!


Recommended Posts

uck. I just realized that all 4 missiles occupy the same byte in memory. The left 2 bits are Missile 3, then 2 bits for Missile 2, 2 more for Missile 1, and the right 2 bits are Missile 0.

 

Hence, to move a missile vertically, you must mask bits so that you don't move ALL the missiles at the same time. I just realized this.

 

Here's a question -- if my PMBase is $1800, and player0 starts at $1C00, where do the missile's memory start and end? I'm guessing at $1B00 -- does that sound correct? And why is $1800 thru $1AFF unused then?

Link to comment
Share on other sites

steve... still waiting that you clear your disks and give us the unpublished pearls you have coded in the past... ;=)

 

i forgot many "magical" numbers like 768 bytes before p0... ;=) others which i never forget

 

53248, $d400, 708-712, $d01a, $d40a, etc... ;=) $e456 and many others... $14, 512....

Link to comment
Share on other sites

Cafeman,

 

Missile data starts (in the 2k block that is set up for single line resolution) 768 bytes from the start of PMBASE (wherever you set that to be) and extends to the start of P0 at PMBASE+1024.

 

You do have to mask the other missile bits to produce independent vertical motion - then again you have to move all the missiles horizontally seperately if you have 5th player enable set too!!!

 

sTeVE

Link to comment
Share on other sites

  • 1 month later...

You can just use OR when drawing the pixels...you don't really need EOR. That way, the pixels are always drawn.

 

BTW the lower portion of the M/L graphics is unused simply because PMBASE needs to begin at a multiple of it's length (1k boundries for double-line DMA, 2k boundries for single-line DMA). But you can always use the area for other things (like redefined characters).

 

[ 06-08-2002: Message edited by: Nukey Shay ]

Link to comment
Share on other sites

Well, I got missiles to work. Check out the Koffi Dev Page:

http://cafeman.www9.50megs.com/atari/5200d...offiKopter.html

 

The yellow bar at the right of the screen is koffi's water level -- missile 2 (Player2 is the Shazam! style of lightning).

 

The 2 raindrops are missiles 1 and 3. I can even change their colors so that their hue of blue is different from each other, and different from the douse water color, just have not done that yet.

 

Although you all may know this, I recently learned that:

 

1. To draw missiles, you must use "masking" over the missile RAM area, since all four missiles share the same byte in 2 bit sections. To draw pixels in the missile area, you can't just read and store a byte; you must use EOR.

 

Thus, for Missile 3 (the left 2 bits of the RAM byte) I use:

 

EOR #%11000000 ; or, EOR #$C0

 

"EOR" will draw the pixels there, unless there are already pixels there, then it will cancel them out! But that doesn't happen to me since:

 

2. I use AND to erase the masked pixels. Thus, to erase the 2 pixels from Missile 3, I use:

 

AND #%11000000 ;or, AND #$C0

 

I do this before I increment the pointer in RAM for Missile 3.

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

I'm trying to get the sprites set up for drawing some cards, and I have to say that I'm a little stumped on how these missiles work as well.

 

What I planned to have is players 0 & 1 as red, then players 2 & 3 as black (for the left & right halves of the card). The card image will be drawn with these 4 sprites).

 

Then, I was planning on combining all 4 missiles as a 5th player at double width to be the white card background. However, I'm having trouble seeing how I can define the missiles to be white, independent of the red and black of the other 4 sprites. From what I'm seeing, the background will be black and red, instead of white.

 

Any tips on how to get red, black, and white out of this mess would be great

 

Thanks,

calamari

Link to comment
Share on other sites

Looks like I had this question before, and I forgot the answer Here's a partial log of what Dan Boris shared with me way back when:

 

quote:

*** Log file opened: 12/10/96 1:32:00 PM

i only see 4 sprite color registers.. how do i change the color of sprite 5 ?

the 5th sprite is just a combination of the 4 missiles...

is there a missile color register ?

yes there is a color register for each missile, and there is a bit in one of the registers that makes all 4 missiles take on the same color.


 

So, at least I know it's possible!!

I'll keep looking.

 

calamari

 

[ 04-10-2002: Message edited by: calamari ]

Link to comment
Share on other sites

Wow I think I found it!

 

$000B PCOLR3 [$C015 COLPM3]

Color of player and missile 3. When the four missiles are

combined to make a fifth player, it takes on COLOR3.

 

So, that's the answer I guess . Looks like I need to get busy and redesign my character -> sprite routines. Oh, and I'm glad they chose COLOR3, cuz thats where I alwready had white

 

calamari

Link to comment
Share on other sites

  • 1 month later...

http://cafeman.www9.50megs.com/atari/5200d...offiKopter.html

 

If you look at the pictures at Koffi's dev page, you'll see I now have 3 raindrops or snowflakes going simultaneously, using only 2 missile right now.

 

As you would guess, I am splitting missile 1 with a DLI. easy enough to do, but due to the collision implications (is it the top raindrop Missile1, or the bottom raindrop Missile1?) and the HPOS issues, I've had a few minor visual glitches -- glitches that I've resolved. YEEE-HAW!

 

Now that I know *why* the visual glitches were occuring (basically you'd get a flicker of a rain drop here & there -- drove me nuts trying to find the problem), I'm going to put in the 4th rain/snowflake later in the day, then I'll be done with that aspect finally.

Link to comment
Share on other sites

http://cafeman.www9.50megs.com/atari/5200d...offiKopter.html

 

Yep, I got my 4 Snowflakes / RainDrops working, although you don't ALWAYS see 4 onscreen at a time, it's quite possible for it to happen (they fall kinda fast anyway).

 

I am quite content with this Nth hurdle I've jumped so I will take a break tonight, watch X-files and drink some wine.

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...