S0urceror / MSX-USB

Schematics, drivers, debug tools, to make USB devices on the MSX a reality
GNU General Public License v2.0
67 stars 18 forks source link

Latest build is not working with folders #15

Closed cristianoag closed 2 years ago

cristianoag commented 2 years ago

@S0urceror - The latest MSXUSB build is not working well with folders. You enter folders, they are shown on the path but when you execute dir it is getting back to the root of the disk. I think there is an issue on the code.

S0urceror commented 2 years ago

I assume MSXUSB and not MSXUSBNext. In MSXUSB you mount an USB stick as a whole drive and Nextor takes care of the file and folder management. As long as it's FAT12 or FAT16 this should work fine.

To be exact you use the CD and DIR commands?

Can you confirm?

cristianoag commented 2 years ago

Fixed. The changes were submitted in a pull request. I tested on openMSX and real hardware. Working in both.

cristianoag commented 2 years ago

Temp solution was submitter, but it seems we have a bug identifying changes on the disk.

S0urceror commented 2 years ago

Hi Christiano, sorry for the long wait. Had some construction going on in my house followed by a nice holiday. I just checked your comments and your code recommendations. I found out that I never initialised workarea->disk_change. Now it does. In normal use it will now always return 1. Only when you use the CALL MOUNTDSK command in Basic to load another image it does only one time return 2 to indicate the change to Nextor and subsequently again 1's. This solves the issue (I hope). Can you test the latest update?

S0urceror commented 2 years ago

Looks like yesterday's version was build with SDCC 4.2.0 and that does (currently) not work. Anyway, I rebuild and pushed the latest version again to GitHub.

Did some tests and I confirm it is working as promised:

image
S0urceror commented 2 years ago

Closing this issue now since I believe it's fixed in the last release.