this is too complicated to answer on here. Several suggestions. First, you can go to www.noonsite.com
and check each of the countries you expect to visit, they normally give current and detailed information about what is needed. Once at the site, go to "countries" and select what country you need information for. Then click on "formalities" or "immigration" and read carefully. For example, for Brazil EU countries don't need a visa if you are flying in, but it mentions that most places insist on everyone coming in by private yacht have a visa. Further on, visas are only good for 3 months after issuance.
Another resource is each of the countries' web page, which should (but will not necessarily do so) give you current information about requirements, etc.
for general information, you can try the CIA world factbook, though it is numbers and info. that most cruisers aren't particularly interested in. http://www.cia.gov/cia/publications/factbook/
Also, Lonely Planet guides http://www.lonelyplanet.com/
- most in your library, also on line, and you can check out the Thorn Tree forum http://thorntree.lonelyplanet.com/
- I like to go through them, there is a lot of information close to the ground, since lots of backpackers use this resource.