The only wasy the Japanese can win is thru treachury, They don't have any cannons capable of hurting the US ships..
Do what?
The Japanese had plenty of cannon. They weren't very good cannon, but they had them.
Basically the Tokugawa Shogunate still had everything Ieyasu had the morning after Sekigahara. Including hundreds of cast-iron muzzle-loading round shot cannon. State of the art for the early 1600s.
Totally obsolete by the 1800s, and of course most of them were scattered all over Japan... but they still worked, and enough of them could have sunk the Black Ships with no trouble at all.
Note that just a few years later, in the Satsuma War, the Royal Navy would engage in a gun duel with the Japanese on shore at Kagoshima. The Japanese still had those same crude cannon... but they had assembled a lot of them, including some very large guns, in batteries all aroud the harbor.
The range of the Japanese guns was very short, so if the Brits had been patient they could methodically have silenced them from a distance. But the Royal Navy wasn't there for a long-drawn-out gun duel; they were on a punitive expedition. Their goal was to trash the town and, if possible, land Marines and show the flag.
Result: the fight was a draw. The Brits wreaked havoc on the town and the ships in the harbor, but they couldn't silence the enemy batteries. Because they got in close, they took some casualties, including the captain of one British ship. The Japanese actually claimed the action as a victory; despite the massive property damage, the Brits were unable to land their Marines and take the town, and eventually sailed away with the Japanese still firing after them.
Anyway, point being: they had cannon.
(Could the Japane have sunk the American ships? Probably. But they were bright enough to see that this would be difficult, and would lead to immense further complications. And, as noted, they were seriously considering opening up already.)
Doug M.