Super MegaZeux

From MZXWiki
Revision as of 21:24, 14 January 2008 by Wildweasel (talk | contribs) (→‎Notable games that use SMZX mode: - Repaired a link typo)
Jump to navigation Jump to search

SMZX Mode is the name for an alternative graphics mode accessible through MegaZeux. It was first introduced by MadBrain in the form of a modified MZX 2.51s3.2 executable. This original version was referred to as Super MegaZeux 100 Alpha (smzx100a). In the most recent versions of MegaZeux, SMZX Mode can be accessed by setting the SMZX_MODE counter to 1, 2, or 3.

How It Works

SMZX Mode halves the vertical screen resolution in favor of adding two colors per character, effectively making a color palette of 256 unique colors.

Each pixel in SMZX can be either color I (represented in MZX mode as two 'off' chars), color II ('on' and 'off), color III ('off' and 'on') ad color IV (both 'on').

Mode 1, the original mode, simply blended every two horizontal pixels together. This allowed each character to have the original foreground and background colors plus two intermediate blends. The usefulness of this was at first only shown in making smooth gradient fills and grayscale images.

Mode 2 was the first to allow 4 distinct colors for each character. It works like this:

  • All colors are defined in pairs of 2 hex digits.
  • Color I uses the background color as both digits.
  • Color II uses the background color as the first digit and the foreground as the second.
  • Color III uses the foreground color as the first digit and the background as the second.
  • Color IV uses the foreground color as both digits.

Mode 3, which was added with the SDL port, uses a palette of 256 separate colors as opposed to 16 foreground and 16 background colors (each color, in hex, is a 2-digit pair consisting of the background color and the foreground color) Characters can access these as following:

  • Color I is the color itself, for example a character set to color 16 (which would normally be foreground 0 and background 1, hence 0x10) will show color 16 as color I.
  • Color II is the color plus 1
  • Color III is the color plus 2
  • Color IV is the color plus 3

hence yielding a set of 64 unique color palettes. The colors wrap around, so a character set to color 255 (0xFF) will use color 0 for color II, etc. When using mode 3, the protected UI colors are overwritten, causing the MegaZeux UI to mess up somewhat.

Notable games that use SMZX mode