Closed Polprzewodnikowy closed 4 months ago
I've submitted a fix here: https://github.com/rovertronic/Mario-Builder-64/pull/13
Thank you! I'll merge this in a bit. Out of curiosity, why does using chdir cause problems on flashcarts? I'd like to know for future reference.
Main issues seems to be stemming from:
f_opendir
in load_level_files_from_sd_card
function returns FR_NO_PATH
so somewhere the path is getting desynced. I've tried to use f_getcwd
to look what's going on but it just returned empty string, which should mean root directory.&
to get the address. Compiler warnings are very clear about that.
As of why this works in the Parallel launcher and not on the real hardware, my assumption is just inaccurate emulation. Maybe there's some place where cache coherency is not taken care of - emulators usually don't implement CPU cache correctly.
If you want to keep f_chdir
then quick fix seems to be to always chdir into absolute path (add /
at the beginning):
But I strongly recommend just sticking to the absolute paths. Doing f_chdir
in random places is error prone and confusing to the uninitiated reader.
Steps to reproduce:
Expected outcome: After save & quit I should see last saved level in the list
Environment: NTSC N64 console with SummerCart64 flashcart and exFAT file system on the SD card