print in 235 --> 255
print in 63 --> 255
print in 235 --> 0
print in 63 --> 0
MiST's SPI emulation sends '1' when the SD-card doesn't do anything. So it's indistinguishable from not used ports. A real divMMC seems to return the last read byte. I can modify the core, but this detection method is not the best. It should issue a simple command to the SD Card, and wait for an answer, it would be more robust.
Re-tried on MiST, print in 235 (when DivMMC is enabled) returns 69 for me sometimes. So relying on it is unreliable.
Tried on a real Spectrum +2A with DivMMC, 3 out of 6 times, it returned 255. So this loader would be unreliable on a real machine, too.