Help with dir from qdos

Discussion and advice about emulating the QL on other machines.
Post Reply
User avatar
chernandezba
Chuggy Microdrive
Posts: 54
Joined: Thu Dec 15, 2016 7:10 pm

Help with dir from qdos

Post by chernandezba »

Hi

I'm working on my ZEsarUX emulator and the command "dir mdv1_" (or mdv2_, etc).
As you may remember, I don't emulate microdrive but I handle all QDOS filesystem calls and emulate them with files from your computer.

Seems the QL SuperBasic calls the following procedures to open a directory:

1) IO.OPEN device "mdv1_"
2) FS.MDINF to get microdrive name (medium info)
3) IO.FSTRG. D2=64: seems it wants to get 64 bytes from the first directory file. It's called repeatedly after I return a EOF

I don't know about what is the data format expected at step 3. I've tried filling it with the typical 64 byte directory entry (file length, file access key, file type etc) but nothing is displayed on the screen (except from the medium info at step 2). After that call I return A1=A1+64, and D1=64.

Anybody knows what is the data format expected for a directory listing? (dir mdv1_)

Thanks
Regards
Cesar


----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Help with dir from qdos

Post by tofro »

chernandezba wrote:Hi

I'm working on my ZEsarUX emulator and the command "dir mdv1_" (or mdv2_, etc).
As you may remember, I don't emulate microdrive but I handle all QDOS filesystem calls and emulate them with files from your computer.

Seems the QL SuperBasic calls the following procedures to open a directory:

1) IO.OPEN device "mdv1_"
2) FS.MDINF to get microdrive name (medium info)
3) IO.FSTRG. D2=64: seems it wants to get 64 bytes from the first directory file. It's called repeatedly after I return a EOF

I don't know about what is the data format expected at step 3. I've tried filling it with the typical 64 byte directory entry (file length, file access key, file type etc) but nothing is displayed on the screen (except from the medium info at step 2). After that call I return A1=A1+64, and D1=64.

Anybody knows what is the data format expected for a directory listing? (dir mdv1_)

Thanks
Regards
Cesar
The contents of the directory file is just a concatenation of all the 64-byte-headers of the files in that directory (see your other question)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
chernandezba
Chuggy Microdrive
Posts: 54
Joined: Thu Dec 15, 2016 7:10 pm

Re: Help with dir from qdos

Post by chernandezba »

Thanks. I've rewritten and tested my code and now it works

Cheers
Cesar


----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
Post Reply