Romhacking.net

Romhacking => Newcomer's Board => Topic started by: PresidentLeever on October 25, 2016, 12:29:02 pm

Title: Zelda II hacking (text drawing speed, sword slash cancel)
Post by: PresidentLeever on October 25, 2016, 12:29:02 pm
Hi all,
I'm using the hex editor in FCEUX to try to edit the dialogue text drawing speed in this game.

I'm trying to edit the text speed, which via the GG code at gamehacking.org that sets it to max, I found the address B6BE for, but how do I change the values temporarily and test what happens? When I change a value the game just freezes.

I also found this in these notes: http://www.bwass.org/romhack/zelda2/
F65E: 8C 6605   STY $0566   ; Delay between letters

That could also be what I'm looking for. But the values for that address are FF and 03 when I use the hex editor, why is that?

Thanks.

Edit:
The other thing I'd like to do right now is fix the sword slash cancel when landing and jumping - Link's sword attack is canceled if you attack right before landing or jump right after attacking. I'd like it to take priority over the landing and jumping and it would be best if Link could attack and jump at the same time. I can't find this in the notes, so any help is appreciated.

Title: Re: Zelda II hacking (text drawing speed, sword slash cancel)
Post by: snarfblam on October 25, 2016, 05:53:33 pm
By breaking on writes to the address referenced with the trace logger logging, I was able to pick out these constants and their apparent meanings:

Code: [Select]
; Delay before any text is shown?
03:B65C:A0 08     LDY #$08
03:B65E:8C 66 05  STY $0566 = #$00
03:B661:A9 00     LDA #$00

; Delay between letters
03:B74D:A9 05     LDA #$05
03:B74F:8D 66 05  STA $0566 = #$00
03:B752:EE 69 05  INC $0569 = #$63
03:B755:D0 03     BNE $B75A


; Delay between lines
03:B656:A0 0B     LDY #$0B
03:B658:C9 FD     CMP #$FD
03:B65A:F0 02     BEQ $B65E

So, e.g., changing 03:B74E (F75E in the ROM) from 5 to 1 would make the text much faster.
Title: Re: Zelda II hacking (text drawing speed, sword slash cancel)
Post by: PresidentLeever on October 25, 2016, 06:01:01 pm
Thanks, I'll try those out.

I forgot that the notes were for an unheadered rom, so F66E was where I should've looked.
Title: Re: Zelda II hacking (text drawing speed, sword slash cancel)
Post by: Disch on October 28, 2016, 02:14:42 pm
I forgot that the notes were for an unheadered rom, so F66E was where I should've looked.

Technically it has nothing to do with the header.  It's the way the cartridge maps ROM into addressable memory.

In Zelda 2, CPU address $F65E would actually be offset 0x1F66E

Not like it matters -- I'm just being hyper-technical  =P