Advertisement
Guest User

Untitled

a guest
Sep 11th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. =============================================================================
  2. File formats for storing border graphics on ZX Spectrum
  3. =============================================================================
  4.  
  5. The following family of raw file formats is designed for efficient storage
  6. of ZX Spectrum graphics that involve drawing at the border. By design,
  7. these files have no identifiers and no metadata; they can only be
  8. recognised by the extension and/or their specific lengths (in bytes).
  9.  
  10. -----------------------------------------------------------------------------
  11. *.BSC files
  12. -----------------------------------------------------------------------------
  13.  
  14. Files with extension *.bsc are intended for storing a standard ZX Spectrum
  15. image (6912 bytes), which is extended to also cover the border area.
  16. These files are always 11136 bytes long.
  17.  
  18. [6144] Standard ZX Spectrum bitplane;
  19. [768] Standard ZX Spectrum attributes;
  20. [4224] The border image data (see detailed description below).
  21.  
  22. The border is aligned to the standard ZX Spectrum character grid and is
  23. stored as a sequence of colours of 8x1 border "pixels". A typical ZX
  24. Spectrum viewer software would only be able to display stripes that contain
  25. three or more border "pixels" of the same colour in a row. This requirement
  26. can be relaxed near the edges of the visible area and also around the
  27. vertical edges of the screen, therefore, this file format does not
  28. explicitly prohibit having stripes of one or two border "pixels". It is the
  29. responsibility of viewer software to somehow deal with the combinations of
  30. border "pixels" that cannot be displayed.
  31.  
  32. A full image contains 48 x 304 border "pixels" and, therefore, spans the
  33. effective resolution of 384 x 304 pixels. Every byte of the border image
  34. data stores the colours of two border "pixels":
  35.  
  36. Bits 0..2: colour of left pixel;
  37. Bits 3..5: colour of right pixel;
  38. Bits 6,7: unused.
  39.  
  40. Since it would be wasteful to store border image under the ZX Spectrum
  41. screen, the border image data is split into three sections:
  42.  
  43. 64x[24] 64 lines of the border image above the ZX Spectrum screen;
  44. 192x[4+4] for 192 lines of the screen, 8 border "pixels" are stored to
  45. the right of the screen and 8 "pixels" to the left;
  46. 48x[24] 48 lines of the border image below the screen.
  47.  
  48. Note that on a specific ZX Spectrum model, a viewer software is allowed to
  49. additionally truncate as many border lines as necessary for its normal
  50. operation.
  51.  
  52. -----------------------------------------------------------------------------
  53. *.BMC4 files
  54. -----------------------------------------------------------------------------
  55.  
  56. Files with extension *.bmc4 are intended for storing a multi-colour image
  57. for ZX Spectrum with 8x4 effective attribute size, which is extended to
  58. also cover the border area. These files are always 11904 bytes long.
  59.  
  60. [6144] Standard ZX Spectrum bitplane;
  61. [768] Standard ZX Spectrum attributes for even lines of the
  62. multi-colour image (i.e. for upper halfs of the characters);
  63. [768] Standard ZX Spectrum attributes for odd lines of the
  64. multi-colour image (i.e. for lower halfs of the characters);
  65. [4224] The border image data (see detailed description above)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement