Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-11 Thread Rich Mellor

On 09/10/2011 19:38, Norman Dunbar wrote:

Evening Rich,


OK, so that appears to give an updated program:

I think that will indeed work.

By the way, my Wiki has full (I hope) details of the QL5A and QL5B 
Floppy format on this URL 
http://qdosmsq.dunbar-it.co.uk/doku.php?id=qdosmsq:fs:dsdd


Might be useful?

Ok, I admit, the ED stuff is currently missing in action, but should 
arrive soon.



Cheers,
Norm.

I haven't managed to get the ED disk image working with the HxC floppy 
emulator unfortunately at the moment - it is almost as though the QL 
cannot detect the ED disk...


Any ideas how this works?

--
Rich Mellor
RWAP Services
Specialist Enuuk Auction Programming Services

www.rwapservices.co.uk


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Bob Spelten
Op Sat, 08 Oct 2011 12:15:34 +0200 schreef Rich Mellor  
r...@rwapservices.co.uk:


I am trying desparately to get the ED disk drive image working with the  
HxC floppy disk drive emulator.


The ED disk drive parameters are
80 tracks
2 sides
10 sectors per track
sector is 2048 bytes

My BASIC code to create a copy of a disk appears below:

100 OPEN_IN #3,'flp2_*D4e'
105 OPEN_NEW #4,ram1_ED_img
107 FOR tracks=0 TO 79
108 FOR sides=0 TO 1
109 FOR sector=1 TO 10
110 GET #3\sector+sides*256+tracks*2^16,sector$
112 AT 0,0
115 PRINT tracks,sides,sector;' '
120 PRINT #4;sector$;
122 END FOR sector
125 END FOR sides
127 END FOR tracks
130 CLOSE

Do I have this working the right way around (or should the sides loop be  
outside the tracks loop?)


This does create an image of the correct size, but I can't get the QL to  
read it once converted.
To convert it to the HxC format, I have tried a bitrate of 50 (same  
as a HD disk drive, although this may be wrong), and an RPM of 300  
(although I am told it may need to be 150)

Interleave is also set at 1

Any other suggestions on where I might be going wrong?

DM5 confirms: 80 tracks, 10 sectors/track, 2 sides (20 sectors/cylinder,  
not 36 sectors)
This program is probably fine if you copy them back to a disk in the same  
way.
The HxC is however not a double sided drive so you may need to get the  
sectors in the right order for the ED-driver to recognise it.


The DP Media Manager SE manual states that files are written in blocks of  
3 sectors (chapter 5).

Although this was written for DD disks it may still be useful for HD/ED.
These blocks are written as follows: (track/side/sector)
  0/0/0, 0/0/3, 0/0/6, 0/1/0, 0/1/3, 0/1/6
  0/0/1, 0/0/4, 0/0/7, 0/1/1, 0/1/4, 0/1/7
  0/0/2, 0/0/5, 0/0/8, 0/1/2, 0/1/5, 0/1/8 ...
So 6 blocks, 18 sectors, one cylinder, filling track 0.

Then for track 1 to n it gets more complicated, an offset is used to find  
the next sector.

  (entry + (track * offset)) MOD sectors_per_track
(Now it gets confusing, MMSE states the offset =5, DM5 reports 320! And I  
don't get how this works.)


Some speculation.
As you can see sides are used in turn, as ED uses 1 sector/block this  
could mean:

  0/0/0, 0/1/0, 0/0/1, 0/1/1, ... 20 blocks, filling 20 sectors.
(or 0/0/0, 0/1/0, 0/0/2, 0/1/2, ... with 1 sector interleave.)
This means the sides loop should be the inside loop.

We need more info on how Miracle did this from Stuart Honeyball or TT or  
Marcel(?).
Even info on the IBM 2.88 drive is scarce on the internet, or I am not  
that fluent in Googleing.

I did find however they were used in the NeXT computers.

Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Memory Lane Computing Ltd
There's a confusion between sector and cluster here.

ED disks really _are_ 36 physical sectors per track. That's in the IBM spec.
They should only format to 5760 physical sectors, but possibly Miracle
formatted tracks beyond 80 to get the extra capacity; 88 tracks would get
6336, which is close to their quoted 6400 sectors.

Anyway, a physical sector on a floppy disk is 512 bytes, but the cluster
size for an ED disk is four physical sectors = 2048 bytes.  (So 80*20 = 1600
clusters = 6400 sectors = 3.2MB)

Then, as Bob says, the issue is understanding the order in which each
cluster has been mapped to the physical sectors. 



Adrian
www.memorylanecomputing.com

 -Original Message-
 From: ql-users-boun...@lists.q-v-d.com [mailto:ql-users-bounces@lists.q-v-
 d.com] On Behalf Of Bob Spelten
 Sent: 09 October 2011 11:15
 To: ql-us...@q-v-d.com
 Subject: Re: [Ql-Users] Making an image of an ED Disk Drive
 
 Op Sat, 08 Oct 2011 12:15:34 +0200 schreef Rich Mellor
 r...@rwapservices.co.uk:
 
  I am trying desparately to get the ED disk drive image working with
  the HxC floppy disk drive emulator.
 
  The ED disk drive parameters are
  80 tracks
  2 sides
  10 sectors per track
  sector is 2048 bytes
 
  My BASIC code to create a copy of a disk appears below:
 
  100 OPEN_IN #3,'flp2_*D4e'
  105 OPEN_NEW #4,ram1_ED_img
  107 FOR tracks=0 TO 79
  108 FOR sides=0 TO 1
  109 FOR sector=1 TO 10
  110 GET #3\sector+sides*256+tracks*2^16,sector$
  112 AT 0,0
  115 PRINT tracks,sides,sector;' '
  120 PRINT #4;sector$;
  122 END FOR sector
  125 END FOR sides
  127 END FOR tracks
  130 CLOSE
 
  Do I have this working the right way around (or should the sides loop
  be outside the tracks loop?)
 
  This does create an image of the correct size, but I can't get the QL
  to read it once converted.
  To convert it to the HxC format, I have tried a bitrate of 50
  (same as a HD disk drive, although this may be wrong), and an RPM of
  300 (although I am told it may need to be 150) Interleave is also set
  at 1
 
  Any other suggestions on where I might be going wrong?
 
 DM5 confirms: 80 tracks, 10 sectors/track, 2 sides (20 sectors/cylinder,
not 36
 sectors) This program is probably fine if you copy them back to a disk in
the
 same way.
 The HxC is however not a double sided drive so you may need to get the
 sectors in the right order for the ED-driver to recognise it.
 
 The DP Media Manager SE manual states that files are written in blocks of
 3 sectors (chapter 5).
 Although this was written for DD disks it may still be useful for HD/ED.
 These blocks are written as follows: (track/side/sector)
0/0/0, 0/0/3, 0/0/6, 0/1/0, 0/1/3, 0/1/6
0/0/1, 0/0/4, 0/0/7, 0/1/1, 0/1/4, 0/1/7
0/0/2, 0/0/5, 0/0/8, 0/1/2, 0/1/5, 0/1/8 ...
 So 6 blocks, 18 sectors, one cylinder, filling track 0.
 
 Then for track 1 to n it gets more complicated, an offset is used to find
the
 next sector.
(entry + (track * offset)) MOD sectors_per_track (Now it gets
confusing,
 MMSE states the offset =5, DM5 reports 320! And I don't get how this
 works.)
 
 Some speculation.
 As you can see sides are used in turn, as ED uses 1 sector/block this
could
 mean:
0/0/0, 0/1/0, 0/0/1, 0/1/1, ... 20 blocks, filling 20 sectors.
 (or 0/0/0, 0/1/0, 0/0/2, 0/1/2, ... with 1 sector interleave.) This means
the
 sides loop should be the inside loop.
 
 We need more info on how Miracle did this from Stuart Honeyball or TT or
 Marcel(?).
 Even info on the IBM 2.88 drive is scarce on the internet, or I am not
that
 fluent in Googleing.
 I did find however they were used in the NeXT computers.
 
 Bob
 
 --
 The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
 ___
 QL-Users Mailing List
 http://www.q-v-d.demon.co.uk/smsqe.htm


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Bob Spelten

Op Sun, 09 Oct 2011 13:32:24 +0200 schreef Memory Lane Computing Ltd
sa...@memorylanecomputing.com:


There's a confusion between sector and cluster here.

ED disks really _are_ 36 physical sectors per track. That's in the IBM  
spec.

They should only format to 5760 physical sectors, but possibly Miracle
formatted tracks beyond 80 to get the extra capacity; 88 tracks would get
6336, which is close to their quoted 6400 sectors.

Anyway, a physical sector on a floppy disk is 512 bytes, but the  
cluster
size for an ED disk is four physical sectors = 2048 bytes.  (So 80*20 =  
1600

clusters = 6400 sectors = 3.2MB)

Then, as Bob says, the issue is understanding the order in which each
cluster has been mapped to the physical sectors.



In the CONQUEROR GOLD manual they say:
   ED disks are not directly supported as no clear PC standard exits for
them.

However they could be used as pseudo-hard disks, giving a massive 6MB when
used with DR-DOS's SuperStor tool.
It was fun to play with but still mimicked a very slow XT on my SGC.

Maybe the author Steve Sutton also has inside ED knowledge.

Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Norman Dunbar

Hi Rich,

this is from my old qformat utility which quickly reformats a disc by 
writing a blank map to the disc. The following is the ED details:


/*--*
 * DS/ED MAP*
 *  *
 * The map for a DS/ED disc takes up 3 sectors  *
 * of 2048 bytes each. This is because there*
 * are 1600 allocation blocks on an ED disc.*
 *--*/

  /*-*/
US char maped[] = {'Q','L','5','B',   /* HD identifier   */
   32,32,32,32,32,/* Medium name */
   32,32,32,32,32,/* */
   0,0,   /* Format Random No*/
   0,1,0,0,   /* Update Counter  */
   6,60,  /* Free Sectors*/
   6,64,  /* Good Sectors*/
   6,64,  /* Total Sectors   */
   0,10,  /* Sectors per Track   */
   0,20,  /* Sectors Per Cylinder*/
   0,80,  /* No of Tracks*/
   0,1,   /* Sectors per block   */
   0,0,   /* Directory EOF block */
   0,64,  /* Directory EOF byte  */
   0,2,   /* Sector offset per track */
   0,2,4,6,8,128, /* Logical - Physical */
   130,132,134,136,   /* */
   1,3,5,7,9,129, /* */
   131,133,135,137,   /* */
   255,255,255,255,255,   /* Spare (Phys - Log ?)   */
   255,255,255,255,255,   /* */
   255,255,255,255,255,   /* */
   255,255,255,   /* */
   255,255,255,255,255,   /* Spare   */
   255,255,255,255,255,   /* */
   255,255,255,255,255,   /* */
   255,255,255,   /* */
   248,0,0,   /* Block 0 = MAP   */
   248,0,1,   /* Block 1 = MAP   */
   248,0,2,   /* Block 2 = MAP   */
   0,0,0};/* Block 3 = DIR   */
  /*-*/


So, 80 tracks, 2 sides, 1 sector per block, 10 sectors per track, which 
is where 3.2 mB comes from:


2 (sides) * 80 (tracks) * 10 (sectors) * 2 KB = 3.2 Mb.

The interleave factor is 2 which means read sector 0, then 2, 4, 6  8 
on side 0, then switch sides to side 1 and read 0, 2, 4, 6, 8 there then 
come back to side 0 and read 1, 3, 5, 7, 9  - the logical to 
physical table shows this. The side number is bit 7.


I assume that this is the order you will need to read the data in order 
to get it onto a single sided SD card.



Do I have this working the right way around (or should the sides loop be
outside the tracks loop?)
See above, the sectors are interleaved. And even worse, when you move 
from track 0 to track 1, because the drive is spinning as the head 
moved, to avoid having to wait, you add on the sector offset per track 
so on side 0, track 1, you read 2,4,6,8,0 then side 1 - 2,4,6,8,0, then 
side 0 - 3,5,7,9,1 and so on.



This does create an image of the correct size, but I can't get the QL to
read it once converted.

Probably because you have read a whole side at once. Then the other.


HTH

Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Memory Lane Computing Ltd
Ah, so that means the Gold Card was setting the controller to use 2048 byte
sectors, so my previous comments about clusters are not valid. No wonder the
disks were never compatible with the PC :)

Thanks for that information, Norman.  Very helpful and that should solve
Rich's problem at a stroke.


Adrian
www.memorylanecomputing.com

 -Original Message-
 From: ql-users-boun...@lists.q-v-d.com [mailto:ql-users-bounces@lists.q-v-
 d.com] On Behalf Of Norman Dunbar
 Sent: 09 October 2011 14:56
 To: ql-users@lists.q-v-d.com
 Subject: Re: [Ql-Users] Making an image of an ED Disk Drive
 
 Hi Rich,
 
 this is from my old qformat utility which quickly reformats a disc by
writing a
 blank map to the disc. The following is the ED details:
 
 /*--*

---SNIP ---


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Rich Mellor

On 09/10/2011 14:55, Norman Dunbar wrote:

Hi Rich,

this is from my old qformat utility which quickly reformats a disc by 
writing a blank map to the disc. The following is the ED details:


/*--*
 * DS/ED MAP*
 **
 * The map for a DS/ED disc takes up 3 sectors*
 * of 2048 bytes each. This is because there*
 * are 1600 allocation blocks on an ED disc.*
 *--*/

  /*-*/
US char maped[] = {'Q','L','5','B',   /* HD identifier   */
   32,32,32,32,32,  /* Medium name */
   32,32,32,32,32,  /* */
   0,0,   /* Format Random No */
   0,1,0,0,  /* Update Counter */
   6,60,  /* Free Sectors */
   6,64,  /* Good Sectors */
   6,64,  /* Total Sectors */
   0,10,  /* Sectors per Track */
   0,20,  /* Sectors Per Cylinder*/
   0,80,  /* No of Tracks */
   0,1,   /* Sectors per block */
   0,0,   /* Directory EOF block */
   0,64,  /* Directory EOF byte  */
   0,2,   /* Sector offset per track */
   0,2,4,6,8,128,  /* Logical - Physical */
   130,132,134,136,  /* */
   1,3,5,7,9,129,  /* */
   131,133,135,137,  /* */
   255,255,255,255,255,   /* Spare (Phys - Log ?)   */
   255,255,255,255,255,   /* */
   255,255,255,255,255,   /* */
   255,255,255,   /* */
   255,255,255,255,255,   /* Spare */
   255,255,255,255,255,   /* */
   255,255,255,255,255,   /* */
   255,255,255,   /* */
   248,0,0,  /* Block 0 = MAP */
   248,0,1,  /* Block 1 = MAP */
   248,0,2,  /* Block 2 = MAP */
   0,0,0};  /* Block 3 = DIR */
  /*-*/


So, 80 tracks, 2 sides, 1 sector per block, 10 sectors per track, 
which is where 3.2 mB comes from:


2 (sides) * 80 (tracks) * 10 (sectors) * 2 KB = 3.2 Mb.

The interleave factor is 2 which means read sector 0, then 2, 4, 6  8 
on side 0, then switch sides to side 1 and read 0, 2, 4, 6, 8 there 
then come back to side 0 and read 1, 3, 5, 7, 9  - the logical to 
physical table shows this. The side number is bit 7.


I assume that this is the order you will need to read the data in 
order to get it onto a single sided SD card.



Do I have this working the right way around (or should the sides loop be
outside the tracks loop?)
See above, the sectors are interleaved. And even worse, when you move 
from track 0 to track 1, because the drive is spinning as the head 
moved, to avoid having to wait, you add on the sector offset per track 
so on side 0, track 1, you read 2,4,6,8,0 then side 1 - 2,4,6,8,0, 
then side 0 - 3,5,7,9,1 and so on.



This does create an image of the correct size, but I can't get the QL to
read it once converted.

Probably because you have read a whole side at once. Then the other.


HTH

Cheers,
Norm.


OK, so that appears to give an updated program:

100 OPEN_IN #3,'flp2_*D4e'
105 OPEN_NEW #4,ram1_ED_img
107 FOR tracks=0 TO 79
108 side=0
109 FOR sector=1,3,5,7,9
110 GET #3\sector+side*256+tracks*2^16,sector$
111 PRINT #4;sector$;
112 END FOR sector
113 side=1
114 FOR sector=1,3,5,7,9
115 GET #3\sector+side*256+tracks*2^16,sector$
116 PRINT #4;sector$;
117 END FOR sector
118 side=0
119 FOR sector=2,4,6,8,10
120 GET #3\sector+side*256+tracks*2^16,sector$
121 PRINT #4;sector$;
122 END FOR sector
123 side=1
124 FOR sector=2,4,6,8,10
125 GET #3\sector+side*256+tracks*2^16,sector$
126 PRINT #4;sector$;
127 END FOR sector
128 AT 0,0
129 PRINT tracks;' '
127 END FOR tracks
130 CLOSE

(remember that for the GET#3\sector, the first sector is sector 1).

--
Rich Mellor
RWAP Services
Specialist Enuuk Auction Programming Services

www.rwapservices.co.uk


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-09 Thread Norman Dunbar

Evening Rich,


OK, so that appears to give an updated program:

I think that will indeed work.

By the way, my Wiki has full (I hope) details of the QL5A and QL5B 
Floppy format on this URL 
http://qdosmsq.dunbar-it.co.uk/doku.php?id=qdosmsq:fs:dsdd


Might be useful?

Ok, I admit, the ED stuff is currently missing in action, but should 
arrive soon.



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Making an image of an ED Disk Drive

2011-10-08 Thread Memory Lane Computing Ltd
Rich,

From memory I believe an ED disk has 36 sectors per track, but it is 300
rpm.  Data rate is 1Mbps.

... but I could be wrong. It's been a damn long time.



Adrian
www.memorylanecomputing.com

 -Original Message-
 From: ql-users-boun...@lists.q-v-d.com [mailto:ql-users-bounces@lists.q-v-
 d.com] On Behalf Of Rich Mellor
 Sent: 08 October 2011 11:16
 To: ql-us...@q-v-d.com
 Subject: [Ql-Users] Making an image of an ED Disk Drive
 
 I am trying desparately to get the ED disk drive image working with the
HxC
 floppy disk drive emulator.
 
 The ED disk drive parameters are
 80 tracks
 2 sides
 10 sectors per track
 sector is 2048 bytes
 
 My BASIC code to create a copy of a disk appears below:
 
 100 OPEN_IN #3,'flp2_*D4e'
 105 OPEN_NEW #4,ram1_ED_img
 107 FOR tracks=0 TO 79
 108 FOR sides=0 TO 1
 109 FOR sector=1 TO 10
 110 GET #3\sector+sides*256+tracks*2^16,sector$
 112 AT 0,0
 115 PRINT tracks,sides,sector;' '
 120 PRINT #4;sector$;
 122 END FOR sector
 125 END FOR sides
 127 END FOR tracks
 130 CLOSE
 
 Do I have this working the right way around (or should the sides loop be
 outside the tracks loop?)
 
 This does create an image of the correct size, but I can't get the QL to
read it
 once converted.
 To convert it to the HxC format, I have tried a bitrate of 50 (same as
a HD
 disk drive, although this may be wrong), and an RPM of 300 (although I am
 told it may need to be 150) Interleave is also set at 1
 
 Any other suggestions on where I might be going wrong?
 
 --
 Rich Mellor
 RWAP Software
 Specialist Retro Computer Dealer
 
 http://www.rwapsoftware.co.uk
 
 -- Try out our new site: http://sellmyretro.com
 
 
 
 ___
 QL-Users Mailing List
 http://www.q-v-d.demon.co.uk/smsqe.htm


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm