diff --git a/A2OSX.BOOT.DSK b/A2OSX.BOOT.DSK index ae03c550..4f6865f5 100644 Binary files a/A2OSX.BOOT.DSK and b/A2OSX.BOOT.DSK differ diff --git a/A2OSX.SRC.po b/A2OSX.SRC.po index 8d4cb318..6833931b 100644 Binary files a/A2OSX.SRC.po and b/A2OSX.SRC.po differ diff --git a/A2osX.S.txt b/A2osX.S.txt index ceb707b6..f8a34aaa 100644 --- a/A2osX.S.txt +++ b/A2osX.S.txt @@ -172,7 +172,7 @@ A2osX.EnumKM >LDAXI MSG.KMENUM A2osX.MLIQuit >LDAXI MSG.STAGE0OK jsr PrintCStrAX - >DEBUG + >DEBUGOA jsr MLI .DA #MLIQUIT diff --git a/DRV/CONSOLE.DRV.S.txt b/DRV/CONSOLE.DRV.S.txt index 0371698e..2f474284 100644 --- a/DRV/CONSOLE.DRV.S.txt +++ b/DRV/CONSOLE.DRV.S.txt @@ -73,6 +73,7 @@ J.EscSeq .DA Esc.DispAttr m .DA 0 end of relocation *-------------------------------------- OPEN stz CURON + stz KeyRemapIdx stz bEscMode stz bEscModeCSI @@ -95,10 +96,50 @@ GETEVENT lda A2osX.TIMER16 and #A2osX.SCREENS.C is screen active? beq .9 - >SYSCALL SYS.GetKeyboardEvent + ldx KeyRemapIdx are we in remap mode ? + bne .4 +.11 >SYSCALL SYS.GetKeyboardEvent bcs .9 + + ldy #S.EVT.DATAHI + lda (pEvent),y + bne .8 + dey + lda (pEvent),y + + ldx KeyRemapped +.2 cmp KeyRemapped,x + beq .3 + dex + bne .2 + clc rts +.3 lda KeyRemappedIdx,x + tax + lda KeyRemappedTable,x + sta (pEvent),y + inx + stx KeyRemapIdx + clc + rts + +.4 lda KeyRemappedTable,x + bne .5 + stz KeyRemapIdx + bra .11 +.5 inx + stx KeyRemapIdx + ldy #S.EVT.DATALO + sta (pEvent),y + iny + lda #0 + sta (pEvent),y + lda #S.EVT.F.KEY + sta (pEvent) + clc +.8 rts + .9 lda #0 Error = no event sec rts @@ -546,6 +587,17 @@ SCROLLTOP .BS 1 SCROLLBOT .BS 1 CURON .BS 1 CURCHAR .BS 1 +*-------------------------------------- +KeyRemapIdx .BS 1 +KeyRemapped .HS 0508090A0D15 L,D,U,CR,R +KeyRemappedIdx .HS 050004080C0F +KeyRemappedTable .EQ * +KeyRemappedLEFT .HS 1B5B4400 esc[D +KeyRemappedDOWN .HS 1B5B4200 esc[B +KeyRemappedUP .HS 1B5B4100 esc[A +KeyRemappedCR .HS 0D0A00 crlf +KeyRemappedRGHT .HS 1B5B4300 esc[C +*-------------------------------------- bEscMode .BS 1 bEscModeCSI .BS 1 EscSeq .BS ESCSEQ.MAXLEN+1 @@ -553,6 +605,7 @@ EscSeqParamCnt .BS 1 EscSeqParam .BS 4 EscSeqInNum .BS 1 EscSeqCmds >PSTRING "mrKH" +*-------------------------------------- DEVINFO .DA #S.DEVINFO.TYPE.CHAR .DA #80 .DA #24 diff --git a/DRV/SSC.I.DRV.S.txt b/DRV/SSC.I.DRV.S.txt index 579e988d..b64af15f 100644 --- a/DRV/SSC.I.DRV.S.txt +++ b/DRV/SSC.I.DRV.S.txt @@ -16,6 +16,10 @@ BUF.MASK .EQ $1F *-------------------------------------- ZPTmpPtr1 .EQ ZPDRV *-------------------------------------- +* see this : +* http://mirrors.apple2.org.za/apple.cabi.net/Applications/Telcom/SSC.DRIVER/SSC.DRIVER.TXT +* About False read issue in SSC +*-------------------------------------- * SSC/ACIA I/O *-------------------------------------- SSC.REG.DIPSW1 .EQ $C081 R @@ -130,7 +134,9 @@ Dev.Detect sta hArgs asl asl sta DEVSLOTn0 - + clc + adc #SSC.REG.DATA+1 + sta DEV.DATA.BFFF >LDYA L.MSG.DETECT.OK >SYSCALL SYS.PSTROutYA >LDYA L.DEV.HEADER.NAME @@ -232,20 +238,20 @@ GETEVENT php *-------------------------------------- COUT php sei -* tay save char in Y + tay save char in Y - ldx DEVSLOTn0 +* ldx DEVSLOTn0 * lda SSC.REG.STATUS,x - bit #SSC.REG.STATUS.DCD+SSC.REG.STATUS.DSR +* bit #SSC.REG.STATUS.DCD+SSC.REG.STATUS.DSR * beq .9 -* ldx OUTBUF.CNT Buffer Empty? -* bne .10 + ldx OUTBUF.CNT Buffer Empty? + bne .10 -* bit #SSC.REG.STATUS.TDRE Register Empty ? -* beq .10 not empty, queue char + bit #SSC.REG.STATUS.TDRE Register Empty ? + beq .10 not empty, queue char -* tya yes, write directly to ACIA + tya yes, write directly to ACIA ldx DEVSLOTn0 sta SSC.REG.DATA,x @@ -339,8 +345,9 @@ IRQ ldx DEVSLOTn0 and #BUF.MASK tay + ldx DEV.DATA.BFFF lda OUTBUF,Y - sta SSC.REG.DATA,x + sta $BFFF,x ora #$80 sta $401 @@ -357,6 +364,7 @@ DRV.CS.END IDX .BS 1 DEVSLOT0n .BS 1 *DEVSLOTCn .BS 1 +DEV.DATA.BFFF .BS 1 DEVSLOTn0 .BS 1 INBUF.PTR .BS 1 INBUF.CNT .BS 1 diff --git a/SBIN/GETTY.S.txt b/SBIN/GETTY.S.txt index bd6aca9b..37333d82 100644 --- a/SBIN/GETTY.S.txt +++ b/SBIN/GETTY.S.txt @@ -89,7 +89,7 @@ CS.INIT ldy #S.PS.hARGS sec .99 rts *-------------------------------------- -CS.RUN lda #13 try send a CR... +CS.RUN lda #12 try send a FF... >SYSCALL SYS.COutA Device Is Ready ? bcs .8 no..loop... diff --git a/SBIN/LOGIN.S.txt b/SBIN/LOGIN.S.txt index 7cd65cdc..fd759d8e 100644 --- a/SBIN/LOGIN.S.txt +++ b/SBIN/LOGIN.S.txt @@ -13,7 +13,7 @@ AUTO 6 *-------------------------------------- ZPPTR1 .EQ ZPBIN *-------------------------------------- -INPUT.BUFFER.SIZE .EQ 16 +INPUT.BufPtr.SIZE .EQ 16 *-------------------------------------- * File Header (16 Bytes) *-------------------------------------- @@ -132,24 +132,26 @@ CS.QUIT ldy #hSHELL *-------------------------------------- * PRIVATE *-------------------------------------- -INPUT.RESET ldy #INPUT.STATUS +INPUT.RESET ldy #INPUT.PassChar sta (pData),y lda #0 - ldy #INPUT.BUFFER + ldy #INPUT.BufPtr + sta (pData),y + ldy #INPUT.Status sta (pData),y rts *-------------------------------------- INPUT.CHARIN tax saver char... - ldy #INPUT.STATUS + ldy #INPUT.Status lda (pData),y bmi .9 - lda #INPUT.BUFFER + lda #INPUT.BufPtr clc adc pData sta ZPPTR1 lda pData+1 - adc /INPUT.BUFFER + adc /INPUT.BufPtr sta ZPPTR1+1 cpx #$20 Control Char? @@ -157,7 +159,7 @@ INPUT.CHARIN tax saver char... lda (ZPPTR1) - cmp #INPUT.BUFFER.SIZE Buffer full? + cmp #INPUT.BufPtr.SIZE Buffer full? beq .9 inc @@ -167,22 +169,40 @@ INPUT.CHARIN tax saver char... txa sta (ZPPTR1),y - ldy #INPUT.STATUS + ldy #INPUT.PassChar lda (pData),y bne .1 txa .1 >SYSCALL SYS.COutA rts -.2 cpx #$0D +.2 cpx #13 CR + bne .3 + ldy #INPUT.Status + lda (pData),y bne .9 - ldy #INPUT.STATUS + + inc + sta (pData),y + rts + +.3 cpx #10 LF + + bne .4 + ldy #INPUT.Status + lda (pData),y + beq .31 lda #$80 sta (pData),y + rts + +.31 + +.4 .9 rts *-------------------------------------- -INPUT.LINEIN ldy #INPUT.STATUS +INPUT.LINEIN ldy #INPUT.Status lda (pData),y asl CS if a line is in the buffer rts @@ -194,8 +214,9 @@ SHELL >PSTRING "SBIN/SHELL" .DUMMY .OR 0 DS.START -INPUT.BUFFER .BS INPUT.BUFFER.SIZE+1 -INPUT.STATUS .BS 1 +INPUT.BufPtr .BS INPUT.BufPtr.SIZE+1 +INPUT.Status .BS 1 +INPUT.PassChar .BS 1 hUSERNAME .BS 1 hPASSWORD .BS 1 hSHELL .BS 1