Do you have the latest version of PBP3 (3.0.5.x)?
Sorry if I've already asked, but I have to ask so many people to update I forget who I've asked.

I don't have a problem getting HPWM to work in the simulator.
I know that doesn't mean it will work on real hardware, but I won't have access to an 1825 till monday.


For the encoder.
When using IOC_INT's, determining the direction is as simple as ...
Code:
    DIR = (A ^ B) ^ IOCAF.0
Which is effectively the same thing as your pseudo code.