#292 - darkcloud - Mon Jan 06, 2003 12:50 am
How do you load data from SRAM? I read that doc about writing to SRAM, but do you read from SRAM in the same way? And can you do it whenever you need to during runtime or is there specific time you must read from SRAM?
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.
#302 - sgeos - Mon Jan 06, 2003 2:44 am
darkcloud wrote: |
How do you load data from SRAM? I read that doc about writing to SRAM, but do you read from SRAM in the same way? And can you do it whenever you need to during runtime or is there specific time you must read from SRAM? |
I have not do much with SRAM, but from what I understand it has some restrictions. Let's look at Martin Korth's GBA tech docs again:
http://www.work.de/nocash/gbatek.htm#backupsram
"Reading from SRAM should be performed by code exectued in WRAM only (but not by code executed in ROM). There is no such restriction for writing."
That means that you will have to copy your SRAM data reader to WRAM and run it from there. I'm sure you know that reads and writes involving SRAM must 8 bits.
-Brendan
#303 - darkcloud - Mon Jan 06, 2003 2:47 am
Yea I had read that in that doc and just wanted to confirm. Thanks.
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.
#304 - sgeos - Mon Jan 06, 2003 2:49 am
Very welcome.
-Brendan
#372 - ampz - Tue Jan 07, 2003 12:08 am
Reading only from code executed in internal RAM?? that seems strange? Knowing the bus hardware I don't see why such a restriction is necessary. (??)
#373 - sgeos - Tue Jan 07, 2003 12:41 am
Neither do I. It struck me as odd too. Then again, if it's a real restriction all we can do is deal with it.
-Brendan
#381 - Costis - Tue Jan 07, 2003 2:45 am
Hi,
I've never heard about this restriction before, and I have successfully written and read to\from SRAM from ROM before.
Costis
#389 - sgeos - Tue Jan 07, 2003 5:08 am
Really? I've never tried it myself. Now that seems extremely odd. I'll need to try it myself sometime.
-Brendan
#444 - DSims - Tue Jan 07, 2003 7:42 pm
Hi,
This zip from staringmonkey might be of use, if anyone's interested, seems to be code for saving and reading from SRAM.
PERN: http://216.167.73.47/~dovoto/Examples/Saving.zip
_________________
Dave
#548 - Malefactor - Wed Jan 08, 2003 6:14 pm
are there any step by step tutorials for sram?
or can anyone provide some more links to code examples?
_________________
[Images not permitted - Click here to view it]
#574 - ampz - Wed Jan 08, 2003 9:38 pm
Uuuuh, step by tep??
NVRAM (battery backed SRAM) savegame is simply a matter of reading/writing to the SRAM memory area, it's really that simple.