DExx-vd isl

From Classic Console Upscaler wiki
Revision as of 22:19, 10 September 2022 by Marqs (talk | contribs)
Jump to navigation Jump to search

Contents

Introduction

DExx-vd_isl is video digitizer expansion card for selected Altera/Intel FPGA development boards, primarily DE10-Nano. Most common use scenario is connecting retro video game consoles and home computers to modern displays. The combination of FPGA development board and expansion card has been used in development of OSSC Pro and can be considered OSSC Pro Lite version since aside from more limited connectivity and performance, it shares most major features.

If you're new to the OSSC and scalers/processors in general, you may wish to jump to the quick start guide.

Features

  • Digitizes analog video sources in RGBS, RGBCS (TTL csync), RGBHV and YPbPr formats connected to SCART connector
  • Up to ~110MHz sampling clock supporting up to 720p@60/1080i@60 inputs.
  • Output up to ~165MHz (1920x1080p@60, 1920x1200p@60 etc.)
  • Analog and digital audio inputs via SCART and toslink (DE10-Nano needs a modification for SPDIF support)
  • OSD and optional character display as UI. IR control using OSSC remote control.
  • Line multiplication and scaler operating modes
  • Free running and frame locked operation
  • Motion adaptive deinterlacing
  • Low latency (<=40 scanlines in LM mode, ~1 frame in framelocked scaler mode)
  • Various sampling presets for classic consoles and home computers
  • Postprocessing options including scanlines and BFI

Board versions and availability

DIY

PCB and parts for the board can be purchased from known manufacturers (e.g. JLCPCB, OSHPark) and suppliers (e.g. Mouser, Digikey) but at the time of writing it may not be feasible/economical due to component shortages.

Pre-assembled board

Pre-assembled boards are sold worldwide by:

More information & discussion

AV inputs

AV1 (SCART)

The SCART connector of DExx-vd_isl supports a number of video/sync formats. SCART-RGB sources can be connected as-is while other formats require passthru cables/adapters. Input is selected via remote key / OSD input menu and the on-board sync switch. The table below summarizes available inputs, their corresponding remote hotkeys and required position of the sync switch.

Input name Remote hotkey Sync switch position Notes
Test pattern 0 Any Change test resolution with LEFT/RIGHT remote keys or via menu.
AV1_RGBS 1 CSYNC For video level c-sync only. Sync can be also extracted from composite video / luma.
AV1_RGsB 4 SOG Use suitable adapter / SCART cable.
AV1_YPbPr 4 (tap twice) SOG Use YPbPr to SCART passthru adapter. Some suitable adapters are sold online (e.g. this) but most don't include audio jacks.
AV1_RGBHV 7 Any Needs a custom adapter/cable which routes HSYNC to SCART pin 12 and VSYNC to pin 10.
AV1_RGBCS 7 (tap twice) Any For TTL c-sync only. Needs a custom adapter/cable which routes CSYNC to SCART pin 12.

AV input adapter

A custom adapter (shown below) can be used to connect VGA or component input sources. A fully wired SCART cable needs to be connected between the adapter and DExx-vd_isl board. Design and gerbers are available here. DIY kit for the adapter may be released later.

Dexx scart adapter.png

Toslink

The toslink input supports LPCM 44.1/48/96kHz and compressed bitstream (Dolby Digital, DTS) formats. The audio stream is forwarded as-is to HDMI transmitter.

Basic setup & usage

Board installation

DE10-Nano

Insert the board into the header which is closer to the FPGA so that both HDMI and SCART ports are facing the same direction. Then plug the 4-pin jumper cable between the boards as shown in the picture. If you use standard SCART-RGB sources, flip the red sync switch towards "CSYNC" as pictured.

De10n-conn.jpg

Prepara a dedicated microSD card (>=64MB) by downloading and unzipping latest firmware image and writing it on the card in raw e.g. via Win32 Disk Imager. Subsequent firmware updates can be made by easier fashion, see #Firmware update.

Additional notes (e.g. how to enable SPDIF) are found on the board-specific README.

Other development boards

  • C5G
  • DE2-115

Remote control

Default remote control keymap

DExx-vd_isl operates with L336 infrared remote pre-programmed for OSSC. Key functionality is listed below.

  • 0-9: Selects AV source and input format. See remote picture on the side for reference.
  • MENU: Activates/deactivates OSD menu
  • OK: Selects sub-menu or function
  • BACK: Returns to previous menu level or from info page to normal source display page
  • UP/DOWN: Selects next/previous menu option or next/previous input when not in menu.
  • LEFT/RIGHT: Option value -/+
  • INFO: Displays detailed timings of video input and output. Also displays firmware version.
  • SCANLINE_MODE: Hotkey for selecting next "Scanlines" option value
  • SCANLINE_TYPE: Hotkey for selecting next "Scanline type" option value
  • SCANLINE_INT+/-: Hotkeys for adjusting scanline strength
  • LINEMULT_PROC:
  • SAMP_PHASE+/-:
  • ZOOM:
  • PAN:
  • OSD:
  • PROFILE_LOAD:

Getting started

Once DExx-vd_isl has been attached to the development board and source and monitor are connected, power on the development board. A 480p test pattern should show up in the monitor. Turn on the video source and select correct input via remote and sync switch (refer to #AV1 (SCART) table).

The firmware has 2 primary operating modes: line multiplier and scaler. Line multiplier is reminiscent of classic line doublers and OSSC while scaler works more like video processors like VP50 or Framemeister. In general scaler mode offers more flexibility and easier usage via fixed output resolution and (optionally) fixed refresh rate. Some users may prefer to stay with strict multiplication to preserve the original look as much as possible, though. The mode can be switched from "Output opt -> Operating mode" on the menu. Main menu has matching sub-menus for each of the 2 operating modes which are accessible even if the said operating mode is not active. Most important picture processing settings are found under these sub-menus, refer to next section for mode details.

Settings

Input select

Selects the source.

AV1 video in opt.

Video LPF

Video low-pass filter. Filters out high-frequency noise on video.

  • Auto: Suitable LPF is automatically selected based on source mode [default]
  • 9-450MHz: Video bandwidth is limited to selected frequency

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

R/Pr / G/Y / B/Pb offset

Fine-adjustment of Red/Pr / G/Y / B/Pb channel offset (brightness).

  • 0-1023: [default=512]

R/Pr / G/Y / B/Pb gain

Fine-adjustment of Red/Pr / G/Y / B/Pb channel gain (contrast).

  • 0-1023: [default=324]

Clamp strength

Sets the strength of backporch clamp.

  • 0-7: [default=7]

Clamp/ALC position

Sets the position of backporch clamp (in percentage of line length).

  • 0.1-25%: [default=0.7%]

Clamp width

Sets the width of backporch clamp pulse (in percentage of line length).

  • 0.1-10%: [default=2.5%]

Clamp/ALC on coast

Sets whether clamp/ALC is enabled during coast.

  • On: Clamp/ALC enabled during coast. [default]
  • Off: Clamp/ALC disabled during coast.

Auto level ctl (ALC)

Sets whether ALC is enabled.

  • On: ALC enabled. [default]
  • Off: ALC disabled.

ALC V filter

ALV vertical filter coefficient. Reduce from default if line/field tilt occurs.

  • 32-4096 lines: [default=512 lines]

ALC H filter

ALV horizontal filter coefficient (duration for which ALC is applied after clamp).

  • 16-128 pixels: [default=16 pixels]

AV1 sync opt.

Analog sync Vth

Sets the sync slicer threshold for video-level sync. May need adjustment if source sync level is not typical and dropouts occur.

  • 0-300mV: threshold voltage. [default=120mV]

TTL Hsync Vth

Sets the sync slicer threshold for TTL level sync. May need adjustment if source sync level is not typical and dropouts occur.

  • 400-3205mV: threshold voltage. [default=1148mV]

Sync glitch filt len

Sets the sync glitch filter length. May need to be increased if there are glitches around sync pulses.

  • 37-592ns: filter length. [default=111ns]

H-PLL Pre-Coast

Defines when PLL coast (current freq. freeze) is activated.

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

H-PLL Post-Coast

Defines when PLL coast (current freq. freeze) is deactivated.

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

H-PLL Loop Gain

Adjusts loop gain of H-PLL which affects sampling clock stability. A higher value makes the PLL react fast to changes in hsync interval which may make sampling more accurate but at the cost of increased jitter in output pixel clock. A small value ensures best compatibility, but sync jitter in the source (e.g. SNES) may result to sampling jitter on nearby scanlines. Increase for sources with sync jitter if your display is able to tolerate jitter in output clock.

  • 0-3: [default=0]

Line multiplier opt

Line multiplier mode

Selects how line multiplier mode operates.

  • Pure: All lines are multiplied for output, operation like original OSSC. Mainly for backwards compatibility.
  • Adaptive: Visible lines are multiplied while amount of blanking lines is adjusted to match selected standard output resolution. [default]

Deinterlace mode

Selects how interlaced content is processed in line multiplier modes.

  • Bob: Displays fields one after another with even field being offset by half input line, resembling how interlaced content looks on a CRT. [default]
  • Noninterlace restore: Displays fields one after another without any offset by default. Useful for 240p games running in 480i (e.g. classic game collections).

NI restore Y offset

Offsets even field in noninterlace restore mode.

  • 0: No offset for even field. [default]
  • 1: Even field is offset by a full input line. Needed depending on field order of 240p->480i conversion.

256x240 aspect

Selects the output aspect for 256x240 sampling presets.

  • Pseudo 4:3 DAR: Integer-multiplication is handled so that target aspect is close to 4:3. [default]
  • 1:1 PAR: Maintains square pixel aspect ratio.

Pure LM opt.

Refer to OSSC#Output_opt..

Adaptive LM opt.

<input_mode> proc

Selects how <input_mode> is processed via output resolution and line multiplication factor.

<input_mode> mode

Selects a sampling preset for <input_mode>.

P-LM Adv. timing

Refer to OSSC#Advanced_timing_tweaker.

A-LM Adv. timing

Allows editing of sampling/output parameters. Sampling preset to edit (default is current mode) is changed via LEFT/RIGHT keys and selected via OK key which then opens editor menu.

Clock & Phase

Enter to fine-tune sampling clock and phase via arrow keys. Only for advanced users.

Size

Enter to adjust bounding box size for input signal (active area) via arrow keys. In scaler mode the active window is scaled to full screen (unless in integer scale mode), effectively enabling zooming in/out.

Position

Enter to adjust bounding box position for input signal via arrow keys.

Reset preset

Resets parameters of selected preset to default values.

Scaler opt.

Output resolution

Selects output resolution. Supported output refresh range is shown in braces.

  • 720x480 (60Hz): Standard 480p output supported by all HDTVs.
  • 720x576 (50Hz): Standard 576p output supported by most HDTVs.
  • 1280x720 (50-120Hz): Standard 720p output supported by majority of HDTVs.
  • 1280x1024 (60Hz): SXGA mode for 5:4 desktop monitors.
  • 1920x1080 (50-120Hz): Standard 1080p output supported by all modern HDTVs. DE10-Nano supports up to ~100Hz output with 1080p. [default]
  • 1600x1200 (60Hz): UXGA mode for 4:3 desktop monitors.
  • 1920x1200 (50-60Hz): WUXGA mode for 16:10 desktop monitors. Uses CVT timings (RB for 60Hz).
  • 1920x1440 (50-60Hz): 4:3 1440p mode for compatible displays. Uses CVT timings (RB for 60Hz). May not be stable on DE10-Nano.
  • 2560x1440 (50-60Hz): 16:9 1440p mode for compatible displays. Uses CVT-RB timings. May not be stable on DE10-Nano.

Framelock

Defines output refresh rate and how it is generated.

  • On: Output refresh rate is locked to input. Minimizes latency, but any interruption in input (e.g. video mode change) may temporarily break sync on output side. [default]
  • On (2x Hz): Output refresh rate is locked 2x input. Useful for BFI. Same conditions apply as above.
  • Off (closest Hz): Output refresh rate is not directly generated from input. Either 50Hz or 60Hz output is selected based on input and supported output resolution setting range.
  • Off (50Hz): Output refresh rate is not generated from input. Output is 50Hz if supported by the selected output resolution setting.
  • Off (60Hz): Output refresh rate is not generated from input. Output is 60Hz if supported by the selected output resolution setting.
  • Off (100Hz): Output refresh rate is not generated from input. Output is 100Hz if supported by the selected output resolution setting.
  • Off (120Hz): Output refresh rate is not generated from input. Output is 120Hz if supported by the selected output resolution setting.

Aspect ratio

Selects aspect ratio for the source. Currently display is assumed to have square PAR.

  • 4:3: Standard aspect ratio for most classic console and home computer sources. [default]
  • 16:9: Widescreen aspect ratio for consoles/games supporting widescreen.
  • 8:7: Special aspect ratio for square pixels with NES/SNES. Most useful with their respective sampling presets.
  • 1:1 source PAR: Source is assumed to have 1:1 pixel aspect ratio. Use only with non-generic sampling presets.
  • Full: Source is assumed to have same aspect ratio as selected output resolution, i.e. it will be scaled to fit screen both horizontally and vertically.

Scaling algorithm

Selects scaling algorithm/filter applied for the polyphase scaler engine. The engine supports edge-adaptive scaling which is able to use different filter for parts of the picture which are detected as edges. Edge-adaptive modes are denoted with '&' which is followed by the filter used for edge content.

  • Auto: Uses Nearest for low-res sources and Lanczos3_sharp for med/high-res. [default]
  • Integer (underscan): Integer scaling with underscan priority (in case a small part of picture would be otherwise cut). Mainly usable with non-generic sampling presets.
  • Integer (overscan): Integer scaling with overscan priority (in case a small part of picture would be otherwise letter/pillarboxed). Mainly usable with non-generic sampling presets.
  • Nearest: Nearest neighbor scaling algorithm. Most appropiate for 2D pixel graphics where more sophisticated filters may add noticeable blur / ringing.
  • Lanczos3: High-quality scaling algorithm suitable for general video material and 3D graphics.
  • Lanczos3_sharp: Sharpened version of Lanczos3 algorithm.
  • Lanczos3&3_sharp: Sharpened version only applied for edges.
  • Lanczos4: Similar to Lanczos3 but with reduced smoothening.
  • SL sharp: General scaling with scanlines applied during scaling. For most cases it's recommended to use post-processing #Scanline opt. instead.
  • Custom scaler1.txt: Scaler coefficients loaded from scaler1.txt file on SD card (Mister format).
  • Custom scaler2.txt: Scaler coefficients loaded from scaler2.txt file on SD card (Mister format).

Edge threshold

Sets edge-detection threahold for edge-adaptive scaling algorithms.

  • 0-255: [default=7]

Deinterlace mode

Selects the deinterlace mode for interlaced sources.

  • Bob: Displays fields one after another with even field being offset by half input line, resembling how interlaced content looks on a CRT. Works well with fast-moving content.
  • Weave: Interleaves lines from 2 adjacent fields. Good for static content.
  • Motion adaptive: . Uses Bob for moving areas of the picture and weave for static ones. [default]

Motion shift

Sets motion detection threshold for motion adaptive deinterlacer.

  • 0-7: [default=3]

240p/288p mode

Selects sampling preset for 240p/288p "15kHz" sources.

350-400p mode

Selects sampling preset for 350-400p "~24kHz" sources.

480i/576i mode

Selects sampling preset for 480i/576i "15kHz" interlaced sources.

480p mode

Selects sampling preset for 480p "31kHz" sources.

Adv. timing

Refer to #A-LM Adv. timing.

Output opt.

Operating mode

Selects operating mode of the device. Respective sub-menus under main menu have detailed options for each operating mode

  • Line multiplier: Operates in basic line multiplication mode. [default]
  • Scaler: Operates in more flexible scaler mode.

Test pattern mode

Selects video mode for test pattern. May be used to test display compatibility.

  • 240p...2560x1440_60: Output video mode. [default=480p]

TX mode

Sets the output TX mode.

  • HDMI (RGB Full): 24-bit full range RGB output with audio and auxiliary Infoframe packets. [default]
  • HDMI (RGB Limited): 24-bit limited range RGB output with audio and auxiliary Infoframe packets.
  • HDMI (YCbCr444): 24-bit YCbCr 4:4:4 (Rec. 601) output with audio and auxiliary Infoframe packets.
  • DVI: 24-bit full range RGB output. Required if target display does not support HDMI.

Audio opt.

Sampling format

Sets sampling format for analog audio input.

  • 24bit/48kHz: Standard format supported by all displays. [default]
  • 24bit/96kHz

Quad stereo

Generates multichannel LPCM audio output where stereo signal is copied into rear speakers.

  • Off: Standard 2.0 channel format. [default]
  • On (4.0): 4.0 channel format.
  • On (5.1): 5.1 channel format.
  • On (7.1): 7.1 channel format.

AV1 audio source

Selects audio source for AV1.

  • AV1 (analog): Analog audio via SCART. [default]
  • SPDIF: Digital audio via Toslink.

Scanline opt.

Scanlines

Controls whether emulated scanlines are drawn on top of the picture

  • Off: No scanlines drawn [default]
  • Auto: Horizontal scanlines are drawn for 240p/288p sources, alternating scanlines are enabled for 480i/576i, no scanlines for other sources
  • On: Scanlines are drawn for every source according to "Scanline type" option

Sl. strength

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

Sl. method

Selects the method how scanlines are generated.

  • Multiplication: Scanline is generated by multiplying source RGB value [default]
  • Subtraction: Scanline is generated by subtracting from source RGB value

Sl. LM Bob altern.

Controls whether scanline position alternates along with fields of Bob deinterlaced LM modes.

  • Off: Scanlines are always mapped to same output lines.
  • On: Position is tied to field which shows as alternating position in output. Useful for reducing flicker. [default]

Sl. alignment

  • Top: Scanline is drawn on top position of every group of output lines formed from a single input line. [default]
  • Bottom: Scanline is drawn on bottom position of every group of output lines formed from a single input line.

Scanline type

  • Horizontal: Scanline pattern is drawn on every N output lines (value of N depends on processing mode). [default]
  • Vertical: Scanline pattern is drawn on every M output column (value of M depends on processing mode).
  • Horiz. + Vert.: Combination of horizontal and vertical mode.
  • Custom: Scanlines are drawn accoring to line-wise and column-wise strength set under Custom Sl.

Custom Sl.

Enables separate setting of each overlay line and column (line strength takes priority on pixels where it is >0%).

H interval

Sets the horizontal interval (in output pixels) in which the column overlay pattern is repeated.

V interval

Sets the vertical interval (in output lines) in which the line overlay pattern is repeated.

Sub-line M str

Strength for Mth sub-line, 0% disables line overlay.

Sub-column N str

Strength for Nth sub-column, 0% disables column overlay.

Post-proc.

Mask color

Sets mask color

  • Black|Blue|Green|Cyan|Red|Magenta|Yellow|White: Mask color. [default=Black]

Mask brightness

Sets mask brightness (only effective is color is set to non-black). Could be used as a precaution with self-emissive displays to avoid uneven wear.

  • 0-15: Mask brightness level. [default=8]

BFI for 2x Hz

Enables black frame insertion feature for modes where output refresh rate is min. 2x of input. Reducing image persistence can be used to improve motion resolution at the cost of some flicker.

  • On: BFI enabled.
  • Off: BFI disabled. [default]

BFI strength

Sets the strength of BFI to trade off motion resolution for improved brightness / reduced flicker

  • 6-100%: Sets opaqueness of the black mask applied over a duplicated frame. [default=100%]

Settings

Initial input

Sets the input which is automatically activated when device is powered on. If "last used" is selected, id is saved every time input is switched (adding a minor delay) and is automatically selected next time the board is powered on. Test pattern is diplayed regardless of initial input setting until sync is detected on the respective input.

OSD

Selects whether OSD rendering is enabled and in which mode. When enabled, Navigation OSD is permanently visible when menu is active and a status OSD is temporarily displayed when input video mode changes.

  • Off: OSD is not displayed.
  • Full: Full OSD is displayed. [default]
  • Simple: Simple OSD is displayed.

OSD status display

Selects how long updated video parameters are shown on the status OSD.

  • 2s: status shown for 2 seconds.
  • 5s: status shown for 5 seconds. [default]
  • 10s: status shown for 10 seconds.
  • Off: Status is not displayed.

Bind IR remote

Learns keycodes from an IR remote. Press prompted function key on a new remote and confirm it by pressing the key again. Once all functions have been configured, new keymap settings are saved. Notes:

  • Any unused functions can be bound to a single unused key
  • If you entered a wrong key, press PCB KEY1 to go back to setup of previous function. Pressing KEY1 during setup of first function cancels setup of the new remote
  • The config function can be entered at power-on if PCB KEY0 is held down

Load profile

Loads selected profile slot from on-board flash. Slot 0 is loaded automatically at power-up. Not available on DE10-Nano.

Save profile

Saves profile into selected slot in on-board flash. Settings (i.e. contents of settings menu which are not part of a profile) are saved simultaneously. Not available on DE10-Nano.

SD Load profile

Loads selected profile slot from SD card. Slot 0 is loaded automatically at power-up on DE10-Nano.

SD Save profile

Saves profile into selected slot on SD card. Settings (i.e. contents of settings menu which are not part of a profile) are saved simultaneously on SD card.

Reset profile

Resets current profile to default values without saving it.

Firmware update

DE10-Nano

Check the existing firmware version by pressing INFO key on remote:

  • v0.58 or earlier: Write the firmware image on SD card as described in DExx-vd_isl#DE10-Nano
  • v0.59 or later: Eject the SD card and insert in into a computer. Replace DE10-Nano-vd_isl.rbf file on the filesystem with latest version.

Other boards

Program latest .jic file on the flash of the development board. Refer to board-specific READMEs in github for more details.

Firmware changelog and roadmap

v0.59

  • Added support for profiles on SD card

Older versions

v0.57

  • Initial release

Info for developers