From 4f5aa6b51b4f4714f45db69bef9d9733a107e7e3 Mon Sep 17 00:00:00 2001 From: boykovra Date: Mon, 19 May 2025 16:23:36 +0300 Subject: [PATCH] Sync local changes with github --- sources/DSS/.vscode/settings.json | 4 +++ sources/DSS/.vscode/tasks.json | 4 +-- sources/DSS/buffer.asm | 2 +- sources/DSS/isa-test.asm | 43 +++++++++++++++++++------------ sources/DSS/isa.asm | 8 +++--- sources/DSS/util.asm | 26 +++++++++---------- sources/DSS/wcommon.asm | 36 ++++++++++++++------------ sources/DSS/wterm.asm | 10 +++---- 8 files changed, 74 insertions(+), 59 deletions(-) create mode 100644 sources/DSS/.vscode/settings.json diff --git a/sources/DSS/.vscode/settings.json b/sources/DSS/.vscode/settings.json new file mode 100644 index 0000000..8e18a3a --- /dev/null +++ b/sources/DSS/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "debug.terminal.clearBeforeReusing": true + +} diff --git a/sources/DSS/.vscode/tasks.json b/sources/DSS/.vscode/tasks.json index 19df3fa..ba63946 100644 --- a/sources/DSS/.vscode/tasks.json +++ b/sources/DSS/.vscode/tasks.json @@ -137,7 +137,7 @@ } }, { - "label": "MDL for WTFTP", + "label": "MDL optimization for WTFTP", "type": "shell", "command": "java -jar ~/Soft/MDL/mdl.jar wtftp.asm -cpu z180 -po -dialect sjasmplus", "group": "build", @@ -161,7 +161,7 @@ "presentation": { "echo": false, "focus": false, - "panel": "shared", + "panel": "dedicated", "showReuseMessage": false, "clear": true, "revealProblems": "onProblem" diff --git a/sources/DSS/buffer.asm b/sources/DSS/buffer.asm index 7365e8a..64052d5 100644 --- a/sources/DSS/buffer.asm +++ b/sources/DSS/buffer.asm @@ -110,7 +110,7 @@ GET LD DE,(PTR_TAIL) LD A,L CP E - JP NZ, G_NOTE + JP NZ, G_NOTEINCLUDE "dss.inc" LD A, H CP D JP NZ, G_NOTE diff --git a/sources/DSS/isa-test.asm b/sources/DSS/isa-test.asm index 01a6c14..42d38ad 100644 --- a/sources/DSS/isa-test.asm +++ b/sources/DSS/isa-test.asm @@ -22,7 +22,7 @@ DEFAULT_TIMEOUT EQU 2000 SLDOPT COMMENT WPMEM, LOGPOINT, ASSERTION DEVICE NOSLOT64K - + INCLUDE "macro.inc" INCLUDE "dss.inc" INCLUDE "sprinter.inc" @@ -47,10 +47,10 @@ EXE_HEADER ORG 0x8100 @STACK_TOP - + ; ------------------------------------------------------ START - + IFDEF DEBUG ; LD IX,CMD_LINE1 LD SP, STACK_TOP @@ -61,51 +61,60 @@ START PRINTLN MSG_START - + XOR A LD (ISA.ISA_SLOT),A CALL ISA.ISA_OPEN - - ; --------- IOW/IOR/A0-A7/D0-D7 -------------- + +; --------- IOW/IOR/A0-A7/D0-D7 -------------- ; LD D,0 ; L_DATA ; LD HL, PORT_UART_A ; LD B,0x08 -; L_PORT +; L_PORT ; LD (HL), D ; LD E,(HL) ; INC HL ; DJNZ L_PORT ; INC D - CALL ISA.ISA_OPEN +// CALL ISA.ISA_OPEN LD HL, REG_SCR LD D,0x55 + ; STROBE ON LD BC, PORT_ISA LD A, ISA_AEN ; AEN=1 (for sync LA by front) OUT (C), A - - ; - LD (HL), D - LD D,(HL) - LD D,0xAA - LD (HL), D - LD D,(HL) + ; TRANSFER TO ISA + LD HL, 0x8000 + LD DE, 0xC000 + LD BC, 0x4000 + LDIR + ; STROBE OFF LD BC, PORT_ISA - LD A, 0 ; AEN=0 + LD A, 0 ; AEN=0 OUT (C), A + ; TRANSFER FROM ISA + LD DE, 0x4000 + LD HL, 0xC000 + LD BC, 0x4000 + LDIR + + + + ; Close window CALL ISA.ISA_CLOSE ; --------- RESET & AEN -------------- ; LD BC, PORT_ISA - ; LD A,ISA_RST | ISA_AEN ; RESET=1 AEN=1 + ; LD A,ISA_RST | ISA_AEN ; RESET=1 AEN=1 ; OUT (C), A ; CALL UTIL.DELAY_100uS ; XOR A diff --git a/sources/DSS/isa.asm b/sources/DSS/isa.asm index e52111a..c17cd5a 100644 --- a/sources/DSS/isa.asm +++ b/sources/DSS/isa.asm @@ -33,7 +33,7 @@ ISA_RST EQU 0x80 ; ------------------------------------------------------ ISA_RESET LD BC, PORT_ISA - LD A,ISA_RST | ISA_AEN ; RESET=1 AEN=1 + LD A,ISA_RST | ISA_AEN ; RESET=1 AEN=1 OUT (C), A CALL @UTIL.DELAY_1MS XOR A @@ -44,7 +44,6 @@ ISA_RESET ; ------------------------------------------------------ ; Open access to ISA ports as memory -; Inp: A = 0 - ISA slot 0, 1 - ISA SLOT 1 ; ------------------------------------------------------ ISA_OPEN PUSH AF,BC @@ -58,6 +57,7 @@ ISA_SLOT EQU $+1 LD A, 0x00 SLA A OR A, 0xD4 ; D4 - ISA1, D6 - ISA2 + //AND A, 0xFB ; mem LD BC, PAGE3 OUT (C), A LD BC, PORT_ISA @@ -82,8 +82,8 @@ ISA_CLOSE RET ; To save memory page 3 -SAVE_MMU3 DB 0 +SAVE_MMU3 DB 0 ENDMODULE - + ENDIF \ No newline at end of file diff --git a/sources/DSS/util.asm b/sources/DSS/util.asm index a22bd0c..3cc4518 100644 --- a/sources/DSS/util.asm +++ b/sources/DSS/util.asm @@ -11,7 +11,7 @@ MODULE UTIL include "dss_error.asm" - + ; ------------------------------------------------------ ; Small delay ; Inp: HL - number of cycles, if HL=0, then 2000 @@ -80,7 +80,7 @@ STRLEN OR C JR Z, .STRL_NCOR DEC BC -.STRL_NCOR +.STRL_NCOR POP HL,DE RET ;ENDIF @@ -98,7 +98,7 @@ STRCMP CP (HL) JR NZ,.STC_NE AND A - JR Z,.STC_EQ + JR Z,.STC_EQ INC DE INC HL JR .STC_NEXT @@ -256,7 +256,7 @@ DIV_10: RLA .DDL1 ADD HL,HL - RLA + RLA CP C JR C,.DDL2 SUB C @@ -269,9 +269,9 @@ DIV_10: ; ------------------------------------------------------ ; FAST_UTOA ; Inp: HL - number -; DE - Buffer +; DE - Buffer ; CF is set to write leading zeroes -; Out: DE - address of strinf +; Out: DE - address of strinf ; ------------------------------------------------------ ;;IFUSED FAST_UTOA FAST_UTOA @@ -345,7 +345,7 @@ FAST_UTOA INC DE JR .LEADING_ZEROES - ;;ENDIF + ;;ENDIF ; ------------------------------------------------------ ; Find char in string @@ -357,7 +357,7 @@ FAST_UTOA ;;IFUSED STRCHR STRCHR PUSH BC -.STCH_NEXT +.STCH_NEXT LD C,A LD A,(HL) AND A @@ -404,12 +404,12 @@ HEXB ; Get full current path ; Inp: HP - pointer to buffer for path ; ---------------------------------------------------- - + GET_CUR_DIR PUSH HL LD C, DSS_CURDISK RST DSS - CALL @DSS_ERROR.CHECK + CALL DSS_ERROR.CHECK ADD A, 65 LD (HL),A INC HL @@ -417,7 +417,7 @@ GET_CUR_DIR INC HL LD C, DSS_CURDIR RST DSS - CALL @DSS_ERROR.CHECK + CALL DSS_ERROR.CHECK POP HL JP ADD_BACK_SLASH ;RET @@ -448,7 +448,7 @@ ADD_BACK_SLASH INC HL LD (HL),0x0 RET - + ENDMODULE - + ENDIF \ No newline at end of file diff --git a/sources/DSS/wcommon.asm b/sources/DSS/wcommon.asm index a4e5165..bdebf89 100644 --- a/sources/DSS/wcommon.asm +++ b/sources/DSS/wcommon.asm @@ -22,7 +22,9 @@ CHECK_ERROR ADD A,'0' LD (COMM_ERROR_NO), A PRINTLN MSG_COMM_ERROR + IFDEF TRACE CALL DUMP_UART_REGS + ENDIF LD B,3 POP HL ; ret addr reset ;;ENDIF @@ -30,7 +32,7 @@ CHECK_ERROR ; ------------------------------------------------------ ; Program exit point ; ------------------------------------------------------ -EXIT +EXIT CALL REST_VMODE DSS_EXEC DSS_EXIT ; ------------------------------------------------------ @@ -68,7 +70,7 @@ DUMP_UART_REGS LD HL, REG_LCR LD E, LCR_DLAB | LCR_WL8 CALL WIFI.UART_WRITE - + LD BC, 0x0210 CALL DUMP_REGS @@ -80,25 +82,25 @@ DUMP_UART_REGS DUMP_REGS LD HL, PORT_UART_A - -DR_NEXT + +DR_NEXT LD DE,MSG_DR_RN CALL @UTIL.HEXB - INC C + INC C CALL WIFI.UART_READ PUSH BC LD C,A LD DE,MSG_DR_RV CALL @UTIL.HEXB - PUSH HL - + PUSH HL + PRINTLN MSG_DR POP HL,BC INC HL DJNZ DR_NEXT - RET + RET ENDIF ;;ENDIF @@ -146,7 +148,7 @@ REST_VMODE LD C,DSS_SETVMOD RST DSS -RVM_SAME +RVM_SAME POP BC RET ;;ENDIF @@ -221,7 +223,7 @@ MSG_ESP_RESET MSG_UART_INIT DB "Reset UART.",0 -LINE_END +LINE_END DB "\r\n",0 ;;IFUSED INIT_VMODE @@ -235,12 +237,12 @@ SAVE_VMODE IFDEF TRACE MSG_DR DB "Reg[0x" -MSG_DR_RN +MSG_DR_RN DB "vv]=0x" -MSG_DR_RV +MSG_DR_RV DB "vv",0 -MSG_ECHO_OFF +MSG_ECHO_OFF DB "Echo off",0 MSG_STATIOJN_MODE @@ -263,13 +265,13 @@ MSG_SET_DHCP ; ------------------------------------------------------ ; Commands ; ------------------------------------------------------ -; CMD_QUIT +; CMD_QUIT ; DB "QUIT\r",0 CMD_VERSION - DB "AT+GMR\r\n",0 -CMD_SET_SPEED - DB "AT+UART_CUR=115200,8,1,0,3\r\n",0 + DB "AT+GMR\r\n",0 +CMD_SET_SPEED + DB "AT+UART_CUR=115200,8,1,0,3\r\n",0 CMD_ECHO_OFF DB "ATE0\r\n",0 CMD_STATION_MODE diff --git a/sources/DSS/wterm.asm b/sources/DSS/wterm.asm index 62cae0e..219b5ee 100644 --- a/sources/DSS/wterm.asm +++ b/sources/DSS/wterm.asm @@ -66,23 +66,23 @@ START CALL ISA.ISA_RESET - CALL @WCOMMON.INIT_VMODE + CALL WCOMMON.INIT_VMODE PRINTLN MSG_START CALL @WCOMMON.FIND_SWF PRINTLN WCOMMON.MSG_UART_INIT - CALL @WIFI.UART_INIT + CALL WIFI.UART_INIT PRINTLN WCOMMON.MSG_ESP_RESET - CALL @WIFI.ESP_RESET + CALL WIFI.ESP_RESET - CALL @WCOMMON.INIT_ESP + CALL WCOMMON.INIT_ESP PRINTLN MSG_HLP - CALL @WIFI.UART_EMPTY_RS + CALL WIFI.UART_EMPTY_RS MAIN_LOOP ; handle key pressed