Homebrew libctru and new 3DS RAM

sparius

New Member
OP
Newbie
Joined
Dec 8, 2022
Messages
2
Trophies
0
Age
28
XP
24
Country
Germany
Hello,

I'm currently trying to port a game to the 3DS which needs quite a lot of RAM.
I noticed that overwriting __ctru_heap_size/__ctru_linear_heap_size and __stacksize__ only gives me access to ~128MB RAM (counting in code/data and the 4MB reserved for kernel).
I'm running my code in Citra in New 3DS mode. So 256MB should be available right?
Is there a way to access the additional memory provided by the n3ds?

Thank you
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
Hello,

I'm currently trying to port a game to the 3DS which needs quite a lot of RAM.
I noticed that overwriting __ctru_heap_size/__ctru_linear_heap_size and __stacksize__ only gives me access to ~128MB RAM (counting in code/data and the 4MB reserved for kernel).
I'm running my code in Citra in New 3DS mode. So 256MB should be available right?
Is there a way to access the additional memory provided by the n3ds?

Thank you
About half of that memory is usually reserved for OS modules and applets on real hardware. There is an ext mode for new3ds that will free up some of that lost space, and it can be accessed in the .rsf file for .cia builds
<https://github.com/LiquidFenrir/Lum...41d555d2d02ceea4d8ee40/cia_workaround.rsf#L67> (178MB)
Not sure how to access that mode for .3dsx format homebrew. Citra is pretty lenient with out of bounds memory access, and I'm not sure how much it will allow you use until it crashes. It won't be the same as real hardware though.
 
  • Like
Reactions: SylverReZ

sparius

New Member
OP
Newbie
Joined
Dec 8, 2022
Messages
2
Trophies
0
Age
28
XP
24
Country
Germany
About half of that memory is usually reserved for OS modules and applets on real hardware. There is an ext mode for new3ds that will free up some of that lost space, and it can be accessed in the .rsf file for .cia builds
(178MB)
Not sure how to access that mode for .3dsx format homebrew. Citra is pretty lenient with out of bounds memory access, and I'm not sure how much it will allow you use until it crashes. It won't be the same as real hardware though.
Thank you very much. The numbers making a lot more sense now. And thank you for the link.
I noticed some out of bounds errors in the citra log, thought this is normal. Have to test it on real hardware sometime.
 
  • Like
Reactions: zoogie

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @AncientBoi, https://www.youtube.com/watch?v=7jUWpmU-X8k