15 users online:  AmperSam,  BeeKaay, cardboardcell, FreezyFoop, Golden Yoshi, Green, Guleyan112,  idol, Kid Power Games, Noah_aka_Feldi, Ryrir, Silver Wind, SomeGuy712x, TreuloseTomate, xhsdf - Guests: 215 - Bots: 196
Users: 65,085 (2,305 active)
Latest user: Gpds2024

Magic Limit

UberASM Repository → Magic Limit

Submission Details

Name: Magic Limit
Author: spooonsss
Type: Level
Includes GFX: No
Includes Hijack: Yes
Featured: No
Description: Limits the number of spawned magikoopa magics (and sprites they turn into). If the limit is reached, the oldest sprite is despawned.

(Screenshot shows limit of 3)
Tags: filter lorom sa-1 sprite
Comments: 3 (jump to comments)
0.0 (0 ratings)
No rating
Download 1.54 KiB | 109 downloads


Comments (3)

 MarioFanGamer Link
Moderated with:
  • Lunar Magic v3.33
  • SA-1 Pack v1.40
  • UberASM Tool v1.5
  • Asar v1.81 (for the unpatch)
  • BSNES v115
One thing to note is that this is somewhat unstable in the sense that you should always use the unpatch should you remove the code as the magic init code will point to garbage and crash the game (it's actually this reason why some — including me — don't like the inclusion of hijacks with UberASM).

Since there is an easy workaround for this (if you intend to not use it, just use the unpatcher), I decided to pass it since I haven't found any other issues.
spooonsss Author Link
Originally posted by Zoreo
Is there a way to get this to work with custom magic?

Sure, you can "JSL read3($01FFFC+1)+7" with the sprite index in x. e.g. you can put it in the magic init routine (and ensure that the sprite is being spawned with state=1 aka init).

print "INIT ",pc
JSL read3($01FFFC+1)+7

Note that running UberASM may change where the code is, so be sure to always run Pixi again after running UberASM.

The magikoopa disassembly spawns magic in state 8. Change 08 to 01 here to spawn it in the init state:
    LDA #$08                        ;\ set sprite status
    STA !14C8,y                     ;/ 
 Zoreo Link
Is there a way to get this to work with custom magic?