And is it true they would have surrendered earlier if the Allies could have guaranteed Emperor Hirohito's safety? Was the only other way the war would end if the Allies launched a large invasion committing hundreds of thousands of ground troops with air and naval support? How many Japanese people and how much of the leadership wanted to surrender earlier?
This is a pretty broad question. No one in Japan who wasn't a raving lunatic thought that Japan would "win" by 1945. What the Japanese leadership was hoping for was to inflict enough losses on the United States that US leadership would be willing to reach a negotiated peace that was acceptable to Japan.
A big turning point for the Japanese was the Battle of the Philippine Sea and the fall of the Marianas in the summer of 1944. Prior to that the IJN still harbored a hope (or fantasy?) that they could fight and win a "decisive battle" with the USN. They weren't delusional enough to think that they could then march on to Hawaii or anything like that, but the idea was that if Spruance's fleet had been smashed the US would have been forced to the negotiating table. My main source for this is Ian Toll's The Conquering Tide.
The next time the US & Japanese fleets fought at Leyte Gulf, the IJN's strategy was very different. By this point there was no longer any hope of a Tsushima-style decisive battle. Instead of defeating Halsey's fleet the idea was that they'd draw the main American force away with a decoy fleet and then inflict heavy damage on the unprotected landing forces. After that kind of defeat they hoped that the US would be more amenable to a negotiated end to the war. My main source here is Thomas Cutler's The Battle of Leyte Gulf.
Once the Philippines had fallen Japanese strategy was reduced to little more than apocalyptic insanity. In The Fleet at Flood Tide James Hornfisher claims that there were people at top of the Japanese military and government who realized how pointless this all was, but until Hirohito's mind was changed that wasn't going to happen. Hornfisher's take on the atomic bombs was that they were what finally jolted the emperor out of his fantasy world and made him realize what had to be done.
Re: other way the war would end, the Americans could've continued to firebomb and starve Japan as the Soviets rolled into Manchuria. Whether that would have caused the Japanese to surrender unconditionally is an unanswerable question. The allies were certainly capable of reducing Japan to a pre-industrial society and causing massive numbers of deaths through starvation but who knows if that would have "broken" Hirohito the same way that the atomic bombs did.