MEGA65 / mega65-freezemenu

Freeze Menu Program for the MEGA65
GNU General Public License v3.0
8 stars 11 forks source link

Freezer resets CHDIR U12 (SD card current working directory) #63

Open dansanderson opened 1 year ago

dansanderson commented 1 year ago

The CHDIR command can be used with U12 to change the current working directory on the SD card, such that subsequent SD card commands like DIR U12 use that subdir. If I enter the Freezer then resume, the current working directory is reset back to the root.

This sounds obscure but I discovered it while using Gurce's Demo Disk #2, which uses MOUNT programmatically. I keep the contents in a subdir, and load the demo disk menu with CHDIR "INTRO2",U12:MOUNT "INTRO2.D81":BOOT. Everything works fine. But then I opened the Freezer to activate Joystick Swap, then when I resumed the menu could not access other disk images because the current working directory went back to the root.

It would be an improvement if the Freezer did not reset the current working directory on the SD card. If the Freezer's own SD card nav shares the same cwd as these BASIC commands, maybe it's fine if it's preserved on resume.

Bonus feature request: Make it an explicit feature of the Freezer to change the cwd via its browser, so I can use it instead of CHDIR U12.

lydon42 commented 1 year ago

There is currently no way to do this, as you can't query the current directory. To be able to do this, we will need core/HYPPO support. Perhaps HYPPO needs to store where it changed directory to, in combination with some UID of the card, so it can be invalidated if the card is changed.

Connected to #62