Quiero Utiizar Este UberAsm Y Quiero Saber Que Herramientas Necesito:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This routine will reset the level when L or R are pressed, or if set to do so, when Mario dies.
;; Also can clear powerups/Yoshi in the process if you want.
;;
;; This file goes in the "library" folder of UberASMTool. If using the patch version of UberASM,
;; just copy it somewhere into the main folder of UberASM.
;; The files in the "level codes" folder are example usages. You could also use them for game mode 14,
;; if you wanted every level to be able to reload itself.
;;
;; To use this in a level, store the following to scratch RAM then call the routine in your level:
;; $0C = Level number to reload to (low byte). This value goes in $19B8.
;; $0D = Exit properties. This value goes in $19D8; see SMWC's RAM map for details on its format.
;;
;; I recommend patching EA EA EA to $00F60C if you reload death, or setting the level to force music reload in LM.
;; Otherwise, the music will get overwritten by the death music.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!reloadDeath = 1 ; set to 1 to reload deaths too, 0 to return to overworld.
!clearPowerups = 1 ; set to 1 to erase mario's powerups and Yoshi, 0 to not.
!resetSound = $2A ; sound effect for resetting
!resetPort = $1DFC
LRRestart:
LDA $17 ;\
AND #$30 ;| If L and R are pressed together, reload the level.
CMP #$30 ;|
BEQ .reload ;/
if !reloadDeath
LDA $13E0 ;\
CMP #$3E ;| If Mario dies, reload the level.
BEQ .reload ;/
endif
RTL
.reload
LDA #!resetSound
STA !resetPort
STZ $1B93 ; Don't use secondary exits
LDX $95 ;\
LDA $5B ;|
LSR ;|
BCC + ;|
LDX $97 ;|
+ ;|
LDA $0C ;| Reload the current translevel.
STA $19B8,x ;|
LDA $0D ;|
STA $19D8,x ;|
LDA #$06 ;|
STA $71 ;|
STZ $88 ;|
STZ $89 ;/
if !clearPowerups
STZ $18E2 ;\ Don't let Yoshi come along.
STZ $0DC1 ;/
STZ $19 ; Clear Mario's powerup.
STZ $0DC2 ; Clear Mario's item box.
endif
if !reloadDeath
STZ $1496 ; Clear the death timer.
endif
LDA #$7E ;\
STA $02 ;|
REP #$20 ;|
LDX $13BE ;|
LDA $00BFFF,x ;|
CLC ;|
ADC #$19F8 ;|
STA $00 ;| Clear item memory.
LDA #$0000 ;|
LDY #$80 ;|
.clearLoop ;|
STA ($00),y ;|
DEY ;|
DEY ;|
BPL .clearLoop ;|
SEP #$20 ;/
RTL
Gracias