diff --git a/applecorn.po b/applecorn.po index f525052..afe52c3 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/auxmem.hgr.s b/auxmem.hgr.s index b1efdb7..4d8de35 100644 --- a/auxmem.hgr.s +++ b/auxmem.hgr.s @@ -121,7 +121,7 @@ CLRLNRET >>> ENTAUX * A=txt colour -HSCRSETTCOL RTS +HGRSETTCOL RTS * A=gfx colour, X=gcol action @@ -134,7 +134,7 @@ HSCRSETTCOL RTS * 5 = NUL no change to pixel * 6 = CLR clear pixel to background * 7 = UND undefined -HSCRSETGCOL PHA +HGRSETGCOL PHA LDA #$00 ; Normal drawing mode CPX #$04 ; k=4 means toggle BNE :NORM diff --git a/auxmem.shr.s b/auxmem.shr.s index dd27df7..cc74d95 100644 --- a/auxmem.shr.s +++ b/auxmem.shr.s @@ -8,6 +8,7 @@ SCB320 EQU $00 ; SCB for 320 mode SCB640 EQU $80 ; SCB for 640 mode + * Colours in the following order. * For 16 colour modes ... * BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, ... @@ -48,6 +49,9 @@ PALETTE640 DB $00, $00 ; BLACK DB $80, $08 ; YELLOW DB $88, $08 ; WHITE +SHRCOLMASK DB $00 ; Colour mask + + * Enable SHR mode SHRVDU22 JSR VDU12 ; Clear text and SHR screen LDA #$80 ; Most significant bit @@ -149,7 +153,7 @@ SHRCHAR640 PHY BNE :L1 PHA LDA :TEMP - AND #%10101010 + AND SHRCOLMASK ; Mask to set colour STA [VDUADDR] PLA STZ :TEMP @@ -164,7 +168,7 @@ SHRCHAR640 PHY BNE :L2 LDA :TEMP LDY #$01 - AND #%10101010 + AND SHRCOLMASK ; Mask to set colour STA [VDUADDR],Y PLY RTS @@ -232,3 +236,15 @@ SHRCLEAR PHP ; Disable interrupts RTS +* Set text colour +* A=txt colour +SHRSETTCOL TAX + LDA :MASKS640,X ; Lookup mask in table + STA SHRCOLMASK ; Set colour mask + RTS +:MASKS640 DB %00000000 + DB %01010101 + DB %10101010 + DB %11111111 + + diff --git a/auxmem.vdu.s b/auxmem.vdu.s index 89fc1c2..732409b 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -900,26 +900,29 @@ VDU20LP STA TXTFGD,X ; Clear all colours * THE FOLLOWING LINE IS FOR GS ONLY & NOT SAFE ON //c * STA CLOCKCTL ; Set border LDA #$80 - JSR HSCRSETTCOL ; Set txt background + JSR HGRSETTCOL ; Set txt background + JSR SHRSETTCOL ; Set txt background LDX #$00 LDA #$80 - JSR HSCRSETGCOL ; Set gfx background + JSR HGRSETGCOL ; Set gfx background LDA VDUCOLOURS AND #$07 PHA STA TXTFGD ; Note txt foreground - JSR HSCRSETTCOL ; Set txt foreground + JSR HGRSETTCOL ; Set txt foreground + JSR SHRSETTCOL ; Set txt background LDX #$00 PLA STA GFXFGD ; Note gfx foreground - JMP HSCRSETGCOL ; Set gfx foreground + JMP HGRSETGCOL ; Set gfx foreground * VDU 17 - COLOUR n - select text or border colour VDU17 LDA VDUQ+8 CMP #$C0 BCS VDU17BORDER * TO DO * - JMP HSCRSETTCOL + JSR HGRSETTCOL + JMP SHRSETTCOL VDU17BORDER AND #$0F STA VDUBORDER TAX @@ -946,7 +949,7 @@ VDU18A LDA VDUQ+7 ; GCOL action ROL A PLP ROR A ; Get bit 7 back - JMP HSCRSETGCOL + JMP HGRSETGCOL * VDU 19 - Select palette colours VDU19 RTS