Banner
Views: 874,999,426
Time:
10 users online: 8Nairb, Alex No, Amine Retro, DoodleMyNoodle, HelloSammu,  JamesD28, JonnyManjiro, LouisDoucet, S.U,  Tahixham - Guests: 47 - Bots: 69 Users: 48,790 (2,458 active)
Latest: xmariedetx
Winter C3 2021 Content Spotlight
Mirann's "SMAS-Styled Hack" Demo!
Not logged in.
(Nobody helped me) I need help in my patch
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - (Nobody helped me) I need help in my patch
Pages: « 1 » Link
(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.

--------------------
Okay, my layout looks ugly.
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


--------------------
Okay, my layout looks ugly.
hups copy paste fail :D
but the NOP should be there
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - (Nobody helped me) I need help in my patch

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks