Ach wirklich?
Ich kann einige (ASM)-Codes fixen. <!-- s:) -->:)<!-- s:) -->
lorom ; Tausche zu hirom aus, wenn die Rom eine sogenannte HiRom ist.
header ; Ist die Rom eine .sfc Datei, dann lösche es.
LDA $19
CMP #$00 ; Powerup nicht 0? Mario nicht klein!
BNE Nichtklein
LDA #$10
BRA Addieren
Nichtklein:
CMP #$01 ; Powerup nicht 1? Mario nicht Super Mario!
BNE NichtSuperMario
LDA #$25
BRA Addieren
NichtSuperMario:
CMP #$02 ; Powerup nicht 2? Mario nicht Cape Mario!
BNE NichtCapeMario
LDA #$35
BRA Addieren
NichtCapeMario: ; Dann kann Mario höchstens noch Feuer Mario sein
LDA #$50
Addieren:
CLC
ADC $0DBF
STA $0DBF
LDX $19
LDA MuenzTabelle,x
CLC
ADC $0DBF
STA $0DBF
MuenzTabelle:
db $10,$25,$35,$50
16BitTabelle:
dw $0000,$0002,$3456,$7895,$AAFF
24BitTabelle:
dl $700360,$700366,$70036A
TestTabelle1:
db $00,$01,$02,$03,$04,$05
...00 01 02 03 04 05...
TestTabelle2:
dw $0100,$0302,$0504
TestTabelle3:
dl $020100,$050403
LDX/Y ZahlOderAdresse
LDA Adresse,X/Y ;Rom oder Ram
STA RamAdresse,Y/X
LDA,X/Y Adresse ; = Lädt Adresse + Zahl des Registers am ende
STA,Y/X Adresse ; = Speichert in die Ram Adresse + Zahl des Registers am ende
Beispiel:
LDX $19 ;Lädt Powerup in X
LDY $0DA0 ;Lädt momentaner Spieler in Y
LDA $00F8E8,x ;Lädt aus der Rom aus der Adresse $00F8E8 in A
STA $0DB6,y ;Speichert in Marios oder Luigis Münzen
header : lorom
org $029347
db $20,$E2,$FF ;Welches gleich ist wie JSR $FFE2
org $02FFE2
db $A9,$02,$4C,BA,$91 ;In ASM: LDA #$02 : JSR $91BA
header : lorom
!Freespace = $xxxxxx ;Freie Adresse
org $xxxxxx
JSL Start ;Oder !Freespace+$08
org !Freespace
!CodeSize = End-Start ; <- RATS Tag define.
db "STAR"
dw !CodeSize-$01
dw !CodeSize-$01^$FFFF
Start: ;<- Beginning of RATS Tag, and bytes to protect.
(Code den ihr schreiben wollt)
End: ; <- End of RATS Tag and number of bytes to protect.
header : lorom
org $xxxxxx
autoclean JSL CustomCode
freespace
CustomCode:
header
lorom
!freespace = $128000 ; Free space. Only freespace. Asar do... oh I made Asar Patch
!Rama = $58 ; Remember: it MUST be cleared by overworld but NOT by level load.
org $008E51
JSL !freespace ; Xkas doesn't need a "Label" to this.
org $008E57
NOP : NOP
org !freespace
header
lorom
!Rama = $58 ; Remember: it MUST be cleared by overworld but NOT by level load.
org $008E51
autoclean JSL Fixing
org $008E51
NOP : NOP
freecode
Fixing:
[...]
org !freespace
FIAR: STZ $170B,x ; \ Erase fireball
JSR SUB_SMOKE ; / Show smoke effect
LDA #$06 ;\
STA $9C ; | Generate coin block
JSL $00BEB0 ;/
Return: RTL
SUB_SMOKE: LDY #$03 ; \ find a free slot to display effect
FINDFREE: LDA $17C0,y ; |
BEQ FOUNDONE ; |
DEY ; |
BPL FINDFREE ; |
RTS ; / return if no slots open
FOUNDONE: LDA #$01 ; \ set effect to smoke
STA $17C0,y ; /
LDA $1715,x ; \ set y pos of smoke
STA $17C4,y ; /
LDA $171F,x ; \ set x pos of smoke
STA $17C8,y ; /
LDA #$18 ; \ set smoke duration
STA $17CC,y ; /
RTS
!Map16Tile = $xxxx
FIAR: STZ $170B,x ; \ Erase fireball
JSR SUB_SMOKE ; / Show smoke effect
PHX ; \
REP #$10 ; |
LDX #!Map16Tile ; |
JSR ChangeMap16 ; |
SEP #$10 ; |
PLX ; /
Return: RTL
SUB_SMOKE: LDY #$03 ; \ find a free slot to display effect
FINDFREE: LDA $17C0,y ; |
BEQ FOUNDONE ; |
DEY ; |
BPL FINDFREE ; |
RTS ; / return if no slots open
FOUNDONE: LDA #$01 ; \ set effect to smoke
STA $17C0,y ; /
LDA $1715,x ; \ set y pos of smoke
STA $17C4,y ; /
LDA $171F,x ; \ set x pos of smoke
STA $17C8,y ; /
LDA #$18 ; \ set smoke duration
STA $17CC,y ; /
RTS
PrematureEnd:
PLX
PLY
PLB
PLP
RTS
ChangeMap16:
PHP
SEP #$20
PHB
PHY
LDA #$00
PHA
PLB
REP #$30
PHX
LDA $9A
STA $0C
LDA $98
STA $0E
LDA #$0000
SEP #$20
LDA $5B
STA $09
LDA $1933
BEQ SkipShift
LSR $09
SkipShift:
LDY $0E
LDA $09
AND #$01
BEQ LeaveXY
LDA $9B
STA $00
LDA $99
STA $9B
LDA $00
STA $99
LDY $0C
LeaveXY:
CPY #$0200
BCS PrematureEnd
LDA $1933
ASL A
TAX
LDA $BEA8,x
STA $65
LDA $BEA9,x
STA $66
STZ $67
LDA $1925
ASL A
TAY
LDA [$65],y
STA $04
INY
LDA [$65],y
STA $05
STZ $06
LDA $9B
STA $07
ASL A
CLC
ADC $07
TAY
LDA [$04],y
STA $6B
STA $6E
INY
LDA [$04],y
STA $6C
STA $6F
LDA #$7E
STA $6D
INC A
STA $70
LDA $09
AND #$01
BEQ SwitchXY
LDA $99
LSR A
LDA $9B
AND #$01
BRA CurrentXY
SwitchXY:
LDA $9B
LSR A
LDA $99
CurrentXY:
ROL A
ASL A
ASL A
ORA #$20
STA $04
CPX #$0000
BEQ NoAdd
CLC
ADC #$10
STA $04
NoAdd:
LDA $98
AND #$F0
CLC
ASL A
ROL A
STA $05
ROL A
AND #$03
ORA $04
STA $06
LDA $9A
AND #$F0
REP 3 : LSR A
STA $04
LDA $05
AND #$C0
ORA $04
STA $07
REP #$20
LDA $09
AND #$0001
BNE LayerSwitch
LDA $1A
SEC
SBC #$0080
TAX
LDY $1C
LDA $1933
BEQ CurrentLayer
LDX $1E
LDA $20
SEC
SBC #$0080
TAY
BRA CurrentLayer
LayerSwitch:
LDX $1A
LDA $1C
SEC
SBC #$0080
TAY
LDA $1933
BEQ CurrentLayer
LDA $1E
SEC
SBC #$0080
TAX
LDY $20
CurrentLayer:
STX $08
STY $0A
LDA $98
AND #$01F0
STA $04
LDA $9A
REP 4 : LSR A
AND #$000F
ORA $04
TAY
PLA
SEP #$20
STA [$6B],y
XBA
STA [$6E],y
XBA
REP #$20
ASL A
TAY
PHK
PER $0006
PEA $804C
JML $00C0FB
PLY
PLB
PLP
RTS