Language…
10 users online:  AmperSam, Hammerer, Isikoro, JezJitzu, MorrieTheMagpie, nonamelol1, RPG Hacker, sofy lumi, timothy726, webzinn - Guests: 247 - Bots: 331
Users: 64,795 (2,377 active)
Latest user: mathew

Need help fixing my hack

So ive already posted my hack but theres still a few things bothering me

1: after you finish the stage the order of the layers change.. example:

https://www.youtube.com/watch?v=u6zkF7eLgTw
at 1:44 the layer 3 (the mountain) comes in front of layer 2 (trees)
at 3:17 the layer 3 comes in front of layer 1 and sprites
and so on..

any way to keep them where they originally are?

2: any way to make the death sequence faster? (i mean to not have to wait for that death music to play and fade out.. just fade out and go back to the map..)


im new to patching things so hex edits would be preferable if its possible.

thanks



EDIT: the death i could do what i wanted by changing $00F61C from 30 to 00 not sure if theres any side effect.
i need another help. this one should be easy
i want to change the overworld text from "DEATHS" to "Happy Accidents"

i think ive figured out the letters, but it only shows 7 characters.
ive tried changing almost every value on the code without success.

the asm im using is this: (by Thomas!?)
Code
!counter	=	$7F9D00		; 5 bytes of free RAM that don't get cleared.


org $008F3B
	autoclean JSL SBDisplay
	BRA +
org $008F5B
	+

org $00F614
	JSL DeathCounter

org $05DBF2
	autoclean JSL OWDisplay
	RTL


org $008C89		; Status bar text
    db $0D,$38	; D
    db $0E,$38	; E
    db $0A,$38	; A
    db $1D,$38	; T
    db $11,$38	; H
    db $1C,$38	; S



freecode
SBDisplay:
	LDX #$04
  -	LDA !counter,x
    STA $0F15,x
	DEX
	BPL -
	
  - INX
	LDA !counter,x
	BNE .ret
	CPX #$04
	BEQ .ret
	LDA #$FC
	STA $0F15,x
	BRA -
	
  .ret
	RTL



DeathCounter:
	PHX
	LDX #$04
  -	LDA !counter,x
	INC
	STA !counter,x
	CMP #$0A
	BCC .ret
	LDA #$00
	STA !counter,x
	DEX
	BPL -

  .ret
	LDA #$09
	STA $71
	PLX
	RTL



DeathText:		; Overworld text
	db $07,$00,$0F,$0F,$18,$1F,$00,$02,$02,$08,$03,$04,$0D,$13,$12,$1F
	;   H   A   P   P   Y      A   C   C   I   D   E   N   T   S



OWDisplay:
	PHB
	PHK
	PLB
	
	LDY #$06
	LDX #$0C
  - LDA DeathText,y
	STA $7F8381,x
	LDA #$39
	STA $7F8382,x
	DEX #2
	DEY
	BPL -
	
	LDA #$7F
	STA $0F
	LDA #$83
	STA $0E
	LDA #$8F
	STA $0D
	
	TYX : INY
	STZ $00
  - INX
	LDA $00
	BNE +
	CPX #$04
	BEQ +
	LDA !counter,x
	BEQ -
  + LDA !counter,x
	CLC : ADC #$22
	STA [$0D],y
	INY
	LDA #$39
	STA [$0D],y
	INY
	INC $00
	CPX #$04
	BNE -
	
	LDA #$FF
	STA [$0D],y
	
	LDA #$50
	STA $7F837D
	LDA #$56
	SEC
	SBC $00
	STA $7F837E
	LDA #$00
	STA $7F837F
	LDA $00 : ASL
	CLC : ADC #$0D
	STA $7F8380
	CLC : ADC #$05
	STA $7F837B
	PLB
	RTL
I think this will work
Code
	LDY #$06
	LDX #$0C
  - LDA DeathText,y


Change this to

Code
	LDY #$0E
	LDX #$1C
  - LDA DeathText,y
unfortunately it changed nothing. it still appears only "HAPPY A"
Constant width stripe images aaaaa

Code
table "owtext.txt"

!counter	=	$7F9D00		; 5 bytes of free RAM that don't get cleared.


org $008F3B
	autoclean JSL SBDisplay
	BRA +
org $008F5B
	+

org $00F614
	JSL DeathCounter

org $05DBF2
	autoclean JSL OWDisplay
	RTL


org $008C89		; Status bar text
    db $0D,$38	; D
    db $0E,$38	; E
    db $0A,$38	; A
    db $1D,$38	; T
    db $11,$38	; H
    db $1C,$38	; S



freecode
SBDisplay:
	LDX #$04
  -	LDA !counter,x
    STA $0F15,x
	DEX
	BPL -
	
  - INX
	LDA !counter,x
	BNE .ret
	CPX #$04
	BEQ .ret
	LDA #$FC
	STA $0F15,x
	BRA -
	
  .ret
	RTL



DeathCounter:
	PHX
	LDX #$04
-	LDA !counter,x
	INC
	STA !counter,x
	CMP #$0A
	BCC .ret
	LDA #$00
	STA !counter,x
	DEX
	BPL -

.ret
	LDA #$09
	STA $71
	PLX
	RTL

DeathText:		; Overworld text
	db "HAPPY ACCIDENTS "
.end

OWDisplay:
	PHB : PHK : PLB
	
	LDY.b #DeathText_end-DeathText-1
	LDX.b #(DeathText_end-DeathText-1)*2
-	LDA DeathText,y
	STA $7F8381,x
	LDA #$39
	STA $7F8382,x
	DEX #2
	DEY
	BPL -
	
	LDA #$7F
	STA $0F
	LDA #$83
	STA $0E
	LDA.b #$83+((DeathText_end-DeathText-1)*2)
	STA $0D
	
	TYX : INY
	STZ $00
-	INX
	LDA $00
	BNE +
	CPX #$04
	BEQ +
	LDA !counter,x
	BEQ -
+	LDA !counter,x
	CLC : ADC #$22
	STA [$0D],y
	INY
	LDA #$39
	STA [$0D],y
	INY
	INC $00
	CPX #$04
	BNE -
	
	LDA #$FF
	STA [$0D],y
	
	LDA #$50
	STA $7F837D
	LDA.b #$5F-(DeathText_end-DeathText)
	SEC
	SBC $00
	STA $7F837E
	LDA #$00
	STA $7F837F
	LDA $00 : ASL
	CLC : ADC.b #(DeathText_end-DeathText)*2-1
	STA $7F8380
	CLC : ADC #$05
	STA $7F837B
	PLB
	RTL
i dont have the owtext.txt so ive used the codes for the text

i dont understand what you did but it worked. Thank you very much.
Oh right, sorry. If you (or whoever else finds this thread) still want it then here (owtext.txt)
It's much easier to work with than the hex values directly.
Originally posted by TheBiob
Oh right, sorry. If you (or whoever else finds this thread) still want it then here (owtext.txt)
It's much easier to work with than the hex values directly.

for sure it helps.
thanks a lot