One of those problems is they could not get their new code books out on time. This meant that once the Americans broke a code book, it was quite a while before they needed to break a new one.

Doing a major operation on an old code book was disastrous at Midway - the Americans knew the timing of the operation and positions of the ships.

I seem to recall this was a factor in Yamamoto's being shot down.

The Germans had told the Japanese "Purple" had been broken early in the war, but they considered that a false story. Americans just weren't smart enough to do that, so the code books weren't a high priority.

No Purple machine survived, they all being ground to sand size, but a small section of one was found in Germany. Interestingly, in trying to build an imitation, the Americans had selected the same telephone switch used by the Japanese.

It is possible there is one on Musashi, sister ship to Yamato, that could be within reach (expensively).