mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-08 08:30:01 +00:00
Minor cleanup of text colour setting code.
This commit is contained in:
parent
ae7c263fed
commit
5780da59fe
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -556,10 +556,7 @@ SHRCLEAR PHP ; Disable interrupts
|
||||
|
||||
* Set text colour
|
||||
* A=txt colour
|
||||
SHRSETTCOL BIT VDUBANK ; Check it is a GS ..
|
||||
BMI :GS ; .. easier to check here
|
||||
RTS
|
||||
:GS PHA
|
||||
SHRSETTCOL PHA
|
||||
LDX VDUPIXELS ; Pixels per byte
|
||||
CPX #$02 ; 2 is 320-mode (MODE 1)
|
||||
BNE :MODE0
|
||||
|
17
auxmem.vdu.s
17
auxmem.vdu.s
@ -921,8 +921,7 @@ VDU20LP STA TXTFGD,X ; Clear all colours
|
||||
DEX ; and gcol actions
|
||||
BPL VDU20LP
|
||||
LDA #$80
|
||||
JSR HGRSETTCOL ; Set txt background
|
||||
JSR SHRSETTCOL ; Set txt background
|
||||
JSR SETTCOL ; Set txt background
|
||||
LDX #$00
|
||||
LDA #$80
|
||||
JSR HGRSETGCOL ; Set gfx background
|
||||
@ -930,8 +929,7 @@ VDU20LP STA TXTFGD,X ; Clear all colours
|
||||
AND #$07
|
||||
PHA
|
||||
STA TXTFGD ; Note txt foreground
|
||||
JSR HGRSETTCOL ; Set txt foreground
|
||||
JSR SHRSETTCOL ; Set txt background
|
||||
JSR SETTCOL ; Set txt foreground
|
||||
LDX #$00
|
||||
PLA
|
||||
STA GFXFGD ; Note gfx foreground
|
||||
@ -941,8 +939,7 @@ VDU20LP STA TXTFGD,X ; Clear all colours
|
||||
VDU17 LDA VDUQ+8
|
||||
CMP #$C0
|
||||
BCS VDU17BORDER
|
||||
JSR HGRSETTCOL
|
||||
JMP SHRSETTCOL
|
||||
JMP SETTCOL
|
||||
VDU17BORDER AND #$0F
|
||||
STA VDUBORDER
|
||||
TAX
|
||||
@ -950,6 +947,14 @@ VDU17BORDER AND #$0F
|
||||
STA CLOCKCTL
|
||||
RTS
|
||||
|
||||
* Helper function
|
||||
SETTCOL JSR HGRSETTCOL ; Set txt foreground
|
||||
BIT VDUBANK
|
||||
BPL :NOTGS
|
||||
JSR SHRSETTCOL ; Set txt background
|
||||
:NOTGS RTS
|
||||
|
||||
|
||||
* VDU 18 - GCOL k,a - select graphics colour and plot action
|
||||
VDU18 LDY #$02 ; Y=>gfd settings
|
||||
LDA VDUQ+8 ; GCOL colour
|
||||
|
Loading…
Reference in New Issue
Block a user