While certainly Nintendo getting nowhere with the Cube marketwise was a factor in their big push for revolutionizing, I don't think it's as big a factor as you make it Ian. Let's not forget that Nintendo was doing just superbly with the SNES, yet they still introduced the analog stick which was, in its own right, a revolution at the time. They also introduced force feedback, during that era which followed the Super Nes' success. So right there we have examples of innovations that Nintendo's thrown in DESPITE coming off of a winning console. Oh, and if you want to count failed innovations, we can lump in Gunpei Yokoi's Virtual Boy too to make it 3 huge innovations not really spurred on by "losing a gen."
But of course, Nintendo here is spurred by the realization that they're stuck, but not only competitively. Nintendo has also been stuck creatively as well. Mario Sunshine, Mario Kart

D, WindWaker, all imparted some sort of ... "this isn't exactly IT" from Nintendo fans. And I'm willing to bet that Miyamoto knew it. Mario Kart: DD's long dev time is probably an example of a very long nintendo-esque experimentation period that vielded almost no fruits. I mean, even as far back as early Cube Miyamoto was starting to talk about wanting the "joystick and ONE BUTTON" game paradigm that he's come close to realizing with the rev controller. It's amazing to think that EVEN THEN he was toying with the ideals that would later be the revolution.
So we can see that while getting stuck marketwise this generation is certainly a factor, we shouldn't be in doubt of Nintendo's drive to innovate. They innovated amazingly with the N64 coming out of the highly successful SNES, and they've given plenty of hints during the Cube era that show that they were innovating even then regardless of how their console was doing merely because they were feeling constricted creatively and were already thinking ahead to what new boundaries they could open up.
Yes, Competition is good. But it isn't what drives Miyamoto. And in the end, Miyamoto is what drives Nintendo, for better or for worse.
~Carmine M. Red
~Spending Thanksgiving in Mexico!