View unanswered posts | View active topics It is currently Thu Jan 24, 2019 1:31 am

Reply to topic  [ 1 post ] 
 Random numbers init 
Author Message

Joined: Fri Feb 26, 2016 4:54 pm
Posts: 1

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.

Fri Aug 05, 2016 6:12 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at Fast, secure and Free Open Source software downloads