BASIC graphics: 320x240 16-colour layer, manual and demo

- z80_system: dual-clock graphics RAM behind ports 30h-34h (X/Y, plot
  with auto-increment, read-back, hardware fill); text_display overlays it
  under the text, colour 0 transparent.
- BASIC: CLS COLOR PLOT LINE RECT FILL CIRCLE POINT, LOCATE and INK;
  faster keyword tokenizing.
- docs/basic-manual.md (+ PDF via docs/build-manual.sh).
- basic/examples/graphics-demo.bas and tools/send-bas.py to load programs
  over the serial port.
- Simulation checks drawing and saves a frame; the emulator models the
  graphics and timer ports and can stop when BASIC waits for input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
brad ArantandClaude Opus 5.5 committed 2026-11-27 21:09:43 -08:00
1 parent 59d5e617f2
commit dc7c7c22c5
14 files changed
+5205 -4141

No files matched your search

+5 -2
View File
@@ -268,12 +268,15 @@ module basys3_terminal #(
always @(posedge clk) ztx_req_s <= {ztx_req_s[0], ztx_req};
wire [15:0] z80_seg;
wire [16:0] gfx_addr;
wire [3:0] gfx_pix;
z80_system #(.MEM_FILE(MEM_FILE), .CPU_HZ(CPU_HZ)) z80 (
.clk(cpu_clk), .rst(cpu_rst_s[2]),
.rx_req(zrx_req), .rx_data(zrx_data), .rx_ack(zrx_ack),
.tx_req(ztx_req), .tx_data(ztx_data), .tx_ack(ztx_ack),
.seg_val(z80_seg), .halted()
.seg_val(z80_seg), .halted(),
.vclk(clk), .gfx_vaddr(gfx_addr), .gfx_vpix(gfx_pix)
);
// terminal input: Z-80 output or received bytes, local echo, banner
@@ -358,7 +361,7 @@ module basys3_terminal #(
text_display #(.FONT_FILE(FONT_FILE)) video (
.clk(clk), .rst(rst), .cur_row(cur_row), .cur_col(cur_col), .cur_vis(cur_vis),
.stop(stop), .sbot(sbot), .sm_on(sm_on), .sm_dir(sm_dir), .sm_off(sm_off),
.ram_addr(v_addr), .ram_data(v_data),
.ram_addr(v_addr), .ram_data(v_data), .gfx_addr(gfx_addr), .gfx_pix(gfx_pix),
.red(vgaRed), .green(vgaGreen), .blue(vgaBlue), .hsync(Hsync), .vsync(Vsync),
.frame_tick(frame_tick)
);