http://www.youtube.com/watch?v=ct0om0XwQyQ
Shell Spin:
Code
;@xkas
;SlideAttack
;allows you to do a SlideAttack (presumably similar to the one
;in super princes peach, though I've never played the game...)
;by running and ducking. Will kill everything a star will
;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 twenty minutes...)
;Feel free to PM me if you have any problems
!freeram = $13E6 ;Way overused Free Ram. if your having a problem with the patch, this is
!freeram2 = $13E7 ;the first place you should look
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 $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 $7B ;\Check if you're moving
CMP #$25
BCC return ;/
LDA $73 ;\check if you're ducking
BEQ return12 ;/
LDA $1470 ;\Check if you're carrying something
BNE return ;/
LDA $77 ;\ as always, Check if your in the air
AND #$04 ;|
BEQ return ;/
LDA $1490
BNE skip
LDA #$03 ;\Make Star Powered
STA $1490 ;/
LDA #$12 ;\Set timer for pallete to stop setting
STA !freeram ;/(without this it blinks after you stop sliding...)
LDA $18D2
BEQ skip
STZ $18D2
skip:
LDA $86
CMP #$80
BEQ chatto
LDA #$81
STA $86
LDA #$01
STA $1696
chatto:
PHX
LDA $14 ; timer that increases each frame
LSR
LSR
AND #$03 ; animate between 00,01,02 and 03 (4 frames)
TAX ; and put that value into X
LDA Poses7,x ; Load from the table
PLX
STA $13E0 ; store into pose address
return:
LDA !freeram ;Check free ram
BEQ RealReturn
DEC !freeram ;Decrease free ram
BRA RealReturn
Poses7:
db $42,$77,$7E,$77 ; change these - there's a helpful document in the Documents section
return12:
;
;
LDA $1696
BEQ RealReturn
STZ $1696
LDA #$00
STA $86
RealReturn:
RTL
%RATS_end(0)
Floating:
Code
;@xkas
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LR Hook - Version 1.1
; By Smallhacker
;
; Disables L/R and prepares them to be used for other stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;CHANGE THIS ADDRESS TO A FREE SECTION OF THE ROM!
!freeSpace = $0FEF90
!EventNumber = $FF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
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
header
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Disable L/R scrolling
org $00CDF6
BRA lrSkip
org $00CE49
lrSkip:
;Hijack the status bar routine
org $008F49
JSL NewRoutine
org !freeSpace
%RATS_start(0)
NewRoutine:
LDA $17
AND #$20
BNE buttonL
LDA $18
AND #$10
BEQ Return
LDA $17
AND #$20
BNE Return
;INSERT R BUTTON CODE HERE
;Use "BRA Return" instead of RTL
BRA Return
buttonL:
LDA $17
AND #$10
BNE Return
;;;;;;;;;;;;;;;;;;;;
EventCheck:
PHX
LDA #!EventNumber
CMP #$FF
BEQ PassCheck
AND #$07
TAX
LDA #!EventNumber
LSR A
LSR A
LSR A
TAY
LDA $1F02,y
AND Threshold,x
PassCheck:
TAY
PLX
LDA $77 ; If Mario isn't
AND #$04 ; touching the ground...
BNE Return ; Go on.
LDA $1470 ;\Check if you're carrying something
BNE Return ;/
LDA $0075
BNE Return
LDA $0074
BNE Return
LDA $14 ; timer that increases each frame
LSR
LSR
AND #$01 ; animate between 00,01,02 and 03 (4 frames)
TAX ; and put that value into X
LDA Poses2,x ; Load from the table
STA $13E0
LDA #$10
STA $7D
;INSERT L BUTTON CODE HERE
;Use "BRA Return" instead of RTL
BRA Return
Threshold:
db $80,$40,$20,$10,$08,$04,$02,$01
Poses2:
db $7B,$7D ; change these - there's a helpful document in the Documents section
Return:
LDA $0DBE
INC A
RTL
%RATS_end(0)
DoubleJump:
Code
Palettechanger:
;@xkas
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Manual Player Palette Update Patch, by imamelia
;;
;; This patch allows up to change the player's palette on the fly (in the middle of
;; a level or whatever you want) by setting a flag in RAM.
;;
;; Usage instructions:
;;
;; To change the player's palette, store a 24-bit pointer to the new color values
;; to !RAM_PlayerPalPtr and set whatever bit of !RAM_PalUpdateFlag is specified
;; (bit 0 by default). Note that this flag must be set every frame you want to use
;; the custom palette; it clears every time the palette upload routine is run, and
;; the colors don't carry over into the next frame.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
header
lorom
!Freespace = $1CE600
!RAM_PlayerPalPtr = $7FA034
!RAM_PalUpdateFlag = $7FA00B
!FlagValue = $01
org $00A309
JML PlayerPaletteHack
org !Freespace
reset bytes
db "STAR"
dw End-Start-$01
dw End-Start-$01^$FFFF
Start:
PlayerPaletteHack:
LDA !RAM_PalUpdateFlag
AND.w #!FlagValue
BEQ .NormalPalette
LDY #$86
STY $2121
LDA #$2200
STA $4320
LDA !RAM_PlayerPalPtr
STA $4322
LDA !RAM_PlayerPalPtr+1
STA $4323
LDA #$0014
STA $4325
STX $420B
LDA !RAM_PalUpdateFlag
AND.w #!FlagValue^$FFFF
STA !RAM_PalUpdateFlag
.NoUpdate
JML $80A328
.NormalPalette
LDY #$86
STY $2121
JML $80A30E
End:
print "Freespace used: ",bytes," bytes."
print "Next address: $",pc
Zitat
And important: Code for UBERASM
Code
!RAM_PlayerPalPtr = $7FA034
!RAM_PalUpdateFlag = $7FA00B
global_code:
PaletteSetRoutine:
LDA $19
CMP #$02
BNE ReturnW
LDA.b #PaletteTable1
STA !RAM_PlayerPalPtr
LDA.b #PaletteTable1>>8
STA !RAM_PlayerPalPtr+1
LDA.b #PaletteTable1>>16
STA !RAM_PlayerPalPtr+2
LDA #$01
STA !RAM_PalUpdateFlag
ReturnW:
RTS
PaletteTable1:
dw $635F,$7AAB,$61A2,$023F,$1CC5,$318A,$462E,$00B7,$35DF,$03FF
Danke für Hilfe! Ihr müsst mir auch nicht bei jedem einzelnen Patch helfen, vielleicht macht ja auch nur ein einziger Probleme.
Wie kritisch man doch gegenüber dem System wird, wenn man älter wird...