Post #4 bug fix 1:task switching now handles pDev properly.

This commit is contained in:
Rémy GIBERT 2015-11-23 15:54:30 +01:00
parent 5d49c27c79
commit 3537472fa1
10 changed files with 84 additions and 140 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,9 +8,9 @@ echo Env:
SET
INSDRV CONSOLE.DRV
GETTY CON SBIN/LOGIN
INSDRV UTHERNET.DRV 000E3A123456
TCPIP ETH3
DHCPCLNT
#INSDRV UTHERNET.DRV 000E3A123456
#TCPIP ETH3
#DHCPCLNT
#INSDRV SSC.DRV 9600 N 8 1 X
#GETTY COM2 SBIN/LOGIN
#INSDRV PPIC.DRV

View File

@ -169,11 +169,6 @@ CROUT1 stz CH
rts
*--------------------------------------
SCROLL.UP ldx #0
lda RD80STORE
pha
sta SET80STORE
.1 lda BASEL,x
sta ZPBASL1
@ -186,7 +181,8 @@ SCROLL.UP ldx #0
sta ZPBASL2+1
ldy #39
sta SETPAGE2
sta SETWRITEAUX
sta SETREADAUX
.2 lda (ZPBASL2),y
sta (ZPBASL1),y
@ -194,7 +190,8 @@ SCROLL.UP ldx #0
bpl .2
ldy #39
sta CLRPAGE2
sta CLRWRITEAUX
sta CLRREADAUX
.3 lda (ZPBASL2),y
sta (ZPBASL1),y
@ -203,12 +200,6 @@ SCROLL.UP ldx #0
cpx #23
bne .1
jsr CLREOL
pla
bmi .8
sta CLR80STORE
.8 rts
*--------------------------------------
CLREOL ldx CH
.1 phx
@ -225,11 +216,6 @@ CLREOL ldx CH
HOME stz CH
stz CV
lda RD80STORE
pha
sta SET80STORE
ldx #23
.1 lda BASEL,x
@ -240,16 +226,18 @@ HOME stz CH
lda #' '
ora INVFLG
sta CLRPAGE2
ldy #39
sta SETWRITEAUX
sta SETREADAUX
ldy #39
.2 sta (ZPBASL1),y
dey
bpl .2
sta SETPAGE2
sta CLRWRITEAUX
sta CLRREADAUX
ldy #39
.3 sta (ZPBASL1),y
dey
bpl .3
@ -257,11 +245,7 @@ HOME stz CH
dex
bpl .1
pla
bmi .8
sta CLR80STORE
.8 rts
rts
*--------------------------------------
CUROFF lda CURON
beq CUREXIT.RTS
@ -297,56 +281,38 @@ CUREXIT lda CURON
CUREXIT.RTS rts
*--------------------------------------
SetCharAtXY pha
lda RD80STORE
pha
sta SET80STORE
txa
lsr
bcc .1
clc
sta CLRPAGE2
bra .2
.1 sta SETPAGE2
.2 adc BASEL,y
bcs .1
sta SETWRITEAUX
.1 clc
adc BASEL,y
sta ZPBASL1
lda BASEH,y
sta ZPBASL1+1
plx
pla
sta (ZPBASL1)
txa
bmi .8
sta CLR80STORE
.8 rts
sta CLRWRITEAUX
rts
*--------------------------------------
GetCharAtXY lda RD80STORE
pha
sta SET80STORE
txa
GetCharAtXY txa
lsr
bcc .1
clc
sta CLRPAGE2
bra .2
.1 sta SETPAGE2
.2 adc BASEL,y
bcs .1
sta SETREADAUX
.1 clc
adc BASEL,y
sta ZPBASL1
lda BASEH,y
sta ZPBASL1+1
lda (ZPBASL1)
plx
bmi .8
sta CLR80STORE
.8 rts
sta CLRREADAUX
rts
*--------------------------------------
DRV.CS.END
BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0

View File

@ -33,7 +33,7 @@ L.MSG.DETECT .DA MSG.DETECT
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL SYS.SysScrPPSTRYA
>SYSCALL SYS.PSTROutYA
lda A2osX.SCREENS
ora #A2osX.SCREENS.G
@ -42,7 +42,7 @@ Dev.Detect >LDYA L.MSG.DETECT
clc
rts
CS.END
MSG.DETECT >PSTRING "\nApple IIe/IIc DoubleHGR Driver."
MSG.DETECT >PSTRING "\nApple IIe/IIc DHGR Driver.\n"
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------
@ -74,11 +74,6 @@ L.DEVINFO .DA DEVINFO
OPEN lda #A2osX.SCREENS.G
>SYSCALL SYS.ScreenSelectA
sta SETHIRES
lda RD80STORE
pha
sta SET80STORE prepare for page switching
ldx #192
.81 dex
@ -92,7 +87,7 @@ OPEN lda #A2osX.SCREENS.G
* lda #$00
ldy #39
sta SETPAGE2
sta SETWRITEAUX
.82 sta (ZPBASE),y
dey
bpl .82
@ -101,19 +96,14 @@ OPEN lda #A2osX.SCREENS.G
* lda #$00
ldy #39
sta CLRPAGE2
sta CLRWRITEAUX
.83 sta (ZPBASE),y
dey
bpl .83
txa
bne .81
pla
bmi .84
sta CLR80STORE
.84 clc
clc
rts
*--------------------------------------
GETEVENT lda A2osX.ASCREEN
@ -148,10 +138,7 @@ GETINFO >LDYA L.DEVINFO
* PULLB = Y
* PULLB = Color (if not xor)
*--------------------------------------
SETPIXEL sta SETHIRES
sta SET80STORE prepare for page switching
>PULLA Pull Mode
SETPIXEL >PULLA Pull Mode
and #$FF
bpl SETPIXEL.1
@ -174,11 +161,9 @@ SETPIXEL.XOR >PULLYA Y=X.LO,A=X.HI
.3 lsr
tay
bcs .4 odd=main ram
sta SETPAGE2
bra .5
.4 sta CLRPAGE2
.5 >PULLA Pull Y
sta SETWRITEAUX
sta SETREADAUX
.4 >PULLA Pull Y
tax
lda BASEL,x setup line Base Ptr
sta ZPBASE
@ -188,6 +173,9 @@ SETPIXEL.XOR >PULLYA Y=X.LO,A=X.HI
lda (ZPBASE),y
eor Mono.Masks,x
sta (ZPBASE),y
sta CLRWRITEAUX
sta CLRREADAUX
rts
*--------------------------------------
SETPIXEL.1 lsr
@ -212,11 +200,9 @@ SETPIXEL.1 lsr
.3 lsr
tay
bcs .4 odd=main ram
sta SETPAGE2
bra .5
.4 sta CLRPAGE2
.5 phx
sta SETWRITEAUX
sta SETREADAUX
.4 phx
>PULLA Pull Y
tax
lda BASEL,x setup line Base Ptr
@ -232,12 +218,16 @@ SETPIXEL.1 lsr
lda (ZPBASE),y
and Mono.NMasks,x includes And $7F for mono
sta (ZPBASE),y
sta CLRWRITEAUX
sta CLRREADAUX
rts
.6 lda (ZPBASE),y
and #$7F switch back this byte to mono
ora Mono.Masks,x
sta (ZPBASE),y
sta CLRWRITEAUX
sta CLRREADAUX
rts
*--------------------------------------
SETPIXEL.COLOR >PULLA Get X.LO...
@ -282,7 +272,9 @@ SETPIXEL.COLOR >PULLA Get X.LO...
and Color.Pixels,y apply color
sta GBYTE
sta SETPAGE2
sta SETWRITEAUX
sta SETREADAUX
lda (ZPBASE)
and Color.NMasks,x reset existing pixel,
ora GBYTE
@ -296,7 +288,9 @@ SETPIXEL.COLOR >PULLA Get X.LO...
and Color.Pixels,y apply color
sta GBYTE
sta CLRPAGE2
sta CLRWRITEAUX
sta CLRREADAUX
lda (ZPBASE)
and Color.NMasks,x reset existing pixel,
ora GBYTE
@ -311,7 +305,9 @@ SETPIXEL.COLOR >PULLA Get X.LO...
and Color.Pixels,y apply color
sta GBYTE
sta SETPAGE2
sta SETWRITEAUX
sta SETREADAUX
lda (ZPBASE)
and Color.NMasks,x reset existing pixel,
ora GBYTE
@ -325,13 +321,17 @@ SETPIXEL.COLOR >PULLA Get X.LO...
and Color.Pixels,y apply color
sta GBYTE
sta CLRPAGE2
sta SETWRITEAUX
sta SETREADAUX
lda (ZPBASE)
and Color.NMasks,x reset existing pixel,
ora GBYTE
sta (ZPBASE)
.8 rts
.8 sta CLRWRITEAUX
sta CLRREADAUX
rts
*--------------------------------------
GETPIXEL
*--------------------------------------

View File

@ -114,7 +114,7 @@ Dev.Detect >LDYA L.MSG.DETECT
rts
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "Apple Mouse Card/IIc Mouse Driver."
MSG.DETECT >PSTRING "Apple Mouse Card/IIc Mouse Driver.\n"
MSG.DETECT.OK >PSTRING "Mouse Installed As Device : "
MSG.DETECT.KO >PSTRING "No Mouse Found.\n"
*--------------------------------------
@ -143,11 +143,6 @@ OPEN
php to read IIe ROM ID bytes
sei
lda RD80STORE
pha
sta CLR80STORE
lda #1 Enable, Polling mode
ldy #SETMOUSE
jsr GOMOUSE
@ -180,11 +175,7 @@ OPEN
ldy #HOMEMOUSE
jsr GOMOUSE
pla
bpl .1
sta SET80STORE
.1 plp
plp
clc
rts
@ -196,10 +187,6 @@ GETEVENT lda A2osX.ASCREEN
php
sei
lda RD80STORE
pha
sta CLR80STORE
ldy #READMOUSE
jsr GOMOUSE
@ -243,11 +230,7 @@ GETEVENT lda A2osX.ASCREEN
lda MOUSEYHIx,x
sta (pEvent),y
pla
bpl .5
sta SET80STORE
.5 plp
plp
ldy #S.EVT.DATALO
lda (pEvent),y
beq .9
@ -293,8 +276,8 @@ DEVSIG.Offset .HS 05070B0CFB
DEVSIG.Value .HS 38180120D6
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
DEVSLOT0n .BS 1
DEVSLOTCn .BS 1
DEVSLOTn0 .BS 1
DEVSLOTCn .BS 1
*--------------------------------------
DEVINFO .DA #S.DEVINFO.TYPE.XY
MAN

View File

@ -55,18 +55,18 @@ CS.INIT >LDYA L.DEVNAME.GFX
.20 stx hDevMouse
>STYA pDevMouse
lda #A2osX.SCREENS.G
>SYSCALL SYS.ScreenSelectA
ldx #DEVMGR.OPEN
jsr GoDevGFX
bcs *
lda #A2osX.SCREENS.G
>SYSCALL SYS.ScreenSelectA
ldx #DEVMGR.OPEN
jsr GoDevMouse
bcs *
jmp .8
* jmp .8
lda #2
sta BW

View File

@ -53,8 +53,7 @@ J.INTCMDS .DA EXEC.CMD.CD
.DA EXEC.CMD.TYPE
.DA 0
*--------------------------------------
CS.INIT >DEBUG
>LDYA L.LIBSTR
CS.INIT >LDYA L.LIBSTR
>SYSCALL SYS.LoadLibYA
bcs .9
sta hLIBSTR
@ -162,8 +161,10 @@ CS.RUN lda #0
rts
.81 jsr CloseTxtFile
bra .8
ldy #bExitOnEOF
lda (pData),y
beq .8
lda #0
.99 sec
rts
*--------------------------------------

View File

@ -58,7 +58,13 @@ S.TskMgrInit stz TSKMGR.LASTID
ldy #S.PS.hPREFIX
sta TskMgr.Table,y
S.TskMgrInit.Env
S.TskMgrInit.Env
jsr S.SelectProcess0
ldx #DEVMGR.OPEN
jsr pDevJmp
>PUSHWI TmpBuffer256 push ENV value
>PUSHWI ENV.A2osX push ENV name
jsr S.SetEnvVarP
@ -78,11 +84,6 @@ S.TskMgrInit.Env
>PUSHWI ENV.DRV
jsr S.SetEnvVarP
bcs .9
jsr S.SelectProcess0
ldx #DEVMGR.OPEN
jsr pDevJmp
.9 rts
*--------------------------------------

View File

@ -199,8 +199,6 @@ Kernel.Init sei
jsr S.TskMgrInit
bcs *
>DEBUG
>LDYAI MSG.Init
jsr S.PSTROutYA
@ -215,12 +213,10 @@ Kernel.Init sei
ply get back ARGS in Y
phy
pha A=CMH, save for discard
>DEBUG
jsr S.CreateProcessYA
bcs *
>DEBUG
pla
jsr S.FreeMemA
pla
@ -228,8 +224,6 @@ Kernel.Init sei
>LDYAI MSG.Init.OK
jsr S.PSTROutYA
>DEBUG
*--------------------------------------
S.KernelRun jsr S.TskMgrRun
bcs .98
@ -345,7 +339,6 @@ S.ScreenSelectA and A2osX.SCREENS Screen is available ?
sta SETHIRES
sta CLR80STORE
sta CLRPAGE2
sta SET80STORE
sta SETIOUDIS
sta SETDHIRES