How do you determine 'magic byte' or version for alt coins? I'm looking at creating a deterministic wallet for some of the less popular altcoins. Bitcoin has a magic byte of '0488b21e' and litecoin '019da462'. How are these determined or calculated? Also how would I generate these values for other altcoins?
0x0488B21E is the extended public key prefix / version bytes (as described in BIP32) and stands for xpub. In the same manner, 0x019DA462 stands for Ltub. 

For bitcoin and litecoin these codes are:

Network             Extended private    Version bytes        Extended public    Version bytes
                    key prefix                               key prefix
---------------------------------------------------------------------------------------------         
Bitcoin main        xprv                0x0488ADE4           xpub               0x0488B21E
Bitcoin testnet     tprv                0x04358394           tpub               0x043587CF
Litecoin main       Ltpv                0x019D9CFE           Ltub               0x019DA462     
Litecoin testnet    ttpv                0x0436EF7D           ttub               0x0436F6E1