Language…
7 users online: Cameron, h.carrell, Jordan, Katrina, Mario's GameBase, timothy726, yv64n - Guests: 214 - Bots: 245
Users: 64,667 (2,404 active)
Latest user: DarthHylian

(Nobody helped me) I need help in my patch

(Because nobody helped me in this thread, I made a new thread.)
I need help in my own patch. It should fix the "music speed up" glitch but it makes only worser. What is on these code wrong#smw{o_O?}:
Code
header
lorom

!freespace = $128000	; Free space. Only freespace. Asar do... oh I made an Asar a Patch
!Rama = $58		; Remember: it MUST be cleared by overworld but NOT by level load.

org $008E51
JSL Start		; Or !freespace+$08.

org $008E58
db $01

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.
LDA $0F32		; \ Recover old code...
AND $0F33		; / ... and check if time is 099.
CMP #$09
BNE Return
LDA !Rama
BEQ Incrase
CMP #$02
BCS Return
Incrase:
INC !Rama		; You need this.
Return:
LDA !Rama		; And this.
RTL			; Return
End: ; <- End of RATS Tag and number of bytes to protect.


Code
header
lorom

!Rama = $58		; Remember: it MUST be cleared by overworld but NOT by level load.

org $008E51
autoclean JSL Fixing

org $008E58
db $01

freecode
Fixing:
LDA $0F32		; \ Recover old code...
AND $0F33		; / ... and check if time is 099.
CMP #$09
BNE Return
LDA !Rama
BEQ Incrase
CMP #$02
BCS Return
Incrase:
INC !Rama		; You need this.
Return:
LDA !Rama		; And this.
RTL			; Return


Remember: the first patch is for xkas, the second for asar.

My problem: the music will speed up even if the free ram is set and I don't know, where the problem is#w{=(}. Please help me, than I can submit this patch here and to SMWHacking.de. If this patch isn't accepted than please help me again.
try this
Code
; Definitions
!Freespace = $128000
!Freespace = $1DEF

header
lorom

ORG $008E5B
JSL Routine
NOP

;=========================
org !Freespace
!CodeSize = Ending-Routine  
db "STAR"
dw !CodeSize-$01
dw !CodeSize-$01^$FFFF
Routine:
;=========================
LDA !FreeRam            
BNE Return              
INC !FreeRam
LDA #$FF
STA $1DF9
Return:
RTL
Ending:
Originally posted by mzuenni
try this
Code
; Definitions
!Freespace = $128000
!Freespace = $1DEF

header
lorom

ORG $008E5B
JSL Routine
NOP

;=========================
org !Freespace
!CodeSize = Ending-Routine  
db "STAR"
dw !CodeSize-$01
dw !CodeSize-$01^$FFFF
Routine:
;=========================
LDA !FreeRam            
BNE Return              
INC !FreeRam
LDA #$FF
STA $1DF9
Return:
RTL
Ending:


Defaqu#smw{o_O?}
Originally posted by Xkas/cmd.exe
error: mzunni.asm: line 19: define not declared (yet?)
error: mzunni.asm: line 19: invalid opcode or command [LDA]
error: mzunni.asm: line 21: define not declared (yet?)
error: mzunni.asm: line 19: define not declared (yet?)
error: mzunni.asm: line 21: define not declared (yet?)


Sry, dass ich deinen Namen falsch geschrieben habe^^

Edit: Freespace TWO times#ab{o_O}? ARE YOU MAD? It must be
Code
!Freespace = $128000
!FreeRam = $1DEF
hups copy paste fail :D
but the NOP should be there