From Fisheater on this thread:
https://bitcointalk.org/index.php?topic=225690.0 "*** Complete Guide on How to Create a New Alt Coin ***"
7. Create genesis block. Some people get stuck there, it's really easy:
- find LoadBlockIndex() function, inside, change:
- paraphrase (pszTimestamp) to any recent news phase.
- get the latest unix time (do a google), and put in block.nTime.
- set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.
After you are done, save it. Now the genesis block will not match the hash check and merkle root check, it doesn't matter.
The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()
assert(block.hashMerkleRoot == uint256("0x..."));
recompile the code, and genesis block created!