Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-12-19 08:12:58 +01:00
parent 1b66ead5df
commit b71302d05d
11 changed files with 195 additions and 151 deletions

Binary file not shown.

View File

@ -350,6 +350,6 @@ BASEH .HS 20.24.28.2C.30.34.38.3C
.HS 23.27.2B.2F.33.37.3B.3F
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.G
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.G
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -24,7 +24,7 @@ BITBLT ldy CB.CACHE+S.CB.SrcPtr
sta SETWRITEAUX
tya
ldx #SYS.GetMemPtr.A
ldx #SYS.GetMemPtr
jsr Kernel.JMP
jsr BITBLT.1
@ -402,6 +402,6 @@ BLT.Get7BMBits1 lda (ZPBMDataPtr)
Kernel.JMP jmp (SYS.Kernel.JMP,x)
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.RECT
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.S.RECT
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -312,6 +312,6 @@ LBUF.DrawAtY.AND.ORA
.8 rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.LBUF
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/RV/DHGR.DRV.S.LBUF
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -241,6 +241,6 @@ VLINE.C16 lda CB.Cache+S.CB.X1
.13 rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.LINE
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.S.LINE
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -157,6 +157,6 @@ SETPIXEL.C16 lda CB.Cache+S.CB.X1
GETPIXEL rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.PIX
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.S.PIX
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -52,13 +52,13 @@ GETRECTBUFSIZE >LDYA CB.Cache+S.CB.X1
phy
ldy #S.CB.DstPtr+1
sta (ZPCmdPtr),y
sta (ZPIOCTL),y
pla
dey
sta (ZPCmdPtr),y
sta (ZPIOCTL),y
rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S.BLT
LOAD USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.S.BLT
LOAD USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -9,13 +9,127 @@ AUTO 4,1
.INB INC/MACROS.I
.INB INC/A2OSX.I
.INB INC/MLI.I
.INB INC/MLI.E.I
.INB INC/IO.I
.INB INC/GFX.I
.INB INC/GFX.EVE.I
.INB INC/GUI.I
.INB INC/LIBGUI.I
*--------------------------------------
ZPCmdPtr .EQ ZPDRV
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp Dev.Detect cld,jmp abs=DRV
.DA #$61 6502,Level 1 (65c02)
.DA #1 DRV Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length
.DA 0
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
L.MSG.DETECT .DA MSG.DETECT
L.MSG.DETECT.IIC .DA MSG.DETECT.IIC
L.MSG.DETECT.EVE .DA MSG.DETECT.EVE
L.MSG.DETECT.80C .DA MSG.DETECT.80C
L.DRV.CS.START .DA DRV.CS.START
L.FD.DEV .DA FD.DEV
L.FD.DEV.NAME .DA FD.DEV.NAME
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL puts
lda MACHID
and #MACHID.T
cmp #MACHID.T.IIc
bne .1
lda #$80
sta DCB+S.DCB.GFX.S $80=//c
>LDYA L.MSG.DETECT.IIC
bra .3
.1 php
sei
sta SETPAGE2
ldx $400 Save Aux $400
lda #$ff Make sure !=1 for comparing later
sta $400
sta CLRPAGE2
ldy $400 Save Main $400
lda #$01 Select Foreground/BKgrnd Colors
sta TXT16.ON Activate 16 color mode
sta $400 Store something in Main
sta SETPAGE2
eor $400 read back AUX, If EVE, must be F/BG colors
bne .2
dec
sta DCB+S.DCB.GFX.S 0=80C,$ff=EVE
.2 stx $400 Set back Aux $400
sta CLRPAGE2
sty $400 Set back Main $400
plp
>LDYA L.MSG.DETECT.EVE
bit DCB+S.DCB.GFX.S
bmi .3
>LDYA L.MSG.DETECT.80C
.3 >SYSCALL puts
>PUSHWI DRV.END
>PUSHWI DRV.CS.END
>PUSHWI DRV.CS.START
>LDYA L.DRV.CS.START
>SYSCALL InsDrv
bcs .9
>STYA FD.DEV+S.FD.DEV.DRVPTR
>PUSHW L.FD.DEV.NAME
>LDYA L.FD.DEV
>SYSCALL MKDEV
.9 rts
*--------------------------------------
CS.END
MSG.DETECT .AZ "Apple IIe/IIc DHGR Driver."
MSG.DETECT.IIC .AZ "Apple //c detected, Assuming 'Le Chat Mauve' Mode."
MSG.DETECT.EVE .AZ "'Le Chat Mauve EVE' Board Detected."
MSG.DETECT.80C .AZ "No Specific H/W Found, Assuming 80c Mode."
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------
FD.DEV .DA #S.FD.T.CDEV
.DA #0 HANDLER
.DA #0 BUSID
.DA #0 DEVID
.DA 0 BUSPTR
.BS 2 DRVPTR
.DA 0 DCBPTR
.DA 0 BUFPTR
FD.DEV.NAME .AZ "GFX"
*--------------------------------------
* Driver Code
*--------------------------------------
ZPIOCTL .EQ ZPDRV
ZPBasePtr .EQ ZPDRV+2
ZPBMShiftPtr .EQ ZPDRV+4
ZPScrShiftPtr .EQ ZPDRV+6
@ -42,106 +156,9 @@ BLT.CMASK .EQ ZPDRV+30
*--------------------------------------
ZPTmpByte .EQ ZPDRV+31
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp Dev.Detect cld,jmp abs=DRV
.DA #$61 6502,Level 1 (65c02)
.DA #1 DRV Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length
.DA DEV.HEADER-CS.START Device Header Offset
.DA DRV.CS.START-CS.START Driver Code Offset
.DA DRV.CS.END-DRV.CS.START Drv Code Length
*--------------------------------------
* Relocation Table
*--------------------------------------
L.MSG.DETECT .DA MSG.DETECT
L.MSG.DETECT.IIC .DA MSG.DETECT.IIC
L.MSG.DETECT.EVE .DA MSG.DETECT.EVE
L.MSG.DETECT.80C .DA MSG.DETECT.80C
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL puts
lda MACHID
and #MACHID.T
cmp #MACHID.T.IIc
bne .1
lda #$80
sta DSTAT+S.DIB.ST $80=//c
>LDYA L.MSG.DETECT.IIC
bra .3
.1 php
sei
sta SET80STORE
sta SETPAGE2
ldx $400 Save Aux $400
lda #$ff Make sure !=1 for comparing later
sta $400
sta CLRPAGE2
ldy $400 Save Main $400
lda #$01 Select Foreground/BKgrnd Colors
sta TXT16.ON Activate 16 color mode
sta $400 Store something in Main
sta SETPAGE2
eor $400 read back AUX, If EVE, must be F/BG colors
bne .2
dec
sta DSTAT+S.DIB.ST 0=80C,$ff=EVE
.2 stx $400 Set back Aux $400
sta CLRPAGE2
sty $400 Set back Main $400
sta CLR80STORE
plp
>LDYA L.MSG.DETECT.EVE
bit DSTAT+S.DIB.ST
bmi .3
>LDYA L.MSG.DETECT.80C
.3 >SYSCALL puts
clc
rts
*--------------------------------------
CS.END
MSG.DETECT .AZ "Apple IIe/IIc DHGR Driver."
MSG.DETECT.IIC .AZ "Apple //c detected, Assuming 'Le Chat Mauve' Mode."
MSG.DETECT.EVE .AZ "'Le Chat Mauve EVE' Board Detected."
MSG.DETECT.80C .AZ "No Specific H/W Found, Assuming 80c Mode."
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------
DEV.HEADER cld
jmp (DRV.CS.START,x)
.DA #0
.BS 6
DEV.HEADER.NAME .AZ "GFX"
.BS 1
*--------------------------------------
* Driver Code
*--------------------------------------
DRV.CS.START .DA STATUS
DRV.CS.START cld
jmp (.1,x)
.1 .DA STATUS
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
@ -174,13 +191,42 @@ L.SHIFT .DA SHIFT.L1
.DA SHIFT.L4
.DA SHIFT.L5
.DA SHIFT.L6
L.DSTAT .DA DSTAT
L.Color.Pixels .DA Color.Pixels
.DA 0 end or relocation
*--------------------------------------
STATUS >LDYA L.DSTAT
STATUS >STYA ZPIOCTL
ldy #S.IOCTL.STATCODE
lda (ZPIOCTL),y
beq .1
cmp #S.IOCTL.STATCODE.GETDIB
bne STATUS.DCB
ldx #S.DIB-1
.HS 2C bit abs
.1 ldx #3
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta .3+1
iny
lda (ZPIOCTL),y
sta .3+2
.2 lda DIB,x
.3 sta $ffff,x SELF MODIFIED
dex
bpl .2
clc
rts
STATUS.DCB
STATUS.9 lda #MLI.E.BADCTL
sec
rts
*--------------------------------------
OPEN sta A2osX.SCRNDEVS+2 DEV.ID in A
@ -213,7 +259,7 @@ OPEN sta A2osX.SCRNDEVS+2 DEV.ID in A
*--------------------------------------
CONTROL ldy #0
bit DSTAT+S.DIB.ST
bit DCB+S.DCB.GFX.S
bmi .1 //c,EVE mode
ldy #CONTROL.LCM-CONTROL.80C
@ -235,26 +281,20 @@ CONTROL ldy #0
CLOSE clc
rts
*--------------------------------------
WRITE >STYA ZPCmdPtr
WRITE >STYA ZPIOCTL
sta SETHIRES Make sure SET80STORE active at $2000
sta SET80STORE
lda (ZPCmdPtr) Get Cmd
lda (ZPIOCTL) Get Cmd
.1 tax
ldy CB.CmdLen,x
.2 lda (ZPCmdPtr),y
.2 lda (ZPIOCTL),y
sta CB.Cache,y
dey
bpl .2
.3 jsr .10
sta CLRPAGE2
sta CLR80STORE
clc
rts
@ -320,15 +360,15 @@ YAMultX stx ZPTmpByte
rts
*--------------------------------------
.INB USR/SRC/BIN/DRV/DHGR.DRV.S.BLT
.INB USR/SRC/BIN/DRV/DHGR.DRV.S.LBUF
.INB USR/SRC/BIN/DRV/DHGR.DRV.S.LINE
.INB USR/SRC/BIN/DRV/DHGR.DRV.S.PIX
.INB USR/SRC/BIN/DRV/DHGR.DRV.S.RECT
.INB USR/SRC/DRV/DHGR.DRV.S.BLT
.INB USR/SRC/DRV/DHGR.DRV.S.LBUF
.INB USR/SRC/DRV/DHGR.DRV.S.LINE
.INB USR/SRC/DRV/DHGR.DRV.S.PIX
.INB USR/SRC/DRV/DHGR.DRV.S.RECT
*--------------------------------------
DRV.CS.END
*--------------------------------------
.INB USR/SRC/BIN/DRV/DHGR.DRV.G
.INB USR/SRC/DRV/DHGR.DRV.G
*--------------------------------------
CONTROL.SWTCHES
* sta CLRTEXT
@ -353,10 +393,10 @@ CONTROL.80C
* sta SETDHIRES STA $C05E ;AN3 OFF
.DA #CLRTEXT
.DA #CLRMIXED
* .DA #CLRMIXED
.DA #SETHIRES
.DA #CLR80STORE
.DA #CLRPAGE2
* .DA #CLR80STORE
* .DA #CLRPAGE2
.DA #SETIOUDIS
.DA #CLR80DISP
@ -385,10 +425,10 @@ CONTROL.LCM
* sta SETDHIRES
.DA #CLRTEXT
.DA #CLRMIXED
* .DA #CLRMIXED
.DA #SETHIRES
.DA #CLR80STORE
.DA #CLRPAGE2
* .DA #CLR80STORE
* .DA #CLRPAGE2
.DA #SETIOUDIS
.DA #CLRAN2
@ -420,20 +460,22 @@ BM.Cache .BS S.BM
LBUF.MASK .BS 81 81 because of sta LBUF.DATA+1,x!!!
LBUF.DATA .BS 81
*--------------------------------------
DSTAT .DA #0
DIB .DA #0
.DA #0,#0,#0
>PSTR "Apple II DHGR"
.BS 3
.DA #S.DIB.T.GFX
.DA #0
.DA #0
.DA #91
.DA K.VER
*--------------------------------------
.DA #S.CB.M.MONO+S.CB.M.C16
.DA #0 S
DCB .DA #S.DCB.T.GFX
.DA #S.CB.M.MONO+S.CB.M.C16 F
.DA 0 S
.DA 560 W
.DA 192 H
*--------------------------------------
DRV.END
MAN
SAVE USR/SRC/BIN/DRV/DHGR.DRV.S
SAVE USR/SRC/DRV/DHGR.DRV.S
ASM

View File

@ -358,6 +358,7 @@ S.IOCTL .EQ 9
S.DCB.T .EQ 0
S.DCB.T.NIC .EQ $81
S.DCB.T.COM .EQ $82
S.DCB.T.GFX .EQ $83
*--------------------------------------
S.DIB.S .EQ 0
S.DIB.S.BLOCK .EQ %10000000

View File

@ -5,11 +5,12 @@ AUTO 4,1
*--------------------------------------
* GFX Devices
*--------------------------------------
S.DIB.GFX.F .EQ S.DIB
S.DIB.GFX.S .EQ S.DIB+1
S.DIB.GFX.W .EQ S.DIB+2
S.DIB.GFX.H .EQ S.DIB+4
S.DIB.GFX .EQ S.DIB+6
S.DCB.GFX.F .EQ 1
S.DCB.GFX.S .EQ 2
S.DCB.GFX.W .EQ 4
S.DCB.GFX.H .EQ 6
*
S.DCB.GFX .EQ 8
*--------------------------------------
MAN
SAVE INC/GFX.I