Diff for /np2/cbus/atapicmd.c between versions 1.5 and 1.6

version 1.5, 2005/03/05 16:35:48 version 1.6, 2005/04/04 11:50:59
Line 17 Line 17
 #include        "atapicmd.h"  #include        "atapicmd.h"
 #include        "sxsi.h"  #include        "sxsi.h"
   
   // #define      YUIDEBUG
   
   
 // INQUIRY  // INQUIRY
 static const UINT8 cdrom_inquiry[] = {  static const UINT8 cdrom_inquiry[] = {
   #ifdef YUIDEBUG
           // うちのドライブの奴 NECCDは Product Level 3.00以上で modesense10のコードがちげー
           0x05,   // CD-ROM
           0x80,   // bit7: Removable Medium Bit, other: Reserved
           0x00,   // version [7-6: ISO, ECMA: 5-3, 2-0: ANSI(00)]
           0x21,   // 7-4: ATAPI version, 3-0: Response Data Format
           0x1f,   // Additional length
           0x00,0x00,0x00, // Reserved
           'N', 'E', 'C', ' ', ' ', ' ', ' ', ' ', // Vendor ID
           'C', 'D', '-', 'R', 'O', 'M', ' ', 'D', // Product ID
           'R', 'I', 'V', 'E', ':', '2', '5', '1', // Product ID
           '4', '.', '0', '9'      // Product Revision Level
   #else
         0x05,   // CD-ROM          0x05,   // CD-ROM
         0x80,   // bit7: Removable Medium Bit, other: Reserved          0x80,   // bit7: Removable Medium Bit, other: Reserved
         0x00,   // version [7-6: ISO, ECMA: 5-3, 2-0: ANSI(00)]          0x00,   // version [7-6: ISO, ECMA: 5-3, 2-0: ANSI(00)]
Line 30  static const UINT8 cdrom_inquiry[] = { Line 45  static const UINT8 cdrom_inquiry[] = {
         'C', 'D', '-', 'R', 'O', 'M', ' ', 'D', // Product ID          'C', 'D', '-', 'R', 'O', 'M', ' ', 'D', // Product ID
         'R', 'I', 'V', 'E', ' ', ' ', ' ', ' ', // Product ID          'R', 'I', 'V', 'E', ' ', ' ', ' ', ' ', // Product ID
         '1', '.', '0', ' '      // Product Revision Level          '1', '.', '0', ' '      // Product Revision Level
   #endif
 };  };
   
 static void senddata(IDEDRV drv, UINT size, UINT limit) {  static void senddata(IDEDRV drv, UINT size, UINT limit) {
Line 318  static const BYTE defval_pagecode_0e[PC_ Line 334  static const BYTE defval_pagecode_0e[PC_
         0x0e, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4b,          0x0e, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4b,
         0x01, 0xff, 0x02, 0xff, 0x00, 0x00, 0x00, 0x00,          0x01, 0xff, 0x02, 0xff, 0x00, 0x00, 0x00, 0x00,
 };  };
   
 static const BYTE defval_pagecode_2a[PC_2A_SIZE] = {  static const BYTE defval_pagecode_2a[PC_2A_SIZE] = {
   #ifdef YUIDEBUG
           0x2a, 0x12, 0x00, 0x00, 0x71, 0x65, 0x89, 0x07,
           0x02, 0xc2, 0x00, 0xff, 0x00, 0x80, 0x02, 0xc2,
           0x00, 0x00, 0x00, 0x00,
   #else
         0x2a, 0x12, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03,          0x2a, 0x12, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00,          0x00, 0x00, 0x00, 0x00,
   #endif
 };  };
   
 // 0x55: MODE SELECT  // 0x55: MODE SELECT
Line 489  static void atapi_cmd_readtoc(IDEDRV drv Line 512  static void atapi_cmd_readtoc(IDEDRV drv
         TRACEOUT(("atapi_cmd_readtoc fmt=%d leng=%d", format, leng));          TRACEOUT(("atapi_cmd_readtoc fmt=%d leng=%d", format, leng));
   
         switch (format) {          switch (format) {
   #ifdef YUIDEBUG
           case 0: // track info
                   // これ、PN専用。
                   // 後で ccd等からデータを作ろう
                   drv->buf[0x00] = 0x00;  drv->buf[0x01] = 0x3a;
                   drv->buf[0x02] = 0x01;
                   drv->buf[0x03] = 0x06;
   
                   drv->buf[0x04] = 0x00;  drv->buf[0x05] = 0x14;
                   drv->buf[0x06] = 0x01;
                   drv->buf[0x07] = 0x00;
                   drv->buf[0x08] = 0x00;
                   drv->buf[0x09] = 0x00;
                   drv->buf[0x0a] = 0x02;
                   drv->buf[0x0b] = 0x00;
   
                   drv->buf[0x0c] = 0x00;  drv->buf[0x0d] = 0x10;
                   drv->buf[0x0e] = 0x02;
                   drv->buf[0x0f] = 0x00;
                   drv->buf[0x10] = 0x00;
                   drv->buf[0x11] = 0x29;
                   drv->buf[0x12] = 0x1c;
                   drv->buf[0x13] = 0x34;
   
                   drv->buf[0x14] = 0x00;  drv->buf[0x15] = 0x10;
                   drv->buf[0x16] = 0x03;
                   drv->buf[0x17] = 0x00;
                   drv->buf[0x18] = 0x00;
                   drv->buf[0x19] = 0x29;
                   drv->buf[0x1a] = 0x20;
                   drv->buf[0x1b] = 0x43;
   
                   drv->buf[0x1c] = 0x00;  drv->buf[0x1d] = 0x10;
                   drv->buf[0x1e] = 0x04;
                   drv->buf[0x1f] = 0x00;
                   drv->buf[0x20] = 0x00;
                   drv->buf[0x21] = 0x2b;
                   drv->buf[0x22] = 0x07;
                   drv->buf[0x23] = 0x19;
   
                   drv->buf[0x24] = 0x00;  drv->buf[0x25] = 0x10;
                   drv->buf[0x26] = 0x05;
                   drv->buf[0x27] = 0x00;
                   drv->buf[0x28] = 0x00;
                   drv->buf[0x29] = 0x2e;
                   drv->buf[0x2a] = 0x39;
                   drv->buf[0x2b] = 0x1d;
   
                   drv->buf[0x2c] = 0x00;  drv->buf[0x2d] = 0x10;
                   drv->buf[0x2e] = 0x06;
                   drv->buf[0x2f] = 0x00;
                   drv->buf[0x30] = 0x00;
                   drv->buf[0x31] = 0x34;
                   drv->buf[0x32] = 0x0b;
                   drv->buf[0x33] = 0x13;
   
                   drv->buf[0x34] = 0x00;  drv->buf[0x35] = 0x10;
                   drv->buf[0x36] = 0xaa;
                   drv->buf[0x37] = 0x00;
                   drv->buf[0x38] = 0x00;
                   drv->buf[0x39] = 0x3b;
                   drv->buf[0x3a] = 0x1e;
                   drv->buf[0x3b] = 0x0b;
                   senddata(drv, 0x3c, leng);
                   break;
   #endif
   
         case 1: // multi session          case 1: // multi session
                 ZeroMemory(drv->buf, 12);                  ZeroMemory(drv->buf, 12);
                 drv->buf[1] = 0x0a;                  drv->buf[1] = 0x0a;
                 drv->buf[2] = 0x01;                  drv->buf[2] = 0x01;
                 drv->buf[3] = 0x01;                  drv->buf[3] = 0x01;
                   drv->buf[5] = 0x14;
                   drv->buf[6] = 0x01;
                   drv->buf[10] = 0x02;
                 senddata(drv, 12, leng);                  senddata(drv, 12, leng);
                 break;                  break;
   

Removed from v.1.5  
changed lines
  Added in v.1.6


RetroPC.NET-CVS <cvs@retropc.net>