Why track size = 56832 bytes ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why track size = 56832 bytes ?

mvs4winxp
The Hercules source code mentions that:
  A track size = 56832 bytes.

However, I really don't understand why it is 56832 bytes.
From my understanding:

56832 =
5 bytes (TRK_Header) +
8 bytes (REC_Header) +
8 bytes (REC_Header) + ?? + 56664 bytes (ckd_size) +
8 bytes (End_of_Track) + ????

Can anyone tell me the exact formula ?
Thanks very much!





Community email addresses:
  Post message: [hidden email]
  Subscribe:    [hidden email]
  Unsubscribe:  [hidden email]
  List owner:   [hidden email]

Files and archives at:
  http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
  http://www.conmicro.cx/hercules 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/hercules-390/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Why track size = 56832 bytes ?

Greg Smith-14


----- Original Message -----
From: mvs4winxp <[hidden email]>
Date: Wednesday, May 25, 2005 11:00 am
Subject: [hercules-390] Why track size = 56832 bytes ?

> The Hercules source code mentions that:
>  A track size = 56832 bytes.
>
> However, I really don't understand why it is 56832 bytes.
> From my understanding:
>
> 56832 =
> 5 bytes (TRK_Header) +
> 8 bytes (REC_Header) +
> 8 bytes (REC_Header) + ?? + 56664 bytes (ckd_size) +
> 8 bytes (End_of_Track) + ????
>
> Can anyone tell me the exact formula ?
> Thanks very much!

    /* Compute the DASD image track length */
    trksize = sizeof(CKDDASD_TRKHDR)
                + sizeof(CKDDASD_RECHDR) + rec0len
                + sizeof(CKDDASD_RECHDR) + maxdlen
                + sizeof(eighthexFF);
    trksize = ROUND_UP(trksize,512);

or  5 + 8 + 8 + 8 + maxdlen + 8 rounded up to a 512 byte boundary.
maxdlen if the maximum r1 record length.  This can be calculated from
the max r0 record length, which can be obtained from the read device
characters ccw command code (RDC), and assuming a standard r0.  That is,
knowing the max r0 size and knowing that r0 is a standard r0 (ie 8 byte
count and 8 byte data) and knowng the track calculation formula and
constants (from RDC), the max r1 size can be calculated.  However, we
just have it hardcoded in a table in dasdtab.c

For 3390, we have
5 + 8 + 8 + 8 + 56664 + 8 = 56701 (0xdd71)
rounding up to a 512 boundary we get 56832 (0xde00)

Greg


Community email addresses:
  Post message: [hidden email]
  Subscribe:    [hidden email]
  Unsubscribe:  [hidden email]
  List owner:   [hidden email]

Files and archives at:
  http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
  http://www.conmicro.cx/hercules 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/hercules-390/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/