Views: 791,035,438
8 users online:  Dan, ForthRightMC, ft029, Gamma V, GeorgeMP,  KKevinM, Linatic, The Snootster - Guests: 74 - Bots: 193 Users: 41,300 (1,494 active)
Latest: anonimo951
Tip: If you're using the original SMW ending, remember that level 104 (Yoshi's House) will appear during it.Not logged in.
Automatic ON/OFF Switch Triggering - Koopster
Forum Index - Valley of Bowser - Moderation Questions - Sprites - Automatic ON/OFF Switch Triggering - Koopster
Pages: « 1 »
File Name:Automatic ON/OFF Switch Triggering
Submitted:2013-03-10 12:20:43 by Koopster
Tool:Romi's Spritetool
Includes GFX:No
Description:This generator makes the ON/OFF switch trigger automatically. By default, it triggers on each 6 SMW seconds (or $FF frames). You can customize the triggering time by changing the frames value on the ASM file.

Made on EvilGuy's request.
Tags:automatic, switch, trigger
Download:Download - 477 bytes

dcb "INIT"
dcb "MAIN"

LDA $13
AND $FF		; Frames until switch triggers
BNE Return
LDA #$0B
EOR #$01


  • AND $FF will read from RAM address $FF, which is freeram or used by LM for some undocumented purpose (I don't know which). You want #$FF.
  • You're using $13. You want $14 in almost every situation, or the timer will run while the game is paused, while Mario is being hurt, and a bunch of similar situations.
  • The comment's suggests that #$C0 would be a valid value - it's not, it'd make the switch go completely crazy for 64 frames and then stand still for 192 frames. You want to mention that the only valid values are #$00, #$01, #$03, #$07, #$0F, #$1F, #$3F, #$7F and #$FF; alternatively you can use a RAM address and make your own timer. Unfortunately, the generators don't seem to have any dedicated RAM addresses, so I'd recommend making this a normal sprite if you're going to use this method.
Fix these and it should be approvable. There are few places to hide unobvious bugs in a code this small.

<blm> zsnes users are the flatearthers of emulation
Pages: « 1 »
Forum Index - Valley of Bowser - Moderation Questions - Sprites - Automatic ON/OFF Switch Triggering - Koopster

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


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • SMBX Community
  • MFGG