If Prototype Portal has left the battlefield by the time its second ability resolves, you’ll still put a token onto the battlefield that’s a copy of the exiled card. On the other hand, if Prototype Portal is still on the battlefield at this time but there is no exiled card (because, perhaps, Riftsweeper’s ability caused the exiled card to be put into its owner’s library), no token is created.

1/1/2011

You don’t choose the value of . Rather, the value of X is defined by the activated ability.

1/1/2011

If the exiled card has in its mana cost (such as Chalice of the Void), that X is considered to be 0. The in Prototype Portal’s activation cost takes this into account, though it may be greater than 0 if the exiled card has other mana symbols in its mana cost (such as Riptide Replicator).

1/1/2011

You may not activate the second ability if no card has been exiled with Prototype Portal. In that case, the value of is undefined and can’t be paid.

1/1/2011

Any enters-the-battlefield abilities of the exiled card will trigger when the token is put onto the battlefield. Any “as [this permanent] enters the battlefield” or “[this permanent] enters the battlefield with” abilities of the exiled card will also work.