fdivitto / FabGL

ESP32 Display Controller (VGA, PAL/NTSC Color Composite, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal
http://www.fabglib.org
Other
1.4k stars 205 forks source link

Modeline for 1024x600 display #277

Open drtjs opened 1 year ago

drtjs commented 1 year ago

Hi Fabrizio,

I'd love to attach one of my 7 inch 1024x600 TFT displays to my VGA32_1.4 and utilize the native resolution, but it seems I can't :-(

Unfortunately, there is no corresponding predefined modeline entry in fabglconf.h. So I tried several modeline parameter sets I could find in various corners of the internet, but I wasn't lucky: The Display didn't sync to any of these parameter sets while it synced easily to other prdefined resolutions. I then attached the display to an old Dell Latitude 6320 running a slightly aged new copy of System Rescue (SystemRescueCD). SysRecCD immediately detected the display and configured it properly using the display's native resolution. Based on the output of xrandr --verbose on the Latitude notebook I generated a new modeline: Modeline "1024x600@60Hz" 49 1024 1041 1185 1312 600 601 604 624 +HSync +VSync I added this to fabglconf.h and a corresponding entry to ModelineStudio. This time I was partially successful: ModelineStudio output for this entry:

Modeline "1024x600@60Hz" 49 1024 1041 1185 1312 600 601 604 624 +HSync +VSync VisibleBegins moveScreen(-1, 0) Screen size : 1024 x 600 Viewport size : 1024 x 600 Free memory (total, min, largest): 208576, 174416, 110580

1024x600_60Hz

It takes several tens of seconds to achieve a very flickery sync as can be seen in the picture included above.

I' m afraid I'm lost. Any ideas w.r.t. what is going wrong, here? Are there any fundamental problems I' not aware of? In case there is hope ;-) I would be happy to provide additional information or perform tests...

All the best and carry with this great project,

Thomas

avalonbits commented 1 year ago

hey there, I've been playing with modelines as well and found a few websites that helped me. You can try out the follwing:

https://tomverbeure.github.io/video_timings_calculator shows gives Modeline "1024x600_60" 40.936 1024 1032 1064 1104 600 604 612 618 +HSync -VSync

https://arachnoid.com/modelines/index.html gives me Modeline "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync

Try those out and see if they work.

tsacks commented 1 year ago

I have a dang similar screen with the same resolution, and am running into the same issue. Busted out an old laptop with VGA that I could boot linux on, to see if I could see what Modeline it's using to run the output, and ended up with these settings, very close to yours:

"1024x600@59.85" 49 1024 1040 1184 1312 600 601 604 624 +HSync +VSync

It's still doing the wobbly thing

tsacks commented 1 year ago

Just to add some info to this one, I pulled the EDID data from the monitor over the VGA port, and those are definitely the timings that it's reporting should be using. At least, if my math checks out.

Decoded EDID data:

Detailed Timing Descriptor
Pixel Clock: 49MHz
Horizontal Active: 1024
Horizontal Blanking: 288
Vertical Active: 600
Vertical Blanking: 24
Horizontal Sync Offset: 16
Horizontal Sync Pulse: 144
Vertical Sync Offset: 1
Vertical Sync Pulse: 3
Horizontal Display Size: 337
Vertical Display Size: 270
Horizontal Border: 0
Vertical Border: 0
Interlaced: false
Stereo Mode: 0
Sync Type: 3

2-Way Line-Interleaved Stereo: false

Raw EDID data:

00ffffffffffff006a991019502d3101
0a17010308211b78eaeea69e544c9926
194f54afcf0061400101010101010101
01010101010124130020415818201090
1300510e1100001e000000fc004c4d31
3731302028564741290a000000fd0037
4c1e510e000a202020202020000000ff
0032303030303038300a2020202001eb
00ffffffffffff006a991019502d3101
0a17010308211b78eaeea69e544c9926
194f54afcf0061400101010101010101
01010101010124130020415818201090
1300510e1100001e000000fc004c4d31
3731302028564741290a000000fd0037
4c1e510e000a202020202020000000ff
0032303030303038300a2020202001eb