Found them - the hard way. ;-)

also my own generator now outputs the same numbers as mingot's does. Decided to go for C++ because the STL-Map seems rather nice for it - also my other pokemon-related-tools were written in C++

Code:

typedef map<uint32_t,uint32_t> t_mersenneTable;
t_mersenneTable createInitialMTable(uint32_t seed){
t_mersenneTable myTable;
{ // insert seed
pair <uint32_t,uint32_t> myEntry;
myEntry.first=0;
myEntry.second=seed;
myTable.insert(myEntry);
}
uint16_t tableIndex;
map<uint32_t,uint32_t>::iterator lastPos=myTable.begin();
for (tableIndex=1;tableIndex<=623;tableIndex++){
pair <uint32_t,uint32_t> myEntry;
myEntry.first=tableIndex;
myEntry.second=((lastPos->second / (1<<30)) xor lastPos->second) *0x6C078965 + tableIndex;
myTable.insert(lastPos,myEntry);
lastPos++; // advance iterator
}
//t[n] = (( upper 2bits of t [n-1] ) xor t [n-1]) * 0x6c078965 + n
return myTable;
}
uint32_t getPreRandom(t_mersenneTable* currentTable){
uint32_t currentIndex=currentTable->rbegin()->first+1;
uint32_t temp_h=0;
uint32_t randomNumber;
temp_h = temp_h + ((*currentTable)[currentIndex-624] & 0x80000000); // front bit
temp_h = temp_h + ((*currentTable)[currentIndex-624+1] & 0x7FFFFFFF); // back
// temp_h is equivalent to k[0]
randomNumber=(*currentTable)[currentIndex-227] xor (temp_h / 2)
xor ((temp_h % 2) * 0x9908B0DF);
// last xor only useful if temp_h is even.
{ // insert into table
pair <uint32_t,uint32_t> myEntry;
myEntry.first=currentIndex;
myEntry.second=randomNumber;
currentTable->insert(myEntry);
}
return randomNumber;
}
uint32_t temper(uint32_t randomNumber){
uint32_t temp;
temp = randomNumber;
temp = temp xor ((temp >> 11)); // (equivalent to ( / 0x800)
temp = temp xor ((temp << 7) & 0x9D2C5680); // equivalent to ( * 0x80)
temp = temp xor ((temp << 15) & 0xEFC60000); // equivalent to ( * 0x8000)
temp = temp xor ((temp >> 18));
return temp;
}

now I just need to put it into a class file on its own, write some nice command-line-interface... but the main work is done.

@mingot: Thanks for posting the example code. I really helped finding the flaws in my stuff.

TCC