74HC125 may not be needed
Have you tried running this without the 74HC125? The atmega328 can drive data lines very well on its own. At first I thought it was doing level shifting but it turns out that is not the case (unless I'm not seeing something). So it looks a little redundant.
This project is based on the original SDisk2 (https://tulip-house.ddo.jp/digital/SDISK2/english.html) which used the 74HC125 to buffer the I/O with the Apple II. It may be possible to redesign to eliminate it, I'm not sure.
Incidentally, I have been unable to get either the original SDisk2 or this OLED version working with the 27mhz crystal on the ATMega128 and a 3.3v supply. I had to modify the boards to supply 5v to the AVR and only use 3.3v for the 74HC and the SDCard.
It should be possible to test this by bypassing the 74HC125. DRIVE_EN should still be connected to PC0. I don't currently have anything to try this.
74HC125 delivers 3.3V? but the signals go to an LS174 and LS323 which both need 5V? How can this even work?
The 125 is required to read the DRIVE_EN signal. It's already wired to PC0. Is it used?
This project is based on the original SDisk2 (https://tulip-house.ddo.jp/digital/SDISK2/english.html) which used the 74HC125 to buffer the I/O with the Apple II. It may be possible to redesign to eliminate it, I'm not sure.
Incidentally, I have been unable to get either the original SDisk2 or this OLED version working with the 27mhz crystal on the ATMega128 and a 3.3v supply. I had to modify the boards to supply 5v to the AVR and only use 3.3v for the 74HC and the SDCard.
You are a superstar!! I have been going crazy getting strange results. Lifted the 2 pins from the ATmega chip from the socket and soldered directly on. All working now