Jump to content

Hold-And-Modify: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Hold And Modify moved to Hold-and-Modify
added more specifics and a run on sentence
Line 1: Line 1:
'''Hold-and-Modify''' (more commonly known as HAM) is a screenmode of the [[Amiga]] micro computer. It works by interpreting the data for a [[pixel]] as "copy the colour of my neighbour to the left" (Hold), then "change that colour" (Modify). This allowed the computer to use a fairly rich palette, even if there were only a few bits available to indicate the colour.
'''Hold-and-Modify''' (more commonly known as HAM) is a screenmode of the [[Amiga]] micro computer. It works by either using one of 16 colours in the palette or by holding the colour of the last displayed pixel and then modifying its red, green, or blue component. This allowed the computer to display up to 4096 colors with only 6 bits available to indicate the colour.


A disadvantage was that rapid colour changes within a row of pixels were not possible, so if you tried to encode such a fast change, you would get artifacting similar to the [[compression artifact]]s you sometimes get with the [[JPEG]] graphics format. Without close scrutiny a HAM8 picture is indistinguishable from a more traditional 16-bit display, and in many cases looks as good as a 24-bit display.
A disadvantage was that some colour changes take 3 pixels to occur, so if you chose the 16 palette colours poorly the artifacting could become frequent and glaringly obvious, vaguely similar to the [[compression artifact|compression artifacts]] you sometimes get with the [[JPEG]] graphics format. The [[Advanced_Graphics_Architecture|AGA]] upgraded version, HAM8, can, without close scrutiny be indistinguishable from a more traditional 16-bit display, and in many cases look as good as a 24-bit display.


In the early days of [[multimedia]], HAM gave the Amiga a small advantage over competing systems, because it allowed the system to display digitized photographs and rendered 3D images at a much more realistic level.
In the early days of [[multimedia]], HAM mode gave the Amiga a graphical advantage over competing systems, because it allowed the system to display digitized photographs and some rendered 3D images at a level claimed to be "photorealistic" at the time.


On early Amiga systems, only 6 bits could be used to indicate colours. Most screenmodes worked with indexed colours, and only 5 bits for the colour index, meaning that 2<sup>5</sup> (=32) colours could be displayed at most. Some screenmodes allowed the sixth bit to be used as a half-color (the pixels with this bit set would display with half the luminosity.)
On [[Original Amiga chipset|OCS]]/[[Enhanced Chip Set|ECS]] Amiga systems, only 6 bits could be used to indicate colours. Most screenmodes worked with indexed colours, and only 5 bits for the colour index, meaning that 2<sup>5</sup> (=32) colours could be displayed at most. Some screenmodes allowed the sixth bit to be used as a half-color (the pixels with this bit set would display with half the luminosity.)


The HAM mode used 6 bits, two being used to indicate whether the remaining 4 bits were an index in the color palette (16 colours) or a change in one of the [[RGB]] components of the color (e.g. '''hold''' the red and green components from previous pixel, and '''modify''' the blue component). The remaining four bits were then used as the absolulte value for the modified RGB component.
The HAM mode used 6 bits, two being used to indicate whether the remaining 4 bits were an index in the color palette (16 colours) or a change in one of the [[RGB]] components of the color (e.g. '''hold''' the red and green components from previous pixel, and '''modify''' the blue component). The remaining four bits were then used as the absolulte value for the modified RGB component.

Revision as of 13:51, 22 October 2005

Hold-and-Modify (more commonly known as HAM) is a screenmode of the Amiga micro computer. It works by either using one of 16 colours in the palette or by holding the colour of the last displayed pixel and then modifying its red, green, or blue component. This allowed the computer to display up to 4096 colors with only 6 bits available to indicate the colour.

A disadvantage was that some colour changes take 3 pixels to occur, so if you chose the 16 palette colours poorly the artifacting could become frequent and glaringly obvious, vaguely similar to the compression artifacts you sometimes get with the JPEG graphics format. The AGA upgraded version, HAM8, can, without close scrutiny be indistinguishable from a more traditional 16-bit display, and in many cases look as good as a 24-bit display.

In the early days of multimedia, HAM mode gave the Amiga a graphical advantage over competing systems, because it allowed the system to display digitized photographs and some rendered 3D images at a level claimed to be "photorealistic" at the time.

On OCS/ECS Amiga systems, only 6 bits could be used to indicate colours. Most screenmodes worked with indexed colours, and only 5 bits for the colour index, meaning that 25 (=32) colours could be displayed at most. Some screenmodes allowed the sixth bit to be used as a half-color (the pixels with this bit set would display with half the luminosity.)

The HAM mode used 6 bits, two being used to indicate whether the remaining 4 bits were an index in the color palette (16 colours) or a change in one of the RGB components of the color (e.g. hold the red and green components from previous pixel, and modify the blue component). The remaining four bits were then used as the absolulte value for the modified RGB component.

The possible values were :

  • 00 xxxx : use color from palette index xxxx;
  • 01 gggg : keep red and blue components from previous pixel, use gggg as green component;
  • 10 rrrr : keep green and blue components from previous pixel, use rrrr as red component;
  • 11 bbbb : keep red and green components from previous pixel, use bbbb as blue component.

A row of pixels would always start with one of the 16 indexed colours.

HAM allowed for a maximum of 4096 colours to be used, because the system used 12-bit colour, 4 bits for each of Red, Green and Blue (212 = 4096).

Starting with AGA-based Amiga systems (the A1200 and A4000), a pixel could have 8 bits to encode its colour, which allowed for a HAM mode with 6 bits of index or color component. HAM-8 as it was called, therefore allowed 64 base colours, with a maximum of 262,144 colours on-screen from a palette of 16,777,216.

HAM was only originally put into the Amigas custom chipset as an experiment. To quote Jay Miner (known as "the father of the Amiga") himself:

"Hold and Modify came from a trip to see flight simulators in action and I had a kind of idea about a primitive type of virtual reality. NTSC on the chip meant you could hold the Hue and change the luminance by only altering four bits. When we changed to RGB I said that wasn't needed any more as it wasn't useful and I asked the chip layout guy to take it off. He came back and said that this would either leave a big hole in the middle of the chip or take a three-month redesign and we couldn't do that. I didn't think anyone would use it. I was wrong again as that has really given the Amiga its edge in terms of the colour palette."