亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? iso9660.c

?? mp3 c51源代碼一硬件解碼 硬件 解碼 硬件解碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*C**************************************************************************
* NAME:         iso9660.c
*----------------------------------------------------------------------------
* Copyright (c) 2003 Atmel.
*----------------------------------------------------------------------------
* RELEASE:      snd1c-refd-nf-4_0_3      
* REVISION:     1.3     
*----------------------------------------------------------------------------
* PURPOSE:
* ISO9660 file-system basics functions
* 
* NOTES:
*   Some variables are shared with fat.c module :
*     data  Uint32 fat_ptr_data
*     data  Uint16 fat_fclust_byte_count
*     idata Uint16 fat_dclust_byte_count
*     idata Uint32 fat_dir_current_sect
*     idata Uint16 fat_dir_list_index
*     xdata char   ext[]
*     xdata Byte   fat_buf_sector[]
*   Global variable :
*     pdata Byte   gl_buffer[]
*
*****************************************************************************/

/*_____ I N C L U D E S ____________________________________________________*/

#include "config.h"                         /* system configuration */
#include "..\mem\hard.h"                    /* low level function definition */
#include "file.h"                           /* file function definition */
#include "iso9660.h"                        /* iso9660 file-system definition */


/*_____ M A C R O S ________________________________________________________*/


/*_____ D E F I N I T I O N ________________________________________________*/

/* shared variables with fat.c module */
extern  data  Uint32 fat_ptr_data;
extern  data  Uint16 fat_fclust_byte_count;
extern  idata Uint16 fat_dclust_byte_count;
extern  idata Uint32 fat_dir_current_sect;
extern  xdata Uint16 fat_dir_list_index;   
extern  xdata char   ext[]; 
extern  xdata Byte   fat_buf_sector[];
extern  pdata Byte   gl_buffer[];
extern  xdata Uint32 fat_dir_start_sect;   
extern  xdata Uint16  fat_dir_list_last;    
extern  xdata Byte current_ext;
extern  idata Uint16  fat_dchain_index;
extern  idata Uint16  fat_fchain_nb_clust;  


extern xdata  Byte    fat_fchain_index_save;         
extern xdata  Byte    fat_fchain_nb_clust_save;
extern xdata  Uint16  fat_fclust_byte_count_save;



#define iso_dir_current_sect      fat_dir_current_sect
#define iso_dir_byte_count        fat_dclust_byte_count
#define iso_f_current_sect        fat_ptr_data
#define iso_current_byte_counter  fat_fclust_byte_count
#define iso_current_dir_file      fat_buf_sector
#define iso_file_index            fat_dir_list_index
#define iso_file_max_index        fat_dir_list_last
#define iso_dir_start_sect        fat_dir_start_sect
#define iso_dir_size              fat_dchain_index

#define iso_f_nb_sector_save      fat_fclust_byte_count_save
#define iso_f_nb_byte_save        fat_fchain_nb_clust


extern  char    pdata *lfn_name;                  /* long filename limited to MAX_FILENAME_LEN chars  */
extern  xdata iso_VolumeDescriptor iso_header;    /* iso header informations                          */
extern  xdata iso_cache  iso_file_cache;          /* cache for the current file                       */
extern  idata Uint16  iso_f_nb_sector;
extern  idata Uint16  iso_f_max_sector;
extern  bdata bit     iso_cd;                     /* if set to one cd is iso else cd is joliet format  */

/*_____ D E C L A R A T I O N ______________________________________________*/
Uint16 iso_dgetw(void);




/*F**************************************************************************
* NAME: fat_install
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*   - OK: intallation succeeded
*   - KO: no primary or supplementary volume descriptor found
*         
*----------------------------------------------------------------------------
* PURPOSE:
*   Install the iso file system
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_install(void)
{

  iso_f_current_sect = Hard_iso_read_toc() + 1 + 16;
  iso_cd = 0;

  if (Hard_iso_read_open(iso_f_current_sect) == OK)
  {
    if ((Hard_iso_read_word() & 0xFF) == 0x01)                    /* ISO CD */
    {
      iso_f_current_sect--;
      iso_cd = 1;
    }
    Hard_iso_read_close();
  }
  
  if (iso_read_volume_descriptor(iso_f_current_sect) == OK)   /* read volume descriptor */
    return OK;
  else
    return KO;
}


/*F**************************************************************************
* NAME: iso_read_volume_descriptor
*----------------------------------------------------------------------------
* PARAMS:
*   sector: firt sector of ISO block location
* return:
*   - OK: intallation succeeded
*   - KO: error
*----------------------------------------------------------------------------
* PURPOSE:
*   Read CD volumes descriptors.
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_read_volume_descriptor (Uint32 sector)
{
Byte i;
Uint16 tmp_word;

  /* settting current offset */
  iso_dir_current_sect = sector;
  
  if (Hard_iso_read_open(iso_dir_current_sect) == OK)
  {
    /* Byte 1 - 2 : Volume descriptor type & Standard identifier                          */
    /* Byte 3 - 4 : Standard identifier                                                   */
    /* Byte 5 - 6 : Standard identifier                                                   */
    /* Standard identifier is 'CD001'                                                     */
    tmp_word  = Hard_iso_read_word();
    if ( (((Byte*)&tmp_word)[0] != 0x43) ||   /* check if it is a standard iso cd volume  */
         (Hard_iso_read_word() != 0x3044) ||  /* string 0D                                */
         (Hard_iso_read_word() != 0x3130))    /* string 10                                */
    {
      Hard_iso_read_close();
      return KO;
    }
    
    switch (((Byte*)&tmp_word)[1])
    {
      case TYPE_BOOT_RECORD:                  /* Boot record                              */
      {
        break;
      }

      case TYPE_PRIMARY_VD:                   /* Primary Volume Descriptor or             */
      case TYPE_SUPPLEMENTARY_VD:             /* Supplementary Volume Descriptor          */
      {
        i = 3;
        while (i != 40)
        {
          Hard_iso_read_word();               /* dummy read                               */
          i++;
        }
        
        iso_header.volume_size = Hard_iso_read_word();                /* Byte 81 - 82 */
        iso_header.volume_size += ((Uint32)(Hard_iso_read_word()) << 16);          /* Byte 83 - 84 */
        Hard_iso_read_word();                                         /* Byte 85 - 86 */
        Hard_iso_read_word();                                         /* Byte 87 - 88 */
        i = 44;
        while (i != 64)
        {
          Hard_iso_read_word();               /* dummy read                               */
          i++;
        }
        
        /* Byte 129 - 132 : Logical Block Size - Both byte order                          */
        iso_header.logical_block_size = Hard_iso_read_word();
        Hard_iso_read_word();

        while (i != 76)
        {
          tmp_word = Hard_iso_read_word();    /* dummy read                               */
          i++;
        }
        /* Byte 157 - 190 : Directory record for root directory                           */
        /* Sbyte 1 : Length of directoy record                                            */
        /* Sbyte 2 : Extended attribute record length                                     */ 
        iso_header.root.length = (Hard_iso_read_word() & 0xFF); 
        /* Sbyte 3 - 10 : Location of extent - Both byte order                            */
        iso_header.root.extend_location = Hard_iso_read_word();
        iso_header.root.extend_location += ((Uint32)(Hard_iso_read_word()) << 16);
        Hard_iso_read_word();
        Hard_iso_read_word();
        /* Sbyte 11 - 18 : Data Length - Both Byte order                                  */ 
        iso_header.root.data_length = Hard_iso_read_word();
        iso_header.root.data_length += ((Uint32)(Hard_iso_read_word()) << 16);
        iso_dir_size = iso_header.root.data_length / iso_header.logical_block_size;
        break;
      }
  
      case TYPE_PARTITION_VD:               /* Partition Volume Descriptor                */
      {
        break;
      }
      case TYPE_VOLUME_SET_TERMINATOR:      /* Volume set terminator                      */
      {
        break;
      }

      default:                              /* error                                      */
      {
        return KO;
      }
    }
    Hard_iso_read_close();
    return OK;
  }
  else
    return KO;
}


/*F**************************************************************************
* NAME: iso_fseek
*----------------------------------------------------------------------------
* PARAMS:
*   offset: relative signed seek offset in file
*
* return:
*   seek status:  - OK: seek done
*                 - KO: out of file seek
*----------------------------------------------------------------------------
* PURPOSE:
*   Change file pointer of an openned file
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   Seek is done with byte boundary
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_fseek(Int16 offset)
{
Uint16 i;         /* generic counter */
Uint32 file_pos;

  file_pos = ((iso_f_current_sect - iso_file_cache.info.extend_location) * iso_header.logical_block_size) 
             + (Uint32)(iso_current_byte_counter);

  if ((file_pos + offset) < 0)
    return KO;

  file_pos += offset;

  iso_f_nb_sector = (file_pos / iso_header.logical_block_size);
  iso_f_current_sect = (Uint32)(iso_f_nb_sector) + iso_file_cache.info.extend_location;
  iso_current_byte_counter =  ((Uint16)file_pos % iso_header.logical_block_size);

  Hard_iso_read_close();
  Hard_iso_read_open(iso_f_current_sect);
  for (i = 0; i < iso_current_byte_counter; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}



/*F**************************************************************************
* NAME: iso_fseek_abs
*----------------------------------------------------------------------------
* PARAMS:
*   offset: absolute seek offset in file
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Move ahead file read pointer of an openned file
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_fseek_abs(Uint32 offset)
{
Uint16 i;         /* generic counter           */

  iso_f_nb_sector = (Uint16)(offset / iso_header.logical_block_size);
  iso_current_byte_counter = (Uint16)(offset % iso_header.logical_block_size);
  iso_f_current_sect = (Uint32)(iso_f_nb_sector) + iso_file_cache.info.extend_location;
  Hard_iso_read_close();
  Hard_iso_read_open(iso_f_current_sect);
  for (i = 0; i < iso_current_byte_counter; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}

/*F**************************************************************************
* NAME: iso_dseek
*----------------------------------------------------------------------------
* PARAMS:
*   offset: offset to current position in signed word value
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Seek from the current position to a new offset computing relative 
*   poisition +/- scan size limited to a 16 bit offset
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/ 
bit iso_dseek(Int16 offset)
{
Uint16 i;         /* generic counter */
Uint32 dir_pos;

  dir_pos = ((iso_dir_current_sect - iso_header.root.extend_location) * iso_header.logical_block_size) 
            + iso_dir_byte_count;
  if ((dir_pos + offset) < 0)
    return KO;

  dir_pos += offset;

  iso_dir_current_sect = (dir_pos / iso_header.logical_block_size) 
                        + iso_header.root.extend_location;
  iso_dir_byte_count = dir_pos % iso_header.logical_block_size;

  Hard_iso_read_close();
  Hard_iso_read_open(iso_dir_current_sect);
  for (i = 0; i < iso_dir_byte_count; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}


/*F**************************************************************************
* NAME: iso_get_file_dir
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Give information about the directory :
*     - total number of entries
*----------------------------------------------------------------------------
* EXAMPLE:
*
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void iso_get_file_dir(void)
{
Byte attributes;
Byte len;
Byte i;
Byte j;
Byte k;
Byte entry_len;
Byte tmp_byte;
Byte byte_to_read;
Byte padding_byte;
Byte entry_rel;
Uint16 tmp_word;
bit no_more_entry;
bit end_of_name;


  no_more_entry = FALSE;
  entry_rel = 0;
  fat_dir_list_index = 0;
  do
  {
    padding_byte = 0;
    do
    {
      tmp_word = iso_dgetw();
      padding_byte++;
      if ((iso_dir_current_sect - iso_dir_start_sect) >= iso_dir_size)
      {
        no_more_entry = TRUE;
      }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
盗摄精品av一区二区三区| 国产精品一区免费在线观看| 蜜臀精品久久久久久蜜臀| 久久亚洲一级片| 亚洲精品欧美综合四区| 成人少妇影院yyyy| 国产精品视频一区二区三区不卡| 韩国精品一区二区| 精品国产成人系列| 国产精品亚洲一区二区三区妖精| 久久这里只有精品首页| 国产一区二区不卡| 国产欧美日韩精品一区| 成人一区二区三区视频在线观看| 亚洲丝袜制服诱惑| 欧洲一区在线电影| 日韩精品免费视频人成| 成人av午夜影院| 一区二区三区四区五区视频在线观看| 91精品办公室少妇高潮对白| 亚洲一区二区三区四区不卡| 欧美在线啊v一区| 韩国视频一区二区| 国产精品天美传媒| 91成人免费网站| 夜夜嗨av一区二区三区| 日韩欧美成人一区二区| 久久99国产精品免费网站| 日本一区二区三区免费乱视频| 另类综合日韩欧美亚洲| 国产人成亚洲第一网站在线播放| 不卡一区二区在线| 亚洲一区二区成人在线观看| 91麻豆精品国产91| 国产成人精品1024| 亚洲一区二区三区在线播放| 欧美不卡一二三| 欧美午夜不卡视频| 国产另类ts人妖一区二区| 亚洲视频一二区| 欧美日高清视频| 91丝袜高跟美女视频| 污片在线观看一区二区| 国产欧美一区视频| 欧美一区二区国产| 成+人+亚洲+综合天堂| 午夜电影一区二区三区| 日韩一级大片在线观看| 在线免费亚洲电影| 狠狠狠色丁香婷婷综合久久五月| 亚洲图片你懂的| 精品伦理精品一区| 欧美猛男超大videosgay| 国产成人激情av| 免费观看一级特黄欧美大片| 国产精品久久久久久妇女6080| av在线播放成人| 国产一区在线精品| 天堂va蜜桃一区二区三区漫画版| 中文字幕日韩一区| 欧美日韩一区二区在线视频| 成人av午夜电影| 国产成人午夜精品影院观看视频| 午夜天堂影视香蕉久久| 一区二区在线观看av| 欧美亚洲日本国产| 国产精品亚洲а∨天堂免在线| 午夜精品国产更新| 国产精品无码永久免费888| 日韩欧美美女一区二区三区| 欧美午夜电影在线播放| 97久久超碰精品国产| 亚洲黄色免费电影| 久久综合色之久久综合| 老色鬼精品视频在线观看播放| 精品国产a毛片| 91热门视频在线观看| 亚洲综合久久久久| 欧美二区在线观看| 成人午夜伦理影院| 一区二区三区欧美久久| 色成年激情久久综合| 欧美日韩在线一区二区| 不卡的av中国片| 九色porny丨国产精品| 免费av成人在线| 国内精品久久久久影院色| 久久99国产乱子伦精品免费| 国产乱色国产精品免费视频| 国产综合久久久久久鬼色| 国产一区二区精品久久91| 国产成人精品免费网站| 91啦中文在线观看| 欧美性xxxxxxxx| 日韩一级二级三级| 日本一区二区三区电影| 亚洲最大的成人av| 蜜桃视频免费观看一区| 国产精品一区二区在线播放| www.欧美亚洲| 欧美美女一区二区在线观看| 欧美精品一区二区三区久久久| 欧美高清在线视频| 亚洲一区二区精品久久av| 青青草国产成人99久久| 国产盗摄视频一区二区三区| 99视频在线精品| 91精品国产综合久久久久久久久久| 精品久久人人做人人爽| 国产精品久久久久久久久免费桃花 | 日韩av中文字幕一区二区| 麻豆精品精品国产自在97香蕉 | 亚洲成人午夜影院| 国产美女娇喘av呻吟久久 | 91久久精品一区二区| 日韩美女视频在线| 亚洲欧洲日韩av| 麻豆freexxxx性91精品| 91污片在线观看| 欧美电影免费提供在线观看| 日韩毛片精品高清免费| 老司机午夜精品99久久| av一区二区三区| 日韩欧美国产三级电影视频| 亚洲欧美日韩在线播放| 久草这里只有精品视频| 一本大道av一区二区在线播放| 日韩欧美精品在线| 一级中文字幕一区二区| 国产裸体歌舞团一区二区| 欧美日韩精品免费| 中文字幕在线不卡| 精品一二线国产| 亚洲一区二区在线观看视频 | 91在线免费看| 久久一日本道色综合| 久久99精品一区二区三区| 色94色欧美sute亚洲线路一久| 国产欧美一区二区精品性| 美女免费视频一区二区| 日本高清视频一区二区| 欧美激情综合在线| 精品无码三级在线观看视频| jiyouzz国产精品久久| 欧美美女视频在线观看| 亚洲欧美电影院| 丁香亚洲综合激情啪啪综合| 日韩欧美国产精品| 偷拍自拍另类欧美| 91丨九色丨尤物| 国产精品久久久久久亚洲毛片| 韩国成人在线视频| 日韩一区二区免费高清| 日韩精品1区2区3区| 欧美色精品在线视频| 亚洲精品日韩一| 91麻豆6部合集magnet| 久久九九影视网| 国产在线不卡视频| 精品区一区二区| 久草精品在线观看| 日韩女优电影在线观看| 免费在线看成人av| 7777精品伊人久久久大香线蕉 | 免费国产亚洲视频| 欧美一区三区二区| 秋霞午夜av一区二区三区| 欧美日韩精品综合在线| 日日欢夜夜爽一区| 日韩欧美综合在线| 久久精品二区亚洲w码| 欧美xxxxxxxx| 国产精品一区二区x88av| 久久婷婷国产综合国色天香| 国产米奇在线777精品观看| 久久毛片高清国产| 懂色av噜噜一区二区三区av| 国产精品麻豆欧美日韩ww| 99久久精品国产一区| 亚洲色大成网站www久久九九| 色伊人久久综合中文字幕| 亚洲国产成人91porn| 欧美一区二区在线不卡| 久久国产精品露脸对白| 国产日韩精品一区| 色婷婷综合久久久久中文一区二区 | 狠狠色丁香久久婷婷综合_中| 亚洲精品欧美专区| 日韩精品视频网| 亚洲午夜三级在线| 中文一区二区在线观看| 欧美大尺度电影在线| 日韩欧美亚洲国产精品字幕久久久| 一本色道a无线码一区v| 国产aⅴ综合色| 国产91丝袜在线播放| 国产高清不卡二三区| 激情伊人五月天久久综合| 亚洲同性同志一二三专区| 性做久久久久久|