Diskmanipulator export and file datestamps (SVI X'PRESS, Ubuntu 20.04.3)

By PSi

Supporter (13)

PSi's picture

29-09-2021, 13:44

I've finally got some sort of hang of the openMSX console stuff. I have copied a 3.5" disk into a disk image using:

cat ~/fd0u360 > "MSX KAYTTOJARJESTELMA.dsk"

and loaded the disk image into openMSX for copying the files from the disk image to a Linux folder using:

<command>diska /home/psi/MSX-DSK/MSX/MSX\ KAYTTOJARJESTELMA.dsk</command>
<command>set power off</command>
<command>diskmanipulator export diska ./tmp</command>

The files are copied to ./tmp folder but the datestamps of all files are today's datestamps ("2021-09-09" instead of "8-23-85"...).

Is there a way of getting the file timestamps also copied?


Login or register to post comments

By sdsnatcher73

Prophet (3851)

sdsnatcher73's picture

29-09-2021, 14:06

I think if you use an MSX with 2 floppy drives in openMSX (e.g. Philips NMS8255) and mount your image to drive A: and mount an empty folder to drive B: you can copy the files using BASIC command:

COPY “A:*.*“ TO “B:“

By PSi

Supporter (13)

PSi's picture

29-09-2021, 16:25

Yes, but the "modified" date of all copied files is today's date, so no improvement Sad

By turbor

Hero (519)

turbor's picture

29-09-2021, 16:32

It has been decades since I wrote that code, but iirc the DirAsDisk feature doesn't set time on files when exporting to the host.
The first versions might have done this. It also cached bootsectors/ hidden sectors etc but all that functionality has been stripped since. The use-case that needs support for those things was deemed to exotic and it made the code unnecessary complicated and thus harder to maintain. So the current code is cleaner,simpler and more robust Smile

There are two ways to go about it if you want this, given the fact that you are using a linux machine:

  1. simply loopback mount the dsk in linux (if they still support 360KB disks) and copy using regular linux tools
  2. download my proof-of-concept code that was the base for the dir-as-disk feature. It is old code called msxtar and that definitely sets the extracted files to the same timestamp as the msx files in the dsk.
    Code can be found here https://github.com/openMSX/msxtar