Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- header
- lorom
- ;===============================================;
- ;POINT THIS TO FREE SPACE!!!!!!!!!!!!! - Applied;
- ;===============================================;
- !RAM_DecCoins = $7F969E ;
- !ShowZeroes = $00 ; 00 - don't show leading zeroes, anything else - show them
- org $10EBF5 ; <--- 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
- ORA $0F36
- BEQ EndDec
- REP #$20
- LDA !RAM_DecCoins
- DEC
- STA !RAM_DecCoins
- SEP #$20
- LDA #$FF
- DEC $0F34
- CMP $0F34
- BNE EndDec
- DEC $0F35
- CMP $0F35
- BNE EndDec
- DEC $0F36
- EndDec:
- LDA $13CC
- BEQ NoInc
- IncCoins:
- DEC $13CC
- LDA #$FF
- CMP $0F34
- BNE NotMaxedOut
- CMP $0F35
- BNE NotMaxedOut
- CMP $0F36
- BNE NotMaxedOut
- STZ $13CC
- BRA EndInc
- NotMaxedOut:
- INC $0F34 ; $0F34 = Lowest 256 values.
- BNE EndInc
- INC $0F35 ; $0F35 = Lowest 65536 values.
- BNE EndInc
- INC $0F36 ; $0F36 = All 1000000 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
- 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:
- STZ $0F29,x
- 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 $2E ; \ Change $FC to $2E if you want the coin sign in front.
- db $3C ; |
- db $00 ; |
- db $38 ; |
- db $00 ; |
- 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 $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 ; /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement