Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions 3440x1440.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* 3440x1440 @60Hz (CVT-RB2)
* Modeline "3440x1440_60.00" 419.50 3440 3696 4064 4688 1440 1443 1453 1493 -hsync +vsync
*
* Uses edid.S as the base and marks display as digital.
*/

#define HSYNC_POL 0
#define VSYNC_POL 1

#define XPIX 3440
#define YPIX 1440
#define VFREQ 60
#define DPI 96
#define CLOCK 419500

#define VERSION 1
#define REVISION 3

/* Horizontal timing parameters */
#define XOFFSET 256
#define XPULSE 368
#define XBLANK 1248

/* Vertical timing parameters (absolute) */
#define YOFFSET 66
#define YPULSE 73
#define YBLANK 53

#define XY_RATIO XY_RATIO_16_9
#define TIMING_NAME "3440x1440"

/* Digital input override */
#define VIDEO_INPUT 0x80

#include "edid.S"

Binary file added 3440x1440.bin
Binary file not shown.
20 changes: 15 additions & 5 deletions edid.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@
#define ESTABLISHED_TIMING3_BITS 0x00
#endif

/* NEW (minimal, backward-compatible):
Allow per-mode override of the input byte.
Default remains 0x6d (analog) exactly as in the original. */
#ifndef VIDEO_INPUT
#define VIDEO_INPUT 0x6d
#endif

#define mfgname2id(v1,v2,v3) \
((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f))
#define swap16(v1) ((v1>>8)+((v1&0xff)<<8))
#define msbs2(v1,v2) ((((v1>>8)&0x0f)<<4)+((v2>>8)&0x0f))
/* FIX (bug in original): correctly pack the top 2 bits of each field */
#define msbs4(v1,v2,v3,v4) \
(((v1&0x03)>>2)+((v2&0x03)>>4)+((v3&0x03)>>6)+((v4&0x03)>>8))
(((((v1)>>8)&0x03)<<6)|((((v2)>>8)&0x03)<<4)|((((v3)>>8)&0x03)<<2)|(((v4)>>8)&0x03))
#define pixdpi2mm(pix,dpi) ((pix*25)/dpi)
#define xsize pixdpi2mm(XPIX,DPI)
#define ysize pixdpi2mm(YPIX,DPI)
Expand Down Expand Up @@ -90,7 +98,7 @@ revision: .byte REVISION /* EDID revision, usually 3 (for 1.3) */
Bit 1 Sync on green supported
Bit 0 VSync pulse must be serrated when somposite or
sync-on-green is used. */
video_parms: .byte 0x6d
video_parms: .byte VIDEO_INPUT /* was 0x6d (unchanged by default) */

/* Maximum horizontal image size, in centimetres
(max 292 cm/115 in at 16:9 aspect ratio) */
Expand Down Expand Up @@ -200,9 +208,10 @@ y_msbs: .byte msbs2(YPIX,YBLANK)
x_snc_off_lsb: .byte XOFFSET&0xff
/* Horizontal sync pulse width pixels 8 lsbits (0-1023) */
x_snc_pls_lsb: .byte XPULSE&0xff
/* Bits 7-4 Vertical sync offset lines 4 lsbits -63)
Bits 3-0 Vertical sync pulse width lines 4 lsbits -63) */
y_snc_lsb: .byte ((YOFFSET-63)<<4)+(YPULSE-63)
/* Bits 7-4: Vertical sync offset (2 LSBs)
Bits 3-0: Vertical sync width (2 LSBs)
FIX: use masked packing to avoid negative wrap warnings. */
y_snc_lsb: .byte (((YOFFSET)&0x3f)<<4)|((YPULSE)&0x3f)
/* Bits 7-6 Horizontal sync offset pixels 2 msbits
Bits 5-4 Horizontal sync pulse width pixels 2 msbits
Bits 3-2 Vertical sync offset lines 2 msbits
Expand Down Expand Up @@ -270,3 +279,4 @@ end3: .byte 0x0a /* End marker */
.fill 12-(end3-start3), 1, 0x20 /* Padded spaces */
extensions: .byte 0 /* Number of extensions to follow */
checksum: .byte CRC /* Sum of all bytes must be 0 */