                             ATAPI(IDE) CD
                        ଠ  ࠧ諥

    㬥  ࠧ    ᠭ ⠭⭮
   ATAPI-CD.  뫨 ᮡ࠭ ⮫쪮 ᭮ , 室  饣
    ਭ樯 㭪樮஢. ।  (  
    ) IDE-䥩 (⠭ 室   ATA-R4C.*).

            室  ࠢ CD-ROM 
   ४ ࠩ VIDE-CDD.SYS.   ᥣ 
   ᥬ஢  ᮤন 筮 宩 . ஬ ⮣,
    室 ⥪ ࠩ CD  Linux ᮤন  
   ଠ樨,  ਥ  "ᮨ" ⨯ ᮢ 蠥
   ᯮ짮  ⥪⮢  樨  MS-DOS.


                     襭  ᯮ㥬 ᮪饭.

     㪠  ᮢ ࠧ㬥,  CD 
    ஬,  ஫ - 170h. ᫨   ᯮ 㣨 ,
     17x 室 ⠢ 1Fx, 1E8+x  168+x.

     = 18.2 .

        ᫮   ᫮ / CD   ଠ
    co 訬  ⮬ (  ⫨稥  PC,    - 訩).

    AP - Atapi , 12  ।  CD-Rom. ঠ 
          ᭮   . :   ன⢠
         c ⮬   16 . , 饥 設⢮
         ࠩ஢     ন ⠪ ଠ.
          । ࠧ  ᯮ ATA- A1h.

    AK - Atapi 
    M  - 
    S  - ᥪ㭤
    F  -  ३ (1/75 ᥪ㭤)

     ᯮ㥬  ॣ cﭨ (177h):
        BSY -  80h
        DRQ -  08h
        CHK -  01h


                      I. ।  CD  ⥬

         ஢ન ⢨ Atapi-CD ன⢠ 室:

        1.  㦭 諥  ॡ㥬 ன⢮ (Master/Slave) 
           ॣ 176h.
        2. ஢ ⢨ BSY
        3. ᫨  - ன⢠ .

            饣  (뢥  8  ॣ 177h
          1-3 ⨪),  ஡   ⮣. ᫨
        CD 室  cﭨ ଠ쭮  ,  
         易⥫쭮.

        3.   174h  175h  , ⫨饥  14EBh.
        4.   177h 뢥  ECh    ⨪.
        5. ஢  174h (.. = 14h)   175h (.. = EBh).
            ⮬  뢠,   ॣ  㤥
           ⠭ 訡 (177h - 51h, 171h - 04h).  ଠ쭮.

        ᫨  ᫮ ᮡ,   ,   IDE-諥
         Atapi ன⢮.  筥 ⨯ ன⢠ 
        ᯮ짮 㦥 Atapi-.

           ਬ ⮫쪮 ⮣,  ⮢୮
        ⭮,  CD  ⮣  믮 .  ⨢ 砥
         BSY   ⠭. ᫨ 室, ஢ ॣ
        ﭨ  , ஢ ⮫쪮 稥 ᠬ ATA
        ன⢠   ॣ.


                     II. 믮 

         믮 AK 室 (ࠡ  뢠):
        1.  ᮮ⢥饥 ன⢮ (Master/Slave)   176h
        2.  ⮢ (BSY  DRQ = 0). ࠩ   10-20
           ᥪ㭤. ᫨ ⮢  -    ਢ.
        3. ⠭ ⥫ ࠧ   ॣ 174h (.)
            175h (. ) ᫨   頥 ,  
             .  DMA-      ⠭
            㣨 ॣ.
        4.  177h   A0h.  ⢥   ன⢮ 
           ⠭ BSY  ६ ⮢  ਥ AP.
        5.  ॡ  (DRQ=1  BSY=0). (筮  
            - ࠩ ⠢ ॡ ࠧ).  ⮬  ॣ
           172h      祭 01.
        6.  ० ᫮ 뫪    170h 6 ᫮ AP.
        7.  ⮢ (BSY=0). ( ᨬ  ⨯  
           㣨 ⥫, ࠩ  믮   ६ 
             ᥪ㭤  ⪮ ᥪ㭤 (᫨, ਬ, 
           ⠥ ᥪ ᪠).
        8. ஢  DRQ  ᫨  ⠭,    ॣ஢
           174h  175h  । .
        9. ᫨  =0   DRQh  177h  ⠭ - . 11,
             ந  묨 १  170h.  ⮬ 
              ॣ 172h  ਭ 祭 00 (
            ।   CD)  02 ( ਥ   CD).
        10.᫨   稫  ( BSY=1),     7.
        11.᫥ 襭     ॣ 172 筮
           ਭ 祭 03,  砥 ⮢ ࠩ  뤠
            襭 .  ⮬  ஠஢
           १ 襭  (ॣ 177h  171h).  訡
            ᯮ짮 ATAPI-㭪 03h  祭  ⠫쭮
           ଠ樨.



                     III.  

         ०    ࠧ   㯯:
        ) ࠢ
                 ࠢ,   室  AP.   
                ਬ ⥫쭮 뫠  .
                  ।  ॣࠬ 訡 (171h  177h)
                   ⥫쭮  祭 ﭨ.
        ) । 
                   ࠬ । 室  AP
                ᪮ 騥 CD  ᬠਢ (   ),
                  , ।  CD, .
                ᫨   ࠧ㬥 ।   CD 
                 訡, CD ࠩ 뤠  ⢥    ()
                .
        ) 祭 ଠ樨
                    室  AP.  ⢥   D
                뤠  .



                        IV. ATA 

         CD  ᪮쪮 ᯮ⥫ ,  ᯮ
        ⠪ ,    筮 IDE-.  ⮬ 祭
        ॣ஢ ᮢ  祭  ATA.

         ᭮ :

        A0h -  । AP.

        A1h - 䨪 ਢ.   ECh  IDE-,
               ଠ 室  㣮 (ᠭ  ਫ C).

        ECh - ਭ  訡,   ॣ 174h  175h
              ⠭ ᨣ 14EBh - ਧ Atapi ன⢠.

        08h - ணࠬ . 믮 楤 砫쭮 樠樨.

        ,  믮   ࠢ ࠭
        ࣨ, ⠭ ⥩  .   ਢ 
        ਭ  ࠢ ,  ॠ쭮  ᯮ 
        ᯮ 筮.



                V.   ATAPI-

   AP   .  ⢥ , 
 ᥣ. ⠫ 11  ᮤঠ ଠ, 
 ⭮ .

----------------------------------------------------------------------
 00h - 誠, ஢ ⮢

:
        db  0
        db  11*dup(0)   ; *

        祣  ,  ਬ  ஢ન ᬥ ᪠

        :
        1) ࢠ  ᫥ ᬥ ᪠ 㤥 ⢥࣭   訡
           "ᬥ ⥫".
        2)   :  祭 "*",  ࠢ,  
           CD,   ᮢ⨬   ⠭  0.

------------------------------------------------------------------------
 01h - ⠭   砫 ᪠

:
        db 01h
        db 12*dup(0)    ; *
         ࠢ (ࠪ᪨  ᯮ).

----------------------------------------------------------------------
 03h -  ﭨ ਢ

:
        db 03h
        db 3*dup(0)     ; *
        db Len          ;  室 
        db 7*dup(0)     ; *

         室 ⠡  12h ,  ன ᠬ묨 묨 
         2, 0  0D -     訡 ᫥ 樨.

--------------------------------------------------------------------------
 012h -  ப ࠬ஢ ⮢⥫ ࠩ

:
        db 12h
        db 0h,0h        ;   ⠭  ࠬ
        db 0h           ; *
        db Len          ;  室 ப
        db 7*dup(0)     ; *

        ࠩ 뤠  ப ⮢⥫ ( ଠ ⮢⥫)
          ⨯ CD-Rom.  ਬ  ࠩ  ஢ન
        ᮮ⢥⢨ ࠩ  ன⢠.

         室 :
        0       db      1Fh     - ⨯ ன⢠ (CD = 5)
                        E0h     -  CD =0
        1       db      7Fh     - = 0 ( ᮢ.  SCSI-1)
                        80h     - ন ᬥ ⥫
        2       db      0       - ᨨ ISO, ECMA  ANSI.
        3       db      0       -  ᮢ⨬  SCSI-2
        4       db      ?       -  ⠢襣 
        5       db   2 dup(?)   - १ࢭ
        7       db      0       -  ᮢ⨬  SCSI-2
        8       db   8 dup(?)   - ப ⮢⥫ (⠬ 뢠 'ATAPI')
        10h     db 10h dup(?)   -  த樨
        20h     db 4   dup(?)   - ॢ

        ⮢  ࠧ  ப, ࠧ ஡.

---------------------------------------------------------------------------
 01Bh - ࠢ ॥  祥

:
        db 1Bh
        db 3*dup(0)     ; *
        db Func         ; 㭪
        db 7*dup(0)     ; *

         ࠢ.

        㭪樨:
        0 -   ० Sleep
        1 - ⠭ ந뢠/⥭
        2 - 뤢 ३
        3 -  ३

---------------------------------------------------------------------------
 01Eh - ஢ 

:
        db 1Eh
        db 3*dup(?)     ; *
        db Func         ; 㭪
        db 7*dup(?)     ; *

         ࠢ.

        訩  Func= 0 - ࠧ஢ ३
                        = 1 - ஢ ३

---------------------------------------------------------------------------
 025h -  ࠧ ⠢ ᪠  ᥪ.

:
        db 25h
        db 11*dup(0)    ; *

         ଠ樮.

        짮⥫  ⢥ ।   8 :
        dd Sectors      ; ᫮ ᥪ஢  ⥪饬 ᪥
        dd SectSize     ; ࠧ ᥪ ( ࠢ,  
                        ;  ᪠  ࠢ 930h)
---------------------------------------------------------------------------
 02Bh - Seek

:
        db 2Bh
        db 2*dup(0)     ; *
        db M,S,F        ; 㤠 樮஢
        db 6*dup(0)     ; *

         ࠢ.
----------------------------------------------------------------------------
 042h - ᬥ蠭 ଠ (⥭ 㡪)

:
        db      42h
        db      ScMsf   ; 0/2 - ⨯ 뤠 ᮢ ( ᥪ  MSF)
        db      FullInfo; ਠ  (/⪨ -  40h)
        db      Func    ; 㭪 (⮫쪮   )
        db      3*dup(0); *
        dw      Length  ;  ⠡
        db      3*dup(0); *

         ଠ樮, 뤠  ᫥饩 ଠ樨:

        00h dw   ﭨ ந뢠 㤨:
                      00h - ⭮   ন
                      11h - ࠥ 㤨
                      12h - 㤨 ⮨
                      13h - 㤨 ⠭  
                      14h -    訡 ᪠
                      15h - 祥
        02h dw   ᫥  (0 - )

        04h      稨  40h  FullInfo 
                Func

              Func  ࠢ 2  3
              04h db  01h       (ଠ  㡪 = 1)
              05h db  Ctrl/Addr
              06h db  TrackNumber
              07h db  Point or Index
              08h db  0
              09h db  3*dup(?) - MSF/SECTOR  ᪥
              0Ch db  0
              0Dh db  3*dup(?) - MSF/SECTOR  ஦

               --㭪 2-- ( UPC )
              04h db  02h       (ଠ  㡪 = 2)
              05h db  3h*dup(?)
              08h db  80h        - 䫠  UPC (᫨ ,  UPC )
              09h db  0Ch*dup(?) -  ࠭ UPC  (6   BCD )
              15h db  3*dup(?)   -  祣-  ᪥  ଠ MSF

               --㭪 3-- ( ISRC )
              04h db  03h       (ଠ  㡪 = 2)
              05h db  Ctrl/Addr
              06h db  TrackNumber  -  ᥣ ᯮ.
              07h db  ?
              08h db  80h - 䫠 ⢨ (筮 㭪樨 02h)
              09h db    ISRC

-----------------------------------------------------------------------------
 043h - ଠ  ஦ (READ TOC)

:
        db      43h
        db      ScMsf   ; 0/2 - ⨯ 뤠 ᮢ ( ᥪ  MSF)
        db      4*dup(0); *
        db      BegTrk  ; 砫쭠 ஦ ( 1, 0   1)
        dw      Length  ;  ⠡
        db      Func    ; ਠ 뤠 ଠ樨 (0/40h/80h)
        db      2*dup(0); *

         ଠ樮, 뤠 ⠡ ஦. ᨬ쭠 
                ⠡ 8*64h+4   64h (100.) ஦.

        Func    = 00h   ;   ⠡ ஦
                = 40h   ;  ⠡ ᨩ
                = 80h   ;   ⠡  ७ ଠ

        騩 ଠ ⠡ :
        dw      Len             ;  ᫥   
        db      BegTrk          ; ࢠ ஦
        db      EndTrk          ; ᫥ ஦
        d?      <track_Def>     ; ᠭ ஦

        ᠭ ஦ ..  ଠ⮢:

        1) 5   ஦ (७ ଠ,   CD  뤠):
                db      Ctrl/Addr       ; ⨯ ஦  䫠
                db      Index           ;  ஦ ()
                db*3    Start           ;  砫 ஦

        2) 8   ஦ (Func=0h/40h):
                db      ?
                db      Ctrl/Addr       ; ⨯ ஦  䫠
                db      TrackNumber     ;  ஦
                db      ?
                db*4    Start           ;  砫 ஦

        3) 11   ஦ (Func = 80h):
                db      Res1
                db      Ctrl/Addr       ; ⨯ ஦
                db      Res2
                db      Index           ;  ஦
                db      Res3
                db      Res4
                db      Res5
                db*4    Start           ;  砫 ஦

        Ctrl/Addr  - ⨯ ஦(-,    MSCDEX,  ⠢
                     ࠤ):

                Ctrl ( ࠤ, ⤥ ):

                01 -  pre-emphasis
                02 - ࠧ襭 ஢
                04 - ஦ 
                08 - 4  (  2)

                Addr ( ࠤ, ):
                0 -  㡪
                1 -  㡪 ஢ 
                2 -  㡪 ஢ UPC
                3 -  㡪 ஢ ISRC
                祥 - १ࢨ஢

                 ࠭ :
                14h - ROM
                10h - audio

        Index -   BCD   筮 ஦ 室  ࢠ
        01-99.  A0    ᯥ樠쭮 祭,   ᮮ⢥
        䨧᪨ ஦  ᪥,   㦥 ࠪ -
        ନ  ᫥ ஦, 砫 ᪠,  ᪠  ..

        Start -  ᨬ  ,    ஬ ᥪ,
         ᮬ ᥪ  ଠ MSF.

-----------------------------------------------------------------------------
 044h - ଠ  ॠ ⪠  (Read HEADER)

:
        db      44h
        db      SL      ;  2 -  뢠  室 
                        ; (室  ᥪ  ⠭)
        db      0       ; *
        db      M,S,F   ;  ᥪ
        db      0       ; *
        dw      Len     ;  뤠 ଠ樨
        db      3*dup(0); *

         ଠ樮, 뤠 ᫥ ⠡  8 :

        db      SectorType      ; ⨯ ଠ ᥪ (data mode)
        db      4*dup(0)
        db      M,S,F           ;  ᥪ

         뤠 ⮫쪮  ⮬ 砥, ᫨ CD ᬮ  
        ᥪ  ।  ⨯.
-----------------------------------------------------------------------------
 045h - ந뢠 audio  ନ  ( - ᫮)

:
        db 45h
        db 0            ; *
        dd StartBlock   ;  砫 ந뢠 (-1 -  ⥪. )
        db ?
        dw Length       ; ᫮ 
        db 3*dup(?)     ; *
         ࠢ.
-----------------------------------------------------------------------------
 047h - ந뢠 audio  ⨫ MSF

:
        db 47h
        db 2*dup(?)     ; *
        db M,S,F        ; 砫 १ (FF:FF:FF - ⥪ )
        db M,S,F        ;  १
        db 3*dup(?)     ; *
         ࠢ.
-----------------------------------------------------------------------------
 04Bh - Start/stop audio

 :
        db  4Bh
        db  7*dup(0)    ; *
        db  Func
        db  3*dup(0)    ; *

         ࠢ.

        訩  Func= 0 - ⠭
                        = 1 - 
---------------------------------------------------------------------------
 04Eh - ⠭ ந뢠

:
        db 4eh
        db 11*dup(?)    ; *
         ࠢ.
----------------------------------------------------------------------------
 055h - ⠭  ࠬ

:
        db      55h
        db      ?       ;  1 - ࠭  NVRAM (?)
        db      Page    ; ॡ㥬 ࠭ ࠬ஢
        db      4 dup (?)
        dw      Length  ;  ⠡
        db      3*dup(0); *

         ࠢ,   ଠ ࠭ ᠭ   5Ah.

----------------------------------------------------------------------------
 05Ah -   ࠬ

:
        db      5Ah
        db      ?
        db      Page  - । ॡ㥬 ࠬ, ⮨  
                        ⮢ :

                        3Fh -  ॡ㥬 ࠭ ࠬ஢:
                                01h - ࠬ ࠢ 訡
                                0Dh - 騥 ࠬ
                                0Eh - 㤨-ࠢ
                                2Ah - ࠬ ன⢠ (⮫쪮 ⠥)
                                3Fh -  ࠭窨

                        C0 -  ⨯ ॡ㥬 ࠭:
                                00 - ⥪騥 祭
                                01 -  祭
                                10 - 祭  㬮砭
                                11 - ࠭ 祭

        db      4 dup (?)
        dw      Length  ;  ⠡
        db      3*dup(0); *

         ଠ樮, 뤠 c⢥ ࠭ ࠬ஢.

        騩 :
        00h     dw               ᥣ  ( ࢮ ᫮)
        02h     db              ﭨ ਢ
        03h     db 5 dup(?);

          ࠭:
        08h     db       ࠭  
        09h     db       ࠭

        ࠭ 01 - ࠢ 訡
        0Ah     db      ࠬ ࠢ 訡
        0Bh     db      稪 ஢ ⥭

        ࠭ 0D - 騥 ࠬ
        0Ah     db      ?
        0Bh     db      ⥫ ⠩ ⨢
        0Ch     dw      ᫮ S   M   ଠ MSF (60)
        0Eh     dw      ᫮ F   S   ଠ MSF (75)

        ࠭ 0E - 㤨 ࠬ
        0Ah     db      ?       ࠬ  .,  
        0Bh     db      2 dup(?)
        0Dh     db      ?    =0 LBA ᥣ ࠢ  ᥪ,
                                訩  㪠뢠 ࠢ쭮 ᫥饣
                                
        0Eh     dw      0       ᫮ ᪨   ᥪ㭤 
                                ந뢠. (-ࠢ  ᯮ)
        10h     db      . ࠤ -  室   0
        11h     db      ஬  0
        12h     db      . ࠤ -  室   1
        13h     db      ஬  1
        14h     db      . ࠤ -  室   2
        15h     db      ஬  2
        16h     db      . ࠤ -  室   3
        17h     db      ஬  3

        ࠭ 2Ah - ࠬ ன⢠ (⮫쪮 ⥭)
        ;  ⢨/⢨ 㭪権
        0Ch     db      01h - ந뢠 㤨
                        02h -  㤨/ ⮪
                        04h - Digital out to port 1
                        08h - Digital out to port 2
                        10h - ⥭ ᥪ஢ Mode 2 Form 1
                        20h - -----//-------- Mode 2 Form 2
                        40h - ⥭ ᨮ ᪮
                        80h - ?
        0Dh     db      01h - ⥭ RedBook १  Read-CD
                        02h - ⥭ RedBook  "with accurate stream"
                        04h - ⥭ 㡪
                        08h - প ૨  㡪
                        10h - প "C2 error pointers"
                        20h - প ⥭ ISRC
                        40h - প ⥭ UPC
                        80h - ?
        0Eh             01h - ஢ ⥫
                        02h - ⥭  ஢
                        04h - Disk prevent jumper present
                        08h -   ⥫
                        10h - ?
                        E0h -  稪:
                                  0 - Caddy
                                  1 - Tray
                                  2 - Pop-Up
                                  3 - Reserved
                                  4 -   㠫쭮
                                      塞묨 ᪠
                                  5 - ਤ
                                  6 - Reserved
                                  7 - Reserved
        0Fh     db      01h - 쭠 ॣ㫨஢ 
                        02h -   
                        04h - ଠ  稨 ᪠
                        08h -
                        10h -
                        20h -
                        40h -
                        80h -
        10h     dw      ᨬ쭠 ᪮   
        13h     db      ᫮ ࠤ権 ॣ㫨஢ ஬
        14h     dw         
        16h     dw       ᪮ 
        ;---------  ⢮-------------
        18h     db      ?
        19h     db      01h - Digital out  ஭/ᯠ ᨣ BCKF
                        02h - LRCK  /ࠢ 
                        04h -   ଠ LSB/MSB
                        08h
                        10h \  BCKs:     0 - 32
                        20h  |           1 - 16
                        40h /            2 - 24
                                         3 - 24 (I^2S)
                        80h - ?

            ୨   ࠧ.  ᠭ ⮫쪮 
         ,  - ⠭. ᫨ 訢 
         ࠭窨 ( 3Fh),   室  㤥 ⢮ 
         騩   ᫥⥫쭮 ᯮ ࠭窨 
         ᢮ .

-----------------------------------------------------------------------------
 0A5h - ந뢠 audio  ନ 

:
        db A5h
        db 0            ; *
        dd StartBlock   ;  砫 ந뢠 (-1 -  ⥪. )
        dd Length       ; ᫮ 
        db 2*dup(?)     ; *
         ࠢ.
---------------------------------------------------------------------------
 0B9h -  

:
        db B9h  ;
        db Fmt  ;   = 00h   ଠ
                ;              08h  CD- ( )
                ;              10h\  ࠧ
                ;              14h/      Green XA
        db 0    ; *
        db M,S,F; 砫 ⥭
        db M,S,F;  ⥭
        db Flg  ; 䫠 ⠥ ᪠ ᥪ:
                ; 01h   
                ; 02h     ᯮ㥬 (?)
                ; 04h           
                ; 08h  EDC/Zero/ECC
                ; 10h  ᭮ ⥫ ᥪ (data)
                ; 20h  ⥫  ᥪ (head)
                ; 40h   㡪 (sub)
                ; 80h  砫 ᨭ஡ (sync)
                ; । ⮫쪮    ᥪ஢,  
                ; ⠭ . ।  ᥪ  
                ; ,  ய᪮.
        db 0    ; ᥣ .. =0,  訡 (?)
        db 0    ; *

         । .
        ᫨ 砫=, ந 樮஢  㪠
           ⠡쭮.  ⮬ 砥   ।.

--------------------------------------------------------------------------
 0BEh -    ନ ᥪ஢
:
        db BEh  ;
        db Fmt  ;
        dd Sec  ; 砫 ⥭ (. ⮫쪮 24 )
        db 0    ; *
	dw ScNum; ᫮ ᥪ஢
        db Flg  ; 䫠 ⠥ ᪠ ᥪ (  B9h)
        db 0    ; ᥣ .. =0,  訡 (?)
        db 0    ; *

          筠  B9,  ᪫祭 
        ᮢ  ⥭  ନ ᥪ஢.




                             ਫ A
                         訡 ATAPI ன⢠
               (  ࠩ CD  Linux')

Ŀ
            
Ĵ
00hNo sense data     
01hRecovered error   
02hNot ready         
03hMedium error      
04hHardware error    
05hIllegal request   
06hUnit attention    
07hData protect      
08h(reserved)        
09h(reserved)        
0ah(reserved)        
0bhAborted command   
0ch(reserved)        
0dh(reserved)        
0ehMiscompare        
0fh(reserved)        


 ன  ⨩ 

 0000h No additional sense information
 0011h Audio play operation in progress
 0012h Audio play operation paused
 0013h Audio play operation successfully completed
 0014h Audio play operation stopped due to error
 0015h No current audio status to return
 0200h No seek complete
 0400h Logical unit not ready - cause not reportable
 0401h Logical unit not ready - in progress (sic) of becoming ready
 0402h Logical unit not ready - initializing command required
 0403h Logical unit not ready - manual intervention required
 0600h No reference position found
 0900h Track following error
 0901h Tracking servo failure
 0902h Focus servo failure
 0903h Spindle servo failure
 1100h Unrecovered read error
 1106h CIRC unrecovered error
 1500h Random positioning error
 1501h Mechanical positioning error
 1502h Positioning error detected by read of medium
 1700h Recovered data with no error correction applied
 1701h Recovered data with retries
 1702h Recovered data with positive head offset
 1703h Recovered data with negative head offset
 1704h Recovered data with retries and/or CIRC applied
 1705h Recovered data using previous sector ID
 1800h Recovered data with error correction applied
 1801h Recovered data with error correction and retries applied
 1802h Recovered data - the data was auto-reallocated
 1803h Recovered data with CIRC
 1804h Recovered data with L-EC
 1805h Recovered data - recommend reassignment
 1806h Recovered data - recommend rewrite
 1a00h Parameter list length error
 2000h Invalid command operation code
 2100h Logical block address out of range
 2400h Invalid field in command packet
 2600h Invalid field in parameter list
 2601h Parameter not supported
 2602h Parameter value invalid
 2603h Threshold parameters not supported
 2800h Not ready to ready transition, medium may have changed
 2900h Power on, reset or bus device reset occurred
 2a00h Parameters changed
 2a01h Mode parameters changed
 3000h Incompatible medium installed
 3001h Cannot read medium - unknown format
 3002h Cannot read medium - incompatible format
 3700h Rounded parameter
 3900h Saving parameters not supported
 3a00h Medium not present
 3f00h ATAPI CD-ROM drive operating conditions have changed
 3f01h Microcode has been changed
 3f02h Changed operating definition
 3f03h Inquiry data has changed
 4000h Diagnostic failure on component (ASCQ)
 4400h Internal ATAPI CD-ROM drive failure
 4e00h Overlapped commands attempted
 5300h Media load or eject failed
 5302h Medium removal prevented
 5700h Unable to recover table of contents
 5a00h Operator request or state change input (unspecified)
 5a01h Operator medium removal request
 5b00h Threshold condition met
 5c00h Status change
 6300h End of user area encountered on this track
 6400h Illegal mode for this track
 bf00h Loss of streaming

-------------------------------------------------------------------------

                        ਫ B
                   ଠ ᥪ஢

Ŀ
 㤨  (᭠ ):             audio_sample_bytes           
                                                 2352                 
Ĵ
  (, mode 1):       sync  head  data  EDC  zero  ECC 
                                 12     4   2048   4     8   276 
Ĵ
  (, mode2):        sync  head          data            
                                 12     4           2336            
Ĵ
 XA  (,            sync  head  sub   data  EDC  ECC 
                 mode2 form1):   12     4    8    2048   4   276 
Ĵ
 XA  (,            sync  head  sub   data        EDC 
                 mode2 form2):   12     4    8    2324         4  


-------------------------------------------------------------------------

                        ਫ C
           , ।  ATA- A1

饭
00h     db   ⮢ :
                03h -  :   00 - 12 
                                      01 - 16 
                                      祥 - Reserved
                1Ch - ?
                60h - CMD DRQ Type:   00 - ய
                                      01 - Interrupt
                                      02 - Accelerated
                                      03 - Reserved
                80h - ꥬ

01h     db      1Fh -  ன⢠: 05 - CD-ROM
                                     (⠫ ⨯  ᬮ
                                       ᠭ SCSI)
;-- ய---

14h     dw*0Ah  ਩ 
28h     dw*3    -  ந⥫
2Eh     dw*4     訢
36h     dw*14h   
5Eh     dw      -  ந⥫
60h     dw      0
62h     db      ????? (0)
63h     db      01h - প DMA
                02h - প LBA
                04h - ன⢮   ᯮ짮 IORDY
                08h - প IORDY
                20h - প ४뢠 権
                40h - প Proxy Interrupt
                80h - প Interleave DMA
66h	db	PIO time (ns)
67h	db	PIO mode
69h     db      S/W DMA mode
6Ah     db      1 -  6h-73h ᯮ
                2 - Advanced PIO Support ( 80h-8Dh ᯮ)

;  6Ch - 78h   Interrupt List'.  設⢥ CD  ᯮ
6Ch     dw      ??? logical cylinders in current translation mode
6Eh     dw      ??? logical heads in current translation mode
70h     dw      ??? logical sectors per track in current translation mode
72h     dw*2    ??? current capacity in sectors
76h     dw      ??? multiple-sector count for read/write multiple command
78h     dw*2    ??? total number of user-addressable sectors (LBA mode)

;ࠬ DMA
7Ch     db      S/W DMA modes: 1 - 0; 2 - 0,1; 4 -0,1,2; 祥 -  DMA
7Dh     db      騩 ० S/W DMA: 1 - 0, 2 - 1, 4 - 2, 祥 -  DMA
7Eh     db      M/W DMA modes (  S/W DMA)
7Fh     db      騩 ० M/W DMA
80h	db	Advanced PIO modes:	4 - PIO 5
					2 - PIO 4
					1 - PIO 3
82h     dw      쭮   ६ ।  M/W DMA
84h	dw	㥬 ---//----//---
86h     dw      쭮   ६ ।  PIO  F/C
88h     dw      -----//------//-------//----//---   F/C (IORDY)
8Ah     dw*2    १ࢨ஢    PIO-०

;    ᯮ  । ࠬ஢
; ४뢠饣 
8Eh     dw      ⨯筮 ६ ᪠ 設 ᫥  (ms)
90h     dw      ----//-----//-----//-----//----//--- 㦨 (ms)
;
92h     dw      -  ᨨ
96h     dw*38h  0
100h    dw*20h  -  ந⥫
140h    dw*60h  0

-----------------------------------------------------------------------

                               ਫ D
                      祭 ॣ஢ 䥩

        170h -   . १  ॣ CD  
                譨 ஬ 묨. /뢮 ⮫쪮 ᫮.

        171h -  ⥭ - ॣ 訡:
                01h - 訡筠 
                02h - 㦥  ⥫
                04h -  ⢥࣭ ( ᮢ    ATA)
                08h - 㦥 ᬥ ⥫
                F0h - 訥 4  ࢮ   訡
        
                 - ॣ . ⥩ (樮):
                01h - 祭   DMA
                02h - 祭 ४뢠 権
                FDh - १ࢨ஢

        172h -   筥 稭 뢠:
                01h -  ।:  0 - । , 1 - । AP
                02h - ࠢ ।: 0  -  CD, 1 -  CD
                04h -  ᢮ 設 ATA. ( ࠢ = 0)
                F8h - १ࢨ஢
                ⠭ ⮢ 1  2  ᫥騩 :
                        0 -    ( CD)
                        1 -  Atapi-
                        2 - 뢮   ( CD)
                        3 - 뤠 ﭨ 襭 

        173h -  १ࢨ஢

        174h - \  뫪.   ⠭
        175h - /⥫ ࠧ  뫪  .  ⥭
                頥 ꥬ, ⮢  ।  CD 
                ॡ㥬  ।  CD  ᫥饬 横 .

        176h -   롮 ன⢠
                0Fh - १ࢨ஢ (SAM LUN)
                10h -  (0)/  (1)
                20h - 1
                40h - १ࢨ஢ (0)
                80h - 1

        177h -    () / ﭨ (⥭)
                 ॣ ﭨ:
                01h - 訡 믮 
                02h -  ᯮ
                04h - 㦥 ᪮४஢ 訡 ⥭
                        ( 設⢥ ன ﭭ 襭)
                08h - ன⢮ ॡ  묨
                10h - ன⢮ ᨫ 뢠  㦨
                        (  ਢ ⠭ ﭭ)
                20h - ன⢮ ⮢  DMA- 
                         訡 (  ०   
                        ᯮ)
                40h - ன⢮ 稫 믮 
                        (    ᯮ짮)
                80h - ன⢮ .

        376h -   ࠢ ன⢮ ( ,    
                 ன⢠)
                 :
                01h - 0
                02h -  뢠  ன⢠
                04h - ணࠬ 
                08h - 1
                F0h - १ࢨ஢

         ਬ砭:  믮  ATA ( ATAPI)  祭
         ॣ஢ ᮢ   祭  ATA.

-----------------------------------------------------------------------

                               ਫ E
/*****************************************************************/
/* ਬ ᯮ짮 ATAPI-CD   ந뢠 ᪮  */
/*  ᯮ짮 ࠩ					 */
/* ਫ  㬥樨  ATAPI-CD			 */
/* : BC 3.1, large model				 */
/*  _ࠩ_  . .. 設⢮ ਢ ⠭*/
/*  ࠡ  뢠,  । ஡ */
/* ࠡ  . ଠ  ஡,   ࠧ묨*/
/* ਢ 㤥 祭 業  ᮧ ᨨ,              */
/* ࠡᯮᮡ    襬 ⢥ ன.	 */
/*****************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>


typedef unsigned char  byte;
typedef unsigned int   word;
typedef unsigned long dword;


/* ⥫ IDE-ன⢠ */
typedef struct{
int port;	/*  				*/
char irq;	/*  IRQ 1-15, ᫨  - 0 */
char ms;	/* 1 - , 0 - 		*/
}ATAPos;


/* ᫨ ᯮ 㣨 뢠
	⠡  ஢	*/
static ATAPos Atp[]={
{0x1F0,14,1},
{0x1F0,14,0},
{0x170,15,1},
{0x170,15,0},
{0x1E0,10,1},
{0x1E0,10,0},
{0x168,11,1},
{0x168,11,0},
{0,0,0}};

/* ,  ᫥ ࠧ ⠫  1x7 */
static byte Last1X7=0;

/*static ATAPos *GetDescr(int drvnum){return(Atp+drvnum);}*/

void StoreLBAToMSF(long lba, void *msf)
{
byte *msfb=msf;
lba+=150;
*msfb++=lba/(60L*75L);
lba%=(60L*75l);
*msfb++=lba/75L;
*msfb++=lba%75L;
}


word  GetMSBWord(word cd){return(
			(cd >> 8)|
			(cd << 8));}

dword GetMSBDword(dword cd){return(
			((cd >> 24)&0x000000FFL)|
			((cd >>  8)&0x0000FF00L)|
			((cd <<  8)&0x00FF0000L)|
			((cd << 24)&0xFF000000L));}

/*  ⠭  */
int WtBitMask(int port, int and, int wt, int sec)
{
long counter;
for(counter=sec*1000L;counter>0;counter--){
	int i;
	i=inportb(port);
	if((port&7)==7)	Last1X7=i;
	if((i&and)==wt) return(0);
	delay(1);
}
return(1);
}

/* ந  */
int ResetDrive(int port)
{
int i;
outportb(port+7,8); 	/* ணࠬ  */
outportb(port+0x206,0xe); /*   */
delay(10);
outportb(port+0x206,8);
delay(10);
for(i=0;i<200;i++)
	if((inportb(port+7)&0x88)==0)return(0);
	else delay(10);
return(1);
}


/*    <maxdetect> ATAPI-cd 
  ⥫  ⠡ DrvTbl*/
int FindAtapiCD(int maxdetect, int *DrvTbl)
{
int devnum;
int totaldev=0;
for(devnum=0;(Atp[devnum].port!=0)&&(totaldev<=maxdetect);devnum++){
	register int port=Atp[devnum].port;
	int i;
	/*  ன⢠ */
	outportb(port+6,Atp[devnum].ms?0xA0:0xB0);
	delay(1);
	if(inportb(port+7)==0xFF)continue;
	if(inportb(port+7)&0x80){
		/* ..  ? */
		if(ResetDrive(port))continue;
	}
	outportb(port+4,0);
	outportb(port+5,0);
	outportb(port+7,0xEC);
	for(i=0;i<20;i++){
		delay(1);
		if((inportb(port+4)==0x14)&&
		   (inportb(port+5)==0xEB)){
			word devcode;
			/*  ATAPI-ன⢮, 㥬 ஡ */
			delay(1);
			outportb(port+7,0xA1);
			for(i=0;i<100;i++)
				if(inport(port+7)&0x80)delay(1);
				else goto okcont;
			goto cont;

			okcont:
			delay(10);
			devcode=inport(port);
			for(i=0;i<255;i++)inport(port);
			/*  CD ? */
			if((devcode&0x1F00)!=0x500)break;
			/*   12   AP ? */
			if(devcode&1)break;
			*DrvTbl++=devnum;
			totaldev++;
			break;
		   }
	}
	cont:;
}
return(totaldev);
}


/*  뢠 -  㬭 cd-ࠩ  蠫 */
int DsbIrq(int devnum)
{
int inum=Atp[devnum].irq;
int oldst;
if(inum==0)return(0);
if(inum>=8){
	oldst=inportb(0xA1);
	outportb(0xA1,oldst|(1<<(inum-8)));
	return(!(oldst&(1<<(inum-8))));
}
oldst=inportb(0x21);
outportb(0x21,oldst|(1<<(inum)));
return(!(oldst&(1<<(inum))));
}

/* ࠧ 뢠  cd -  襭 ࠡ */
void EndIrq(int devnum)
{
int inum=Atp[devnum].irq;
if(inum==0)return;
if(inum>=8){
	outportb(0xA1,
		inportb(0xA1)&(~(1<<(inum-8))));
}
else{
	outportb(0x21,
	inportb(0x21)&(~(1<<inum)));
}
}

/* 믮 ATAPI-:
	 drive 	- ன⢮
	 dir    - 1 - ⥭, 0 -    CDD
	 AP 	-   ATAPI-⮬
	 buffer -   묨 (NULL, ᫨  㦥)
	 bufflen-  뢮   . ࠧ 
 室:
	 -1	- 뫠 訡
	 祥 - ࠧ ᫠  ( )
*/
static word PrefIOBlock=0x8000;  /* ࠧ  뫪  ᫮ */
static byte DontResetFlg=0;	/*  뢠  ⮢ */

int ExecATAPICMD(int drive, int dir, word *AP, word *buffer, word bufflen)
{
int port;
int i;
int readed=0;
int size;
	port=Atp[drive].port;
	/* 롥६ ⨢ ன⢮ */
	outportb(port+6,Atp[drive].ms?0xA0:0xB0);

	rerd:

	Last1X7=inportb(port+7);
	if(Last1X7&0x88){ /*  祭 ⮢ - ஡㥬 ࠢ  */
		if(DontResetFlg)return(-1);
		ResetDrive(port);
		/*  襭   */
		if(WtBitMask(port+7,0x80,0x0,10))return(-1);	/*  ⮢ */
		goto rerd;
	}
	/* ⠭ ࠧ  */
	{
	 register word pl;

	 if(PrefIOBlock>bufflen)pl=bufflen;
	 else 			pl=PrefIOBlock;
	 outportb(port+4,pl);
	 outportb(port+5,pl>>8);
	}
	/* ⨬ 直   */
	outportb(port+1,0);
	/*  ⮢  ࠡ  - 㯨  ।  */
	outportb(port+7,0xA0);
	/*  ⮢   3 ᥪ㭤 (  ) */
	if(WtBitMask(port+7,0x89,8,3))return(-1);
	/* 뢥 ⨪ */
	disable();
	for(i=0;i<6;i++) outport(port,*AP++);
	enable();

	/* 窠 室 横 ਥ  */
	GetNextBlk:
	/*    30 ᥪ㭤 */
	WtBitMask(port+7,0x80,0x00,30);
	/*  ਭ,   믮 -
		稬 ࠧ  ࠢ । */
	size=inportb(port+4) | (inportb(port+5)<<8);
	Last1X7=inportb(port+7);
	if(Last1X7&1)return(-1);	/* 訡 믮  */
	if(Last1X7&8){ /* 㦭 - 뫠 */
		if(inportb(port+2)&2){
		 /* CD */
				if(dir==1 && buffer != NULL ){
				/* ⥬ । */
				   while(size>0){
					int i=inport(port);
					size-=2;
					if(bufflen<1)break;
					*buffer++=i;
					readed+=2;
					bufflen-=2;
				   }
				}
				/* ய⨬ 㦭 ⮪ */
				while((size-=2)>0){inport(port);}
		}
		else{
		/*  CD */
			if(dir==0 && buffer!=NULL ){
				   while(bufflen>0 && size > 0){
					if(bufflen<1)break;
					outport(port,*buffer++);
					bufflen-=2;
					readed+=2;
					size-=2;
				   }
			}
			/* ᨬ ⮪ ﬨ */
			while((size-=2)>0){outport(port,0);}
		}
		goto GetNextBlk;
	}
	/* 뫠   㦭 -  襭 */
	Last1X7=inportb(port+7);
	if(Last1X7&1){
		/* 뫨 訡 */
		return(-1);
	}
return(readed);
}


/***************************************************************/
/*               ⮢ ந뢠⥫ CD                  */
/*  饭 䥩 ந뢠 ⮫쪮  10 ४*/
/***************************************************************/

/* ਬ⨢ 訢 ப */
char *AskStr(char *quest)
{
static char str[80];
rtt:
printf(quest);
fflush(stdin);
if(fgets(str,79,stdin)==NULL)exit(1);
return(str);
}


typedef struct{
word Params1;
word scsi1;
byte len;
word dummy2;
byte Scsi2;
char Manuf[8];
char Prod[0x16];
char Rev[4];
}Inf12Blk;

typedef struct{
word bkllen;
byte state;
byte undef[9];
byte flags1, flags2, flags3, flags4;
word maxspeed;
byte undef2;
byte audiosteps;
word bufsize;
word curspeed;
word dummy[10];
}Cmd5AInfo;

typedef struct{
word	st1;
byte	err0;
byte    dummy1[9];
byte	err1;
byte	err2;
byte	dummy2[4];
}Inf3Blk;

typedef struct{
byte res1;
byte CA;
byte number;
byte res2;
byte Start[4];
}OneTrk0;

typedef struct{
word Len;
byte BegTrk;
byte EndTrk;
OneTrk0	Trk[11];
}TOC10;

Cmd5AInfo Buf5A2A;
Inf12Blk Info12Buf;
Inf3Blk  Info3Buf;
TOC10	TrkBuf;

/* ATAPI-  ࠧ ᮢ */
word ClosePkt[6]={0x1B,0,3,0,0,0};
word EjectPkt[6]={0x1B,0,2,0,0,0};
word Info5A2A[6]={0x5A,0xAA,0,0,0x1C,0};
word Info12[6]={0x12,0,sizeof(Inf12Blk),0,0,0};
word LockPkt[6]={0x1E,0,1,0,0,0};
word UnlockPkt[6]={0x1E,0,0,0,0,0};
word Info3[6]={0x3,0,sizeof(Inf3Blk),0,0,0};
word RdToc[6]={0x243,0,0,1,sizeof(TOC10),0};
word PlaySt[6]={0x47,0,0,-1,255,0};
word ReadSc[6]={0xBE,0,0,0,0,0};
word ReadScM[6]={0xB9,0x0,0x0,0x0,0x0,0};


/*   ⥭ ᥪ஢ */

#define MaxSect 16U

byte Buffer[2352U*MaxSect];

void main(void)
{
int devtbl[8];
int workdrv;
int maxdrv;
int i;
maxdrv=FindAtapiCD(8,devtbl);
printf("Detected %d ATAPI CD-ROM drive(s):\n",maxdrv);
if(maxdrv<1)return;
{
int i;
for(i=0;i<maxdrv;i++){
	printf("%1.1d: %3.3Xh:%c (irq %d)\n",i+1,
			Atp[devtbl[i]].port,
			Atp[devtbl[i]].ms?'M':'S',
			Atp[devtbl[i]].irq);
}
if(maxdrv>1){
	do{
	  workdrv=atoi(AskStr("Select work drive>"));
	}while((workdrv<1)||(workdrv>maxdrv));
	workdrv=devtbl[workdrv-1];
}
else {	AskStr("Press Enter to continue....");
	workdrv=devtbl[0];
}
}
/* ࠡ稩  ࠭ */
DsbIrq(workdrv);

redrawscr:
clrscr();

gotoxy(1,15);
cprintf(
" 0-9 - Start play at track X       E - Eject disk\n\r"
" R   - Rescan  track list          C - Close tray\n\r"
" I   - Some drive info             M - Manufacturer Info\n\r"
" L   - Lock tray                   U - unlock tray\n\r"
" X   - Error type                  W - write CD to disk\n\r"
" Z   - Redraw screen\n\r"
" Esc - quit");
gotoxy(1,22);
cprintf(" Select >");
rein:
gotoxy(10,22);
while(kbhit())getch();
i=getch();
gotoxy(1,23);clreol();
switch(i){
/* ४  -   ந뢠 */
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':i-='0';
	cprintf("Start playing....");
	PlaySt[1]=TrkBuf.Trk[i].Start[1]<<8;
	PlaySt[2]=TrkBuf.Trk[i].Start[2]|(TrkBuf.Trk[i].Start[3]<<0x8);

	PlaySt[3]=TrkBuf.Trk[i+1].Start[1]|(TrkBuf.Trk[i+1].Start[2]<<0x8);
	PlaySt[4]=TrkBuf.Trk[i+1].Start[3]<<8;

	if(ExecATAPICMD(workdrv,0,PlaySt,NULL,0)!=-1)cprintf("Ok");
	else printf("Fail");
	break;
/*  ३ */
case 'E':
case 'e':
	cprintf("Eject disk....");
	if(ExecATAPICMD(workdrv,0,EjectPkt,NULL,0)!=-1)cprintf("Ok");
	else printf("Fail");
	break;
/*   */
case 'C':
case 'c':
	cprintf("Close tray....");
	if(ExecATAPICMD(workdrv,0,ClosePkt,NULL,0)!=-1)cprintf("Ok");
	else printf("Fail");
	break;
/* ᬥ蠭 ଠ ( 5A/2A) */
case 'I':
case 'i':
	if(ExecATAPICMD(workdrv,1,Info5A2A,(void*)&Buf5A2A,sizeof(Buf5A2A))>0){
	cprintf("MaxSpd: %d, CurSpd: %d, Buff: %d Kb",
			GetMSBWord(Buf5A2A.maxspeed),
			GetMSBWord(Buf5A2A.curspeed),
			GetMSBWord(Buf5A2A.bufsize));
	}
	else cprintf("Fail");
	break;
/* ଠ  ந⥫ */
case 'M':
case 'm':
	if(ExecATAPICMD(workdrv,1,Info12,(void*)&Info12Buf,sizeof(Info12Buf))>0){
	cprintf("Manuf: [%8.8s], Prod: [%16.16s], Rev: [%4.4s]",
			Info12Buf.Manuf,
			Info12Buf.Prod,
			Info12Buf.Rev);
	}
	else cprintf("Fail");
	break;
/* ஢  */
case 'l':
case 'L':cprintf("Lock tray....");
	if(ExecATAPICMD(workdrv,0,LockPkt,NULL,0)!=-1)cprintf("Ok");
	else printf("Fail");
	break;
/* ࠧ஢  */
case 'u':
case 'U':cprintf("Unlock tray....");
	if(ExecATAPICMD(workdrv,0,UnlockPkt,NULL,0)!=-1)cprintf("Ok");
	else printf("Fail");
	break;
/* ७ ଠ  訡 */
case 'X':
case 'x':
	if(ExecATAPICMD(workdrv,1,Info3,(void*)&Info3Buf,sizeof(Info3Buf))>0){
	cprintf("Err0: %3.3Xh, Err1: %3.3Xh, Err2: %3.3Xh",
			Info3Buf.err0,
			Info3Buf.err1,
			Info3Buf.err2);
	}
	else cprintf("Fail");
	break;
/*  ᯨ᮪ ஦ */
case 'R':
case 'r':
	if(ExecATAPICMD(workdrv,1,RdToc,(void*)&TrkBuf,sizeof(TrkBuf))>0){
		gotoxy(1,1);
		cprintf("Num   Ctrl/Addr   TrNum    Start");
		{
		 for(i=0;i<10;i++){
		   cprintf("\n\r");
		   clreol();
		   if(i<TrkBuf.EndTrk){
		    cprintf("%2.2d    %3.3Xh        %2.2X     %2.2d:%2.2d:%2.2d",
			i,
			TrkBuf.Trk[i].CA,
			TrkBuf.Trk[i].number,
			TrkBuf.Trk[i].Start[1],
			TrkBuf.Trk[i].Start[2],
			TrkBuf.Trk[i].Start[3]);
		   }


		 }
		}
	}
	else cprintf("Fail");
	break;
/* ⥭ ᥪ஢   ( 砫    ⠭) */
case 'w':
case 'W':{FILE *img;
	  word len;
	  long CurSector=0;
	while(kbhit())getch();
	img=fopen("CDImage.bin","wb");
	if(img==NULL)cprintf("Can't open save file !");
	cprintf("Copying sectors. Press any key to abort [");
	do{
		cprintf("/");
		StoreLBAToMSF(CurSector,((byte*)ReadScM)+3);
		StoreLBAToMSF(CurSector+MaxSect,((byte*)ReadScM)+6);
		((byte*)ReadScM)[9]=0x10;
		len=ExecATAPICMD(workdrv,1,ReadScM,(void*)Buffer,sizeof(Buffer));
		if(len==0xFFFF){ cprintf("]CD read fail");goto ecpy;};
		if(len==0){ cprintf("]CD return zero bytes");goto ecpy;}
		cprintf("%u\\",len);
		if(fwrite(Buffer,len,1,img)!=1){
				cprintf("]Error write to disk");
				goto ecpy;
				}
		CurSector+=MaxSect;
	}while(!kbhit());
	while(kbhit())getch();
	cprintf("]Copy stopped");
	ecpy:
	cprintf("(%ld)",CurSector);
	fclose(img);
	break;
	}
case 'z':
case 'Z':goto redrawscr;
/* 室  ணࠬ */
case 0x1b:goto finch;
case 0: goto rein;
}
goto rein;
finch:
clrscr();
}


#########################################################################

PS/ 砫쭮  㬥 ⠢ ᪫⥫쭮  ७
    ᯮ짮  稭   ଥ ᠭ
    ⠭  ATAPI-CD.
    ᪮  ଠ ࠫ  ᥬ஢ ࠩ஢,
    室 ⥪⮢ Linux', ⤨ᥬ஢ 訢 ACER665,
    a ⠪  ᠭ SCSI-⮢  ⠭  ATAPI,  
     । 宦  ⠭⮬ ( ⢮
    ண   㢥७). ᬮ  ,  ,   ⠪
    ᠭ ।⠢ । 業.

      ᠭ    ᯥ樠쭮 ⥭ 
    (028h/0A8h) -    ⪨    ࠡ,  ⠪
    ᪮쪮 㣨,   ᯮ  ࠩ  ন
     ᥬ ਢ.  ᠥ  ४ ந뢠
    Audio-CD,  ᬥ ᪠  ᪮ ਢ  ..

      ⠫  - ଠ, ਬ, ⥪ CD-ࠩ஢,
    訢  ..,  뫨 ⥭ ⢥묨  譥
    ஬. ᫨ 室,  ⠢   㬥 뤥প 
    ࠩ஢.

     ⫥ "஡ ᠭ"  ४ ⠭
    SCSI-2 (X3T9.2).  讥 ⢮ ᭮ ଠ樨,
     ᮫ ꥬ ( 20 . ப   1.7 Mb), 
    ⫨ SCSI  ATAPI  "७" 譨 ⠫ﬨ ᫮
    祭 㦭 ᢥ.

     室  ⠫쭮   ᮬ 
    (  DMA, ४뢠騥   ..)   ⠭
     ATAPI ன⢠ (X3T10). , ᠭ  CD  ⠬
     ( 뫪  SCSI).

    :
    10.08.1996  - ᮡ࠭  - ⥬⨧஢ 뢮 
    19.09.1996  -  ࠧ ⤠  ৠ.
    20.12.1996  -  -  ATAPI  ᪠ ᠭ.
    14.02.1997  - 筥 ନ,  ᠭ  ⮢,
                  ॣ஢  .
    01.03.1997  -    ࠢ ନ.
    23.03.1997  - ࠢ ᠭ ⮢,
                   ⮢ ணࠬ,
                  ࠭ "hex- 㬮砭",
                  ࠭ 訡 ᢥ   10h  177h  㣨
                  訡  ⬥ 믮 .
    29.03.1997  -   4B  墮    譨 .

।, 砭, 㣠  ..
                        졠 ࠢ   2:5030/163.44
⠭⨭ ࢠ⮢ (Konstantin Norvatoff, KonNor)

,  ஡    : konnor@small.spb.su

