Views: 828,111,103
10 users online: containercore, Cr4zy,  E-man38, Infinity, JamesD28, Medic, nathandandy, PokerFace, qantuum, Shiva619 - Guests: 36 - Bots: 70 Users: 44,332 (2,538 active)
Latest: timothy726
Tip: If you edit level 0, make sure you also edit level 100. Both of them are used for the bonus game.Not logged in.
SpinJump Star by RussianMan
Forum Index - Valley of Bowser - Moderation Questions - Sprites - SpinJump Star by RussianMan
Pages: « 1 »
File Name: SpinJump Star
Submitted: by RussianMan
Obsoletes: SpinJump Star
Authors: RussianMan
Tool: PIXI
Type: Extended
Dynamic: No
Disassembly: Yes
Includes GFX: No
Description: This is a disassembly of Extended sprite 10 in SMW, SpinJump Star.
Credit is unnecessary.
The code for setting the sprite size is correct on its own, but it's not in the right place.

LDA $01				;Sprite tile's position is already stored in $02A1A4
STA $0200|!Base2,y		;But we used macro, so we have to do positions manually

LDA $02				;
STA $0201|!Base2,y		;

LDA #!Property			;Sprite tile's prop
STA $0203|!Base2,y		;

LDA #!Tile			;Sprite tile's tile
STA $0202|!Base2,y		;

LDA $9D				;No movement when freeze flag
BNE Return			;
LDA $176F|!Base2,x		;Calculate speed
LSR #2				;
TAY				;
LDA $13				;
AND DATA_029CB0,y		;
BNE Return			;
LDA #$01			;
%ExtendedSpeed()		;Apply speed

TYA				;
LSR #2				;
TAY				;
LDA #$00			;
STA $0420|!Base2,y		;Ouch, I forgot this

Return:				;
RTL				;

You first write the tile to the top part of OAM (the writes to $0200-$0203), then you execute other code before setting the size of the tile. This causes a rather big problem.

You see, the code between the graphics routine and the size (labeled as "Apply speed") clobbers the Y register (see the TAY before LDA $13), so you corrupt the size of another sprite tile instead of setting the size of the spin-jump star. Even if the speed code did preserve Y, it would still be possible to display the star with an undefined size because the speed code can return from the whole main routine. What's more, the vanilla game writes the sprite's size immediately after writing the tile (see $02A204).

This can be fixed by writing the tile size before handling the speed.
Pages: « 1 »
Forum Index - Valley of Bowser - Moderation Questions - Sprites - SpinJump Star by RussianMan

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

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

Total queries: 14


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy