Banner
Views: 785,739,948
Time:
6 users online: DJSpleef,  Falconpunch, MaxwelHacks,  poopsey, StrikeForcer, yupilongas - Guests: 26 - Bots: 177 Users: 41,070 (1,532 active)
Latest: TheGamingTurfs
Tip: Press Ctrl+Del to delete original levels before making a new level.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.
Screenshots:
The code for setting the sprite size is correct on its own, but it's not in the right place.

Code
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 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

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