How did the N64 do as well as it did?

The N64 might have got beaten by the PS1, but it sure killed the Saturn in the west. On paper, the N64 sounded like it would be a failure. $30 (either 8MB or 12MB as that's all launch games used) to manufacture carts in 1996, while 700MB PS1 and Saturn CDs were $2. It sounded like the vast majority of publishers were going to completely jump ship to Sony or Sega, and the few PS1 ports would suffer from low-poly models, missing levels and characters.

But, many publishers stayed. Surprisingly, most PS1 to N64 ports were mostly intact, only lacking FMVs and sometimes voice acting, while the rest of the game was all there.

Nintendo might have lost Square, but many other publishers, even smaller ones, dealt with the expensive cartridges and storage limitations.

Sega, on the other hand, had cheap CDs like Sony, but the Saturn bombed completely in the west. Publishers would rather go to expensive N64 carts than cheap Saturn CDs. By the end of 1998, it was already discontinued. Did the 32X and Saturn's early US launch really kill that much trust in Sega?

And how did the N64 do as well as it did? What encouraged third-party devs and publishers to keep going despite the pains of carts?