Was?! Die Signaturlänge wurde auf 1024 Zeichen beschränkt? #notmysignaturelength
Was?! Die Signaturlänge wurde auf 1024 Zeichen beschränkt? #notmysignaturelength
o4c1024>c1024c1024 c1024 c1024 c1024 c1024 c1024 c1024 c1024
;FirePowerTimer
;Makes it so firepower works on a timer. e.g. when you get a firepower,
;you will only have it for a certain amount of time
;frames you have firepower is Timer RAM * Multiplier RAM
;HuFlungDu
;Note, hijacks the SAME status bar routine as everybody else since I'm far too lazy to find a better
;one, so check if I hijack te same place (8DC4) as any of your other patches.
;No credit neccesary (I knocked it out in about five minutes...)
;Feel free to PM me if you have any problems
!freeram = $0660 ;set to free RAM
!freeram2 = $0661 ;I use the same freeram as a start as everybody else,
;so your probably going to want to change these.
macro RATS_start(id)
db "STAR"
dw RATS_Endcode-RATS_Startcode
dw RATS_Endcode-RATS_Startcode ^#$FFFF
RATS_Startcode:
endmacro
macro RATS_end(id)
RATS_Endcode:
endmacro
lorom ;\ ROM is LoRom
header ;/ and has a header.
org $01C5EC ;\Hijack getfire routine
JSL setram ;|and jump to code
NOP ;/then get rid of one byte because I oerwrite the rest of the command
org $8DC4 ;\ Hijack NMI routine
JSL StatusCode ;| and jump to our code
NOP ;/ also NOP one time.
org $218015 ;| POINT TO FREE SPACE!!!
%RATS_start(0)
StatusCode:
LDA #$02 ;\ Restore previous
STA $420B ;/ hijacked NMI routine.
LDA $19 ;\Check if you have firepower
CMP #$03 ;|
BNE return ;/
DEC !freeram2 ;\decrease the "multiplyer" RAM "allows me to make it take FF*2 frames
LDA !freeram2 ;|and check if it has reached 0 yet
BNE return ;/
LDA !freeram ;\if it has and the first timer isn't zero
BEQ return ;/
LDA #$02 ;\This is the Mulitplier RAM
STA !freeram2 ;/
DEC !freeram ;decrease timer
LDA !freeram ;\check if it's zero yet
BNE return ;/
LDA #$01 ;\make mario big
STA $19 ;/
return:
RTL
setram:
LDA #$20 ;\Restore hijack
STA $149B ;/
LDA #$FF ;\This is the Timer RAM
STA !freeram ;/
RTL
%RATS_end(0)
;Disable Jumping While Ducking Patch
;Origional By: Ixtab
;"Fix" By: Chdata/Fakescaper
;Does not disable spin jumping globally (while still being able to jump off of Yoshi)
;Because there is already a patch on SMWC that does this
;Also unlike Ixtab's version, the jumping SFX does not play when you try to jump while ducking, and it's now impossible to see Mario "twitch" from trying to show his jumping frame.
;Incase you're wondering, you can still jump while sliding.
;If you want to disable jumping while sliding too, look for ";ORA $13ED" and uncomment it, (Remove the semicolon)
header
lorom
;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!freeSpace = $958000 ; change this to whatever
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;
org $8F7E
JSL Main
NOP #2
org !freeSpace
db "STAR"
dw Encode-Main
dw Encode-Main^#$FFFF
Main: ;Start of Patch
STA $0F14 ;Put hacked code back.
STX $0F13 ;More code restoration
LDA $73 ;Mario's Ducking Flag
;ORA $13ED ;***UNCOMMENT THIS LINE IF YOU WANT TO DISABLE JUMPING WHILE SLIDING***
BEQ bbb ;If not ducking skip this
REP #$20 ;16-bit A
LDA #$8080 ;This
TSB $0DAA ;-Disables jumping while ducking
TSB $0DAC ;-Disables spin jumping while ducking (comment this out if you want to still be able to, the patch will still be able to counter break as described in the description. Incase you're stupid, duck jumping as big Mario to fit into small places.)
SEP #$20 ;8-bit A
bbb: ;labbbel
RTL ;Return
Encode: ;End of Patch
print "I'm psychic, I knew that you would patch this."
print "-Chdata-"
header
lorom
;Walljump/Note Block Glitch Fix by lolcats439
;fixes the wall jumping glitch and the note block-wall death glitch
;This patch moves some of SMW's anti-wall-clipping code to freespace, and calls it from different hijacks, so it runs before the "Mario is on ground" bit of $77 would get set, so that the bit doesn't get set when jumping at a wall. Then when trying to walljump, you can't "catch" the block anymore, because you don't clip inside the block for one frame.
;It fixes the note block clipping glitch by changing the blocked bits that will be set to $77 to 12 (blocked from up and right) if it is 11 (blocked from up and left) and Mario is moving to the left. This would be a separate patch, but it needs to use the same hijack used to fix the walljumping glitch.
;post bugs/comments in this thread: http://www.smwcentral.net/?p=thread&id=35691
!FREESPACE = $168000 ; change to freespace
org $00E9F6 ;\ Hijack code and JSL to custom code
JSL SideScreen ;/ this hijack runs when Mario is against the side of the screen
NOP
org $00EA16 ;\ NOP out the anti-clipping routine here
BRA Skip1 ;|
NOP #10 ;|
Skip1: ;/
org $00EBD9 ;\ reset old hex edit which didn't really fix the note block death glitch
db $02 ;/
org $00EC7E ;\ Hijack code and JSL to custom code
JSL Block ;| this hijack runs when Mario is against a block
NOP ;/
org $00ED1C
JSL BigMarioStuckInOneBlockHighSpace
NOP #4
org !FREESPACE
!CodeSize = CodeEnd-CodeStart ;\
RATS: ;| Write RATS tag to
db "STAR" ;| prevent other programs
dw !CodeSize-$01 ;| from overwriting this
dw !CodeSize-$01^$FFFF;/ code!
CodeStart:
Block:
CMP #$11 ;\ fix note block clipping glitch by changing the blocked bits
BNE Skip6 ;| to be set depending on Mario's direction
PHX ;|
LDX $7B ;|
BPL Skip7 ;|
LDA #$12 ;|
Skip7: ;|
PLX ;|
Skip6: ;/
TSB $77 ;\ restore old code
AND.b #$03 ;|
TAY ;/
LDA $00 ;\ Use $00 as temporary freeRAM, restoring its value at the end
PHA ;/
LDA $96 ;\ Don't move Mario outside the block instantly if his head is in the block
AND #$F0 ;|
STA $00 ;|
LDA $98 ;|
AND #$F0 ;|
CMP $00 ;|
BNE Skip2 ;|
JSR NoClipping ;|
BRA Skip3 ;|
Skip2: ;/
PHX ;\ Put blocked bits into X to select side of block to move Mario to
LDA $77 ;|
AND #$03 ;|
LSR A ;|
TAX ;/
LDA $1933 ;\ If layer 1 interaction is being processed, Mario is being crushed horizontally
CMP #$00 ;| between layer 1 and layer 2, and the layer 1 block is on the right, set X to 00
BNE Skip5 ;| to avoid a glitch where Mario clips in and out of the block really fast before dying
LDA $77 ;|
AND #$03 ;|
CMP #$03 ;|
BNE Skip5 ;|
CPY #$01 ;|
BNE Skip5 ;|
LDX #$00 ;|
Skip5: ;/
LDA $94 ;\ Move Mario outside the block instantly
AND #$F0 ;|
ORA.l $00E911,x;|
STA $94 ;|
PLX ;/
Skip3:
PLA
STA $00
RTL
SideScreen:
PHX
TYX
LDA.l $00E90A,x;\ restore old code
TSB $77 ;/
PLX
JSR NoClipping
RTL
BigMarioStuckInOneBlockHighSpace:
LDA $77 ;\ If blocked from the right, do nothing
AND #$01 ;| If not blocked from the left, subtract 1 from Mario's x position
BNE Skip4 ;| If blocked from the left, subtract 2 from Mario's x position
REP #$20 ;|
DEC $94 ;|
SEP #$20 ;|
LDA $77 ;|
AND #$02 ;|
BEQ Skip4 ;|
REP #$20 ;|
DEC $94 ;|
SEP #$20 ;/
Skip4:
LDA $77 ;\ restore old code
AND.b #$FC ;|
ORA.b #$09 ;|
STA $77 ;/
RTL
NoClipping:
LDA $77 ;\ anti-clipping routine moved here
AND #$03 ;|
BEQ Return ;|
AND #$02 ;|
PHX ;|
TAX ;|
REP #$20 ;|
LDA $94 ;|
CLC ;|
ADC.l $00E90D,x;| ADC.l doesn't work with y, so this uses x
STA $94 ;|
SEP #$20 ;|
PLX ;/
Return:
RTS
CodeEnd:
header
lorom
;P-balloon/Cloud Fix patch by lolcats439
;Fixes the glitch that lets you go though blocks while using a P-balloon or Lakitu cloud.
!FREESPACE = $168000 ; change to freespace
org $02D214 ;\ Hijack code and JSL to custom code
JSL CodeStart ;/
org !FREESPACE
!CodeSize = CodeEnd-CodeStart ;\
RATS: ;| Write RATS tag to
db "STAR" ;| prevent other programs
dw !CodeSize-$01 ;| from overwriting this
dw !CodeSize-$01^$FFFF;/ code!
CodeStart:
LDA $15 ;\ restore overwritten code
AND.b #$03 ;/
CMP #$03
BNE Skip
LDA #$01
Skip:
CMP #$00
RTL
CodeEnd: