mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-01-26 20:01:48 +00:00
ntsc mode fix
This commit is contained in:
@@ -272,24 +272,6 @@ always @(posedge clk) begin
|
||||
else dma_irqD <= dma_irq;
|
||||
|
||||
|
||||
// ST default for most aer bits is 0 (except I2/CTS)
|
||||
// since the irq polarity is inverted over normal ST
|
||||
// interrupts we'll invert the irq signal if a aer bit
|
||||
// is 1
|
||||
|
||||
if(aer[3]) blitter_irqD <= !blitter_irq;
|
||||
else blitter_irqD <= blitter_irq;
|
||||
|
||||
`ifndef CUBHACK
|
||||
if(aer[4]) acia_irqD <= !acia_irq;
|
||||
else acia_irqD <= acia_irq;
|
||||
`endif
|
||||
|
||||
// the polarity of the irq is negated over a real st.
|
||||
if(aer[5]) dma_irqD <= !dma_irq;
|
||||
else dma_irqD <= dma_irq;
|
||||
|
||||
|
||||
dma_irqD2 <= dma_irqD;
|
||||
blitter_irqD2 <= blitter_irqD;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// http://code.google.com/p/mist-board/
|
||||
//
|
||||
// Copyright (c) 2013 Till Harbaum <till@harbaum.org>
|
||||
// Modified by Juan Carlos González Amestoy.
|
||||
//
|
||||
// This source file is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
@@ -19,18 +20,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// original atari video timing
|
||||
// mono color
|
||||
// pclk 32MHz 16/8MHz
|
||||
// hfreq 35.7kHz 15.75kHz
|
||||
// vfreq 71.2Hz 50/60Hz
|
||||
//
|
||||
// avg. values derived from frequencies:
|
||||
// hdisp 640 640/320
|
||||
// htot 896 1015/507
|
||||
// vdisp 400 200
|
||||
// vtot 501 315/262
|
||||
|
||||
// TODO:
|
||||
// - async timing
|
||||
|
||||
@@ -38,8 +27,8 @@
|
||||
// Overscan:
|
||||
// http://codercorner.com/fullscrn.txt
|
||||
|
||||
// Examples: automation 000 + 001: bottom border
|
||||
// automation 097: top+ bottom border
|
||||
// Examples: automation 000, 001, 097: bottom border
|
||||
// automation 168: top + bottom border
|
||||
|
||||
module video (
|
||||
// system interface
|
||||
|
||||
@@ -23,6 +23,18 @@
|
||||
// http://martin.hinner.info/vga/timing.html
|
||||
// http://www.epanorama.net/faq/vga2rgb/calc.html
|
||||
|
||||
// original atari video timing
|
||||
// mono color
|
||||
// pclk 32MHz 16/8MHz
|
||||
// hfreq 35.7kHz 15.75kHz
|
||||
// vfreq 71.2Hz 50/60Hz
|
||||
//
|
||||
// avg. values derived from frequencies:
|
||||
// hdisp 640 640/320
|
||||
// htot 896 1015/507
|
||||
// vdisp 400 200
|
||||
// vtot 501 315/262
|
||||
|
||||
module video_modes (
|
||||
inout mono, // select monochrome mode (and not color)
|
||||
input pal, // select pal mode (and not ntsc) if a color mode is selected
|
||||
@@ -39,7 +51,8 @@ localparam H_ACT = 10'd640;
|
||||
localparam V_ACT = 10'd400;
|
||||
|
||||
// TIMING CONSTRAINTS:
|
||||
// The total width (act+both blank+2*border+sync) must be a multiple of 16
|
||||
// The total width (act+both blank+2*border+sync) must be a multiple of 16, for
|
||||
// low rez a multiple of 32
|
||||
// For modes to be used with the scan doubler the total heigth (act+both blank+
|
||||
// 2*border+sync) must be a multiple of 4
|
||||
|
||||
@@ -47,14 +60,15 @@ localparam V_ACT = 10'd400;
|
||||
// ----------------------------- pal56 timing -------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// PAL modes need ~80 pixels vertical border for border removal
|
||||
// 34.21 kHz / 55.9 Hz
|
||||
|
||||
wire [121:0] pal56_config_str;
|
||||
|
||||
conf pal56_conf(
|
||||
// front porch sync width back porch border width sync polarity
|
||||
.h_fp ( 10'd44), .h_s (10'd120), .h_bp ( 10'd44), .h_bd (10'd40), .h_sp (1'b1),
|
||||
.v_fp ( 10'd64), .v_s ( 10'd4), .v_bp ( 10'd64), .v_bd (10'd40), .v_sp (1'b1),
|
||||
.h_fp ( 10'd44), .h_s (10'd120), .h_bp ( 10'd44), .h_bd (10'd40), .h_sp (1'b1),
|
||||
.v_fp ( 10'd24), .v_s ( 10'd4), .v_bp ( 10'd24), .v_bd (10'd80), .v_sp (1'b1),
|
||||
.str (pal56_config_str)
|
||||
);
|
||||
|
||||
@@ -67,7 +81,7 @@ wire [121:0] pal50_config_str;
|
||||
conf pal50_conf(
|
||||
// front porch sync width back porch border width sync polarity
|
||||
.h_fp ( 10'd80), .h_s ( 10'd40), .h_bp (10'd152), .h_bd (10'd40), .h_sp (1'b1),
|
||||
.v_fp ( 10'd77), .v_s ( 10'd3), .v_bp ( 10'd76), .v_bd (10'd40), .v_sp (1'b1),
|
||||
.v_fp ( 10'd37), .v_s ( 10'd3), .v_bp ( 10'd36), .v_bd (10'd80), .v_sp (1'b1),
|
||||
.str (pal50_config_str)
|
||||
);
|
||||
|
||||
@@ -75,14 +89,14 @@ conf pal50_conf(
|
||||
// ------------------------------ ntsc timing -------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// 32.01 kHz / 60.16 Hz
|
||||
// 31.01 kHz / 59.63 Hz
|
||||
|
||||
wire [121:0] ntsc_config_str;
|
||||
|
||||
conf ntsc_conf(
|
||||
// front porch sync width back porch border width sync polarity
|
||||
.h_fp ( 10'd76), .h_s (10'd120), .h_bp ( 10'd76), .h_bd (10'd40), .h_sp (1'b1),
|
||||
.v_fp ( 10'd24), .v_s ( 10'd3), .v_bp ( 10'd25), .v_bd (10'd40), .v_sp (1'b1),
|
||||
.h_fp ( 10'd88), .h_s (10'd120), .h_bp ( 10'd96), .h_bd (10'd40), .h_sp (1'b0),
|
||||
.v_fp ( 10'd18), .v_s ( 10'd3), .v_bp ( 10'd19), .v_bd (10'd40), .v_sp (1'b0),
|
||||
.str (ntsc_config_str)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user