Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 640x400 @ 70Hz mode #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ extern const scanvideo_mode_t vga_mode_160x120_60; // 3d monster maze anyone :-)
extern const scanvideo_mode_t vga_mode_213x160_60;
extern const scanvideo_mode_t vga_mode_320x240_60;
extern const scanvideo_mode_t vga_mode_640x480_60;

extern const scanvideo_mode_t vga_mode_320x200_70;
extern const scanvideo_mode_t vga_mode_640x400_70;

extern const scanvideo_mode_t vga_mode_800x600_54;
extern const scanvideo_mode_t vga_mode_800x600_60;
extern const scanvideo_mode_t vga_mode_1024x768_63;
Expand Down
49 changes: 46 additions & 3 deletions src/common/pico_scanvideo/vga_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,13 @@ const scanvideo_timing_t vga_timing_640x480_60_default =
.v_active = 480,

.h_front_porch = 16,
.h_pulse = 64,
.h_pulse = 64, // spec says 96 ?
.h_total = 800,
.h_sync_polarity = 1,

.v_front_porch = 1,
.v_front_porch = 1, // spec says 10 ?
.v_pulse = 2,
.v_total = 523,
.v_total = 523, // spec says 525 ?
.v_sync_polarity = 1,

.enable_clock = 0,
Expand Down Expand Up @@ -481,6 +481,49 @@ const scanvideo_mode_t vga_mode_640x480_60 =
.yscale = 1,
};

const scanvideo_timing_t vga_timing_640x400_70_default =
{
.clock_freq = 25000000, // 25.175MHz

.h_active = 640,
.v_active = 400,

.h_front_porch = 16,
.h_pulse = 96,
.h_total = 800,
.h_sync_polarity = 1,

.v_front_porch = 3, // vs 12
.v_pulse = 2,
.v_total = 446, // 449 * 800 * 70 / 25.175M 0.9987 vs 446 * 800 * 70 / 25 000 000 = .99904
.v_sync_polarity = 0, // note opposite polarity

.enable_clock = 0,
.clock_polarity = 0,

.enable_den = 0
};

const scanvideo_mode_t vga_mode_320x200_70 =
{
.default_timing = &vga_timing_640x400_70_default,
.pio_program = &video_24mhz_composable,
.width = 320,
.height = 200,
.xscale = 2,
.yscale = 2,
};

const scanvideo_mode_t vga_mode_640x400_70 =
{
.default_timing = &vga_timing_640x400_70_default,
.pio_program = &video_24mhz_composable,
.width = 640,
.height = 400,
.xscale = 1,
.yscale = 1,
};

/* Requires 130Mhz system clock, but standard XGA mode */
const scanvideo_timing_t vga_timing_1024x768_60_default =
{
Expand Down