I tried a few things, normally simply deasserting the Chip Select of the SD should work, but it doesn't (since it is low active, simply resetting Uzebox would start with it being asserted, so ther's a certain conflict). It felt ridiculous, did some research with only people struggling about the issue but never resolving... Then found that the SD has some "quirks" that it won't simply let that MISO go.
Finally I thought what if... So what if I just handled the SD card like an SD card. There comes CunningFellows's sdBase (which is already part of the master kernel), did a simple sdCardInitNoBuffer() before going on to the SPI RAM thing, and at last, it works! So if you treat the thing like it should be treated, it will behave, it seems (and something using the SPI RAM is very likely using it since it wants to put data on it fetched from somewhere, so...)
Playing with SPI RAM
Re: Playing with SPI RAM
Another great find Jubatian! I recall experiencing this very same noise and somehow relating it to the SD interface but I could find a fix at that time. So the trick is just to put the SD card in a known state and then deassert it to use the SPI RAM. Even if the game does not need the sd (which would be doubtful as you remarked), using Cunning's sd lib is ok. Unused functions will just be optimized away anyway. I've added a note to the wiki's SPI RAM page to this effect.
Thanks for the troubleshooting!
Thanks for the troubleshooting!
Re: Playing with SPI RAM
If you have a code snippet that shows reading from SD and writing to SPI and the de/assertions etc required in between, I would be very grateful to see a working implementation
Re: Playing with SPI RAM
I didn't make such, just experimented with the SPI RAM demo attempting to find the proper solution, adding the mentioned SD code to it. One could make a version of this which loads the image from the SD card and writes it into the SPI RAM. Interestingly if you did it the "natural" way, it would likely just work as for this you would naturally init and start loading from the SD card first.