mzm.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. MZM file format: MZX image
  2. //////////////////////////////////////////////////////////////////////////
  3. NOTE: These formats have been superceded by MZM3. Please use MZM3 instead.
  4. //////////////////////////////////////////////////////////////////////////
  5. This file format is a simple format that describes graphically a
  6. rectangular area.
  7. b = byte (8bit)
  8. w = word (16bit)
  9. d = dword (32bit)
  10. sN = string of N size (ie N bytes)
  11. bN = N bytes
  12. wN = N words
  13. dN = N dwords
  14. header:
  15. pos size description
  16. 0 s4 "MZMX" tag
  17. 4 b width
  18. 5 b height
  19. 6
  20. . reserved
  21. f
  22. data:
  23. The data is composed of w * h (width * height) blocks, where each
  24. block is 6 bytes and contains the following:
  25. pos size description
  26. 0 b ID (5 for overlay)
  27. 1 b param (char for overlay)
  28. 2 b color
  29. 3 b under ID (0 for overlay)
  30. 4 b under param (0 for overlay)
  31. 5 b under color (0 for overlay)
  32. MZM2 file format:
  33. This file format is a simple format that describes graphically a
  34. rectangular area.
  35. b = byte (8bit)
  36. w = word (16bit)
  37. d = dword (32bit)
  38. sN = string of N size (ie N bytes)
  39. header:
  40. pos size description
  41. 0 s4 "MZM2" tag
  42. 4 w width
  43. 6 w height
  44. 8 d location in file of robot table (0 for no table)
  45. c b number of robots
  46. d b storage mode
  47. e b robot storage mode
  48. f reserved
  49. data:
  50. Width * height cells are then stored.
  51. In storage mode 0 the cells consist of the following 6 bytes:
  52. pos size description
  53. 0 b ID
  54. 1 b param
  55. 2 b color
  56. 3 b under ID
  57. 4 b under param
  58. 5 b under color
  59. All robots are stored with param 0.
  60. In storage mode 1, the cells consist of the following 2 bytes:
  61. pos size description
  62. 0 b character
  63. 1 b color
  64. Then, an optional robot table may be stored. The table consists of n
  65. robots listed in the same order that their representative ID's appear
  66. in the cell table.
  67. The robots comply to the MZX 2 world format in mode 0 and MZX 2.80
  68. save format in mode 1. Reserved fields are in place to retain compatability
  69. with the MZX 2 world format (and thus can be loaded by an MZX 2 compatabile
  70. loader)
  71. If the robot storage mode is 0, the robot data is as follows:
  72. pos size description
  73. 0 w program length
  74. 2 reserved
  75. 4 s15 robot name
  76. 13 b robot character
  77. .
  78. . reserved
  79. 29
  80. . robot program, stored in MZX2 Robotic bytecode format
  81. ??
  82. If the robot storage mode is 1, the robot data is as follows:
  83. pos size description
  84. 0 w program length
  85. 2 reserved
  86. 4 s15 robot name
  87. 13 b robot character
  88. 14 w current line
  89. 16 b current position in line
  90. 17 b current cycle
  91. 18 b cycle total
  92. 19 b bullet type
  93. 1A b locked status
  94. 1B b lavawalk status
  95. 1C b walking direction
  96. 1D b last touched direction
  97. 1E b last shot direction
  98. 1F
  99. . reserved
  100. .
  101. 23 b status
  102. 24
  103. . reserved
  104. .
  105. 27 loop counter
  106. 29 d32 local counters
  107. 49 d stack size
  108. 4D d stack pointer
  109. 51
  110. . stack (stack size bytes)
  111. ??
  112. . robot program, stored in MZX2 Robotic bytecode format
  113. ??