mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
f1b420eb3b
SELF decrypter improved:
The files 'scetool.exe' and 'zlib1.dll' are no longer needed. Everything
needed is now included in the rpsc3 project. So the only thing you need
in order to load SELF files are the keys. More information about this
matter in my last commit: c1565e55
Warning for devs! There is a lot of spaghetti code in /scetool/. I
fucked up things a bit while trying to include scetool in rpcs3. There
is a lot of unused code there and I need to make sure that everything is
working properly. In any case, the code seems to work stable so
end-users shouldn't be worried about this warning. ;-)
'About...' dialog added:
Well, I have nothing more to say here. I wish you all a nice day!
42 lines
918 B
C
42 lines
918 B
C
//Mersenne-Twister 19937 pseudorandom number generator.
|
|
//Reference implementation at:
|
|
//http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
|
|
|
|
#ifndef _MT19937_H_
|
|
#define _MT19937_H_
|
|
|
|
/*! State size. */
|
|
#define MT_N 624
|
|
#define MT_M 397
|
|
#define MT_MATRIX_A 0x9908b0df
|
|
#define MT_UPPER_MASK 0x80000000
|
|
#define MT_LOWER_MASK 0x7fffffff
|
|
|
|
/*! Mersenne-Twister 19937 context. */
|
|
typedef struct _mt19937_ctxt
|
|
{
|
|
/*! State. */
|
|
unsigned int state[MT_N];
|
|
/*! Index. */
|
|
unsigned int idx;
|
|
} mt19937_ctxt_t;
|
|
|
|
/*!
|
|
* \brief Initialize Mersenne-Twister 19937 context.
|
|
*
|
|
* \param ctxt Mersenne-Twister 19937 context.
|
|
* \param seed Random seed.
|
|
*/
|
|
void mt19937_init(mt19937_ctxt_t *ctxt, unsigned int seed);
|
|
|
|
/*!
|
|
* \brief Update Mersenne-Twister 19937 state.
|
|
*
|
|
* \param ctxt Mersenne-Twister 19937 context.
|
|
*
|
|
* \return Generated pseudorandom number.
|
|
*/
|
|
unsigned int mt19937_update(mt19937_ctxt_t *ctxt);
|
|
|
|
#endif
|