Mercurial > hg > Members > kono > nitros9-code
changeset 3257:987f995993c3
co80: Use HW port address from descriptor (via SCF and VTIO)
Change the driver code to not use a hardcoded address.
Change the value in the descriptor to the previously
hardcoded value in the driver. Looks like someone was debugging
a WordPak prototype using the cartridge ROM enable output...
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Wed, 29 Aug 2018 08:49:13 +0200 |
parents | 11d87afc644a |
children | 9d4f4204b82d |
files | level1/modules/co80.asm level1/modules/term_80.asm |
diffstat | 2 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/modules/co80.asm Wed Aug 29 08:44:58 2018 +0200 +++ b/level1/modules/co80.asm Wed Aug 29 08:49:13 2018 +0200 @@ -18,8 +18,6 @@ nam CO80 ttl Mysterious 80 column co-driver for VTIO -BASEADDR equ $FF78 - ifp1 use defsfile use cocovtio.d @@ -47,7 +45,7 @@ lbra Term * Init -Init ldx #BASEADDR +Init ldx <V.PORT,u HW Base Address lda #$06 Vertical Displayed Rows sta $01,x sta ,x @@ -81,7 +79,7 @@ ldb <V.C80Y,u addb #$20 std R$X,y - ldx #BASEADDR + ldx <V.PORT,u lda #$0D Display Start Address sta $01,x lbsr WaitBUSY @@ -97,7 +95,7 @@ coma rts * Write -Write ldx #BASEADDR get HW addr in X +Write ldx <V.PORT,u get HW addr in X cmpa #$0E $0E? bcs L00B6 branch if less than cmpa #$1E $1E? @@ -127,7 +125,7 @@ ldd a,x leax d,x pshs x - ldx #BASEADDR + ldx <V.PORT,u rts * display functions dispatch table @@ -269,7 +267,7 @@ stb <V.NGChr,u clrb rts -L01B0 ldx #BASEADDR get HW address +L01B0 ldx <V.PORT,u get HW address lda <V.NChr2,u get char2 in A ldb <V.NChar,u and char1 in B subb #32 subtract 32 from B @@ -325,7 +323,7 @@ CurOnOff leax >L0219,pcr ldb #$01 bra L01A8 -L0219 ldx #BASEADDR +L0219 ldx <V.PORT,u lda <V.NChr2,u get next character cmpa #$20 cursor code valid? blt WritErr no, error
--- a/level1/modules/term_80.asm Wed Aug 29 08:44:58 2018 +0200 +++ b/level1/modules/term_80.asm Wed Aug 29 08:49:13 2018 +0200 @@ -28,7 +28,7 @@ fcb UPDAT. mode byte fcb HW.Page extended controller address - fdb $C000 physical controller address + fdb $FF78 physical controller address fcb initsize-*-1 initilization table size fcb DT.SCF device type:0=scf,1=rbf,2=pipe,3=scf fcb $00 case:0=up&lower,1=upper only