If I understood you correctly, you are trying to get from Room D to room M. If so - (This is based on this map:
If you want the traditional west is at the left of the compass and east is on the right - just interchange east and west on the post.
Go back to Rooms - C, H, L, K, G, F and A.
In A, turn around-south, press button and door closes. Go to B.
In B, press the button at center of door.
Go to C (west), H (south), L (south), K (east), G (north), F (east), J (south), N (south), R (south), S (west), T (west) and U (west).
In U, press button and door closes.
Go to T (east), S (east), R (east), N (north), J (north), F (north), G (west), K (south), O (south) and P (west).
In P, turn left-north, press door and door opens (don't go in). Go to O (west).
In O, turn around-east, press button and door closes. Go back to K (north), L (west), P (south), Q (west) and M (north).
Hope that gets you through.