changed CRT timing

This commit is contained in:
Steven Hugg 2018-01-07 16:57:17 -06:00
parent eb3a1164fa
commit 45756f682d
4 changed files with 11 additions and 9 deletions

View File

@ -5,7 +5,8 @@
"dependencies": {},
"devDependencies": {
"mocha": "^3.2.0",
"mocha-phantomjs": "^4.1.0"
"mocha-phantomjs": "^4.1.0",
"wavedrom-cli": "^0.5.0"
},
"description": "8bitworkshop.com",
"main": "main.js",

View File

@ -13,7 +13,7 @@ module ball_paddle_top(clk, reset, hsync, vsync, rgb);
reg [8:0] ball_htimer;
reg [8:0] ball_vtimer;
reg [8:0] ball_horiz_stop = 209;
reg [8:0] ball_horiz_stop = 204;
reg [8:0] ball_horiz_move = -2;
reg [8:0] ball_vert_stop = 251;
reg [8:0] ball_vert_move = 2;

View File

@ -13,9 +13,9 @@ module hvsync_generator(
// constant declarations for TV-simulator sync parameters
localparam H_DISPLAY = 256; // horizontal display area
localparam H_L_BORDER = 16; // horizontal left border
localparam H_R_BORDER = 16; // horizontal right border
localparam H_RETRACE = 16; // horizontal retrace
localparam H_L_BORDER = 23; // horizontal left border (back porch)
localparam H_R_BORDER = 7; // horizontal right border (front porch)
localparam H_RETRACE = 23; // horizontal retrace (sync)
localparam H_MAX = H_DISPLAY + H_L_BORDER + H_R_BORDER + H_RETRACE - 1;
localparam START_H_RETRACE = H_DISPLAY + H_R_BORDER;
localparam END_H_RETRACE = H_DISPLAY + H_R_BORDER + H_RETRACE - 1;
@ -23,7 +23,7 @@ module hvsync_generator(
localparam V_DISPLAY = 240; // vertical display area
localparam V_T_BORDER = 4; // vertical top border
localparam V_B_BORDER = 14; // vertical bottom border
localparam V_RETRACE = 4; // vertical retrace
localparam V_RETRACE = 4; // vertical retrace (sync)
localparam V_MAX = V_DISPLAY + V_T_BORDER + V_B_BORDER + V_RETRACE - 1;
localparam START_V_RETRACE = V_DISPLAY + V_B_BORDER;
localparam END_V_RETRACE = V_DISPLAY + V_B_BORDER + V_RETRACE - 1;

View File

@ -170,8 +170,9 @@ function VerilatorBase() {
var VerilogPlatform = function(mainElement, options) {
var self = this;
var video, audio;
var videoWidth = 288;
var videoWidth = 304;
var videoHeight = 248;
var maxVideoBlankLines = 80;
var idata, timer;
var gen;
var frameRate = 60;
@ -263,8 +264,8 @@ var VerilogPlatform = function(mainElement, options) {
while (gen.hsync && z++<videoWidth) vidtick();
}
var z=0;
while (!gen.vsync && z++<videoWidth*80) vidtick();
while (gen.vsync && z++<videoWidth*80) vidtick();
while (!gen.vsync && z++<videoWidth*maxVideoBlankLines) vidtick();
while (gen.vsync && z++<videoWidth*maxVideoBlankLines) vidtick();
updateInspectionFrame();
video.updateFrame();
updateInspectionPostFrame();