Skip to content

Commit 444c5f9

Browse files
committed
Move keyboard onto the same row as the other peripherals and fix issue with kbconv not working on a fresh build
1 parent 7080a00 commit 444c5f9

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

python/src/mlogv32/preprocessor/app.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def build(
9797
yaml_path: Path,
9898
cpu_config_name: Annotated[str | None, Option("-c", "--config")] = None,
9999
width: Annotated[int, Option("-w", "--width")] = 16,
100-
height: Annotated[int, Option("-h", "--height")] = 16,
101-
size: Annotated[int | None, Option("-s", "--size")] = None,
100+
height: Annotated[int, Option("-h", "--height", max=16)] = 16,
101+
size: Annotated[int | None, Option("-s", "--size", max=16)] = None,
102102
output: Annotated[Path | None, Option("-o", "--output")] = None,
103103
bin_path: Annotated[Path | None, Option("--bin")] = None,
104104
include_all: Annotated[bool, Option("--all")] = False,
@@ -119,11 +119,11 @@ def build(
119119
120120
Defaults:
121121
122-
- drom: 0
122+
- data_rom_rows: 0
123123
124-
- icache: rom + ram
124+
- icache_rows: rom + ram
125125
126-
- width: 32
126+
- memory_width: 32
127127
128128
- x_offset: -9
129129
@@ -406,40 +406,40 @@ def add_with_label(block: Block, **labels: Unpack[Labels]):
406406
pause_switch_link = ProcessorLink(11, 17, "")
407407
single_step_switch_link = ProcessorLink(11, 16, "")
408408

409-
add_peripheral(ram_schem, 14, 16)
409+
add_peripheral(ram_schem, 13, 16)
410+
add_peripheral(ram_schem, 12, 17)
410411
add_peripheral(ram_schem, 13, 17)
411-
add_peripheral(ram_schem, 14, 17)
412412
add_with_label(
413-
Block(Content.SWITCH, 14, 18, True, 0),
413+
Block(Content.SWITCH, 13, 18, True, 0),
414414
right="UART0 -> DISPLAY",
415415
)
416416

417417
add_peripheral(
418418
Block(
419419
block=Content.WORLD_PROCESSOR,
420-
x=13,
420+
x=12,
421421
y=16,
422422
config=ProcessorConfig(
423423
code=display_code,
424424
links=relative_links(
425425
*lookup_links,
426-
ProcessorLink(14, 16, "processor17"), # BUFFER
427-
ProcessorLink(13, 17, "processor18"), # INCR (display)
428-
ProcessorLink(14, 17, "processor19"), # DECR
426+
ProcessorLink(13, 16, "processor17"), # BUFFER
427+
ProcessorLink(12, 17, "processor18"), # INCR (display)
428+
ProcessorLink(13, 17, "processor19"), # DECR
429429
config_link,
430-
ProcessorLink(14, 18, "switch1"), # DISPLAY_POWER
430+
ProcessorLink(13, 18, "switch1"), # DISPLAY_POWER
431431
power_switch_link,
432432
uart_links[0],
433433
display_link,
434-
x=13,
434+
x=12,
435435
y=16,
436436
),
437437
),
438438
rotation=0,
439439
)
440440
)
441441

442-
add_peripheral(sortkb_schem, 4, 21)
442+
add_peripheral(sortkb_schem, 14, 16)
443443

444444
# CPU
445445

schematics/sortKB.msch

-4 Bytes
Binary file not shown.

src/peripherals/kbconv.mlog

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
set COPYRIGHT "kbconv - a sortKB scancode decoder\n© 2025 camelStyleUser, BasedUser. Released under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html).\nThis program is provided without any warranty."
77
set SOURCELINK "https://github.com/BasedUser/mPC"
88

9-
read UART_FIFO_MODULO processor1 "UART_FIFO_MODULO"
10-
119
read modifiers cell2 0
1210
op and shift modifiers 1
1311
op and ctrl modifiers 2
1412
op and caps modifiers 32
1513

1614
loop:
15+
read UART_FIFO_MODULO processor1 "UART_FIFO_MODULO"
1716
read rptr cell1 62
1817
read wptr cell1 63
1918
jump loop equal wptr rptr

0 commit comments

Comments
 (0)