Difference between revisions of "Video (PC8801)"

From Data Crystal
Jump to: navigation, search
m
m
Line 31: Line 31:
 
|Toggle Background/Foreground color components
 
|Toggle Background/Foreground color components
 
|Toggles background and foreground color components on and off
 
|Toggles background and foreground color components on and off
if 8-color mode {
+
*if 8-color mode
  if bit 8 (mask 0x80) set, target is background color, else foreground
+
**if bit 8 (mask 0x80) set, target is background color, else foreground
 +
**if bit 7 (mask 0x40) toggle green component
 +
***GREEN ON if bits 1,2,3 (0x7) set, else OFF
 +
**else toggle red and/or blue
 +
***BLUE ON if bit 1,2,3 set, else OFF
 +
***RED ON if value written / 8 sets bits 1,2,3, else OFF
  
  if bit 7 (mask 0x40) toggle green component {
+
*else if monochrome mode, set foreground color
    GREEN ON if bits 1,2,3 (0x7) set, else OFF
+
**BLUE ON if bit 1 set (mask 0x1)
  }
+
**RED ON if bit 2 set (mask 0x2)
  else toggle red and/or blue {
+
**GREEN ON if bit 3 set (mask 0x4)
    BLUE ON if bit 1,2,3 set, else OFF
 
    RED ON if value written / 8 sets bits 1,2,3, else OFF
 
  }
 
}
 
else if monochrome mode, set foreground color {
 
  BLUE ON if bit 1 set (mask 0x1)
 
  RED ON if bit 2 set (mask 0x2)
 
  GREEN ON if bit 3 set (mask 0x4)
 
}
 
 
|-
 
|-
 
|0x55-0x5b
 
|0x55-0x5b
 
|Palette Write
 
|Palette Write
 
|Writes to the palette. The index written to is the difference between the port number and 0x54.
 
|Writes to the palette. The index written to is the difference between the port number and 0x54.
if port 0x31 bit 6 (0x20) set {
+
*if port 0x31 bit 6 (0x20) set
 
+
**if bit 7 (mask 0x40) toggle green component
  if bit 7 (mask 0x40) toggle green component {
+
***GREEN ON if bits 1,2,3 (0x7) set, else OFF
    GREEN ON if bits 1,2,3 (0x7) set, else OFF
+
**else toggle red and/or blue
  }
+
***BLUE ON if bit 1,2,3 set, else OFF
  else toggle red and/or blue {
+
***RED ON if value written / 8 sets bits 1,2,3, else OFF
    BLUE ON if bit 1,2,3 set, else OFF
+
*else
    RED ON if value written / 8 sets bits 1,2,3, else OFF
+
**BLUE ON if bit 1 set (mask 0x1)
  }
+
**RED ON if bit 2 set (mask 0x2)
}
+
**GREEN ON if bit 3 set (mask 0x4)
else {
 
  BLUE ON if bit 1 set (mask 0x1)
 
  RED ON if bit 2 set (mask 0x2)
 
  GREEN ON if bit 3 set (mask 0x4)
 
}
 
 
|-
 
|-
 
|0x5c-0x5f
 
|0x5c-0x5f

Revision as of 18:39, 4 March 2016

Port Name Function
0x30
0x34
0x35
0x52 Background Color Sets the background color of the screen. The color is an RGB composite.
  • BLUE ON if bit 3 (mask 0x8) set
  • GREEN ON if bit 4 (mask 0x10) set
  • RED ON if bit 5 (mask 0x20) set
0x53
0x54 Toggle Background/Foreground color components Toggles background and foreground color components on and off
  • if 8-color mode
    • if bit 8 (mask 0x80) set, target is background color, else foreground
    • if bit 7 (mask 0x40) toggle green component
      • GREEN ON if bits 1,2,3 (0x7) set, else OFF
    • else toggle red and/or blue
      • BLUE ON if bit 1,2,3 set, else OFF
      • RED ON if value written / 8 sets bits 1,2,3, else OFF
  • else if monochrome mode, set foreground color
    • BLUE ON if bit 1 set (mask 0x1)
    • RED ON if bit 2 set (mask 0x2)
    • GREEN ON if bit 3 set (mask 0x4)
0x55-0x5b Palette Write Writes to the palette. The index written to is the difference between the port number and 0x54.
  • if port 0x31 bit 6 (0x20) set
    • if bit 7 (mask 0x40) toggle green component
      • GREEN ON if bits 1,2,3 (0x7) set, else OFF
    • else toggle red and/or blue
      • BLUE ON if bit 1,2,3 set, else OFF
      • RED ON if value written / 8 sets bits 1,2,3, else OFF
  • else
    • BLUE ON if bit 1 set (mask 0x1)
    • RED ON if bit 2 set (mask 0x2)
    • GREEN ON if bit 3 set (mask 0x4)
0x5c-0x5f