Random numbers init

support for the ARM toolchain
Post Reply
SantiRom
Posts: 1
Joined: Fri Feb 26, 2016 4:54 pm

Random numbers init

Post by SantiRom » Fri Aug 05, 2016 6:12 pm

Hello,

I need to use random numbers in a project that must be run within the Insight built-in ARM-memory simulator, so it is not going to be deployed onto any platform (NDS, GP3, PSP, etc.).
Although I've included a regular random number generator routine, I don't have a source for obtaining a variable random seed, such as the typical RTC current time stamp.
Eventually, I found that the absolute address 0x00010004 contains a 32 bit value that it is different every time the .elf file is loaded into the debugger, so it works perfectly as a truly-variable random seed.
Indeed, there is another information starting at 0x00010000, assuming that the code section starts at 0x00008000 and its length is smaller than 0x8000.
Since I've got no idea where to find out the meaning of those bytes, I would like somebody to give me a clue.
Most importantly, I would like to know if I could continue using such a variable value as a random seed in future versions of the devkitARM toolchain.

Thanks in advance.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest