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.
support for the ARM toolchain
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests