Horizontal Mask toggle

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
  • #16287

    Hi there, apologies for bringing this up again, but I’d be very interested to read Marqs’ opinion on this topic.

    My request is: would it be possible to include a proper H.Mask ON – OFF toggle, on top of the current numerical scale, in order to completely remove it?

    This is why I ask.
    As per the following pictures, I’m using Line2x optim. 320×240 mode on my Japanese Mega Drive 2. The screen is correctly centered, Advanced Timings are all good, Vertical Mask is set to 8 and Horizontal Mask to 0 (zero): I only cranked its brightness up to better demonstrate the issue I’m experiencing.

    This is what I get on the right side of the screen: https://i.imgur.com/e5vcUtk.jpg
    Alignment is perfect and beyond the last column of visible pixels begins the colored overscan (pink, in this very case, as I’m using The Super Shinobi). That white bar at the very bottom is the Vertical Mask brightened up to 15.

    Now, this is what happens to the left side: https://i.imgur.com/v5rUzaq.jpg
    As you can see, there’s still a hair of Horizontal Mask active by default, literally covering up half-pixel along the vertical border, even if it’s set to 0. If that line wasn’t there – hence my assumption that a proper toggle would fix the issue right away – the alignment would be as perfect as on the other side. No matter what I currently do with the Advanced Settings, I can’t get rid of it.

    After a bit of testing, it looks like the horizontal mask produces different effects, according to the video mode that is selected: optim. 320p in Line4x (4:3:) seems fine, whereas optim. 256p in Line 4x (8:7) is wrong, as it covers less screen than it should.

    Thanks in advance!

    — Edit —

    What I’m using:
    – unmodded Japanese Mega Drive 2 + Mega CD 2. I found Mega Drive games with brightly colored overscan areas (see Sonic The Hedgehog) are ideal to immediately spot the mask’s misalignements
    – C-sync RGB scart cable
    – Asus VG275Q 1080p monitor


    I can take look into the original issue as it’s clearly a bug related to the special line2x implmentation. Not sure whether it’s feasible to add enable/disable option for the mask after getting that fixed.


    Thanks for replying marqs. ^_-

    Should you find an easy way to fix the bug, then there would be no need for a toggle, as I suggested that only as an uneducated guess to get rid of that extra column of H. Mask to the left.
    Also, I don’t know if it’s actually an ‘extra’ column, or if the whole mask is just half pixel offset to the right… The only thing I checked out for sure, is that it’s impossible to move it out of the way. Even if I change H. sync-lenght/backporch and save the profile, as soon as I reload it, the column reappears.

    If you want me to test anything else and report, feel free to let me know anytime.
    In the meanwhile, thank you.


    Hi guys, hope you don’t mind me bringing this up again (only because it’s something that would pretty much perfect my retro setup).

    Is this ‘horizontal mask bug’ still on schedule to be fixed with the next firmware? I remember FirebrandX pointed this up too, over at SHMUPS forums (he found out a kinda opposite problem, compared to mine, while 256p optim-setting up the Mega Drive/Genesis in Line4X…), so maybe he helped out in order to better identify the issue.

    Thanks again everyone!


    Some things that I found: With Mask brightness set to full there is a 1 pixel white vertical line on the left of every 240p line2x mode (generic 4:3, 256/320 optimized) and 480i lineX2. 240p/480i passthrough modes do not have it.

    Debug logs output is “h_border: 0, h_opt_startoffs: 0”

    I think the issue is probably on the FPGA with “border_enable_pp1 <= ((hcnt_act < H_AVIDSTART+H_MASK)” but only for lineX2.

    We need Marqs to take a look πŸ™‚


    Massive thanks for taking a look, Paul. ^_-

    Hopefully, he will! I’m aware to sound super selfish, but I LOVE the look of Line2x optim. on my monitor: it has that minimum degree of softness that – coupled with thick scanlines – really gives me the CRT feel which made me instantly adore the OSSC. Of course I’m also totally OCD towards tiny little bugs no one else seems to care about, so I cannot unsee that extra vertical line when I play. XD

    If you wanna look at something similar, in a way, I found out (FirebrandX noticed that too) that – while Line4x optim. 240p (4:3) looks perfectly aligned both sides – with optim. 256p (8:7) the horizontal mask once again doesn’t snap to one side, this time leaving a vertical line uncovered – as in, you can see the colored overscan – instead of covering up too much, like in optim. 240p.

    Once again, no pressure. It’s just to report something else, with the hope it can help you guys to better identify the issue.

    Thanks again!


    The issue is still on my list, yes. Will take a look into it after getting v0.80 out (soon!) and scanline generation method updates integrated.


    Some more findings. In lineX2 the left mask is always 1 pixel wider than the right mask. For example with H.mask set to 6 with linex2 256×240 optimized the left and right borders should both be 18 pixels but they are 19 & 17.

    The same thing with the latency test where the boxes should be 90 the top left one is 91 and bottom right is 89 pixels. So this must be an issue with hcnt_act being off.

    Delaying only hcnt_2x by 2 cycles will increase the left border by 1 pixel and decrease the right border. However in 480pX2 which had no issue now also has a border of 2 pixels. Delaying hcnt_2x by 1 cycle had no effect in 240pX2.


    @marqs – Massive thanks. No pressure, I’m just glad it’s still on your radar. πŸ™‚

    – Thank you again! And yeah, the mask is definitely not behaving the same way in every mode. Hopefully there will be a work-around for the H centering being off.
    I’d personally take a fixed optim. 320p/256p over a misaglined 480p, mainly because I’ve never seen a PS2/GameCube/XBOX game displaying any colored (or non black) overscan area, so I don’t even use H. mask with those systems, in general.

    Huge thanks again, guys. ^_-


    You should be able to work around the issue in Line2x by enabling “AV3 interlacefix” (which basically disables internal 2x sampling for certain modes) in compatibility options, although it might have negative effects like increased jitter (please report if so). I’ll have to look at other modes to see what’s the problem there.


    Thanks Marqs. It works on lineX2 generic mode but not on optimized mode. Jitter is slightly increased with AV3 interlace On but only with TVP HPLL2X Off. I saw no difference in jitter with HPLL2X On.

    For 8:7 optimized mode I see this:
    lineX2: Mask left: 129px, right 127px. Covers up 1px on the left and shows 1px too much on the right.
    lineX4: Mask correct left & right 128px. Covers up 2px on the left and shows 2px too much on the right.


    @paulb_nl – Exactly the same findings I came up to. The mask’s behaviour is the same on my Asus VG275 monitor.

    – I’ll test interlacefix later on today and I’ll report back.

    Thank you all, guys. ^_-


    The issue should be now resolved, and the fixes will be included in v0.81.


    Wow, marqs, thank you SO MUCH for even taking the time to look into it, not to mention fix it.
    Immensely appreciated.

    Needless to say, I can’t wait for the new firwmare to come out. πŸ™‚


    Thanks marqs! Did some testing and everything is indeed fixed πŸ™‚

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