ZX Spectrum 128k and OSSC (Open Source Scan Converter)

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
Post Reply
User avatar
MrClump
Microbot
Posts: 112
Joined: Sun Aug 16, 2020 7:12 pm
Location: Torbay, Devon, UK

ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by MrClump »

I've had an OSSC for a few months now and haven't really messed with it a great deal. The OSSC doesn't seem to get a great deal of discussion with Speccies, and so far, I've found it impossible to find a single source of information on how to configure what is a reasonably complex device to get the best results. I thought it might be helpful to document my findings (so far) relevant to Spectrum owners here.

The generic OSSC profile gives a pretty good result with the Spectrum's RBG output, but it is far from perfect. I understand that it can be possible to achieve a pixel-perfect image that doesn't look far off a native digital HDMI output. I've managed to accomplish this with Workbench on my Commodore Amiga (sorry), which now looks simply stunning. I've now turned my attention to my Speccy Toastrack and have managed to achieve something close to pixel perfect, although it's not quite there yet. I'm not sure if the 100% pixel perfection I have achieved with my Amiga is even possible with the Speccy. The Amiga has the benefit of being able to be set to a screen mode that is an exact multiple of my monitor's native resolution.

It was pretty hard to take decent photos of the LCD; in reality, it looks way better than in these pics.

Image

Image

Image

Image

I am using a BenQ BL912, which is a 5:4 LCD. The results you get with the OSSC are fairly heavily dependant on your display, its resolution and ability to cope with what are still often non-standard video signals. The pics above are the result of several hours of fiddling, reading wikis, cursing and starting from scratch several times. But, the image is pretty crisp; once you are in a game, I now have a zero-lag, rock-solid, HDMI like image; from a standard, unmodified Toastrack using a regular Retro Computer Shack RGB SCART cable connected to the OSSC's SCART input. I am using scanlines here, which I find adds to the impression of the image being very clean and sharp as it nicely delineates each line on the Spectrum's display.

As you can see from the loading screen, my settings also have the unintended benefit of shrinking the border area. I think it may be possible to shrink the border area even further to give a larger image or even eradicate the border, although I am not sure why you would want to do that!

These are the settings I used to achieve this, be warned, the OSSC is highly dependant on your display device. I don't believe these settings will work correctly on anything other than a 1280 x 1024 display without further tinkering, YMMV. The locations are scattered around various menus; if I don't mention a setting, it is left set to default.

Sampling Options - Adv. Timing - 1280 x 288
H. samplerate - 1850
H. synclen - 167
H.backporch - 255
H.active - 1280
V.synclen - 3
V.backporch - 28
V.active - 256
Sampling phase - adjust to suit

Output opt.
240p/288p proc - Line 4x
Line 4x mode - Generic 4:3 (haven't messed with the other options yet)

Scanline opt.
Adjust to your personal preference

The key with a 1280x1024 display at least seems to be to use 4x line quadrupling. 1x and 2x are too fuzzy, 3x messes up the geometry to a degree I could not correct and 5x outputs too high a resolution.

These settings work nicely with my Toastrack and also with my Grey +2. They do not work so well with my +3; currently, I'm not sure if this is down to differences with the +3's video output or that I cannot use the same RGB SCART cable. It is worth noting that any flaws in the Spectrum's video output will likely remain. I can still see the faint jailbars remaining post-jailbar fix on my Toastrack for instance.

All this may be complete garbage, and I may have set it all up wrong! I am far from an expert with the OSSC and only have a fairly tenuous but growing understanding of the effects of the many settings. But this setup has worked for me with this monitor. I shall continue to tinker....
User avatar
MrClump
Microbot
Posts: 112
Joined: Sun Aug 16, 2020 7:12 pm
Location: Torbay, Devon, UK

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by MrClump »

So my previous settings might have looked good, but were actually pretty much garbage and were never going to get properly to a pixel perfect display with any amount of fiddling. After starting again (again) these are the settings for a 1:1 pixel perfect display with an OSSC tested with a Toastrack, Grey +2 and a +3.

Note: these settings will only work unmodified on a 1280 x 1024 display, on anything else you may need to use a different line multiplier which will have a knock on effect on your H. Active and V. Active. I'm going to try a 1080p display next, it's just not what I normally have on my desk.

Output opt.
240p/288p - Line 4x
Line 4x mode - 320 x 240 optim.

Sampling Options
Adv. timing - 320x240LB
H.samplerate - 456
h.synclen - 31
H.backporch - 69
H.active - 320
V.synclen - 7
V.backporch - 24
V.active - 256
Sampling phase - adjust to suit

The H.active of 320 and V.active of 256 when multiplied by the 4x line mode is what gives the perfect 1280x1024 window for the monitor to display without using the internal scaler. If you are using a different resolution monitor it is those settings and the Line x mode that you will have to juggle to reach a resolution that looks good on your display.

To correctly adjust the phase you will need a display showing a repeating grid of squares, and then adjust it until you get rid of all vertical bars and swirling patterns. This inelegant BASIC program will do the trick.

Code: Select all

  10 REM OSSC calibration by MrClump
  20 FOR n=0 TO 7
  30 READ row: POKE USR "S"+n,row
  40 NEXT n
  50 DATA BIN 01010101
  60 DATA BIN 10101010
  70 DATA BIN 01010101
  80 DATA BIN 10101010
  90 DATA BIN 01010101
 100 DATA BIN 10101010
 110 DATA BIN 01010101
 120 DATA BIN 10101010
 130 FOR a=0 TO 21
 140 PRINT "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"
 150 NEXT a
 160 PAUSE 0
Once completed for me it gives an absolutely superb image on my Toastrack and +2, the same settings work for both. The +3 with its cleaner RGB signal and complete lack of jailbars looks absolutely stunning, it almost looks like an emulator! Although the same settings work for the +3, for some reason it requires a different phase setting, so have it saved to a separate profile.

Below are some close up pics from my Toastie that show the sort of clarity of image it gives, on the 128 numbers you can see how perfectly the Speccies pixels align with the monitor.

Image
Batty on Toastrack

Image
Toastrack menu

Image
+3 Menu
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2643
Joined: Mon Nov 13, 2017 3:16 pm

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by Ast A. Moore »

Looks pretty darned good!

Of course, I still prefer my trusty old—well, not that old—14-inch CRT for all things Speccy. But, yeah, your results look absolutely fantastic!
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
neon
Drutt
Posts: 16
Joined: Fri Mar 19, 2021 8:18 pm

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by neon »

This is the about the same timing I'm using, except I'm manually scaling 4x horisontally instead of using the built in 320x240-stuff. I only care about capturing and my capture card has some issues with chroma subsampling so I have to have sub-pixel control.

These are my settings (1280x288) for the 128:
Horizontal sample rate: 1824
Horizontal synclen: 156
Horizontal backporch: 246
Horizontal active: 1280
Vertical synclen: 3
Vertical backporch: 36
Vertical active: 240
240/288p: 4x
Sampling phase is 157.

The capture looks like this (scaled to 1080 lines for youtube): https://www.youtube.com/watch?v=CjHxZ_t6_GQ
User avatar
MrClump
Microbot
Posts: 112
Joined: Sun Aug 16, 2020 7:12 pm
Location: Torbay, Devon, UK

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by MrClump »

neon wrote: Mon May 17, 2021 6:34 pm This is the about the same timing I'm using, except I'm manually scaling 4x horisontally instead of using the built in 320x240-stuff. I only care about capturing and my capture card has some issues with chroma subsampling so I have to have sub-pixel control.
Looks awesome, even after YouTube compression. I think it shows with such a flexible device there are many ways to skin the cat!
User avatar
MrClump
Microbot
Posts: 112
Joined: Sun Aug 16, 2020 7:12 pm
Location: Torbay, Devon, UK

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by MrClump »

neon wrote: Mon May 17, 2021 6:34 pm This is the about the same timing I'm using, except I'm manually scaling 4x horisontally instead of using the built in 320x240-stuff. I only care about capturing and my capture card has some issues with chroma subsampling so I have to have sub-pixel control.
Are you using Generic 4:3 scaling? I'm not really sure what the scaling modes are doing, or rather I'm not sure if they're doing anything you can't do yourself manually.
neon
Drutt
Posts: 16
Joined: Fri Mar 19, 2021 8:18 pm

Re: ZX Spectrum 128k and OSSC (Open Source Scan Converter)

Post by neon »

MrClump wrote: Mon May 17, 2021 7:07 pm
neon wrote: Mon May 17, 2021 6:34 pm This is the about the same timing I'm using, except I'm manually scaling 4x horisontally instead of using the built in 320x240-stuff. I only care about capturing and my capture card has some issues with chroma subsampling so I have to have sub-pixel control.
Are you using Generic 4:3 scaling? I'm not really sure what the scaling modes are doing, or rather I'm not sure if they're doing anything you can't do yourself manually.
Yes, I'm using generic 4:3. I've never bothered using the other scaling modes. My main usage has been capturing demos from different platforms (Amiga, Dreamcast, Playstation etc) and go for pixel-perfect (with 2x2 or 4x4 pixels) lossless capture and worry about getting the correct aspect ratio when encoding the video. This can take a bit of work to get correct with all the different graphics modes, especially on the Playstation 1.
Post Reply