Image Map Image Map
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37

Thread: Was CGA mode 5 secretly intended for anaglyph 3D?

  1. #11

    Default

    That reminds me, I need to put my 5150 back together and need to get it back in working order, hopefully without any new 'splody surprises from old tantalum caps or maybe RIFA caps or similar (in case there are some of those in the PSU).

    Btw., I recently read this in an old post in an old and closed thread over on VOGONS:
    Is it possible to get the unofficial cyan, red and white palette by bit manipulation?
    Would anyone still like to hear a response to that? Because I think I might have a response to that in case people are still interested. Anyone? Great Hierophant? Bueller?

  2. #12
    Join Date
    Sep 2020
    Location
    Wellington, New Zealand
    Posts
    42

    Default

    Quote Originally Posted by ropersonline View Post
    Would anyone still like to hear a response to that? Because I think I might have a response to that in case people are still interested. Anyone? Great Hierophant? Bueller?
    I can't imagine that you could get cyan/red/white in 4-colour graphics mode except via setting the BW bit in the mode control register. Ordinarily, in graphics mode the two bits (C0 and C1) from the display RAM correspond to the R and G video outputs, while the B and I video outputs come straight from bits 4 & 5 of the colour select register.

    But perhaps there's another way?

  3. #13

    Default

    Quote Originally Posted by ropersonline View Post
    Btw., I recently read this in an old post in an old and closed thread over on VOGONS:
    Is it possible to get the unofficial cyan, red and white palette by bit manipulation?
    Would anyone still like to hear a response to that? Because I think I might have a response to that in case people are still interested. Anyone? Great Hierophant? Bueller?
    Quote Originally Posted by kdr View Post
    I can't imagine that you could get cyan/red/white in 4-colour graphics mode except via setting the BW bit in the mode control register. Ordinarily, in graphics mode the two bits (C0 and C1) from the display RAM correspond to the R and G video outputs, while the B and I video outputs come straight from bits 4 & 5 of the colour select register.

    But perhaps there's another way?
    I take that as a yes.
    Actually I understood Great Hierophant's question to mean, "Is it possible to get from a simple 2-bit truth table to the mode 5 palette in a really simple way?"

    I think that's also a yes to that:
    I initially thought this had been done by XORing R with 1 and rearranging the colours, but I now believe it's simply B=G:

    Code:
    2-bit truth table:
    ------------------
    00
    01
    10
    11
    
    SHL of the above:
    -----------------
    000
    010
    100
    110
    
    
    B=G:
    ----
    RGB
    =========
    000 = blk
    011 = cyn
    100 = red
    111 = wht
    So simple once you see it.

  4. #14

    Default

    Quote Originally Posted by ropersonline View Post
    I now believe it's simply B=G:
    That is essentially how it's implemented by the logic on the CGA card, as kdr said earlier on the thread. Pins 2-6 of U22 and pins 5-6 of U20 give +SEL_BLUE = (+COLOR_SEL AND -BW) OR (+C0 AND +BW). +SEL_BLUE is B, +C0 is G, +COLOR_SEL is bit 5 of the palette register, +BW is bit 2 of the mode register and -BW is +BW inverted.

  5. #15

    Default

    Quote Originally Posted by reenigne View Post
    +SEL_BLUE = (+COLOR_SEL AND -BW) OR (+C0 AND +BW)
    It's a shame IBM didn't make it +SEL_BLUE = (+COLOR_SEL AND +C0) OR (+C1 AND +ENABLE_BLINK). That would not have required any additional gates, would have given us all the current palettes plus a new one (green/magenta/white), and made them work independently of the +BW setting so that they could all be displayed in either colour or monochrome on composite monitors.

  6. #16
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    6,884
    Blog Entries
    1

    Default

    Meanwhile, I ordered some Chromadepth glasses on a whim and will be curious to see how well the effort works with the CGA 16-color palette.
    Offering a bounty for:
    - A working Sanyo MBC-775 or Logabax 1600
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  7. #17

    Default

    Quote Originally Posted by kdr View Post
    Ordinarily, in graphics mode the two bits (C0 and C1) from the display RAM correspond to the R and G video outputs, while the B and I video outputs come straight from bits 4 & 5 of the colour select register.
    Did you mean C0 is R and C1 is G?

    Quote Originally Posted by reenigne View Post
    Pins 2-6 of U22 and pins 5-6 of U20 give +SEL_BLUE = (+COLOR_SEL AND -BW) OR (+C0 AND +BW). +SEL_BLUE is B, +C0 is G, +COLOR_SEL is bit 5 of the palette register, +BW is bit 2 of the mode register and -BW is +BW inverted.
    If I understood you both correctly, then you're saying C0 is G, but kdr is saying C1 is G. Who is right?
    If you're right, then what's C1? Is it red? So just the other way around? I.e. C0 is G and C1 is R? (Now where was that circuit diagram again? Slightly above my pay grade, but still.)

  8. #18

    Default

    Quote Originally Posted by Trixter View Post
    Meanwhile, I ordered some Chromadepth glasses on a whim and will be curious to see how well the effort works with the CGA 16-color palette.
    Oh, so not anaglyph 3D glasses but actual chromadepth 3D glasses? To try on an RGBI monitor or colour composite display or both? I imagine having a lot more colours available on the latter (and I realise I'm talking to the people who proved that ) would work rather better than just 4 or 16 colours on the RGBI display. If redder hues are more upfront and bluer hues down back, then I imagine chromadepth glasses might cause any dithering between e.g. cyan and magenta to "fall apart", especially on a less blurry and non-artifacting RGBI display. Correct me if I'm wrong and please let us know the results.

  9. #19
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    6,884
    Blog Entries
    1

    Default

    They were ordered on a whim, so testing will be quick and silly. I was only going to test with RGBI 16 colors.
    Offering a bounty for:
    - A working Sanyo MBC-775 or Logabax 1600
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  10. #20
    Join Date
    Sep 2020
    Location
    Wellington, New Zealand
    Posts
    42

    Default

    Quote Originally Posted by ropersonline View Post
    Did you mean C0 is R and C1 is G?

    If I understood you both correctly, then you're saying C0 is G, but kdr is saying C1 is G. Who is right?
    If you're right, then what's C1? Is it red? So just the other way around? I.e. C0 is G and C1 is R? (Now where was that circuit diagram again? Slightly above my pay grade, but still.)
    I wasn't being particularly precise...

    You can follow along by looking at Sheet 2 of the schematics for the CGA, which is where the video data is generated by combining 16 bits of data from video RAM with the MUX A and MUX B signals that control the current video mode.

    C0 is the output of the '166 shift register U7 that handles the even bits from graphics mode (bits 0, 2, 4, 6, etc...) and C1 is the output of the '166 shift register U8 handling the odd bits. So each C0/C1 pair is (in sequence) bits 0+1, 2+3, 4+5, etc. C0 and C1 are then wired up to the '153 dual 4-to-1 mux at U9 that outputs the R and G bits; C0 goes into 2C2 and C1 goes into 1C2. When in graphics mode, the mux takes the inputs on xC2 and puts them on xY -- so 1C2 (which is the C1 bit of the current pixel) goes to 1Y (which is the R video output) and 2C2 (the C0 bit of the current pixel) goes to 2Y (the G video output).

    Which is all to say that, yes, reenigne is correct that C0 is Green and C1 is Red.

    Incidentally, this is where the ugly palette comes from: the other mux U10, which generates the B and I video bits, is fed from the SEL BLUE and BACKGROUND I signals in graphics mode. And these are 'global' signals, i.e. they don't come from the pixel data in video RAM but rather originate from the mode control and color select registers.... there is absolutely no way for the bits that come out of video RAM to influence the B or I video output when in graphics mode. That's why the 160x100 "16-colour graphics" mode is actually a text mode: it's the only way to hook up the data in video RAM to the B/I video output.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •