Track&Sector R/W monitoring

Started by MIRKOSOFT, October 06, 2010, 10:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!

I want to monitor activity of any drive.

I want to do it similar like it is in CP/M (look at picture in attachment)

Monitoring if drive READs / WRITEs

and from/to which Track&Sector, e.g.:

R 10 18

W 02 20

Can anybody hel me how to do it?

Many thanks for every reply.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Hydrophilic

You will have to write your own DOS, not an easy task. 

The CBM drives have DOS built-in so when you issue a standard command like LOAD or OPEN, the drive takes care of everything for you... you have no idea what track/sector is being accessed.

CP/M has it's own version of DOS and it doesn't send high-level commands like LOAD to the drive.  It only sends block-read/write commands, so it always knows what track/sector is being accessed.
I'm kupo for kupo nuts!

MIRKOSOFT

On forum64 was in reply BASIC program:

10 dim j$(18) : rem array for job queue
12 print "{clr}"
14 open 1,8,15
40 print#1,"m-r" chr$(0); chr$(0); chr$(18) : rem lobyte, hibyte, number of bytes
42 for i=0 to 17
44 get#1,a$
46 j$(i)=a$
48 next i
50 print "{home} job","track","sector"
52 for i=0 to 5
54 print asc(j$(i)),asc(j$(i*2+6)),asc(j$(i*2+7))
56 next i
58 get a$:if a$="" goto 40
60 close 1




But I think it's not possible to use also as IRQ...
:-(
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Hydrophilic

That code will tell you the most recent track/sector used by all buffers of 1541/71.  I don't think it will work with 1581 or CMD HD or uIEC.  Anyway, this can only run after disk has completed a command.  Thus you can not update a display while disk executes command.  The only exception would be OPEN file, read/write bytes.  Other commands (SCRATCH / VALIDATE / NEW) access many sectors before they are completed.
I'm kupo for kupo nuts!