i'm just starting with SPI interface on the atmega128, but i don't see why this simple code is not working, i tested on the hardware and checked the result with a logic analyzer. the first thing i notice was that the clock (PB1) has not a nice pulse train. perhaps i have to include something ?
the green line is the clock
the yellow line is the MOSI