gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Sram problem - Solved

#44521 - Mollusk - Thu Jun 02, 2005 2:36 pm

Hi everyone,

I've been using an old template and old startup files for a while now, and it worked out pretty well. With DevkitARM r12, I decided to switch to the new template at the same time. First got a problem with the OAM (my DMA copy doesn't work anymore for it, I have to copy everything to it with a large loop...), and now another problem :
My saves (on the gba SRAM) used to work perfectly, and now I can only read them... If I create a save file in notepad, write stuff to it, then load it from the DS, it works... If I take that save file back to the PC with the linker, there's the text I had written in it plus stuff follwing (I suppose the linker takes all the found data for the save, not just the beginning).

But if try writting to it with SRAM[0] = 's', for example (or whatever number), the save becomes :
Code:
x8  ??  GB                   
and stuff after that...
Any idea why ? (writing at a diff?rent offset doesn't change anything).

Did something change in the devkit files concerning Sram ?

Thanks in advance !

Mol


Edit : problem solved, thanks to DesktopMa :
<DesktopMa> iaccess: 0x06606333 daccess: 0x36033333
<DesktopMa> in ds_arm9_crt0.s
<DesktopMa> make it by writing make CRT=arm9_crt

#59322 - Didou - Mon Oct 31, 2005 2:58 pm

Hi,

Mollusk wrote:
Hi everyone,
Edit : problem solved, thanks to DesktopMa :
<DesktopMa> iaccess: 0x06606333 daccess: 0x36033333
<DesktopMa> in ds_arm9_crt0.s
<DesktopMa> make it by writing make CRT=arm9_crt


Pretty stange... I'm looking at the ds_arm9_crt0.s in dekkitpro R17, it seems that one still has something different:
    IAccess : 0x36636333
    DAccess : 0x36333333


Is is normal ? Or do we still need to change these settings in the R17 ?

-- Didou

#59326 - cory1492 - Mon Oct 31, 2005 4:59 pm

As far as I can tell there is no problems with the crt0 and SRAM access since R13, need to set wait_cr to 0x0880 and can only write 1 char or 1 uint8 to SRAM address at a time.