[Answered]How to find port addresses for a given pin?

The Arduino core provides a macro "digitalPinToPort(pin)" that should do what you want. It's in
.../packages/arduino/hardware/sam/1.6.5/variants/arduino_due_x/variant.h

Note that this is the address of the "PIO" controller associated with that pin, which contains a bunch of additional structure, AND controls up to 32 pins.
There are other useful macros as well.

#define digitalPinToPort(P)        ( g_APinDescription[P].pPort )
#define digitalPinToBitMask(P)     ( g_APinDescription[P].ulPin )
#define portOutputRegister(port)   ( &(port->PIO_ODSR) )
#define portInputRegister(port)    ( &(port->PIO_PDSR) )

These are the sorts of things that library writers use to "bit-bang" protocols at a higher speed than would be possible using digitalWrite(), without losing the arduino-style pin numbering. See also: digitalWrite() is embarassingly slow on Due... · Issue #4030 · arduino/Arduino · GitHub