OSSC

From Classic Console Upscaler Wiki
Revision as of 13:37, 5 June 2016 by BuckoA51 (talk | contribs) (More informarion & discussion)
Jump to navigation Jump to search

Introduction

Open Source Scan Converter is a low-latency video digitizer and scanconverter board designed mainly for connecting retro video game consoles and home computers into modern displays. It converts analog RGB/component video into digital format, and doubles (or triples) scanlines of a single frame if necessary to generate a valid mode for digital TVs or monitors.

The board and firmware was designed as a homebrew project mainly during 2015. The primary goal has been to make a scan converter with minimal latency and reasonable cost, which also can be built/assembled manually. Output image quality and features have also been important targets as long as they didn't contradict with primary goals.

Due to interest in the retrogaming community, both DIY kits and pre-assembled boards are released to public during early 2016. Firmware of the system is open source as the name suggests and new features can be expected after initial release.

Features

  • Detection and digitization of various analog SDTV/EDTV/HDTV/PC modes
  • Linedouble-support for 240p, 480i, 288p, 576i, 384p
  • Linetriple-support for 240p/288p with 4 different sampling modes
  • Very low latency (less than 2 input scanlines)
  • Fast "deinterlace" for 480i/576i
  • Fast recover from input video mode change (e.g. 240p<->480i)
  • All video processing done in RGB domain - no conversion to YCbCr
  • Video and sync LPF for less-than optimal input signals
  • Multiple inputs supporting various formats (see below)
  • Full-range 24-bit RGB output through DVI/HDMI
  • Emulated scanlines with configurable strength and position
  • Configurable mask for overscan area
  • Selectable sampling configuration for 480p input: DTV-480p or VGA 640x480
  • Selectable CSC configuration for YPbPr source: Rec. 601 or Rec. 709

Board versions and availability

DIY kit

DIY board (front)DIY board (back)DIY kit contents

New kit orders will be soon available online.

Assembly instructions for v1.3 kit

Pre-assembled board

Pre-assembled boards will be available to buy world-wide from VideoGamePerfection.com

More informarion & discussion

AV inputs

AV1 (RGB-SCART)

This input supports RGB video in RGBS and RGsB (sync on green) formats. Composite video, luma or c-sync can be used as sync source with RGBS mode. External sync splitters / boosters are generally not required or recommended as there is built-in sync filter & separator in the ADC frontend. The sync input has 75ohm termination, so TTL-level c-sync should not be connected directly there in order to avoid unnecessarily stressing source console and/or scanconverter. A 470ohm series resistor on the console side of the cable generally is a good solution when using cables which are wired for TTL-level c-sync output of a console. Video inputs also have standard 75ohm termination, so arcade boards may need extra resistors on the cable when connected directly without using a SuperGUN.

AV2 (Component)

3xRCA input supports for component video (YPbPr) and RGB (RGsB format).

AV3 (VGA)

VGA/HD-15 input supports RGB video in RGBHV, RGBS (pin 13) and RGsB formats. RGBHV and RGBS modes require clean TTL-level sync signals and cannot extract sync from composite/luma. VGA input is best suited for high-quality input sources as video LPF functionality is limited (SCART and Component inputs are routed through a dedicated LPF chip). Therefore, it is generally recommended to connect older consoles and arcade boards to other inputs.

AV outputs

HDMI (DIY boards)

DIY boards contain a HDMI connector which is used to transmit video data in 24bit RGB format. Digital audio output is not available in current boards. Currents up to 200mA can be safely supplied via power pin to external devices such as active cables.

DVI-D (pre-assembled boards)

Due to HDMI licensing requirements and fees, pre-assembled boards come with DVI-D connector. Functionality is otherwise similar, and it is possible to use a DVI-to-HDMI cable or adapter to connect to a HDMI display. Analog output pins of DVI are not used, so it is not possible to connect to a VGA monitor via a passive DVI-to-VGA cable or adapter (an active adapter is required instead).

AV1 audio

Analog audio from SCART input is bypassed to a 3.5mm stereo output jack next to video output connector.

Basic usage

Remote control

Default remote control keymap

The OSSC is available with a pre-programmed infrared remote. This is optional, and can be replaced with a suitable learning remote if desired (see Remote control setup).

  • AV1: Selects AV1 input. If AV1 is already active, toggles between input formats (RGBS, RGsB)
  • AV2: Selects AV2 input. If AV2 is already active, toggles between input formats (YPbPr, RGsB)
  • AV3: Selects AV3 input. If AV3 is already active, toggles between input formats (RGBHV, RGBS, RGsB)
  • MENU: Activates menu at on-board character LCD display
  • BACK: Returns from menu or info page to normal source display page
  • UP/DOWN: Selects next/previous menu option
  • LEFT/RIGHT: Option value -/+
  • INFO: Displays extra information on video source processing: VMod=selected output mode for the current source. LO=total number of lines output by FPGA. VSM=vsync generation mode (0=directly from source, 1-2=FPGA modified)
  • LCD_BACKLIGHT: Turns on-board character LCD backlight off/on
  • HOTKEY1: Turns scanlines on/off (on fw. 0.64 - will be an user-defineable function on a future firmware)
  • HOTKEY2: Decreases scanline intensity (on fw. 0.64 - will be an user-defineable function on a future firmware)
  • HOTKEY3: Increases scanline intensity (on fw. 0.64 - will be an user-defineable function on a future firmware)

PCB buttons

  • BTN0: Next input/mode
  • BTN1: Enable/disable scanlines (horizontal)

Status LEDs

  • Green: Power on. Light off when IR remote code detected
  • Red: Unstable sync when alight.

Settings

Scanlines

Controls whether emulated scanlines are drawn on top of the picture

  • Off: No scanlines drawn [default]
  • Horizontal: Scanlines drawn on every other (digitize & linedouble modes) or every third (linetriple) output line
  • Vertical: Scanlines drawn on every other output column


Scanline strength

  • 6-100%: Strength of the emulated scanlines [default=6%]


Scanline id

  • Even: Scanlines are drawn on even output lines (or columns). [default]
  • Odd: Scanlines are drawn on odd output lines (or columns).


Horizontal mask

  • 0-63 pixels: Controls the size of a mask (black border) generated around the picture in horizontal direction (1-pixel steps). Can be used to mask areas which would get hidden in the overscan region of CRT TVs. [default=0]


Vertical mask

  • 0-63 pixels: Controls the size of a mask (black border) generated around the picture in vertical direction (1-pixel steps). Can be used to mask areas which would get hidden in the overscan region of CRT TVs. [default=0]


480p in sampler

Controls the sampling mode when 525-line progressive signal (“480p”) is detected at input

  • Auto: “VGA 640x480”-mode is selected when the signal comes from RGBHV input. “DTV 480p”-mode is selected with all other inputs [default]
  • DTV 480p: Input is sampled at 858 samples per line, typically associated with 720x480 mode (CEA-861 spec.) used by DTV/DVD equipment and newer game consoles. This option forces the sampling mode for all inputs, which may be required for optimal image quality when e.g. Dreamcast with a VGA module is connected to RGBHV input.
  • VGA 640x480: Input is sampled at 800 samples per line, typically associated with 640x480 mode used by PCs. This option forces the sampling mode for all inputs.


Sampling phase

  • 0-347 deg: Selects the phase of regenerated pixel clock (=position where each sample is taken). When output rate matches the input DAC rate (PC graphics modes, newer consoles, 2 last linetriple modes), it is important to adjust sampling phase for optimal quality. This setting should be adjusted only after adjusting sync and video LPF since they can alter the relative position of video and sync signals. [default=180deg]


YPbPr input Color Space

Controls YPbPr->RGB colorspace conversion coefficients.

  • Rec. 601: Input is assumed to be in Rec. 601 format, which is generally true for SD video [default]
  • Rec. 709: Input is assumed to be in Rec. 709 format, which is generally true for HD video


Analog sync threshold

Sets the sync slicer threshold. May help with dropouts as the last resort - sync LPF and coast settings should be tested through first.

  • 0-350mV: threshold voltage. [default=124mV]


H-PLL Pre-Coast

Defines when PLL coast (current freq. freeze) is activated. Higher than default value needed with some sources (e.g. MD) for stable sync.

  • 0-5 lines: Number of scanlines before vsync at when coast is activated. [default=1]


H-PLL Post-Coast

Defines when PLL coast (current freq. freeze) is deactivated. Higher than default value needed with some sources (e.g. MD) for stable sync.

  • 0-5 lines: Number of scanlines after vsync at when coast is deactivated. [default=0]


Analog sync LPF

Low-pass filter selection for analog sync signals (SCART and component inputs plus VGA input in RGsB mode). Required if there is noise or glitches on the sync line.

  • Off: Sync is processed unfiltered [default]
  • 33MHz: Lowest filtering
  • 10MHz: Medium filtering
  • 2.5MHz: Heavy filtering – recommended only if the above settings are not sufficient for stable sync, since excessive LPF can cause image jitter.


Video LPF

Video low-pass filter. Filters out high-frequency noise on video, and can reduce jitter when sampling clock does not match input video dot clock rate (e.g. older consoles in linedouble mode). NOTE: The last 3 settings are not effective with VGA input in RGBHV/RGBS mode.

  • Auto: Suitable LPF is automatically selected based on input source and video mode [default]
  • Off: LPF is disabled.
  • 95MHz (HDTV II): 95MHz bandwidth – suitable for 1080p
  • 35MHz (HDTV I): 35MHz bandwidth – suitable for 720p
  • 16MHz (EDTV): 16MHz bandwidth – suitable for 480p etc. EDTV formats
  • 9MHz (SDTV): 9MHz bandwidth – suitable for 240p, 480i etc. SDTV formats


240p/288p lineX3

Controls whether 240p/288p is linetripled instead of standard linedouble. NOTE: resulting modes do not have the same parameters (total lines, pixels per line) as standard CEA 720p mode, so they are generally accepted only by monitors and not by many consumer TVs.

  • Off: 240p/288p is linedoubled, resulting to 480p output. [default]
  • On: 240p/288p is linetripled, which results to 720p output.


Linetriple mode

Controls the sampling and pixel clock multiplication mode for linetriple.

  • Generic 16:9: Uses full horizontal sample rate without pixel multiplication, resulting to fully utilized 1280x720/864 output (16:9 aspect). Useful if connected to a CRT via DVI->VGA converter. [default]
  • Generic 4:3: Uses 3/4 of full horizontal sample rate without pixel multiplication, resulting to 960x720/864 effective area of 1280x720/864 output (4:3 aspect).
  • 320x240 optim.: For advanced users only - requires clock and phase adjustments. Uses a sampling rate which matches the DAC rate of 426 dots per line used by some classic consoles (e.g. several PSX games) in 320x240 mode, resulting to pixel-perfect digitization. Output is pixel-multiplied by 3 in horizontal direction, resulting to 960x720 effective area of 1280x720 output. Note: If picture jitters when this mode is selected, adjust sampling phase until sweet spot is achieved.
  • 256x240 optim.: For advanced users only - requires clock and phase adjustments. Uses a sampling rate which matches the DAC rate of 341 dots per line used by various classic consoles (e.g. NES, SNES) in 256x240 mode, resulting to pixel-perfect digitization. Output is pixel-multiplied by 4 in horizontal direction, resulting to 1024x720 effective area of 1280x720 output. Note: If picture jitters when this mode is selected, adjust sampling phase until sweet spot is achieved.


TX mode

Sets the output TX mode.

  • HDMI: auxiliary HDMI packets are sent along with video data, such as Infoframes which indicate color settings (RGB, full-range). NOTE: only DIY boards offer this option.
  • DVI: Only video data is sent to the display. Required if target display does not support HDMI.


Firmware update

See section below.


Save settings

Saves settings (all previous and remote control config) to flash.

Compatibility and special configuration

We encourage the community to add sections under each system instead of having an enormous table here. That way we can have more detailed and specific information on a per system basis, and here links to all the systems tested so far.

Home consoles

Computers

Arcade Boards

Remote control setup

In addition to the included remote control, it is possible to program OSSC to detect infrared signals from any remote which uses common NEC IR protocol. This is useful e.g. if one wants to minimize the number of remote controls in living room or if the included remote gets lost. Many TV remotes have optional control for DVD/VCR which may be used for controlling OSSC. Also, most AV receiver remotes allow controlling other devices (not only by the same manufacturer), so it's almost certainly possible to control OSSC with a suitable manufacturer code.

To configure OSSC for a new infrared RC, find a suitable manufacturer code (e.g. from Toshiba, NEC etc.) so that OSSC green LED blinks when remote buttons are pressed. Then cycle OSSC power on while holding BTN1. A target function name (e.g. "MENU") is displayed of the character LCD. Press the corresponding key on the remote control, after which you're prompted to confirm the new code if signal was detected correctly. Press the same key again to confirm, and then program rest of the functions. When done, new codes are effective immediately. Remember to save settings to make the new codes permanent.

L336 remote keycodes

Logitech Harmony

See this page for a tutorial on using the Logitech Harmony with the OSSC.

Philips Pronto

For IR codes and related files for Philips Pronto and compatible remotes, see this page.

Known issues / limitations

  • interlaced content via VGA in RGBHV/RGBS mode works through a hack (TVP7002 issue).
  • 240p signals using odd-field indicator like Chrono Cross or G Darius (arcade) work through a hack (TVP7002 issue). OSSC input must be pre-selected and not changed with such games.
  • 320x240 and 256x240 optimized linetriple modes require phase adjusment each time the mode is initialized (TVP7002 issue - might be fixed with a workaround).
  • limited compatibility with sdhc/sdxc cards (will be fixed later by a new sd card driver)

Firmware update

Firmware images.

FW update requires a microSD card (2gb and smaller are most compatible) and a program to write the binary file as a disk image to the card (Win32 Disk Imager, dd etc.). The card can be then inserted to OSSC, after which the update process can be started by selecting the update option from the menu and following on-screen instructions. When update is complete, power should be turned off and SD card removed. New fw is activated when system is powered on next time. Settings are kept unless new menu options have been added.

See also - Video tutorial on updating the firmware using Windows.

Firmware changelog and roadmap

v0.69

  • Default fw on 1st batch of pre-assembled boards

Scheduled improvements

  • YPbPr support for SCART and VGA (target: 0.70)
  • Dedicated buttons for each input mode (target: 0.70)
  • New menu structure (target: 0.70)
  • Fix scanline idx and load of some settings (target: 0.70)
  • Option to reset settings to defaults (target: 0.70)
  • Extra remote shortcuts (target: 0.70)
  • New options: ALC, Vsync threshold (target: 0.70)
  • Reset line counters when changing input to avoid false detection (target: 0.70)
  • Interlace passthrough (target: 0.71)
  • 480p/576p lineX2 (target: 0.71)
  • Alternating scanlines (target: 0.71)
  • Profiles (target: 0.7X)
  • Advanced timing tweaker - position, samplerate etc. adjusments (target: 0.7X)
  • New and more compatible SD card controller (target: 0.7X)
  • R/G/B gain and offset control (target: 0.7X)

Other feature requests

  • 240p/288p lineX4
  • Overlay mask brightness control
  • Scale2x/Super Eagle style graphics filters (requires new memory structure)
  • De-dither filter for composite style faux transparencies (requires new memory structure)
  • 480p -> 2x240p (duplicate every other line to bypass interpolation for e.g. GC GB player)

Info for developers