[solved]Loader stops working properly with more than ~80 .bin files


#1

Hello, dont know if it is right to put this -> i have a problem, yesterda just arrived my wonderfull Pokitto with 2GB SD card. Now when i´m addigng games/programms/demos-*.bins to on the SD card existing ones and there are over 100 -*.bins and i start the loader, i cant scroll down to select the bins to start, it stuck at the first *bin.. :( is there a limit of ~100*.bins on sd-card, and than the filesystem is overloadet?


[solved]SD Card Loader hang with big binaries
#2

Have you tried removing some of the .bins?
If it still doesn’t work after than then it’s probably not the number of bins.

(Unfortunately I can’t play the video.)


#3

yes, when i remove a few added .bins (from the ones a added to the existing ones from gamedisc) it works.

But there is still 1,3 GB free Rom on SD Card. ~80 .bins working fine, over 80, its impossible to scroll down when loader is started… How much .bins do you have on sd Card??


#4

Hi. Sorry but this is a bug. We need a new release of loader


#5

Ok thank you <3 so atm the loader can handle only ~80 .bins?


#6

Correct. Sorry about that, I think fixing it is easy but at the moment I have no opportunity to check it out. I am in the middle of changing jobs and its a challenging situation. I’ll try to get to it as soon as possible


#7

ok, I wish you success :+1: should i add it to bugrep or is it already known?


#8

I’ve migrated this to the bug reports section of the forum.
I’ll also add an issue to the GitHub.

I’d look into it myself but I don’t know where the loader is kept.
I’ll have a dig later if I get time, but I’m currently busy working on something else Pokitto related.

If neither me or @jonne get time to have a look, maybe @FManga or @Hanski will have a free moment.


#9

The loader isn’t on github yet.


#10

Thanks to take care of it :mushroom:


#11

True. Coming soon

EDIT : the reason is I need to update the code to work with the latest codebase


#12

Oh right, I forgot it’s stored in the LOA.DER file.

I’ve already made the issue so we can close it or leave it as it is.

If @jonne’s going to be adding the loader then it’s probably best to leave it until we know which is going to happen first - the bug getting fixed or the loader being added to the repo.


And a delayed grab of Jonne’s post.


#13

Please add it to our fancy-pants open for everyone todo list


[solved]SD Card Loader hang with big binaries
#14

I’ve added it on behalf of @Haunebu123.
I also added a note about uploading the loader to GitHub,
and I’ve also forked the list into a ‘completed’ list so the todo list can actually shrink as stuff gets done.


#15

I’ve started work on this. I have brought the loader to the new codebase but it is too big to fit in the memory area allocated. I’m trying to figure out what has increased the binary size


#16

Got it to compile.

Phew.

Went from overflow (too big) of .text section (=program code) by 4092 bytes to 1300 bytes to spare :wink:

Link-Time Optimization for the win!


#17

An interesting information in that link. Do you remember if we have dead code & data removal in use in PokittoLib?


#18

LTO, link time optimization, is something I have never used before. This time I was desperate.

What it does is that it re-analyzes unused code and data sections again when the compilation is finished and the linking is ongoing.

So no, we have not used this option before.

EDIT: in this case, LTO helped clear out float math operations that were actually not used. Compiler optimization -Os only looks at individual compilation units. LTO looks across all compilation units. The difference in this case was a whopping 1320 bytes.


#19

To enable dead code removal, all the C/C++ source code files must be compiled using the command line option -ffunction-sections. Furthermore, the linker must be launched with the linker command line option --gc-sections.

To enable dead data removal, all the C/C++ source code files must be compiled using the command line option -fdata-sections. Furthermore, the linker must be launched with the linker command line option --gc-sections.

These could be very useful also in PokittoLib.


#20

Unfortunately, this option (LTO) is experimental, and i am beginning to see why.

Won’t run.

EDIT: confirmed. It messes up the binary

EDIT: and here’s the bug

https://sourceware.org/bugzilla/show_bug.cgi?id=22502

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83967