Search found 633 matches

by tcat
Sat Jul 09, 2016 8:09 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Tobias, Thank you, now I see the logic behind. We usually ever format once, and read/rewrite blocks many times. We may possibly reformat few times in a life of media, to get away of bad blocks appearing due to tape wear. Sector headers & flags are there, to guide QDOS in reading/writing blocks. ...
by tcat
Fri Jul 08, 2016 8:38 pm
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Hi, While I am toying with MAPs and Blocks, that I hopefully have learnt to read and also write. I now look at Format routine, it seems very complex with many passes and checks. The media label is written to each sector as the Format routine writes sector headers. As it has many passes I try to avoi...
by tcat
Thu Jul 07, 2016 7:54 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

I'm not sure if a 'lea blkBuff,a0' would be quicker than a 'movea.l' These instructions do different things. LEA means 'load effective address' and only accepts an address as parameter. In the above example, LEA will load A0 with the address of blkBuff. cheers, Jan. Hi, I initially thought it nice ...
by tcat
Wed Jul 06, 2016 7:08 pm
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Hi, 3600uS/0.13uS = 27692 cycles. So you have about 27500 clock cycles to play with. Some of these may get lost to things like screen display generation and RAM refresh cycles. But I have no idea how many. Aha, in slower contended memory I have only half the cycles, 27500/2 = 13750, this would be th...
by tcat
Wed Jul 06, 2016 2:41 pm
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Use a 'move.w (a1)+,-(sp)' then you would not need the 'addq.l'. Saves a couple of bytes and about 12 clock cycles. I'm not sure if a 'lea blkBuff,a0' would be quicker than a 'movea.l' Martin Head Martin, I will try, just wondering how many cycles=3600us, i.e. how many instructions may fit between ...
by tcat
Wed Jul 06, 2016 11:19 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Hi, Possibly with a bit of luck, I can now seem able to duplicate uDUMP1 image onto a real MDV media. I still cannot believe It, but it happens in 'a single tape loop pass'. I currenlty look into a possible code optimisation, that goes between MD.SECTR and MD.WRITE, as I am afraid of the timing... ....
by tcat
Tue Jul 05, 2016 11:09 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Martin,

Many thanks so far, is it alright I add some more code to Explorer[1-2]_bas, with some experiments of mine?
I state your Name in the revision history.

Again a big thank you.
Tomas
by tcat
Sun Jul 03, 2016 8:12 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Jan, It is plain JS-ROM QDOS 1.10, TK2 version 2.20 burnt to CARE ROM Cartridge, plugged to external ROM port. http://www.dilwyn.me.uk/pe/tkii220.zip Actually I was mistaken, as ERR #-$20, does not get popped up, but the drive gets spinned down, so the exit routine works up to this point before RTS ...
by tcat
Sat Jul 02, 2016 12:40 pm
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Chaps, I would think the easiest way would be to try to read a sector header (MD.SECTR) and if it does a 'normal' (bad medium) return rather than a 'normal+4' (OK) return. Then assume there is no cartridge present. This seems the best way indeed. I've taken a look at the MD.SECTR code and it does wa...
by tcat
Fri Jul 01, 2016 10:06 am
Forum: Software & Programming
Topic: MDV Low Level Routines
Replies: 122
Views: 52119

Re: MDV Low Level Routines

Tobias, Thank you, I am getting more understanding. Taking oportunity to pose another question. How can we safely detect NO MEDIA present? As QL just does that, when DIR'ed whithout any cart present in the slot, mdv[1-2]_[label] media changed / bad media Currently my code gets spur of bytes onto cha...