diff --git a/constants/dss_equ.inc b/constants/dss_equ.inc index ab972dc..d43d0cd 100644 --- a/constants/dss_equ.inc +++ b/constants/dss_equ.inc @@ -17,6 +17,7 @@ CLP_Parameters EQU 1 ; ; (CLP_CLLength) + 3 ; ­ ч ЋЎ ЏЎЋ­ЎЃЎ ЏутЈ ЄЎ Ї ЏусЊ ЅЌЎЃЎ ЏрЈЋЎІЅ­Јя (ЂЌЅстЅ с ЈЌЅ­ЅЌ EXE) ;--------------------------------------- +;----------------------------------------------------------; ;!TODO ­Ѕ тЎЋьЊЎ FAT FAT_ATTR: .ARCHIVE EQU %0010'0000 ; bit 5 @@ -32,6 +33,18 @@ FAT_ATTR: ; .LFS_Entry EQU .READ_ONLY + .HIDDEN + .SYSTEM + .VOLUME_ID .LFS_Entry_Mask EQU %0011'1111 + +CDFS_ATTR: +.NOT_LAST_EXTENT EQU %1000'0000 ; bit 7 +.RESERVED_6 EQU %0100'0000 ; bit 6 +.RESERVED_5 EQU %0010'0000 ; bit 5 +.EXTENDED_PERMISSIONS EQU %0001'0000 ; bit 4 +.EXTENDED_FORMAT EQU %0000'1000 ; bit 3 +.ASSOCIATED EQU %0000'0100 ; bit 2 +.DIRECTORY EQU %0000'0010 ; bit 1 +.HIDDEN EQU %0000'0001 ; bit 0 +;----------------------------------------------------------------------; + ;------------[DSS Functions]------------ Dss: .Version EQU #00 diff --git a/structures/FileSystem.inc b/structures/FileSystem.inc index 3c15c0d..163c932 100644 --- a/structures/FileSystem.inc +++ b/structures/FileSystem.inc @@ -1,4 +1,4 @@ -//////////////////////////////////////////////////////////////////////////////////////////// +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; BOOT_SECTOR EQU #00 .JMP EQU #00 ; BLOCK 3,0 BS_jmpBoot Jump to bootstrap (E.g. eb 3c 90; on i86: JMP 003E NOP. One finds either eb xx 90, or e9 xx xx. .ID_NAME EQU #03 ; TEXT 8 BS_OEMName DOS NAME - DB "DSS_1.70" @@ -146,11 +146,12 @@ BOOT_SECTOR EQU #00 ; STRUCT _sBOOT_SECTOR .PARAMS: _sBOOT_SECTOR_PARAMS_FAT32 -.BOOT_CODE: BLOCK #1BE-_sBOOT_SECTOR_PARAMS_FAT32,0 ; +#3E boot loader's code -.PARTITION_TABLE: _sMBR_PARTITION_TABLE ; +#1BE table = 4x16 bytes -.MBR_SIGNATURE: WORD #AA55 ; +#1FE Signature +.BOOT_CODE: BLOCK #1BE-_sBOOT_SECTOR_PARAMS_FAT32,0 ; +#3E boot loader's code +.PARTITION_TABLE: _sMBR_PARTITION_TABLE ; +#1BE table = 4x16 bytes +.MBR_SIGNATURE: WORD #AA55 ; +#1FE Signature ENDS ; + ; STRUCT FAT_DIRECTORY_RECORD .NAME: TEXT 8,{". "," "} ; DIR_Name #00 +00 NAME @@ -166,12 +167,148 @@ BOOT_SECTOR EQU #00 .DATE: WORD #0000 ; DIR_WrtDate #18 +24 Date of last write. .FIRST_CLUSTER_L: WORD #0000 ; DIR_FstClusLO #1A +26 START CLUSTER low .F_SIZE: DWORD #00000000 ; DIR_FileSize #1C +28 SIZE FILE -; ; structure size #20 +32 - ENDS -//--------------------------------------------------------------------------- + ENDS ; structure size #20 +32 +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; + + +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; ; -//--------------------------------------------------------------------------- + STRUCT CDFS_DIRECTORY_RECORD +.NAME: TEXT 8,{". "," "} ; DIR_Name #00 +00 NAME +.EXT: TEXT 3,{" "," "} ; --//--//; #08 +08 EXT +.ATTRIBUT: BYTE #10 ; DIR_Attr; #0B +11 ATTRIBUT +.RESERVED_NT: BYTE #00 ; DIR_NTRes; #0C +12 RESERVED +.RESERVED_FAT32: BYTE #00 ; DIR_CrtTimeHundth #0D +13 „ЅсятыЅ ЄЎЋЈ сЅЊу­Єы сЎЇЄ ­Јя ф ЉЋ  (0-1.99) +.CREATE_TIME_FAT32: WORD #0000 ; DIR_CrtTime #0E +14 ‚рЅЌя сЎЇЄ ­Јя ф ЉЋ  +.CREATE_DATE_FAT32: WORD #0000 ; DIR_CrtDate #10 +16 „ т  сЎЇЄ ­Јя ф ЉЋ  +.LAST_ACCESS_DATE_FAT32: WORD #0000 ; DIR_LstAccDate #12 +18 „ т  ЏЎсЋЅЄ­ЅЃЎ ЄЎстуЏ  (r/w) +.FIRST_CLUSTER_H: WORD #0000 ; DIR_FstClusHI #14 +20 START CLUSTER high ;!TODO fat32 +.TIME: WORD #0000 ; DIR_WrtTime #16 +22 Time of last write. +.DATE: WORD #0000 ; DIR_WrtDate #18 +24 Date of last write. +.FIRST_CLUSTER_L: WORD #0000 ; DIR_FstClusLO #1A +26 START CLUSTER low +.F_SIZE: DWORD #00000000 ; DIR_FileSize #1C +28 SIZE FILE + ENDS +; + + STRUCT _sCDFS_DATE_TIME +.YEAR TEXT 4,{"2025"} +.MONTH TEXT 2,{"01"} +.DATE TEXT 2,{"31"} +.TIME_Hours TEXT 2,{"23"} +.TIME_Minutes TEXT 2,{"59"} +.TIME_Seconds TEXT 2,{"59"} +.TIME_CentiSeconds TEXT 2,{"99"} ; сЎтыЅ сЅЊу­Єы +.TIME_GMT BYTE 0 ; сЌЅщЅ­ЈЅ Ўт GMT Ђ 15-ЌЈ­ут­ых Ј­тЅрЂ Ћ х + ENDS +; + STRUCT _sCDFS_PRIMARY_VOLUME_DESCRIPTOR +.TYPE: BYTE 1 ; ЏЎЄЄЅрІЈЂ ЅЌыЉ DSS тЈЏ ; 0 #00 +.IDENTIFIER: TEXT 5,{"CD001"} ; 1 #01 +.VERSION BYTE 1 ; 6 #06 +.Unused_0 BYTE 0 ; 7 #07 +.SYS_ID TEXT 32,{"Sprinter 2000, BIOS > 3.06"," "} ; 8 #08 +.VOLUME_LABEL TEXT 32,{"CDFS VOLUME"," "} ; 40 #28 +.Unused_Block_0 BLOCK 8,0 ; 72 #48 +.VOLUME_SPACE_SIZE DWORD 0 ; р ЇЌЅр Ђ ЋЎЃ.сЅЊтЎр х ; 80 #50 +.VOLUME_SIZE_be DWORD 0 ; р ЇЌЅр Ђ ЋЎЃ.сЅЊтЎр х big-endian ; 84 #54 +.Unused_Block_1 BLOCK 32,0 ; 88 #58 +.VOLUME_SET_SIZE WORD 1 ; 120 #78 +.VOLUME_SET_SIZE_be WORD #0100 ; 122 #7A +.VOL_SEQUENCE_NUMBER WORD 1 ; 124 #7C +.VOL_SEQUENCE_NUMBER_be WORD #0100 ; 126 #7E +.LOGICAL_BLCOK_SIZE WORD #800 ; 128 #80 +.LOGICAL_BLCOK_SIZE_be WORD 8 ; 130 #82 +.PATH_TABLE_SIZE DWORD 0 ; 132 #84 +.PATH_TABLE_SIZE_be DWORD 0 ; 136 #88 +.LBA_TYPE_L_PATH_TABLE WORD 0 ; 140 #8C +.LBA_OPTIONAL_TYPE_L_PATH_TBL WORD 0 ; 144 #90 +.LBA_TYPE_M_PATH_TABLE WORD 0 ; 148 #94 +.LBA_OPTIONAL_TYPE_M_PATH_TBL WORD 0 ; 152 #98 +.ROOT_DIR_ENTRY BLOCK 34,0 ; 156 #9C +.VOLUME_SET_ID TEXT 128,{""," "} ; 190 #BE +.PUBLISHER_SET_ID TEXT 128,{""," "} ; 318 #13E +.DATA_PREPARER_ID TEXT 128,{""," "} ; 446 #1bE +.APPLICATION_ID TEXT 128,{""," "} ; 574 #23E +.COPYRIGHT_ROOT_FILE_NAME TEXT 37,{""," "} ; 702 #2bE +.ABSTRACT_ROOT_FILE_NAME TEXT 37,{""," "} ; 739 #2E3 +.BIBLIOGRAPHIC_ROOT_FILE_NAME TEXT 37,{""," "} ; 776 #308 +.VOLUME_CREATION _sCDFS_DATE_TIME ; 813 #32D +.VOLUME_MODIFICATION _sCDFS_DATE_TIME ; 830 #33E +.VOLUME_EXPIRATION _sCDFS_DATE_TIME ; 847 #34F +.VOLUME_EFFECTIVE _sCDFS_DATE_TIME ; 864 #360 +.FILE_STRUCTURE_VERSION BYTE 1 ; 881 #371 +.Unused_1 BYTE 0 ; 882 #372 +.APPLICATION_USED TEXT 512,{"Sprinter 2000. Tolik_Trek@SprinterTeam"} ; 883 #373 +.RESERVER BLOCK 653,0 ; 1395 #573 + ENDS ; 2048 #800 +; +/* +Offset Length (bytes) Field name Datatype Description + 0 1 Type int8 Volume Descriptor type code (see below). + 1 5 Identifier strA Always 'CD001'. + 6 1 Version int8 Volume Descriptor Version (0x01). + 7 2041 Data - Depends on the volume descriptor type. + +Type: +Value Description + 0 Boot Record + 1 Primary Volume Descriptor + 2 Supplementary Volume Descriptor + 3 Volume Partition Descriptor + 4-254 Reserved + 255 Volume Descriptor Set Terminator + +Boot Record +Offset Length (bytes) Field name Datatype Description + 0 1 Type int8 Zero indicates a boot record. + 1 5 Identifier strA Always "CD001". + 6 1 Version int8 Volume Descriptor Version (0x01). + 7 32 Boot System Identifier strA ID of the system which can act on and boot the system from the boot record. + 39 32 Boot Identifier strA Identification of the boot system defined in the rest of this descriptor. + 71 1977 Boot System Use - Custom - used by the boot system. + +Primary Volume Descriptor +Offset Length (bytes) Field name Datatype Description + 0 1 Type Code int8 Always 0x01 for a Primary Volume Descriptor. + 1 5 Standard Identifier strA Always 'CD001'. + 6 1 Version int8 Always 0x01. + 7 1 Unused - Always 0x00. + 8 32 System Identifier strA The name of the system that can act upon sectors 0x00-0x0F for the volume. + 40 32 Volume Identifier strD Identification of this volume. + 72 8 Unused Field - All zeroes. + 80 8 Volume Space Size int32_LSB-MSB Number of Logical Blocks in which the volume is recorded. + 88 32 Unused Field - All zeroes. + 120 4 Volume Set Size int16_LSB-MSB The size of the set in this logical volume (number of disks). + 124 4 Volume Sequence Number int16_LSB-MSB The number of this disk in the Volume Set. + 128 4 Logical Block Size int16_LSB-MSB The size in bytes of a logical block. NB: This means that a logical block on a CD could be something other than 2 KiB! + 132 8 Path Table Size int32_LSB-MSB The size in bytes of the path table. + 140 4 Location of Type-L Path Table int32_LSB LBA location of the path table. The path table pointed to contains only little-endian values. + 144 4 Location of the Optional Type-L Path Table int32_LSB LBA location of the optional path table. The path table pointed to contains only little-endian values. Zero means that no optional path table exists. + 148 4 Location of Type-M Path Table int32_MSB LBA location of the path table. The path table pointed to contains only big-endian values. + 152 4 Location of Optional Type-M Path Table int32_MSB LBA location of the optional path table. The path table pointed to contains only big-endian values. Zero means that no optional path table exists. + 156 34 Directory entry for the root directory - Note that this is not an LBA address, it is the actual Directory Record, which contains a single byte Directory Identifier (0x00), hence the fixed 34 byte size. + 190 128 Volume Set Identifier strD Identifier of the volume set of which this volume is a member. + 318 128 Publisher Identifier strA The volume publisher. For extended publisher information, the first byte should be 0x5F, followed by the filename of a file in the root directory. If not specified, all bytes should be 0x20. + 446 128 Data Preparer Identifier strA The identifier of the person(s) who prepared the data for this volume. For extended preparation information, the first byte should be 0x5F, followed by the filename of a file in the root directory. If not specified, all bytes should be 0x20. + 574 128 Application Identifier strA Identifies how the data are recorded on this volume. For extended information, the first byte should be 0x5F, followed by the filename of a file in the root directory. If not specified, all bytes should be 0x20. + 702 37 Copyright File Identifier strD Filename of a file in the root directory that contains copyright information for this volume set. If not specified, all bytes should be 0x20. + 739 37 Abstract File Identifier strD Filename of a file in the root directory that contains abstract information for this volume set. If not specified, all bytes should be 0x20. + 776 37 Bibliographic File Identifier strD Filename of a file in the root directory that contains bibliographic information for this volume set. If not specified, all bytes should be 0x20. + 813 17 Volume Creation Date and Time dec-datetime The date and time of when the volume was created. + 830 17 Volume Modification Date and Time dec-datetime The date and time of when the volume was modified. + 847 17 Volume Expiration Date and Time dec-datetime The date and time after which this volume is considered to be obsolete. If not specified, then the volume is never considered to be obsolete. + 864 17 Volume Effective Date and Time dec-datetime The date and time after which the volume may be used. If not specified, the volume may be used immediately. + 881 1 File Structure Version int8 The directory records and path table version (always 0x01). + 882 1 Unused - Always 0x00. + 883 512 Application Used - Contents not defined by ISO 9660. + 1395 653 Reserved - Reserved by ISO. + +*/ +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; + + +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; PartitionSysTypes: .Empty EQU #00 .FAT12 EQU #01 @@ -187,7 +324,7 @@ PartitionSysTypes: .Linux EQU #83 .Linux_extended EQU #85 .CrazyBlasterBios EQU #CB -//--------------------------------------------------------------------------- +;лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл; ; //---------------------------------------------------------------------------