fix(saolei): 修 hard 模式光标到某一格就跳回最左边(列只有 5 位)

现象:只看 hard 模式时,光标移到某一排的某个格子后再往右,会跳回最左边。

原因:光标的列字段只有 5 位。
- 软件 update_cursor_reg():REG_CURSOR = (cur_c & 31u) | ...
- RTL cpu21_vga.v:cursor_here = (cursor_i[4:0] == ccol) && ...
hard 棋盘宽 30、左上角列 5,光标列能到 35,35 被掩成 3,于是画在第 3 列。
初级/中级列最大 25 以内,所以只有 hard 暴露出来;背景界面光标能走到列 39,
同样受影响。

改法:
- saolei.c:列掩码 31u -> 63u(6 位,覆盖 0..39)
- cpu21_vga.v:cursor_i[4:0] -> cursor_i[5:0]
This commit is contained in:
2026-09-23 21:13:35 +08:00
parent 7e13571744
commit 10d4836ad7
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -310,7 +310,7 @@
rom[307] = 32'h79402703;
rom[308] = 32'h01F7F793;
rom[309] = 32'h00879793;
rom[310] = 32'h01F77713;
rom[310] = 32'h03F77713;
rom[311] = 32'h00E7E7B3;
rom[312] = 32'h00001737;
rom[313] = 32'h14F72223;