From db53947da5e915b42ae5b1319118a37510fd8b50 Mon Sep 17 00:00:00 2001 From: david-schmidt <1110325+david-schmidt@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:32:36 -0400 Subject: [PATCH] Load up the normal Apple font on the /// --- .gitignore | 7 +- build/build-xtn.xml | 126 +++++++++++++++++----------------- build/build.xml | 6 +- src/common/PrivateGlobals.asm | 2 +- src/shell/3/conio3.asm | 85 +++++++++++++++++++++++ src/shell/3/starfont.bin | Bin 0 -> 1024 bytes src/shell/main.asm | 2 +- 7 files changed, 157 insertions(+), 71 deletions(-) create mode 100644 src/shell/3/starfont.bin diff --git a/.gitignore b/.gitignore index e6b671f..8562af2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -/dist/ -/obj/ -*.lst \ No newline at end of file +/dist/ +/obj/ +*.lst +Davex.properties \ No newline at end of file diff --git a/build/build-xtn.xml b/build/build-xtn.xml index ea246ac..503012d 100644 --- a/build/build-xtn.xml +++ b/build/build-xtn.xml @@ -1,5 +1,5 @@ - + @@ -32,69 +32,69 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/build.xml b/build/build.xml index a65f53d..5adf8e1 100644 --- a/build/build.xml +++ b/build/build.xml @@ -1,5 +1,5 @@ - + @@ -32,7 +32,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/src/common/PrivateGlobals.asm b/src/common/PrivateGlobals.asm index 53df83b..92b174a 100644 --- a/src/common/PrivateGlobals.asm +++ b/src/common/PrivateGlobals.asm @@ -3,7 +3,7 @@ ; myBakVer = $00 myversion = $14 -AuxVersion = 0 ; = 1.40 +AuxVersion = 1 ; = 1.41 Proto = 1 RemoteImp = 0 diff --git a/src/shell/3/conio3.asm b/src/shell/3/conio3.asm index 0ec6ce0..0607156 100644 --- a/src/shell/3/conio3.asm +++ b/src/shell/3/conio3.asm @@ -19,6 +19,7 @@ cout: ; Character output routine (print to screen) ;--------------------------------------------------------- init_screen: ; Prepare the system for our expectations + jsr loadfnt CALLOS mli_open, OPEN_PARMS ; Open the console ;jsr ERRORCK lda OPEN_REF @@ -182,6 +183,90 @@ suspend80: restore80: rts +;--------------------------------------------------------- +; loadfnt: Load up the standard Apple character font +;--------------------------------------------------------- + +ctemp1 = $FD + +dnldcel = $FE +dnldchr = $FF + +dimgptr = $21 +dcelptr = $2a + +cwrton = $C0DB +cwrtoff = $C0DA +cb2ctrl = $FFEC +cb2int = $FFED + +loadfnt: + lda #$F0 + sta $FFDF + lda #fontptr + sta dimgptr+1 + lda #$00 + sta dnldchr + lda #$07 + sta dnldcel +@1: jsr loadchr + dec dnldcel + bpl @2 + bit cwrton + jsr vretrce + jsr vretrce + bit cwrtoff + lda #$07 + sta dnldcel +@2: inc dnldchr + bpl @1 + +loadchr: lda #$00 ; X will be set to 0 for this function + tax + tay ; Use Y for row counter +@1: lda dnldcel ; Set up cell pointer for ASCII code + and #$03 + ora dcptrl, y + sta dcelptr, x + lda dnldcel + lsr + lsr + cpy #$04 + rol + ora #$08 + sta dcelptr+1, x + lda dnldchr ; Store ASCII code into download cell + sta (dcelptr, x) + lda dcelptr+1, x ; Fix cell pointer for character image + eor #$0C + sta dcelptr+1, x + lda (dimgptr, x) ; Store character image + sta (dcelptr, x) ; into download cell + inc dimgptr, x ; Increment the image pointer + bne @2 + inc dimgptr+1, x +@2: iny ; Increment the row number + cpy #$08 + bcc @1 ; Not done yet + rts + +vretrce: sta ctemp1 ; save bits to be stored + lda cb2ctrl ; control port for "CB2" + and #$3F ; reset high bits to 0 + ora ctemp1 + sta cb2ctrl + lda #$08 ; test vertical retrace + sta cb2int +vwait: bit cb2int ; wait for retrace + beq vwait + rts + +dcptrl: .byte $78, $7C, $F8, $FC, $78, $7C, $F8, $FC + +fontptr: .incbin "../../src/shell/3/starfont.bin" + INIT_SCREEN_DATA: .byte 16 INIT_SCREEN_COLUMNS: diff --git a/src/shell/3/starfont.bin b/src/shell/3/starfont.bin new file mode 100644 index 0000000000000000000000000000000000000000..bc1e5f1ed4fc6745c5f68c63e3e252e081b6ad9a GIT binary patch literal 1024 zcmXw1ftJ!R5Zs2e1ZXipPa;=)F><_8cqf9MfVKXTf8eh>lb#E&(@7?~JDW~s#lC5- zk|pi&XVXMn0msQAiIx>(-Ua9)5dOd-AJRbpT@DXsw|S{1ZEG=SWW%3?S;V ziZ&J;Iq}3hPeN~_-zv2Cjp}fnA@m^#lJk#!_(EO~M2-5YR_rUHk`CMF&*tKWsLD)BoK@d6TO3rhrU(qjy$Y7nQk5ES5wy(@r zvh|46#ksK0i~+}V@8SN$-~=GY^DX`kvmvW|2S2cf5;Zs-cJR}Iciay>xZCQQb0^2d zt3e+yZC)VmOB_DqWsc!3=kO7)73(4xK+DR^Pviu+K1=}hn9qycGtPtcD_@Idxh=m_ w$j`?C;h!7>AaVf1I{JZATyHPeJkRp{%I`GB+_{r;b2)AxMOf1>7N2VQ2NpL=SpWb4 literal 0 HcmV?d00001 diff --git a/src/shell/main.asm b/src/shell/main.asm index 2c0770e..33518c0 100644 --- a/src/shell/main.asm +++ b/src/shell/main.asm @@ -48,7 +48,7 @@ dollar: asc "Copyright (c) 1988-1990, 1999-2011" .byte cr asc "by David A. Lyons" .byte cr,cr - asc " http://davex.sourceforge.net" + asc " https://github.com/david-schmidt/Davex" .byte cr,cr asc "Davex is Freeware. If you find it useful, please let me know." .byte cr