Start the screen at 132x64
The terminal comes up (and resets with ESC c) in DECCOLM's 132x64 mode; term_ctrl's WIDE_BOOT parameter selects 80x32 instead. Port 0 bit 2 tells software which width is showing: BASIC's line editor wraps at it, and the games, which play at 80 columns, put 132 back when they end. scripts/sim.sh wide checks the start-up; the other checks still start at 80x32. Manual, README and terminfo updated. send-hex.py is executable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5930b958b4
commit
19278d1d74
23 files changed
+4183
-4102
No files matched your search
+36
-1
@@ -17,7 +17,12 @@ module tb_terminal;
|
||||
wire qcs;
|
||||
wire [3:0] qdb;
|
||||
|
||||
basys3_terminal #(.FONT_FILE(`FONT_FILE), .MEM_FILE(`MEM_FILE), .MEM_HI_FILE(`MEM_HI_FILE), .MON_FILE(`MON_FILE)) dut (
|
||||
`ifdef WIDE_BOOT
|
||||
localparam WIDE = 1; // scripts/sim.sh wide: the board as built, 132x64
|
||||
`else
|
||||
localparam WIDE = 0; // the other checks were written for an 80x32 start
|
||||
`endif
|
||||
basys3_terminal #(.WIDE_BOOT(WIDE), .FONT_FILE(`FONT_FILE), .MEM_FILE(`MEM_FILE), .MEM_HI_FILE(`MEM_HI_FILE), .MON_FILE(`MON_FILE)) dut (
|
||||
.clk(clk), .btnC(btnC), .btnU(btnU), .btnD(btnD), .sw(sw), .led(led), .seg(), .dp(), .an(),
|
||||
.vgaRed(r), .vgaGreen(g), .vgaBlue(b), .Hsync(hs), .Vsync(vs),
|
||||
.RsRx(rsrx), .RsTx(rstx), .PS2Clk(ps2c), .PS2Data(ps2d),
|
||||
@@ -28,6 +33,7 @@ module tb_terminal;
|
||||
|
||||
real BIT_NS = 1_000_000_000.0 / 115200; // changed for the 3 Mbaud test
|
||||
integer errors = 0;
|
||||
integer wk;
|
||||
|
||||
task uart_send(input [7:0] d);
|
||||
integer i;
|
||||
@@ -346,6 +352,35 @@ module tb_terminal;
|
||||
if (hs_bad == 0 && vs_bad == 0) $display("PASS 1280x1024 sync timing");
|
||||
else begin $display("FAIL sync timing: %0d hsync, %0d vsync periods off", hs_bad, vs_bad); errors = errors + 1; end
|
||||
|
||||
`endif
|
||||
`ifdef WIDE_BOOT
|
||||
// ---- start-up in 132x64: the screen, port 0 bit 2, BASIC's line editor
|
||||
uart_str("\033[2J\033[H");
|
||||
#100_000;
|
||||
sw[15] = 1; sw[14] = 1;
|
||||
#3_000_000;
|
||||
if (dut.wide) $display("PASS the screen starts at 132x64");
|
||||
else begin $display("FAIL the screen starts at 80x32"); errors = errors + 1; end
|
||||
uart_str("PRINT INP(0) AND 4\015");
|
||||
#2_000_000;
|
||||
expect_row(1, "DARTMOUTH-STYLE BASIC");
|
||||
expect_row(5, " 4");
|
||||
// a 107-character line stays on one row; three Lefts and a Y land
|
||||
// in that row only if the editor knows the screen is 132 wide
|
||||
uart_str("10 REM ");
|
||||
for (wk = 0; wk < 100; wk = wk + 1) uart_send("X");
|
||||
uart_str("\033[D\033[D\033[DY");
|
||||
#2_000_000;
|
||||
if (cellraw(8, 106) == "X" && cellraw(8, 104) == "Y" && cellraw(9, 0) == " ")
|
||||
$display("PASS the line editor works 132 wide");
|
||||
else begin
|
||||
$display("FAIL the line editor at 132 wide: row 8 col 104 '%c' col 106 '%c', row 9 col 0 '%c'",
|
||||
cellraw(8, 104), cellraw(8, 106), cellraw(9, 0));
|
||||
errors = errors + 1;
|
||||
end
|
||||
if (errors == 0) $display("ALL TESTS PASSED");
|
||||
else $display("%0d TESTS FAILED", errors);
|
||||
$finish;
|
||||
`endif
|
||||
// ---- BASIC as the console, input pasted over the UART
|
||||
uart_str("\033[2J\033[H");
|
||||
|
||||
Reference in new issue
Block a user