MiSTer-devel / Main_MiSTer

Main MiSTer binary and Wiki
GNU General Public License v3.0
3.06k stars 332 forks source link

MiSTer not working on modern Sony laser projector #307

Closed limi closed 1 year ago

limi commented 3 years ago

Trying to get MiSTer to work with a portable laser projector, the Sony MP-CL1A.

Background: It’s a very interesting projector with zero motion blur (similar to CRT), no image retention, always perfect focus (LASERS!), and comes in a portable package that can run off a 5V USB and also has a built-in battery — making it a potentially great travel companion for the MiSTer, and also as something that could be built into a case, obviating the need to carry a display.

This one has me (and quite a few members of the Classic Gaming MiSTer Discord server) stumped.

The basics:

image

I ran through all the pre-defined resolutions, and here are the ones that work:

; 0 - 1280x720@60 — No
; 1 - 1024x768@60 — No
; 2 - 720x480@60 — Yes
; 3 - 720x576@50 — Yes
; 4 - 1280x1024@60 — No
; 5 - 800x600@60 — No
; 6 - 640x480@60 — Yes
; 7 - 1280x720@50 — No
; 8 - 1920x1080@60 — Yes, but colors reversed(!)
; 9 - 1920x1080@50 — Yes, but colors reversed(!)
;10 - 1366x768@60 — No
;11 - 1024x600@60 — No
;12 - 1920x1440@60 — No
;13 - 2048x1536@60 — No `

When running the 240p test suite in e.g. 1920×1080, the scrolling is smooth in vsync_adjust=2, so vsync does not appear to be the issue. I did try vsync_adjust=0 when I started out to ensure maximum compatibility, but it does not seem to make a difference in any of the resolutions listed above.

Using the tool that Grabulosaure has made to dump the EDID info, I collected the following on what the Sony MP-CL1A supports:

EDID version: 1.3
Manufacturer: SNY Model 5804 Serial Number 1
Digital display
Maximum image size: 160 cm x 90 cm
Gamma: 2.20
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.6250, 0.3398
  Green: 0.2802, 0.5947
  Blue:  0.1552, 0.0703
  White: 0.2832, 0.2978
Established timings supported:
  640x480@60Hz 4:3 HorFreq: 31469 Hz Clock: 25.175 MHz
Standard timings supported:
  1920x1080@60Hz 16:9
  1280x720@60Hz 16:9
  640x480@60Hz 4:3 HorFreq: 31469 Hz Clock: 25.175 MHz
Detailed mode: Clock 74.250 MHz, 1600 mm x 900 mm
               1280 1390 1430 1650 hborder 0
                720  725  730  750 vborder 0
               +hsync +vsync 
               VertFreq: 60 Hz, HorFreq: 45000 Hz
Monitor name: MP-CL1A
Monitor ranges (GTF): 24-85Hz V, 14-70kHz H, max dotclock 160MHz
Manufacturer-specified data, tag 0
Has 1 extension blocks
Checksum: 0x5b (valid)

----------------

CTA Extension Block
Extension version: 3
Basic audio support
Supports YCbCr 4:4:4
Supports YCbCr 4:2:2
1 native detailed modes

27 bytes of CTA data
  Video Data Block
    VIC   1 640x480@60Hz 4:3  HorFreq: 31469 Hz Clock: 25.175 MHz
    VIC   3 720x480@60Hz 16:9  HorFreq: 31469 Hz Clock: 27.000 MHz
    VIC   4 1280x720@60Hz 16:9 (native) HorFreq: 45000 Hz Clock: 74.250 MHz
    VIC   5 1920x1080i@60Hz 16:9  HorFreq: 33750 Hz Clock: 74.250 MHz
    VIC  16 1920x1080@60Hz 16:9  HorFreq: 67500 Hz Clock: 148.500 MHz
    VIC  18 720x576@50Hz 16:9  HorFreq: 31250 Hz Clock: 27.000 MHz
    VIC  19 1280x720@50Hz 16:9  HorFreq: 37500 Hz Clock: 74.250 MHz
    VIC  20 1920x1080i@50Hz 16:9  HorFreq: 28125 Hz Clock: 74.250 MHz
    VIC  31 1920x1080@50Hz 16:9  HorFreq: 56250 Hz Clock: 148.500 MHz
    VIC  34 1920x1080@30Hz 16:9  HorFreq: 33750 Hz Clock: 74.250 MHz
  Audio Data Block
    Linear PCM, max channels 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block
    Speaker map:
      FL/FR - Front Left/Right
  Vendor-Specific Data Block, OUI 000c03 (HDMI)
    Source physical address 1.0.0.0
    Supports_AI
    Maximum TMDS clock: 150MHz

Detailed mode: Clock 148.500 MHz, 1600 mm x 900 mm
               1920 2008 2052 2200 hborder 0
               1080 1084 1089 1125 vborder 0
               +hsync +vsync 
               VertFreq: 60 Hz, HorFreq: 67500 Hz
Detailed mode: Clock 74.250 MHz, 1600 mm x 900 mm
               1920 2008 2052 2200 hborder 0
                540  542  547  562 vborder 0
               +hsync +vsync interlaced 
               VertFreq: 60 Hz, HorFreq: 33750 Hz
Detailed mode: Clock 74.250 MHz, 1600 mm x 900 mm
               1920 2448 2492 2640 hborder 0
                540  542  547  562 vborder 0
               +hsync +vsync interlaced 
               VertFreq: 50 Hz, HorFreq: 28125 Hz
Detailed mode: Clock 74.250 MHz, 1600 mm x 900 mm
               1280 1390 1430 1650 hborder 0
                720  725  730  750 vborder 0
               +hsync +vsync 
               VertFreq: 60 Hz, HorFreq: 45000 Hz
Detailed mode: Clock 27.000 MHz, 1600 mm x 900 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync 
               VertFreq: 59 Hz, HorFreq: 31468 Hz
Checksum: 0x2 (valid)

I have tried a bunch of custom video_modes, as documented here, but none of them work for the native 720p resolution.

Is there anything else I can do to resolve this?

sorgelig commented 3 years ago

It's very specific to this projector. You may try to use PC with 1280x720, and if it will work, then try to find exact video parameters video card is using and then convert it to custom video mode parameters. Only experiments can tell more what is wrong.

limi commented 3 years ago

Does anyone have tips on tools to use on the Windows or Mac side to get this information? I did try MonitorInfoView, but it doesn’t seem to get very in-depth compared to the EDID tool that Grabulosaure supplied.

image

Happy to do the work to figure it out, but I am not super experienced with what data matters when trying to make a working video_mode for the MiSTer. What information am I looking for from the Windows/Mac side?

limi commented 3 years ago

And for completeness, this is the video_mode I was recommended based on the EDID line for the native resolution:

VIC 4 1280x720@60Hz 16:9 (native) HorFreq: 45000 Hz Clock: 74.250 MHz

which should become:

video_mode=1280,110,40,220,720,5,5,20,74250

…but it didn’t seem to work.

sorgelig commented 3 years ago

I'm not an expert in getting info from video card settings. EDID string you shown isn't enough to get required settings.

limi commented 3 years ago

Connected the projector to a laptop and booted Linux on it, here’s the xrandr output:

$ xrandr --verbose

<<<removed irrelevant outputs>>>

HDMI-1 connected 1280x720+1366+0 (0x17f) normal (normal left inverted right x axis y axis) 1600mm x 900mm
    Identifier: 0x44
    Timestamp:  392802
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 1.0
    Clones:    
    CRTC:       1
    CRTCs:      0 1 2
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    _MUTTER_PRESENTATION_OUTPUT: 0 
    EDID: 
        00ffffffffffff004dd9045801000000
        ff1a010380a05a780a0dc9a057479827
        12484c200000d1c081c0314001010101
        010101010101011d007251d01e206e28
        550040846300001e000000fc004d502d
        434c31410a2020202020000000fd0018
        550e4610000a20202020202000000000
        0000000000000000000000000000015b
        02031f714a01038405101213141f2223
        0907078301000067030c001000801e02
        3a801871382d40582c45004084630000
        1e011d8018711c1620582c2500408463
        00009e011d80d0721c1620102c258040
        846300009e011d007251d01e206e2855
        0040846300001e8c0ad08a20e02d1010
        3e960040846300001800000000000002
    max bpc: 12 
        range: (8, 12)
    content type: No Data 
        supported: No Data, Graphics, Photo, Cinema, Game
    Colorspace: Default 
        supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
    aspect ratio: Automatic 
        supported: Automatic, 4:3, 16:9
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 74 
        supported: 74
    non-desktop: 0 
        range: (0, 1)
  1280x720 (0x17f) 74.250MHz +HSync +VSync *current +preferred
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1920x1080 (0x180) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
  1920x1080 (0x181) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
  1920x1080 (0x182) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
  1920x1080i (0x183) 74.250MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.75KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  60.00Hz
  1920x1080i (0x184) 74.250MHz +HSync +VSync Interlace
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  28.12KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  50.00Hz
  1920x1080 (0x185) 74.250MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.75KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  30.00Hz
  1920x1080i (0x186) 74.176MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.72KHz
        v: height 1080 start 1084 end 1094 total 1125           clock  59.94Hz
  1920x1080 (0x187) 74.176MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.72KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  29.97Hz
  1280x720 (0x188) 74.250MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
        v: height  720 start  725 end  730 total  750           clock  50.00Hz
  1280x720 (0x189) 74.176MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
        v: height  720 start  725 end  730 total  750           clock  59.94Hz
  720x576 (0x18a) 27.000MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
        v: height  576 start  581 end  586 total  625           clock  50.00Hz
  720x480 (0x18b) 27.027MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
        v: height  480 start  489 end  495 total  525           clock  60.00Hz
  720x480 (0x18c) 27.000MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
        v: height  480 start  489 end  495 total  525           clock  59.94Hz
  640x480 (0x18d) 25.200MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
        v: height  480 start  490 end  492 total  525           clock  60.00Hz
  640x480 (0x6d) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
sorgelig commented 3 years ago

try this:

video_mode=1280,110,40,220,720,5,5,20,74250
sorgelig commented 3 years ago

hmm.. it equals to standard 1280x720 mode used by MiSTer. If it doesn't work then your projector doesn't like something else.

limi commented 3 years ago

Indeed, it does look like the standard 720p definition.

I also tried the 59.94Hz variant: video_mode=1280,110,40,220,720,5,5,20,74176

…but no luck. What else could it be? So strange that it works on literally everything I plug it into, but not the DE-10 nano.

sorgelig commented 3 years ago

No idea. 1280x720 mode works everywhere i plug MiSTer.

wickerwaka commented 1 year ago

It's possible, though unlikely, that it is sensitive to sync polarity. Try:

video_mode=1280,720,60,+hsync,+vsync

Or some other modelines with +hsync,+vsync at the end.

limi commented 1 year ago

Great, thanks for the suggestion! I don't have access to the device for a while, but will definitely try that once I do.