I recall an article “Why We Dropped the Bomb” in Civilization magazine... stated that the Japanese envoy to the US was SHOWN a nuclear detonation in New Mexico. They phoned home to say “It is either a hoax or they can’t have any more, so continue the war”... not like they weren’t warned.
I've always thought that the US should have first dropped a bomb in Japan in an uninhabited or less inhabited part of the country as an example. It still may not have worked but the second bomb could have targeted a city. The Japanese reaction may still have been the same. IIRC, this was overruled but I didn't get a full understanding as to why.
There is little doubt that the bomb ended the war with Japan and it was unlikely that it would have ended any time soon otherwise.