Views: 926,853,105
10 users online:  bebn legg, codfish1002, katun24, margot, meatloaf, Qwoll,  RussianMan, S.U, Saela, The_Uber_Camper - Guests: 43 - Bots: 89 Users: 51,803 (2,054 active)
Latest: TOMATO516
Tip: Unlike for traditional hacks and Kaizo: Light hacks, usage of tools such as savestates and rewinds in Kaizo: Hard and Pit hacks is encouraged, if not necessary.
Not logged in.
Details for SMB Castle path-choice effect
SPASM Repository - SMB Castle path-choice effect Link - Show random
File Name: SMB Castle path-choice effect
Authors: BTD6_maker
Type: Init, Main
Includes Hijack: No
Featured: No
Description: This code allows you to create a level with multiple paths, where the correct path must be chosen to progress, similar to 4-4 and 7-4 from SMB. You can define several rectangles, and then if Yoshi reaches a particular x-position without entering any of these rectangles all horizontal entrances towards right (sprite 0D0) will despawn. For instance, this can be used to despawn an entrance that sends you back to the start, if you have chosen the correct path, thus allowing you to continue.
Tags: sprites
Rating: No rating
Download: Download - 1.74 KiB
;This has a list of all coordinates of the rectangles where this will trigger.

dw $00D0,$00D0,$0210,$0210
dw $00F0,$00F0,$0230,$0230
dw $0720,$07A0,$0760,$07A0
dw $0760,$07E0,$07A0,$07E0

!length = #$07			;Replace with actual length of tables, in bytes
	SEP #$20
	CMP !length
	BCS .AreaReturn

Uh, you utilize label maths to avoid having the user manually entering the length of tables:

Posted by: HammerBrother - | Link
Thanks for that. When I get the chance I will see if I can make those improvements.
Posted by:  BTD6_maker - | Link
Moderated with:
  • Golden Egg 0.005
  • Asar v1.71
  • BSNES v115
Replaced a single instance of $7F0000 in the code with !flag (apperantelly, you forgot this one).

It works... but it could have been more user friendly. For example, I'd specify each box for the wrong path on a single line. I'd also make use of Asar maths so you don't have to specify the entries. You also could have made it so to disable sprite 147 (horizontal entrance to the left).

I also see ways of improvement. One example I can think of is the constant switching between 16-bit and 8-bit mode. I can understand it if you set the flag that the wrong path has been taken but if you compare it, you can just clear the high byte with AND #$00FF. Another example is that you don't use the SRAM mirrors $6000-$7FFF beyond the use of the sprite table $7360,x.

Nonetheless, it is a way to disable horizontal warps depending on Yoshi / the player's path so accepted.
Posted by:  MarioFanGamer - | Link
Batata Douce
Originally posted by zacmario
That's awesome.. but what heck is spasm

SNES Professional ASM
Posted by: Batata Douce - | Link
This comment was written and published 8 months after this was submitted... sheesh.
Posted by: parakmahonsmwc - | Link
Ohh yeah I forgot. Thanks
Posted by: zacmario - | Link
levelASM for Yoshi's Island.
Posted by:  MarioFanGamer - | Link
That's awesome.. but what heck is spasm
Posted by: zacmario - | Link

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

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


Follow Us On

  • YouTube
  • Twitch
  • Twitter


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