Alright, let me explain the code
If you compare something with zero you can completely get rid of CMP as it will do it automatically i.e.
LDA $19
CMP #$00
BEQ Code
is the same as:
LDA $19
BEQ Code
Also, the org is neccesary to rewrite the pause code and jump from there to your code.
And for NOPs, you just have to know how long a routine is and what you really need from it i.e.
LDA $16
AND #$08
BNE Code
RTS
Code
LDA #$02
STA $19
RTS
in HEX: A5 16 29 08 D0 CodeOffset 6B A9 02 8D 19 6B
So you can basically rewrite it to 22 xx xx xx 6B EA EA EA EA EA EA
xx xx xx is your code's location in SNES format and little endian (reversed)
Code
org $00A233 ;\write the JSL and 11 NOPs jsl Paused ;| to $00A233 (SNES format) nop #11 ;/ org $2FB000 ;| write the code below to this address db "STAR" ;\ RATS to prevent other programs dw $0080, $FF7F ;/ to overwrite this Paused: lda $13D4 ;\ Load pause flag bne notPause ;| If no pause, go to notPause beq Pause ;/ If pause, go to Pause notPause: lda #$00 ;\ Tell the game that sta $13D4 ;| it's not paused lda #$45 ;| and play pause effect sta $1dfc ;/ when returning back from the pause rtl Pause: lda #$01 ;\ Tell the game that sta $13d4 ;| it's paused lda #$45 ;| and play pause effect sta $1dfc ;| when pausing the game lda #$02 ;| also give Mario sta $19 ;/ a cape rtl
If you compare something with zero you can completely get rid of CMP as it will do it automatically i.e.
LDA $19
CMP #$00
BEQ Code
is the same as:
LDA $19
BEQ Code
Also, the org is neccesary to rewrite the pause code and jump from there to your code.
And for NOPs, you just have to know how long a routine is and what you really need from it i.e.
LDA $16
AND #$08
BNE Code
RTS
Code
LDA #$02
STA $19
RTS
in HEX: A5 16 29 08 D0 CodeOffset 6B A9 02 8D 19 6B
So you can basically rewrite it to 22 xx xx xx 6B EA EA EA EA EA EA
xx xx xx is your code's location in SNES format and little endian (reversed)