Kernel 0.9.1 : LibGui, Fonts.....

This commit is contained in:
Rémy GIBERT 2017-12-14 17:25:03 +01:00
parent 4dcd79c345
commit 47c6d59784
10 changed files with 53 additions and 22 deletions

Binary file not shown.

Binary file not shown.

View File

@ -82,7 +82,11 @@ SYS.MKFIFO .EQ $0A
SYS.OpenDir.YA .EQ $10 SYS.OpenDir.YA .EQ $10
SYS.ReadDir.A .EQ $12 SYS.ReadDir.A .EQ $12
SYS.CloseDir.A .EQ $14 SYS.CloseDir.A .EQ $14
* .EQ $16-$1E * .EQ $16
* .EQ $18
* .EQ $1A
* .EQ $1C
* .EQ $1E
SYS.FPutC.AY .EQ $20 SYS.FPutC.AY .EQ $20
SYS.PutChar.A .EQ $22 SYS.PutChar.A .EQ $22
@ -90,8 +94,8 @@ SYS.GetC.A .EQ $24
SYS.GetChar .EQ $26 SYS.GetChar .EQ $26
SYS.FPutS .EQ $28 SYS.FPutS .EQ $28
SYS.PutS.YA .EQ $2A SYS.PutS.YA .EQ $2A
SYS.FGetS .EQ $2C *SYS.FGetS .EQ $2C
SYS.GetS.YA .EQ $2E *SYS.GetS.YA .EQ $2E
SYS.FOpen .EQ $30 SYS.FOpen .EQ $30
SYS.FOpen.R .EQ $01 Open For Read SYS.FOpen.R .EQ $01 Open For Read
@ -109,6 +113,7 @@ SYS.FSeek.CUR .EQ $01
SYS.FSeek.END .EQ $02 SYS.FSeek.END .EQ $02
SYS.FTell .EQ $3C SYS.FTell .EQ $3C
SYS.FEOF .EQ $3E SYS.FEOF .EQ $3E
SYS.Remove.YA .EQ $40 SYS.Remove.YA .EQ $40
SYS.Rename .EQ $42 SYS.Rename .EQ $42
* .EQ $44 * .EQ $44
@ -165,7 +170,7 @@ SYS.LoadLib.YA .EQ $98
SYS.UnloadLib.A .EQ $9A SYS.UnloadLib.A .EQ $9A
SYS.LoadDrv.YA .EQ $9C SYS.LoadDrv.YA .EQ $9C
SYS.FileSearch .EQ $9E SYS.FileSearch .EQ $9E
*--------------------------------------
SYS.ExecPSNewEnv.YA .EQ $A0 SYS.ExecPSNewEnv.YA .EQ $A0
SYS.ExecPS.YA .EQ $A2 SYS.ExecPS.YA .EQ $A2
SYS.CreatePSNewEnv.YA .EQ $A4 SYS.CreatePSNewEnv.YA .EQ $A4

View File

@ -130,8 +130,7 @@ DrawCursor.I >LDYA L.GC.Screen
jsr CLIP.YA jsr CLIP.YA
bcs .9 bcs .9
>LDYA L.CB.Cache jmp GoDevGfx
jmp GoDevGfx.YA
.9 rts .9 rts
*-------------------------------------- *--------------------------------------

View File

@ -24,9 +24,7 @@ Draw >PULLW ZPCBPtr Get CB
jsr Draw.Jmp jsr Draw.Jmp
bra .7 bra .7
.2 >LDYA L.CB.Cache .2 jsr GoDevGfx
jsr GoDevGfx.YA
.7 lda (ZPCBPtr) Get Cmd .7 lda (ZPCBPtr) Get Cmd
tax tax

View File

@ -251,7 +251,7 @@ GetScreenGC >LDYA L.GC.Screen
rts rts
*-------------------------------------- *--------------------------------------
GoDevGfx >LDYA L.CB.Cache GoDevGfx >LDYA L.CB.Cache
GoDevGfx.YA ldx #DEVMGR.WRITE ldx #DEVMGR.WRITE
GoDevGfx.Jmp jmp $ffff GoDevGfx.Jmp jmp $ffff
*-------------------------------------- *--------------------------------------
GoDevMouse jmp $ffff GoDevMouse jmp $ffff

View File

@ -6,7 +6,7 @@ AUTO 6
.LIST OFF .LIST OFF
.OP 65C02 .OP 65C02
.OR $2000 .OR $2000
.TF /A2OSX.BUILD/SBIN/GUI .TF /A2OSX.BUILD/SBIN/GUI/GUI
*-------------------------------------- *--------------------------------------
.INB /A2OSX.BUILD/INC/IO.I .INB /A2OSX.BUILD/INC/IO.I
.INB /A2OSX.BUILD/INC/MACROS.I .INB /A2OSX.BUILD/INC/MACROS.I
@ -36,6 +36,7 @@ CS.START cld
.DA CS.QUIT .DA CS.QUIT
L.MSG.INIT .DA MSG.INIT L.MSG.INIT .DA MSG.INIT
L.LIBGUI .DA LIBGUI L.LIBGUI .DA LIBGUI
L.SYSFONT .DA SYSFONT
L.Filename .DA Filename L.Filename .DA Filename
L.MouseData .DA MouseData L.MouseData .DA MouseData
L.CB.Rect .DA CB.Rect L.CB.Rect .DA CB.Rect
@ -49,18 +50,26 @@ CS.INIT >LDYA L.MSG.INIT
>LDYA L.LIBGUI >LDYA L.LIBGUI
>SYSCALL LoadLib.YA >SYSCALL LoadLib.YA
bcs .9 bcs .99
sta hLIBGUI sta hLIBGUI
>LIBCALL hLIBGUI,LIBGUI.InitGUI >LIBCALL hLIBGUI,LIBGUI.InitGUI
bcs .9 bcs .99
>PUSHWI 0 Aux type
>PUSHBI $CC Type
>PUSHBI SYS.FOpen.R
>PUSHW L.SYSFONT
>SYSCALL LoadStkObj
bcs .99
sta hSYSFONT
>PUSHWI 0 Aux type >PUSHWI 0 Aux type
>PUSHBI $CB Type >PUSHBI $CB Type
>PUSHBI SYS.FOpen.R >PUSHBI SYS.FOpen.R
>PUSHW L.FILENAME >PUSHW L.FILENAME
>SYSCALL LoadStkObj >SYSCALL LoadStkObj
bcs .9 .99 bcs .9
sta CB.BitBlt+S.CB.SrcPtr sta CB.BitBlt+S.CB.SrcPtr
@ -163,9 +172,12 @@ CS.END
LIBGUI >CSTR "libgui.o" LIBGUI >CSTR "libgui.o"
MSG.INIT >CSTR "GUI:Init...\r\n" MSG.INIT >CSTR "GUI:Init...\r\n"
hLIBGUI .BS 1 hLIBGUI .BS 1
hSYSFONT .BS 1
*-------------------------------------- *--------------------------------------
Filename >CSTR "/A2OSX.BUILD/MARILYN" Filename >CSTR "/A2OSX.BUILD/MARILYN"
*-------------------------------------- *--------------------------------------
SYSFONT >CSTR "/A2OSX.BUILD/SBIN/GUI/SYSTEM"
*--------------------------------------
MouseData .BS S.MOUSE MouseData .BS S.MOUSE
*-------------------------------------- *--------------------------------------
CB.Rect .DA #S.CB.CMD.FILLRECT CB.Rect .DA #S.CB.CMD.FILLRECT

View File

@ -60,6 +60,8 @@ CS.END
*-------------------------------------- *--------------------------------------
ZPCmdPtr .EQ ZPDRV ZPCmdPtr .EQ ZPDRV
ZPDestBMPtr .EQ ZPDRV+2 ZPDestBMPtr .EQ ZPDRV+2
ZPFontPtr .EQ ZPDRV+4
ZPCharPtr .EQ ZPDRV+6
*-------------------------------------- *--------------------------------------
* YA =Ptr to S.CB in MAIN**** * YA =Ptr to S.CB in MAIN****
* X = DestBM hMem * X = DestBM hMem
@ -186,6 +188,12 @@ FILLRECT
*-------------------------------------- *--------------------------------------
BITBLT BITBLT
*-------------------------------------- *--------------------------------------
* In:
* S.CB.SrcW
* S.CB.SrcH
* Out:
* S.CB.DstPtr : Buffer Size (in bytes)
*--------------------------------------
GETRECTBUFSIZE GETRECTBUFSIZE
*-------------------------------------- *--------------------------------------
* In: * In:

View File

@ -175,11 +175,15 @@ Cmd.Exec.EXT jsr Cmd.Exec.Split
bcs .99 bcs .99
.3 >LDYA ZPCMDBuf .3 >LDYA ZPCMDBuf
.4 >SYSCALL NewStr.YA .4 >SYSCALL NewStr.YA
bcs .99 bcs .99
txa txa
>STA.G CMD.hFullpath >STA.G CMD.hFullpath
lda #0
sta (ZPCMDBuf) reset ZPCMDBuf for final CMD
ldy #CMD.Stat+S.STAT.P.TYPE ldy #CMD.Stat+S.STAT.P.TYPE
lda (pData),y lda (pData),y
cmp #$04 TXT File ? cmp #$04 TXT File ?
@ -199,22 +203,23 @@ Cmd.Exec.EXT jsr Cmd.Exec.Split
*-------------------------------------- *--------------------------------------
Cmd.Exec.EXT.TXT Cmd.Exec.EXT.TXT
lda #0 Get arg[0] = /PATH/SHELL lda #0 Get arg[0] = /PATH/SHELL
>SYSCALL GetArg.A >SYSCALL GetArg.A
>PUSHYA >PUSHYA
>PUSHW ZPCMDBuf >PUSHW ZPCMDBuf
>SYSCALL StrCpy >SYSCALL StrCat
jsr Cmd.Exec.EXT.SEP Add a space.... jsr Cmd.Exec.EXT.SEP Add a space....
*--------------------------------------
* BIN : Launch "/PATH/CMD ARGS"
*--------------------------------------
Cmd.Exec.EXT.BIN
>LDA.G CMD.hFullpath >LDA.G CMD.hFullpath
>SYSCALL GetMemPtr.A >SYSCALL GetMemPtr.A
>PUSHYA >PUSHYA
>PUSHW ZPCMDBuf >PUSHW ZPCMDBuf
>SYSCALL StrCat >SYSCALL StrCat
*--------------------------------------
* BIN : Launch "/PATH/CMD ARGS"
*--------------------------------------
Cmd.Exec.EXT.BIN
lda (ZPPTR2) Some ARGS ? lda (ZPPTR2) Some ARGS ?
beq .1 beq .1

View File

@ -194,16 +194,20 @@ K.FileSearch.I >PULLW .4+1 Filename
>SYSCALL STAT -> BNK1 >SYSCALL STAT -> BNK1
bcs .1 Failed...retry next path... bcs .1 Failed...retry next path...
lda K.S.STAT+S.STAT.P.TYPE
cmp #S.FI.T.DIR Dir ?
beq .1
jsr .98 Discard Expanded hSrch list jsr .98 Discard Expanded hSrch list
clc clc
rts .99 rts
.98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list .98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list
jsr K.FreeMem.A jsr K.FreeMem.A
lda #MLI.E.FNOTFND lda #MLI.E.FNOTFND
sec sec
.99 rts rts
*-------------------------------------- *--------------------------------------
BIN.FindLIB clc BIN.FindLIB clc
.HS B0 bcs .HS B0 bcs