 |
|
 |
|
Views: 236,138,158 Time: 2013-05-21 08:12:47 AM | 12 users online: BlackPass, Bombchu, Hailcrash, Lightvayne, metalgearhunter, mrdeppelman, phenolatukas, Ramidalv, ShadowPhoenix, superdragonyoshi1, tatanga, telinc1 - Guests: 22 - Bots: 15 | Users: 22,857 (1,295 active) Latest: Precious Hippocrates |
|
|
 |
|
 |
|
| Tip: If you plan on making long levels, be sure to include multiple midway points. A patch for this can be found in the Patches section. |
|
|
|
 |
|
 |
|
 |
|
 |
|
| anti cheat grabage |
|
Forum Index - SMW Hacking - General SMW Hacking Help - anti cheat grabage |
|
Pages: 1  |
|
|
|
| Posted on 2012-03-10 05:38:23 AM |
Link | Quote |
|
When I apply the anti cheat glitch I get this trash in the upper right corner I don't know why. I seems to act like the coin counter by when you get a coin it goes up. I think it might have to do with it conflicting with the coin counter patch I have I'm not sure.
Anti cheat patch
Code
; Used Ram: $7E0060
!Freespace = $2B8000
Header
LoROM
org $A274
NOP #10
org $8F7E
JSL Check
NOP #2
org !Freespace
!CodeSize = End-Start
db "STAR"
dw !CodeSize-$01
dw !CodeSize-$01^$FFFF
Start:
Check:
STA $0F14
STX $0F13
LDA $0060 ; ram
CMP #$00
BNE Return
LDA $A268
CMP #$00
BEQ Death
LDA $A273
CMP #$00
BEQ Death
LDA $C576
CMP #$F0
BEQ Death
LDA $CC84
CMP #$F0
BEQ Death
LDA $CC85
CMP #$00
BEQ Death
LDA $E2D3
CMP #$00
BEQ Death
BRA Return
Death:
INC $0060 ; ram
JSL $00F606
Return:
RTL
End:
Coin counter patch
Code
header
lorom
;=====================================;
;POINT THIS TO FREE SPACE!!!!!!!!!!!!!;
;=====================================;
!RAM_DecCoins = $348000 ;
!ShowZeroes = $04 ; 00 - don't show leading zeroes, anything else - show them
org $2C8000 ; <--- POINT TO FREESPACE!! REPLACE XXXXXX WITH SNES ADDRESS.
!RatsTag = RoutineEnd-RoutineStart ; RATS TAG.
db "STAR" ; DON'T REMOVE
dw !RatsTag-$01 ; THIS IF YOU WANT
dw !RatsTag-$01^$FFFF ; TO PROTECT THIS DATA.
RoutineStart: ; Don't remove label
LDA !RAM_DecCoins
BEQ EndDec
LDA $0F34
ORA $0F35
BEQ EndDec
REP #$20
LDA !RAM_DecCoins
DEC
STA !RAM_DecCoins
SEP #$20
LDA #$FF
DEC $0F34
CMP $0F34
BNE EndDec
DEC $0F35
EndDec:
LDA $13CC
BEQ NoInc
IncCoins:
DEC $13CC
REP #$20
LDA $0F34
CMP #$270F
BCC NotMax
LDA #$270F
STA $0F34
SEP #$20
BRA EndInc
NotMax:
SEP #$20
INC $0F34 ; $0F34 = Lowest 256 values.
BNE EndInc
INC $0F35 ; $0F35 = Lowest 65536 values.
EndInc:
LDA $00
JML $008F32
NoInc:
JML $008F3B
ZeroDec:
STA $7F8000
LDA #$0000
STA !RAM_DecCoins
RTL
SaveSRAMRoutine:
JSR GetSaveFile
LoadScoreData:
LDA $0F34,y ; Transfer coin counter data over...
STA $70079F,x ; to SRAM data. ($7007FD - $7007FF)
INX
INY
CPY #32
BCC LoadScoreData
LDX $010A
LDA $009CCB,x
RTL
LoadSRAMRoutine:
PHX
PHY
SEP #$10
JSR GetSaveFile
LoadSRAMData:
LDA $70079F,x ; Transfer SRAM data...
STA $0F34,y ; over to coin counter data.
INX
INY
CPY #32
BCC LoadSRAMData
REP #$10
PLY
PLX
LDA $700000,x
RTL
STZSRAMWhenGameOver:
JSR GetSaveFile
StoreZeroIntoSRAM:
LDA #$00
STA $0F34,y ; Set coins to zero.
STA $70079F,x ; Set coins in SRAM to zero.
INX
INY
CPY #32
BCC StoreZeroIntoSRAM
LDA #$0A
STA $1DFB
RTL
GetSaveFile:
LDA $010A
ASL
ASL
ASL
ASL
ASL
TAX
LDY #0
RTS
ZeroCoins:
LDA #!ShowZeroes
BNE PutZero
LDA #$FC ; hijacked routine
STA $0F29,x
LDA $0F34
ORA $0F35
ORA $0F36 ; if you have 0 coins...
BNE DontStoreZero ; put "0" on the status bar
STZ $0F2E ; 0 for the first digit
DontStoreZero:
RTL
PutZero:
CPX #$02
BCC BlankAtStart
STZ $0F29,x
RTL
BlankAtStart:
LDA #$26
STA $0F2A
LDA #$2E
STA $0F29
RTL
RoutineEnd: ; Don't remove label
;=====================================;
; Values that edit status bar & score.;
;=====================================;
org $008CB2
db $3C ; \
db $FC ; |
db $38 ; |
db $FC ; |
db $38 ; |
db $FC ; |
db $20 ; | Tilemap in status bar.
db $FC ; |
db $20 ; |
db $FC ; |
db $38 ; |
db $FC ; |
db $38 ; |
db $FC ; |
db $20 ; /
org $008CE7
db $FC ; \ Change $FC to $2E if you want the coin sign in front.
db $3C ; |
db $2E ; |
db $3C ; |
db $26 ; |
db $38 ; | More tilemap data.
db $00 ; |
db $38 ; |
db $00 ; |
db $38 ; |
db $00 ; |
db $38 ; |
db $00 ; |
db $38 ; |
db $FC ; |
db $3C ; /
org $008EE5
JSL ZeroCoins
NOP
org $00802A
JSL ZeroDec
;STZ $0F29,x ; <--
org $008F1D
JML RoutineStart
LDA $00
BRA CycleSkip ;\ Skip for reducing cycles
NOP ; |
NOP ; | Useless
NOP ; |
NOP ;/
CycleSkip:
org $008F7E
BRA Skip ; \ Skip to save cycles.
NOP ; |
NOP ; |
NOP ; |
NOP ; / There isn't written to coin total.
Skip:
org $009BCC
JSL SaveSRAMRoutine ; Save data to SRAM!
NOP
NOP
org $009D14
JSL LoadSRAMRoutine ; Load data from SRAM!
org $009E4E
NOP ; Remove the first ; if you...
NOP ; want to disable the score being...
NOP ; deleted when getting to the Game Over screen.
org $009E56
NOP ; Remove the first ; if you...
NOP ; want to disable the score being...
NOP ; deleted when getting to the Game Over screen.
org $00D0DD
JSL STZSRAMWhenGameOver
NOP
org $028766
NOP ; \
NOP ; | Disable score
NOP ; /
org $028770
NOP ; \
NOP ; | Disable score
NOP ; /
org $02AE21
BRA SkipUseless ; \ Skip to save cycles.
NOP ; |
NOP ; |
NOP ; |
NOP ; | Disable score
NOP ; |
NOP ; |
NOP ; |
NOP ; |
NOP ; |
NOP ; /
NOP
NOP
NOP
NOP ; \ Yeah more semi-colons and comments...
NOP ; / Etc.
NOP
NOP
NOP
SkipUseless:
org $05CEF9
NOP ; \
NOP ; |
NOP ; |
NOP ; |
NOP ; |
NOP ; |
NOP ; | Disable score being added at level end.
NOP ; |
NOP ; |
NOP ; |
NOP ; |
NOP ; /
|
|
| Posted on 2012-03-10 06:59:24 AM |
Link | Quote |
|
$008F7E is hijacked by both patches, and that's most likely what's causing the conflict. Try removing everything between the org $008F7E and the next org statement in the coin counter patch, as well as the first two lines after the "Check:" label in the anti-cheat patch, and reapplying both.
Also, though that might not be the cause of your problem, you're supposed to provide a RAM address where it says !RAM_DecCoins. Looks like you confused ROM and RAM there, since $348000 most definitely isn't RAM.
|
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - anti cheat grabage |
|
|
 |
|
 |
The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.
Copyright © 2005 - 2013 - SMW Central Legal Information - Link To UsTotal queries: 29
|
|
|
|