First Stage Timing Updates

Changed generation of PIX_CLK.  It is no longer CLK_14, instead it is created in coco3video_mister and pushed outward. (as it should be).  Video1.stp is for watching the video signals.
The ability of using a old GIMEX video file has been removed as a feature.
This commit is contained in:
shodge12 committed 2026-01-13 23:54:33 -05:00
1 parent 0cc97c86d9
commit 77ee8b8c8c
9 files changed
+398 -3493

No files matched your search

+28 -9
View File
@@ -88,6 +88,7 @@ HSYNC_N,
VSYNC_N,
HBLANKING,
VBLANKING,
VBLANK_PRIME,
// RAM / Buffer
RAM_ADDRESS,
@@ -128,7 +129,8 @@ art
);
input MASTER_CLK;
input PIX_CLK;
output PIX_CLK;
reg PIX_CLK;
input RESET_N;
output [9:0] COLOR;
@@ -138,6 +140,8 @@ reg HSYNC_N;
output VSYNC_N;
output HBLANKING;
reg HBLANKING;
output VBLANK_PRIME;
reg VBLANK_PRIME;
output VBLANKING;
reg VBLANKING;
@@ -169,7 +173,7 @@ input PHASE;
input SWITCH;
output [10:0] ROM_ADDRESS;
input [7:0] ROM_DATA1;
input [7:0] ROM_DATA1;
output HBORDER;
output VBORDER;
output HBORDER_INT;
@@ -237,7 +241,7 @@ wire [8:0] BUF_ADD_BASE;
//reg [353:0] VSYNC_DELAY;
//reg VBLANKING;
//wire [3:0] SG_VLPR;
reg [139:0] VSYNC_DELAY;
//reg [139:0] VSYNC_DELAY;
reg VBORDER;
reg VSYNC_FLAG;
reg HBORDER_DELAY;
@@ -1785,6 +1789,15 @@ HBlanking has to be 1 for border
HBORDER has to be 1 for main display
HBlanking has to be 0 for main display
******************************************************************************/
always @ (posedge MASTER_CLK)
begin
reg [1:0] div;
PIX_CLK <= 1'b0;
div <= div + 1'b1;
if ((div == 2'd1) || (div == 2'd2))
PIX_CLK <= 1'b1;
end
always @ (negedge MASTER_CLK)
if(PIX_CLK == 1'b0 && PIX_CLK_DELAY == 1'b1)
begin
@@ -1820,6 +1833,10 @@ always @ (negedge MASTER_CLK)
11'd724: // End of right border 720 + 44 - 1 (+ 64) start of back porch
begin
HBORDER <= 1'b0; // 736 - 28
if (LINE == 9'd262)
VBLANK_PRIME <= 1'b0;
if (LINE == 9'd5)
VBLANK_PRIME <= 1'b1;
PIXEL_COUNT <= 11'd725;
end
@@ -1927,12 +1944,14 @@ assign SG6 = VLPR[3:2];
* Generate clock for VSYNC_N by
* Delaying VSYNC_FLAG by 137 pixels
*************************************/
assign VSYNC_N = VSYNC_DELAY[137];
always @ (negedge MASTER_CLK)
if(PIX_CLK == 1'b0 && PIX_CLK_DELAY == 1'b1)
begin
VSYNC_DELAY <= {VSYNC_DELAY[138:0], VSYNC_FLAG};
end
//assign VSYNC_N = VSYNC_DELAY[137];
//always @ (negedge MASTER_CLK)
// if(PIX_CLK == 1'b0 && PIX_CLK_DELAY == 1'b1)
// begin
// VSYNC_DELAY <= {VSYNC_DELAY[138:0], VSYNC_FLAG};
// end
assign VSYNC_N = VSYNC_FLAG;
/*****************************************************************************
* Keeps track of how many lines are in each row.
File diff suppressed because it is too large. Load diff
+6 -71
View File
@@ -3807,7 +3807,7 @@ end
* Video
******************************************************************************/
assign PIX_CLK = CLK_14;
//assign PIX_CLK = CLK_14;
wire PIX_CLK_D;
@@ -3817,8 +3817,10 @@ wire PIX_CLK_D;
// The VBOARDER is used as a VBLANK as is [inverted]
reg [3:0] MISTER_HBLANK_D;
assign HBLANK = MISTER_HBLANK_D[1]; // This is 2 clock delay on the ~HBORDER...
assign VBLANK = ~VBORDER;
assign HBLANK = MISTER_HBLANK_D[2]; // This is 2 clock delay on the ~HBORDER...
//assign VBLANK = ~VBORDER;
wire VBLANK_PRIME;
assign VBLANK = ~VBLANK_PRIME;
assign RED[3:0] = RED[7:4];
assign GREEN[3:0] = GREEN[7:4];
@@ -3888,7 +3890,6 @@ wire VBLANK_1;
wire HBLANK_1;
wire double, buff_bank;
`ifndef CoCo3_Select_GIMEX_RAST
// Video timing and modes
COCO3VIDEO MISTER_COCOVID(
// Clocks / RESET
@@ -3902,6 +3903,7 @@ COCO3VIDEO MISTER_COCOVID(
.VSYNC_N(V_SYNC_N),
.HBLANKING(HBLANK_1),
.VBLANKING(VBLANK_1),
.VBLANK_PRIME(VBLANK_PRIME),
// RAM / Buffer
.RAM_ADDRESS(VIDEO_ADDRESS),
@@ -3953,73 +3955,6 @@ COCO3VIDEO MISTER_COCOVID(
.art(SWITCH[7:6])
);
`else
wire [9:0] BUFF_ADD_temp;
assign BUFF_ADD = BUFF_ADD_temp[8:0];
COCO3VIDEO_GIMEX MISTER_COCOVID(
// Clocks / RESET
.PIX_CLK(PIX_CLK), //14.32 MHz = 69.3 nS
.RESET_N(RESET_N),
.COLOR(COLOR),
.HSYNC_N(H_SYNC_N),
.VSYNC_N(V_SYNC_N),
// RAM / Buffer
.BUFF_ADD_F(BUFF_ADD_temp),
.RAM_ADD(VIDEO_ADDRESS),
.RAM_DATA(BUFF_DATA),
// Mode Selection
.COCO1(COCO1),
.V(V),
.BP(GRMODE),
.VERT(VERT),
.VID_CONT(VDG_CONTROL),
.CSS(CSS),
.LPF(LPF),
.VERT_FIN_SCRL(VERT_FIN_SCRL),
.HLPR(HLPR),
.LPR(LPR),
.HRES(HRES),
.CRES(CRES),
.HVEN(HVEN),
// Starting location
.SCRN_START_HSB(SCRN_START_HSB), // 2 extra bits for 2MB screen start
.SCRN_START_MSB(SCRN_START_MSB),
.SCRN_START_LSB(SCRN_START_LSB),
.SWITCH(SWITCH[5]),
.BLINK(BLINK),
.ARTI(SWITCH[7:6]),
.PHASE(PHASE),
.HBORDER(HBORDER),
.VBORDER(VBORDER),
// Interrupts
`ifdef CoCo3_Horz_INT_FIX
.HBORDER_INT(HBORDER_INT),
`endif
`ifdef CoCo3_Vert_INT_FIX
.VBORDER_INT(VBORDER_INT),
`endif
// .DOUBLE(double),
// .BUFF_BANK(buff_bank),
.TURBO(1'b0),
.SDRate(1'b0),
.ROM_ADDRESS(font_adrs),
.ROM_DATA1(font_data)
);
`endif
parameter SHDOW_FONT_LOCK_REG = 16'hfff0;
parameter SHDOW_FONT_DATA_REG = 16'hfff1;
+2 -2
View File
@@ -101,7 +101,7 @@ localparam [7:0] FEATURE_8 = 8'h80;
`define CoCo3_disable_GART_in_GIMEX
`define Feat_6
// `set_feature(CoCo3_Select_GIMEX_RAST,Feat_7) // Use GIMEX Rasterizer Engine
// `define CoCo3_Select_GIMEX_RAST
// `set_feature(,Feat_7) // Open Feature
// `define New_Feature...
// `define Feat_7