logs archiveBotHelp.net / Freenode / #3dsdev / 2015 / August / 25 / 1
Lectem
StapleButter: what algorithm did you use for your texture packing?
StapleButter
what texture packing?
Lectem
your tweet
StapleButter
oh that
I just finished coding it
I inspired it from Citra's code though
that was the most readable source I could find
oh and you reminded me to commit the code
Lectem
is it meant to be used at runtime?
or at precompile time
yuriks
texture packing? Citra?
StapleButter
it doesn't pack a texture
it decompresses textures from NSMB2's files
yuriks
oh, you mean the ETC1 decoding?
endrift
yuriks: yeah I was right, there was a bug in my directory handling
I still don't know what the bug is though
so I just switched to newlib
it's a lot bigger but it works
StapleButter
yup
yuriks
you mean you switched to the default dkA stuff?
endrift
yuriks: the default "diropen" files etc
yuriks
yeah, it's what I meant
so that god rid of all the crashing?
endrift
yuriks: yep
well
the remaining crashing
yuriks
huh
how large is your binary now?
endrift
~730kB
yuriks
weird that it was causing *random* crashing
endrift
no, the random crashing was sf2dlib being weird
I fixed that last night
this was causing deterministic crashing
yuriks
ah
endrift
anyway, barring the fact that sound doesn't work, it's ready for alpha
unfortunately uh
Mother 3 crashes when trying to load
oh
okay it still can't load 32MB ROMs
is there some way to increase the heap size?
Lectem
nope
have to wait for smea for this
endrift
what's the default heap size?
Seems to be about 32MB
Lectem
exploit based
iirc
endrift
oh
if I could just get a 40MB heap I'd be happy :(
what's the difference between the heap and the linear heap, btw?
Lectem
one can be accessed from hardware
to make it simple
Subv
<+yuriks> so that god rid of all the crashing?
unintended?
endrift
I basically just need some way to allocate 32MB in one chunk
and then it'll be fine
Subv
i wonder what's the maximum allocation allowed in the linear heap for ironhax
Lectem
endrift : http://3dbrew.org/wiki/Memory_layout#NATIVE_FIRM.2FSAFE_MODE_FIRM_Userland_Memory
endrift
ah
until then I can't load 32MB ROMs
Subv
endrift: did you try allocating 32mb in the linear heap?
endrift
yeah I did.
should I be using the linear heap sparingly, then?
I don't know which one is which really
Lectem
linear mem is kinda small
yuriks
Subv: the typo? yeah
Subv
endrift: can't you load the roms in chunks?
yuriks
(D and T are adjacent on my layout)
endrift
Subv: no, for speed it's all contiguous
Lectem
endrift: mhhh nvm, its actually 0x08000000
yuriks
endrift: you can increase the haep yourself, it's just a bit tricky
heap*
endrift
0x08000000 > 0x02000000
yuriks
Lectem: you can choose the balance between regular and linear heap
some games allocate almost all their memory on the linear heap
(everything except thread stacks)
Lectem
gotta play with svc though
yuriks
yeah
not too hard though, the largest issue is that you can't integrate whatever you're doing with the ctrulib allocator :P
endrift
hmm
yuriks
endrift: the linear and regular heap come from the same region of physical memory, but the linear heap is allocated from the bottom (and is contiguous, so you can only increase/decrease the allocation size, not allocate arbitrary hole and stuff) (that last part is not strictly true but good enough) and the regular heap is allocated from the top and can be fragmented in physical memory
endrift
ah interesting
yuriks
so there's no reason not to use the linear heap unless the kernel restricts its use somehow (threads stacks and shared memory blocks, that I know of)
Lectem
yuriks:isnt linear mem just a paradigm that lets you think its continuous?
yuriks
Lectem: no, it *is* contiguous
since the hardware doesn't go through an MMU
Lectem
oh, I though it was meant to be continous from vaddr point of view but not for physical mem
thought*
yuriks
there's not much point in making things contiguous in virtual space, since you can allocate a chunk of heap to do whatever if you want
er, what I mean is, it's easy to make things contiguous in vspace, so it's not a problem
smea
<endrift> if I could just get a 40MB heap I'd be happy :( <= you can reduce linear heap size
there's an API for that
look at the overridable appInit/appExit functions or whatever they're called
<Lectem> linear mem is kinda small <= by default no it's really not
default configuration is something like 32MB linear heap and 24MB regular heap
you could easily have your 40MB heap if you're willing to have a 14MB linear heap
which should be plenty
yuriks
the rules for allocating/deallocating memory are so fu*king confusing :P
I just realized I have to re-test a case I probably didn't think of
you can de-allocated holes in the linear heap
and then re-allocate them
« prev 1 2 next »