Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. meta:
  2. id: basic_dsk_rsdos
  3. file-extension: dsk
  4. title: RS-DOS filesystem wrapped in a basic array of sectors disk image
  5. license: CC0-1.0
  6. endian: be
  7. xref: Radio Shack TRS-80 Color Computer Disk System Owners Manual & Programmer guide, p58-59
  8. seq:
  9. - id: granules1
  10. size: 9 * 256
  11. type: granule
  12. repeat: expr
  13. repeat-expr: 17 * 2
  14. - id: reserved1
  15. size: 256
  16. - id: fat
  17. size: 256
  18. type: file_allocation_table
  19. - id: files
  20. type: file
  21. repeat: expr
  22. repeat-expr: 72
  23. - id: reserved2
  24. size: (9 * 256) - files.size * 32 + (7 * 256)
  25. - id: granules2
  26. size: 9 * 256
  27. type: granule
  28. repeat: eos
  29. enums:
  30. file_type:
  31. 0: basic_program
  32. 1: basic_data_file
  33. 2: machine_language_program
  34. 3: text_editor_source_file
  35. ascii_flag:
  36. 0: binary
  37. 0xff: ascii
  38. types:
  39. granule:
  40. seq:
  41. - id: bytes
  42. size: 9 * 256
  43. file_allocation_table:
  44. seq:
  45. - id: table
  46. type: u1
  47. repeat: expr
  48. repeat-expr: 68
  49. - id: reserved
  50. size: 188
  51. file:
  52. seq:
  53. - id: name
  54. size: 8
  55. type: strz
  56. pad-right: 32
  57. terminator: 32
  58. consume: false
  59. encoding: ASCII
  60. - id: extension
  61. size: 3
  62. type: strz
  63. pad-right: 32
  64. terminator: 32
  65. consume: false
  66. encoding: ASCII
  67. - id: file_type
  68. type: u1
  69. enum: file_type
  70. - id: ascii_flag
  71. type: u1
  72. enum: ascii_flag
  73. - id: ofs_granule
  74. type: granule_ptr
  75. - id: bytes_in_last_sector
  76. type: u2
  77. - id: reserved
  78. size: 16
  79. granule_ptr:
  80. seq:
  81. - id: current_ptr
  82. type: u1
  83. instances:
  84. body:
  85. io: "current_ptr < 34 ? _root.granules1[current_ptr]._io : _root.granules2[current_ptr-34]._io"
  86. pos: 0
  87. size: "(_root.fat.table[current_ptr] & 0xc0) == 0 ? 9 * 256 : (((_root.fat.table[current_ptr] & 0x3f) - 1) * 256) + _parent.bytes_in_last_sector"
  88. if: current_ptr < 68
  89. next:
  90. io: _root.fat._io
  91. pos: current_ptr
  92. type: granule_ptr
  93. parent: _parent
  94. if: current_ptr < 68
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement