some of the way that modern linguists know about the pronunciation of classical japanese is because of dictionaries and grammar books written by the spanish and portuguese in the late 1500's.
they spoke a kind of pidjin but also studied each other's languages. some modern japanese words date from this period, including "tempura" and "piman" among others... the englishman, william adams, who rose to the status of hatamoto (direct retainer of the shogun) was apparently fluent in the japanese of the day (no small feat considering the more complex system of honorifcs/etc!).
in the edo era, there wasn't really much contact with the outside word (鎖国), but there was limited relations with the dutch. so many medical and scientific terms came from the so-called "dutch learning."
when japan opened up in 1868, again people studied each other's languages but pidjin also prevailed. there is a fascinating book from this era called Exercises in the "Yokohama Dialect" which displays many aspects of the pidjin used at the time to do simple business transactions. one of my favorite is that they list "oh-my!" as the word for "you." this shows that at that time お前 still had it's original honorific meaning. really interesting stuff!
some dude scanned the book here:
http://www.atrus.org/yokohama_dialect/