Recent posts

#81
General Discussion / Sony PVM-4300
Last post by JetSetIlly - 24 Dec 2024, 08:46 AM
#82
General Discussion / Re: PAL Consoles and Colour
Last post by alex_79 - 22 Dec 2024, 02:03 AM
Quote from: JetSetIlly on 21 Dec 2024, 08:35 AMI thought LUM defined the chroma only in SECAM but it also defines the luminance as you would expect.
Yes, the luminance seems to work just like PAL and NTSC models. Attached are screenshots of my SECAM console showing color bars with the "TV TYPE" switch set to "color" and TV saturation set to 50%, then with TV saturation turned completely down to 0% and finally with console set to "B&W" and TV saturation back to 50%.
(Unlike PAL and NTSC ones, The TV TYPE switch on SECAM models disables color generation in hardware.)

Note that the yellow looks actually light green in my case, probably because of the crappy digital TV demodulator, or the console needs servicing, or both.


For some reason I'm not able to insert the images inline while posting, altough I'm sure I could do that in the past.
#83
General Discussion / Re: PAL Consoles and Colour
Last post by JetSetIlly - 21 Dec 2024, 08:35 AM
Quote from: alex_79 on 12 Dec 2024, 01:27 AM
Quote from: JetSetIlly on 11 Dec 2024, 09:04 PMDo SECAM consoles have an adju/home/steve/Desktop/Screenshot from 2024-12-20 21-33-09.png
stment pot. If so, what does it actually do?
The only adjustable components on the board are two variable capacitors, but I have no idea what they're for.

I'm just coding up the calculation of SECAM colours and I think they might define the range for the Y component.

As we know, the HUE nibble is ignored in SECAM consoles. The LUM nibble is used to define the colour wheel angle AND the Y value in the YUV calculation. I thought LUM defined the chroma only in SECAM but it also defines the luminance as you would expect.

So, LUM 1 creates blue with the lowest Y value. LUM 2 creates red with a slightly higher Y value. all the way to LUM 6 which creates yellow with the highest Y value.

Having two controls make me thinks it relates to the min/max limits of the Y. But it could easily be a hue control and saturation or something else. I'd like to know for sure.

Screenshot attached of the generated SECAM colours.




#84
General Discussion / Re: PAL Consoles and Colour
Last post by alex_79 - 12 Dec 2024, 01:27 AM
Quote from: JetSetIlly on 11 Dec 2024, 09:04 PMDo SECAM consoles have an adjustment pot. If so, what does it actually do?
The only adjustable components on the board are two variable capacitors, but I have no idea what they're for.
#85
General Discussion / Re: PAL Consoles and Colour
Last post by JetSetIlly - 11 Dec 2024, 09:04 PM
Do SECAM consoles have an adjustment pot. If so, what does it actually do?
#86
General Discussion / Re: PAL Consoles and Colour
Last post by JetSetIlly - 11 Dec 2024, 08:37 PM
Quote from: alex_79 on 11 Dec 2024, 07:06 PMIf it's a Jr. model, you can adjust the color without opening it. Looking at the bottom of the case, with the controller ports facing down, you'll see a small hole in the pcb under the vents on the left (6th slit from the left, bottom row). That's the color trimmer and you can adjust it with a small flat screwdriver.
Brilliant! I had no idea.
#87
General Discussion / Re: PAL Consoles and Colour
Last post by alex_79 - 11 Dec 2024, 07:06 PM
Quote from: JetSetIlly on 11 Dec 2024, 12:31 AMI'll have to open my 2600 to play with it to see how it behaves it actuality.
If it's a Jr. model, you can adjust the color without opening it. Looking at the bottom of the case, with the controller ports facing down, you'll see a small hole in the pcb under the vents on the left (6th slit from the left, bottom row). That's the color trimmer and you can adjust it with a small flat screwdriver.
#88
General Discussion / Re: PAL Consoles and Colour
Last post by JetSetIlly - 11 Dec 2024, 12:31 AM
And the Decathalon screenshot
#89
General Discussion / Re: PAL Consoles and Colour
Last post by JetSetIlly - 11 Dec 2024, 12:31 AM
I revisited the maths for this and managed to simplify it greatly. I've very happy with this now, although my phase adjustment seems to behave slightly differently to how Stella's phase adjustment works. I'll have to open my 2600 to play with it to see how it behaves it actuality.

func generatePAL(col signal.ColorSignal) color.RGBA {
    if col == signal.VideoBlack {
        return VideoBlack
    }

    // col is a colour-luminance value as stored internally in the 2600

    // color-luminance components of color signal
    lum := (col & 0x0e) >> 1
    hue := (col & 0xf0) >> 4

    // the min/max values for the Y component of greyscale hues
    const (
        minY = 0.35
        maxY = 1.00
    )

    // Y value in the range minY to MaxY based on the lum value
    Y := minY + (float64(lum)/8)*(maxY-minY)

    // PAL creates a grayscale for hues 0, 1, 14 and 15
    if hue <= 0x01 || hue >= 0x0e {
        if lum == 0x00 {
            // black is defined as 0% luminance, the same as for when VBLANK is
            // enabled
            //
            // some RGB mods for the 2600 produce a non-zero black value. for
            // example, the CyberTech AV mod produces a black with a value of 0.075
            return color.RGBA{A: 255}
        }
        g := uint8(Y * 255)
        return color.RGBA{R: g, G: g, B: g, A: 255}
    }

    var phiHue float64

    // even-numbered hue numbers go in the opposite direction for some reason
    if hue&0x01 == 0x01 {
        // green to lilac
        phiHue = float64(hue) * -PALPhase
    } else {
        // gold to purple
        phiHue = (float64(hue) - 2) * PALPhase
    }

    // angle of the colour burst reference is 180 by defintion
    const phiBurst = 180

    // see comments in generateNTSC for why we apply the adjusment and burst value to the
    // calculated phi
    const phiAdj = -57.28
    phiHue += phiAdj
    phi := phiHue + phiBurst

    // phi has been calculated in degrees but the math functions require radians
    phi *= math.Pi / 180

    // saturation of chroma in final colour. value currently uncertain
    const saturation = 0.3

    // create UV from hue
    U := Y * saturation * -math.Sin(phi)
    V := Y * saturation * -math.Cos(phi)

    // YUV to RGB conversion
    //
    // YUV conversion values taken from the "SDTV with BT.470" section of:
    // https://en.wikipedia.org/w/index.php?title=Y%E2%80%B2UV&oldid=1249546174
    R := clamp(Y + (1.140 * V))
    G := clamp(Y - (0.395 * U) - (0.581 * V))
    B := clamp(Y + (2.033 * U))

    return color.RGBA{
        R: uint8(R * 255.0),
        G: uint8(G * 255.0),
        B: uint8(B * 255.0),
        A: 255,
    }
}

The single adjustment for the phase (difference between hues) is currently 16.35 degrees

#90
General Discussion / Re: "Space Age" decimal comput...
Last post by Al_Nafuur - 05 Dec 2024, 03:14 AM
Quote from: alex_79 on 02 Dec 2024, 02:48 AMBTW, anyone has any great gameplay idea that makes use this new "rotary" controller? ;D
maybe with your dc26 kernel. The 2600 gives a Number to reach, but also selects for you the digit sequence (most digits twice or three times) to enter. You always have to add 1-10 to the selected digit.