dead purple guard in snes

Discuss PoP1 for SNES here.

Moderator: English Moderator Team

Post Reply
User avatar
robert
Sultan
Sultan
Posts: 188
Joined: August 27th, 2011, 7:16 pm
Location: Argentina

dead purple guard in snes

Post by robert » June 18th, 2013, 12:39 am

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?
Image
This will be my face if you can't win any of my mods

User avatar
Iso
Sheikh
Sheikh
Posts: 48
Joined: January 15th, 2010, 11:34 pm

Re: dead purple guard in snes

Post by Iso » June 18th, 2013, 1:42 am

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.

User avatar
robert
Sultan
Sultan
Posts: 188
Joined: August 27th, 2011, 7:16 pm
Location: Argentina

Re: dead purple guard in snes

Post by robert » June 18th, 2013, 3:27 am

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.
Image
This will be my face if you can't win any of my mods

User avatar
Kaslghnoon
Sultan
Sultan
Posts: 138
Joined: February 27th, 2010, 8:35 pm
Location: United States

Re: dead purple guard in snes

Post by Kaslghnoon » June 19th, 2013, 7:42 am

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.

User avatar
robert
Sultan
Sultan
Posts: 188
Joined: August 27th, 2011, 7:16 pm
Location: Argentina

Re: dead purple guard in snes

Post by robert » June 20th, 2013, 10:08 pm

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!
Image
This will be my face if you can't win any of my mods

2233
Efendi
Efendi
Posts: 17
Joined: March 25th, 2014, 3:07 pm

Re: dead purple guard in snes

Post by 2233 » April 22nd, 2014, 4:11 pm

Works,thanks.

David
The Prince of Persia
The Prince of Persia
Posts: 1505
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: dead purple guard in snes

Post by David » November 7th, 2015, 5:49 pm

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.

Post Reply