News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Anyone know where the charge beam animation routine is?

Started by PHOSPHOTiDYL, April 27, 2020, 11:07:30 AM

Previous topic - Next topic

PHOSPHOTiDYL

Like for the sparks & stuff before firing?? Like if I wanted each beam to have a different animation for charging??

Mentlegen

not sure if this helps or not, but if I had to guess, then I would say look in bank 90 or 91 where the charge palette asm is and look for a pointer

Quote58

I kept meaning to reply here since I implemented that fusion style charge beam animation a while back (so the routine was somewhere in my documentation), sorry about that. The routine that handles it is at $90BBE1

Edit: also the best way to find it would be to look for the routine that draws the sprite and work backwards. $81 has most of the routines responsible for moving oam data, so the fastest way is to look for the routine that handles the table with the data for the particular sprite, and then work back to where in the rom that particular oam handler is called. In this case it's only used for a couple of things, which makes it a little easier to find. There are other ways to find it as well, for example iirc the way I used back when I worked with it originally was through the addresses used as animation timers for different parts of the charge beam.

And for reference, the charge beam palette routine is entirely separate (it affects samus, not the beam after all), and it also handles all sorts of other effects on samus ($91D743)

Mentlegen

Quote from: Quote58 on April 28, 2020, 10:21:32 AM
I kept meaning to reply here since I implemented that fusion style charge beam animation a while back (so the routine was somewhere in my documentation), sorry about that. The routine that handles it is at $90BBE1

Edit: also the best way to find it would be to look for the routine that draws the sprite and work backwards. $81 has most of the routines responsible for moving oam data, so the fastest way is to look for the routine that handles the table with the data for the particular sprite, and then work back to where in the rom that particular oam handler is called. In this case it's only used for a couple of things, which makes it a little easier to find. There are other ways to find it as well, for example iirc the way I used back when I worked with it originally was through the addresses used as animation timers for different parts of the charge beam.

And for reference, the charge beam palette routine is entirely separate (it affects samus, not the beam after all), and it also handles all sorts of other effects on samus ($91D743)

Do we know why the charge particles only reflect the palette when samus is facing to one side yet?
Or why the charge release is only one color?

Quote58

"Do we know why the charge particles only reflect the palette when samus is facing to one side yet?"
iirc the oam data uses the wrong palette bit for the other side, and I'm not seeing from a quick glance anywhere in that routine that sets the palette property ($03) for the sprite drawing routine, so it may just be using the oam palette bit, giving it the wrong one.

"Or why the charge release is only one color?"
$91D79E A2 1C 00    LDX #$001C
$91D7A1 A9 FF 03    LDA #$03FF ;charge flash colour value
$91D7A4 9F 82 C1 7E STA $7EC182,x[$7E:C19E] ;which loops over the current palette
$91D7A8 CA          DEX
$91D7A9 CA          DEX
$91D7AA 10 F8       BPL $F8    [$D7A4]

Mentlegen

Quote from: Quote58 on May 12, 2020, 03:03:41 AM
"Do we know why the charge particles only reflect the palette when samus is facing to one side yet?"
iirc the oam data uses the wrong palette bit for the other side, and I'm not seeing from a quick glance anywhere in that routine that sets the palette property ($03) for the sprite drawing routine, so it may just be using the oam palette bit, giving it the wrong one.

"Or why the charge release is only one color?"
$91D79E A2 1C 00    LDX #$001C
$91D7A1 A9 FF 03    LDA #$03FF ;charge flash colour value
$91D7A4 9F 82 C1 7E STA $7EC182,x[$7E:C19E] ;which loops over the current palette
$91D7A8 CA          DEX
$91D7A9 CA          DEX
$91D7AA 10 F8       BPL $F8    [$D7A4]


Huh, that's interesting. Thanks dude