Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =============================================================================
- File formats for storing border graphics on ZX Spectrum
- =============================================================================
- The following family of raw file formats is designed for efficient storage
- of ZX Spectrum graphics that involve drawing at the border. By design,
- these files have no identifiers and no metadata; they can only be
- recognised by the extension and/or their specific lengths (in bytes).
- -----------------------------------------------------------------------------
- *.BSC files
- -----------------------------------------------------------------------------
- Files with extension *.bsc are intended for storing a standard ZX Spectrum
- image (6912 bytes), which is extended to also cover the border area.
- These files are always 11136 bytes long.
- [6144] Standard ZX Spectrum bitplane;
- [768] Standard ZX Spectrum attributes;
- [4224] The border image data (see detailed description below).
- The border is aligned to the standard ZX Spectrum character grid and is
- stored as a sequence of colours of 8x1 border "pixels". A typical ZX
- Spectrum viewer software would only be able to display stripes that contain
- three or more border "pixels" of the same colour in a row. This requirement
- can be relaxed near the edges of the visible area and also around the
- vertical edges of the screen, therefore, this file format does not
- explicitly prohibit having stripes of one or two border "pixels". It is the
- responsibility of viewer software to somehow deal with the combinations of
- border "pixels" that cannot be displayed.
- A full image contains 48 x 304 border "pixels" and, therefore, spans the
- effective resolution of 384 x 304 pixels. Every byte of the border image
- data stores the colours of two border "pixels":
- Bits 0..2: colour of left pixel;
- Bits 3..5: colour of right pixel;
- Bits 6,7: unused.
- Since it would be wasteful to store border image under the ZX Spectrum
- screen, the border image data is split into three sections:
- 64x[24] 64 lines of the border image above the ZX Spectrum screen;
- 192x[4+4] for 192 lines of the screen, 8 border "pixels" are stored to
- the right of the screen and 8 "pixels" to the left;
- 48x[24] 48 lines of the border image below the screen.
- Note that on a specific ZX Spectrum model, a viewer software is allowed to
- additionally truncate as many border lines as necessary for its normal
- operation.
- -----------------------------------------------------------------------------
- *.BMC4 files
- -----------------------------------------------------------------------------
- Files with extension *.bmc4 are intended for storing a multi-colour image
- for ZX Spectrum with 8x4 effective attribute size, which is extended to
- also cover the border area. These files are always 11904 bytes long.
- [6144] Standard ZX Spectrum bitplane;
- [768] Standard ZX Spectrum attributes for even lines of the
- multi-colour image (i.e. for upper halfs of the characters);
- [768] Standard ZX Spectrum attributes for odd lines of the
- multi-colour image (i.e. for lower halfs of the characters);
- [4224] The border image data (see detailed description above)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement