Here's a first shot: https://gist.github.com/3240689
It compiles. But I haven't tested it. So I urge you not to test it atm I first need to check/double check/triple check it againt the original C code. But the most important thing to do is to first figure out how the sd is initialized/accessed.

The "worst" bug was that the termination tests for the active wait macro were wrong (bne instead of beq). I also had to "fixed" the font printing. I forgot to specify the palette to use for the text print routine. Hence the crappy results. And last but not least I managed to blast the SD card filesystem
Anyway! It seems to be working now. disk_init returns 0 (which means success). The next test will be to read the CID register (card identification information).

The updated code can be found here : https://gist.github.com/3240689
I attached the test rom. Note that it won't work under Mednafed as SPI_BUSY_WAIT will loop indefinitely. As suggested by Charles, I should use the timer interrupt for timeouts.

KRIKzz forgot the function that opens the sd card for reading (here).
After hours of testing (and sd card reformating) and the help from Chilly Willy, I managed to read sector 0
The code is at the same place and I attached a new version of the test rom.

A lot of stuffs happened behind the hood (namely by email and on some other forum).
To keep things short John Snowdon (aka megatron-uk) picked up the "super tenokoe card" project and started working on the FAT driver using the low level SD card access code I wrote. As he's using HuC, I had to code some C wrapper around the asm routines. You can now read bytes from the SD card but writing is still buggy. At the moment, only single block write is implemented. The only problem is that once you write a single block you can't perform anything afterwards. Every other command will fail. At least the SD card is not fubar.

Huzzah! Multiple sector writes are defeated! The start/dostuff/stop sequence routines were removed. Instead disk_read_sector, disk_write_sector were added.
You can find the code here: sd.asm
I still need to add the C "exports" and send a pull request to John.