Page 1 of 1

dead purple guard in snes

Posted: June 18th, 2013, 12:39 am
by robert
Have you ever used a "dead purple" guard in a snes mod?
If the answer is yes, have you ever noticed that whatever settings or skill you set him he'll be easier to kill than other normal guards?

e.g. You set a dead purple guard with skill values like the "red" guard. Then you test your level, you find the guard and prepare to fight. You attack him, and he parries, and inmediately advances, like a skill 1 guard. He can fight like a normal red guard, but he advances quicker so you can attack him twice without him parrying.

It seems like setting whatever value in "advance" in guards settings doesn't make any effect.
Does someone know how to adjust this?

Re: dead purple guard in snes

Posted: June 18th, 2013, 1:42 am
by Iso
Sounds like his refractory timer is set to 0. Every other guard, including bosses, has this value at 20. As far as I understand, the value is the amount of time(measured in frames) that a guard waits after being struck before he reacts. The "advance" setting relates to the probability of the guard moving forward into striking range. If you set that to 0, a guard will never move forward to strike you, regardless of how long you stand there. A guard will always move forward if it doesn't put him within striking range.

Re: dead purple guard in snes

Posted: June 18th, 2013, 3:27 am
by robert
By default, all values are 0. I set all values exactly like a red guard. Maybe dead purple guard's refactory timer is internally 0 and needs to do some advance hacking to modify it.

Re: dead purple guard in snes

Posted: June 19th, 2013, 7:42 am
by Kaslghnoon
I pulled this one from my "untested hacks" collection so be prepared to revert back to the original values should a problem occur elsewhere after making these changes:

x91F4 to $4C (default: $AD)
x91F5 to $F9 (default: $19)
x91F6 to $91 (default: $05)

It says "Fix the dead purple." I hope it fixes the dead purple without breaking everything else.

Re: dead purple guard in snes

Posted: June 20th, 2013, 10:08 pm
by robert
Kaslghnoon wrote:I pulled this one from my "untested hacks" collection so be prepared to revert back to the original values should a problem occur elsewhere after making these changes:

x91F4 to $4C (default: $AD)
x91F5 to $F9 (default: $19)
x91F6 to $91 (default: $05)

It says "Fix the dead purple." I hope it fixes the dead purple without breaking everything else.
It seemed like it worked :D . No problems (yet).

Thanks!

Re: dead purple guard in snes

Posted: April 22nd, 2014, 4:11 pm
by 2233
Works,thanks.

Re: dead purple guard in snes

Posted: November 7th, 2015, 5:49 pm
by David
Kaslghnoon wrote: x91F4 to $4C (default: $AD)
x91F5 to $F9 (default: $19)
x91F6 to $91 (default: $05)
I looked at that part of the disassembly.

Code: Select all

01:91F4: ad 19 05    LDA $0519
01:91F7: f0 05       BEQ $91fe
01:91F9: ad b9 04    LDA $04b9
01:91FC: d0 0b       BNE $9209
01:91FE: 20 c6 92    JSR $92c6
01:9201: dd 6e 80    CMP $806e,X ; advprob
01:9204: b0 03       BCS $9209
01:9206: 4c 7a 92    JMP $927a

01:9209: 60          RTS
Compare this with the Apple II source: (AUTO.S)

Code: Select all

MaybeAdvance
 lda guardprog
 beq :dumb ;Guard #0 is too dumb to care
 lda gdtimer
 bne ]rts

:dumb jsr rndp
 cmp advprob,x
 bcs ]rts

 jmp DoAdvance
It seems that this was copied to SNES from the Apple II source.
(Just like much code that is not platform-dependent. I have been adding names from the Apple II source to my local copy of the SNES disassembly since I uploaded it.)

Guards with skill (type) zero will advance no matter what, just like in the Apple II (or DOS) version.
Except that skill zero means different things in different versions:
On SNES, it's the dead purple.
On Apple/DOS, it's skill 0, the skill of guards on (the original) level 1.