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,003
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
  • S @ salazarcosplay:
    ancient boy good mornig
    +2
  • K3Nv2 @ K3Nv2:
    Ancientboi slept with Charles Babbage for a pc
    +1
  • AncientBoi @ AncientBoi:
    And his was BIG 😱
  • K3Nv2 @ K3Nv2:
    20kbps connection
    +1
  • SylverReZ @ SylverReZ:
    @AncientBoi, That's what she said. :rofl2:
    +1
  • K3Nv2 @ K3Nv2:
    Actually they say 400 years ago 1cm was pretty average so Juan wouldn't feel left out
    +2
  • ZeroT21 @ ZeroT21:
    oh my...
  • K3Nv2 @ K3Nv2:
    Ffs officials are closed on juneteenth guess it's fairly new became federal in 21:rofl2:
  • BigOnYa @ BigOnYa:
    I figured you'd be down at the parade anyways.
  • K3Nv2 @ K3Nv2:
    Nah I still own slaves just ask ancientboi his nicknames mister slave
    +1
  • BigOnYa @ BigOnYa:
    Poor Lemmiwinks...
  • ModernSithLord @ ModernSithLord:
    @BigOnYa Great episode, camp of tolerance
    +1
  • BigOnYa @ BigOnYa:
    Thanks, we try to make every episode, special.
    +1
  • K3Nv2 @ K3Nv2:
    I saw a $15 south park bundle box at Walmart kinda wish I bought it
    +2
  • ModernSithLord @ ModernSithLord:
    I remember seeing the movie when I was young, made me swear up a storm when I got home. lol
    +1
  • K3Nv2 @ K3Nv2:
    I'm gonna buy it if I see it there tomorrow
  • BigOnYa @ BigOnYa:
    That beanie will look good on you, Kentman
  • K3Nv2 @ K3Nv2:
    It would look better on urewife it would be like boning myself
  • BigOnYa @ BigOnYa:
    Started a new game last night called "The Quarry", pretty damn good. Feels/ looks like a movie. About a summer camp where local town folks go crazy and hunt down the campers.
  • K3Nv2 @ K3Nv2:
    I beat it when it first came out good playback ability
    +1
  • BigOnYa @ BigOnYa:
    What's crazy is I have 3tb in my SeriesX , and its almost full. Of course with some of these games being over 150gb each, it don't take long.
    BigOnYa @ BigOnYa: What's crazy is I have 3tb in my SeriesX , and its almost full. Of course with some of these...