Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
hardware:color [2016/06/05 15:08]
ex_writer created
hardware:color [2018/03/05 19:33] (current)
ex_writer [Horizontal Color Boundary]
Line 1: Line 1:
 ====== Color ====== ====== Color ======
  
-The Bally Arcade can generate 256 distinct colors (between values $00–$FF).<​sup>​†</​sup>​ However, only eight colors may be displayed onscreen simultaneously:​ four on the left side of the [[color mapping#horizontal color boundary|horizontal color boundary]], and four on the right side.<​sup>​††</​sup>​+The Bally Arcade can generate 256 distinct colors (between values $00–$FF).<​sup>​†</​sup>​ However, only eight colors may be displayed onscreen simultaneously:​ four on the left side of the [[#​horizontal color boundary]], and four on the right side.<​sup>​††</​sup>​
  
 Two bits are used to represent each pixel on the screen. These two bits, along with the left/right bit that is set by crossing the horizontal color boundary, map each pixel to one of eight different color registers. ​ Two bits are used to represent each pixel on the screen. These two bits, along with the left/right bit that is set by crossing the horizontal color boundary, map each pixel to one of eight different color registers. ​
Line 11: Line 11:
 <​sup>​†</​sup>​Frank Palazzolo'​s [[http://​www.ballyalley.com/​ml/​ml_docs/​astrocade_palette.html|Bally Astrocade Color Table]] lists and illustrates all 256 colors. ​ <​sup>​†</​sup>​Frank Palazzolo'​s [[http://​www.ballyalley.com/​ml/​ml_docs/​astrocade_palette.html|Bally Astrocade Color Table]] lists and illustrates all 256 colors. ​
  
-<​sup>​††</​sup>​Manipulating color registers during [[hardware:interrupts|interrupts]] can circumvent the eight-color limitation.+<​sup>​††</​sup>​Manipulating color registers during [[hardware:​interrupts]] can circumvent the eight-color limitation.
  
 ===== Color Register Access ===== ===== Color Register Access =====
Line 35: Line 35:
 ==== Horizontal Color Boundary ==== ==== Horizontal Color Boundary ====
  
-A horizontal color boundary register (HORCB) defines the horizontal position of an imaginary ​vertical line that divides the screen into the left and right color palettes. The boundary line can be positioned between any two adjacent screen bytes. The line is immediately to the left of the byte whose number is sent to bits 0–5 of port 9. For example, if the horizontal color boundary is set to 0, the line will be just to the left of byte 0; if it is set to 20, the line will be between bytes 19 and 20 in the center of the screen.+A horizontal color boundary register (HORCB) defines the horizontal position of vertical line that divides the screen into the left and right color palettes. The boundary line can be positioned between any two adjacent screen bytes. The line is immediately to the left of the byte whose number is sent to bits 0–5 of output ​port $9. For example, if the horizontal color boundary is set to 0, the line will be just to the left of byte 0; if it is set to 20, the line will be between bytes 19 and 20 in the center of the screen.
  
 The left/right bit is an additional register identifying signal supplied by the video processor in response to the data stored in the horizontal color boundary register. If a pixel is to the left of the boundary, its left/right bit is set to 1. The left/right bit is set to 0 for pixels to the right of the boundary. Color registers 0–3 are used for pixels to the right of the boundary and registers 4–7 are used for pixels to the left of the boundary. If a byte read from display RAM has the values 00 11 10 00, and was to the right of the boundary line, for example, the four pixels will be defined by color registers 0, 3, 2, and 0, respectively. However, if the byte is located to the left of the horizontal color boundary line, the four pixels will be defined by color registers 4, 7, 6, and 4 respectively. The left/right bit is an additional register identifying signal supplied by the video processor in response to the data stored in the horizontal color boundary register. If a pixel is to the left of the boundary, its left/right bit is set to 1. The left/right bit is set to 0 for pixels to the right of the boundary. Color registers 0–3 are used for pixels to the right of the boundary and registers 4–7 are used for pixels to the left of the boundary. If a byte read from display RAM has the values 00 11 10 00, and was to the right of the boundary line, for example, the four pixels will be defined by color registers 0, 3, 2, and 0, respectively. However, if the byte is located to the left of the horizontal color boundary line, the four pixels will be defined by color registers 4, 7, 6, and 4 respectively.
Line 44: Line 44:
  
 ---- ----
-=== Example ​===+=== Example: Palettes and HORCB ===
  
 {{:​rectangles01.png}} {{:​rectangles01.png}}
Line 55: Line 55:
 ---- ----
  
-=== Example ​===+=== Example: Palettes, HORCB, & Frame Color ===
  
 {{:​rectangles02.png}} {{:​rectangles02.png}}