Banner
Views: 645,660,752
Time:
15 users online: 1337doom, Alcaro, brotherhack, o Dan, DarkCodr, Hooded Edge, Horrowind, idol, jamie18, StarTheKitty102, Telinc1, TNTMAN332, Ultima, WhiteYoshiEgg, Y.Y. - Guests: 49 - Bots: 682Users: 35,095 (1,342 active)
Latest: CoReV
Tip: Keep your graphics within a specific style. Don't mix cartoony sprites with detailed and realistic back/foregrounds!Not logged in.
Miscellaneous Sprite RAM Usage
Forum Index - SMW Hacking - Resource & Tool Releases - SMW Data Repository - Miscellaneous Sprite RAM Usage
Pages: « 1 »
The RAM map has rather... sparse descriptions of the miscellaneous RAM tables used by SMW, I ended up going through every single sprite in the game and documenting the usage of every table. And after about a year of gradually working my way through, I'm done with it.

You can find the table here.


I've chosen to omit the following common usages from the table, since they pretty much apply to every sprite:
  • $1540: A timer used when the sprite is killed in various ways. Notably, smoke clouds (from e.g. spinjumping) and squished sprites use this as an animation timer, and it's also set for any sprites killed by a block, capespin, net punch, cape smash, or Yoshi stomp.
  • $154C: Timer for disabling player contact. Every sprite that uses default Mario interaction sets this address when touched, so those are ommitted. Certain non-standard cases where it gets set are mentioned, however.
  • $1558: Timer for sinking in lava. Also set for a lot of sprites when hit by a block, capespin, net punch, cape smash, or Yoshi stomp.
  • $1FE2: Set for every sprite for a couple frames after spawn, with the purpose of preventing a splash sprite from appearing if the sprite spawns in water.
It is is also worth noting the following tables are intended as timers, and decrement by 1 per frame while non-zero: $1540, $154C, $1558, $1564, $15AC, $163E, $1FE2.

Lastly, the misc RAM for the shell version of sprite 9 is also excluded, since it's just a duplicate of the shell-related RAM already noted in 4-7 and would just needlessly expand the table to include it.



Also, for custom sprite coding reference, here are the uses of each misc RAM table by SMW's shared routines. Hover over a routine name to see the address it's referring to (a * after it indicates the routine is automatically handled outside of the sprite). Let me know if I missed a notable routine, since this list was compiled after completing the table.
(note: "quake sprites" will be used as a general term for referring to the interaction 'sprites' from hit blocks, capespins, and net punches; their usage can be completely disabled by setting bit 5 of $166E)

$C2:
> Solid sprite routine: (input/output) For a sprite ID >= 83 when hit from below: If 0, set to 1, as a flag for having been hit.
> Quake sprite interaction: (input/output) If non-zero, will be cleared and the sprite will have $AA, $1540, $1558, and $157C modified.

$1528:
> Solid sprite routine: (input) Number of pixels moved horizontally in a frame, for moving Mario (note: not cleared post-routine).
> Fireball-Sprite interaction: (input/output) If the sprite takes 5 fireballs to kill ($190F bit 3 is set), then used as a counter for the number of hits.

$1540:
> Mario-Sprite interaction: (output) If $1656 bit 6 is set (die when jumped on), set to #$20 when jumped on, for a squish animation timer.
> Mario-Sprite interaction: (output) If the sprite can be killed by a spinjump, set to #$1F, for the death cloud's timer.
> Sprite status 4 (death by spinjump): (input) Timer for the smoke cloud.
> Quake sprite interaction: (output) If $C2 was non-zero, set to #$10.

$154C:
> Mario-Sprite interaction: (input/output) Disables default interaction. Set to #$08 if interaction occurs.
> Quake sprite interaction: (input/output) Disables interaction. Set to #$08 if interaction occurs.
> Cape smash: (input/output) Disables interaction. Set to #$08 if interaction occurs.

$1558:
> Object interaction: (output) Set if the sprite lands in lava, for the sinking animation.
> Sprite status 5 (sinking in lava): (input) Timer for sinking.
> Solid sprite routine: (output) For a sprite ID >= 83 when hit from below: If $C2 was initially 0, set to #$10, for usage as a bounce animation timer.
> Quake sprite interaction: (output) If $C2 was non-zero, set to #$20.

$1564:
> Sprite-Sprite interaction: (input) Disables interaction with other sprites.
> Solid sprite routine: (output) For a sprite ID >= 83 when hit from below: Set to #$10.

$1570:
> Basic animation handler: (input/output) Frame counter for animation

$157C:
> Sprite-Sprite interaction: (output) If $1686 bit 4 is set (change direction when touched) and the two sprites are facing each other, bit 0 is inverted when interaction occurs.
> Mario-Sprite interaction: (output) If $1686 bit 4 is set (change direction when touched), bit 0 is inverted when interaction occurs.
> Quake sprite interaction: (output) If $C2 was non-zero, will be cleared.
> Shared GFX routines: (input) Flag for X flip (except for SubSprGfx0 / $019CF3)

$15AC:
> Sprite-Sprite interaction: (input/output) If $1686 bit 4 is set (change direction when touched) and currently zero and the two sprites are facing each other, set to #$08 when interaction occurs.
> Object interaction: (input) If non-zero and the sprite has no X speed, horizontal block interaction will be skipped.

$15D0:
> Yoshi-Sprite interaction: (input) Disables interaction.
> Sprite-Sprite interaction: (input) Disables interaction with sprites in lower slots.
> Fireball-Sprite interaction: (input) Disables interaction.
> Quake sprite interaction: (input) Disables interaction.
> Cape smash: (input) Disables interaction.
> Tongue-Sprite interaction: (input/output) Set when the sprite is on Yoshi's tongue.

$1602:
> Shared GFX routines: (input) Animation frame index to sprite's GFX table.

$187B:
> Mario-Sprite interaction: (input) Flag to make Mario bounce off the sprite like a disco shell.

$1FE2:
> Level load: (output) Set for a few frames after spawn, for every standard sprite (to prevent a water splash if spawning in water).
> Object interaction: (input) Disables water splashes when landing in water.
> Quake sprite interaction: (input) Disables interaction.
Pages: « 1 »
Forum Index - SMW Hacking - Resource & Tool Releases - SMW Data Repository - Miscellaneous Sprite RAM Usage

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 21

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented