Fine-tuning of sampling rate in optimized modes

NewHome Forums OSSC & OSSC Pro OSSC – Feature Requests Fine-tuning of sampling rate in optimized modes

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #25442
    Calle W
    Participant

    This function was discussed a while back in a previous thread regarding de-blur for the N64. The possibility of dialing in a more precise sampling rate would be beneficial for pixel perfection.

    If I’m not mistaken, the Genesis (for 320 games) and maybe other consoles would benefit from this as well, so I thought I’d make a specific request for this feature. The precision would depend on line multiplication mode if I remember correctly.

    How tricky would this be to add as a feature?

    #26581
    marqs
    Participant

    Fw 0.83 introduces “H. s.rate adj” option which enables fine-tuning for optimized modes.

    #27413
    Harrumph
    Participant

    H.samplerate + (H. s.rate adj % H. mult factor) / H. mult factor)

    If someone (like I was) is a bit confused as to what the formula for this actually means (the % term is not obvious), below is the resulting decimal values calculated for H.Mult values 3 to 6.

    (Basically, the % (modulo) operation gives the integer remainder after dividing the H. s. rate adjust with the H.Mult factor.)

    You can check which mode uses which horizontal multiplication mode in the optimal timings wiki page.

    H. mult factor 3 (divide remainder by 3)
    H s adjust:
    1 -> 1 % 3 = 0, remainder 1 = 0.333
    2 -> 2 % 3 = 0, remainder 2 = 0.667
    3 -> 3 % 3 = 1, remainder 0 = 0
    4 -> 4 % 3 = 1, remainder 1 = 0.333
    5 -> 5 % 3 = 1, remainder 2 = 0.667

    H. mult factor 4 (divide remainder by 4)
    1 -> 1 % 4 = 0, remainder 1 = 0.25
    2 -> 2 % 4 = 0, remainder 2 = 0.5
    3 -> 3 % 4 = 0, remainder 3 = 0.75
    4 -> 4 % 4 = 1, remainder 0 = 0
    5 -> 5 % 4 = 1, remainder 1 = 0.25

    H. mult factor 5 (divide remainder by 5)
    1 -> 1 % 5 = 0, remainder 1 = 0.2
    2 -> 2 % 5 = 0, remainder 2 = 0.4
    3 -> 3 % 5 = 0, remainder 3 = 0.6
    4 -> 4 % 5 = 0, remainder 4 = 0.8
    5 -> 5 % 5 = 1, remainder 0 = 0

    H. mult factor 6 (divide remainder by 6)
    1 -> 1 % 6 = 0, remainder 1 = 0.167
    2 -> 2 % 6 = 0, remainder 2 = 0.333
    3 -> 3 % 6 = 0, remainder 3 = 0.5
    4 -> 4 % 6 = 0, remainder 4 = 0.667
    5 -> 5 % 6 = 0, remainder 5 = 0.833

    #27416
    marqs
    Participant

    The interface has been updated for upcoming fw, so samplerate will be set as XXX.YY (XXX is base and YY is fraction at 0.05 interval) and closest factor is calculated internally.

    #27737
    FBX
    Participant

    I’m having trouble understanding the math here. I know that if I choose line4x for Genesis 320 mode, the horizontal multiplication factor is 4. So what do I put in for H. samplerate and H. s.rate adj to get 427.5? I had artemio make me a spreadsheet to calculate the formula, but when I put in 427 for H. samplerate, I get an effective samplerate output of around 107 depending on the value in H. s.rate adj. I’m just totally confused.

    Edit: spreadsheet was missing a parenthesis, which threw the whole formula off. It all makes sense now, and I was right in working it out in my head that a value of “2” was needed for 427.5 for 320 at line4x.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.