mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-16 10:29:32 +00:00
Implemented GCOL bg colours. Cleanup gfx code.
This commit is contained in:
parent
856d4f1b3f
commit
000a52b19a
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
30
auxmem.vdu.s
30
auxmem.vdu.s
|
@ -276,12 +276,6 @@ CLREOL LDA VDUTEXTY ; ROW
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
* Clear the screen
|
* Clear the screen
|
||||||
*VDUINIT STA $C00F
|
|
||||||
* LDA #'_'
|
|
||||||
* STA CURSOR ; Normal cursor
|
|
||||||
* STA CURSORCP ; Copy cursor when editing
|
|
||||||
* LDA #$A0
|
|
||||||
* STA CURSORED ; Edit cursor when editing
|
|
||||||
CLEAR STZ VDUTEXTY ; ROW
|
CLEAR STZ VDUTEXTY ; ROW
|
||||||
STZ VDUTEXTX ; COL
|
STZ VDUTEXTX ; COL
|
||||||
:L1 JSR CLREOL
|
:L1 JSR CLREOL
|
||||||
|
@ -463,15 +457,16 @@ VDU22 LDA VDUQ+8
|
||||||
DEX ; All other MODEs default to 40-col
|
DEX ; All other MODEs default to 40-col
|
||||||
VDU22A STA $C051 ; Enable Text
|
VDU22A STA $C051 ; Enable Text
|
||||||
STA $C00C,X ; Select 40col/80col
|
STA $C00C,X ; Select 40col/80col
|
||||||
STA $C003 ; Alt charset off
|
|
||||||
STA $C055 ; PAGE2
|
STA $C055 ; PAGE2
|
||||||
STA $C00F
|
STA $C052 ; Clear MIXED
|
||||||
|
STA $C00F ; Enable alt charset
|
||||||
BRA VDU22C
|
BRA VDU22C
|
||||||
|
|
||||||
VDU22G STA $C057 ; Hi-Res
|
VDU22G STA $C050 ; Enable Graphics
|
||||||
|
STA $C057 ; Hi-Res
|
||||||
STA $C054 ; PAGE1
|
STA $C054 ; PAGE1
|
||||||
STA $C052 ; Clear MIXED
|
STA $C052 ; Clear MIXED
|
||||||
STA $C050 ; Enable Graphics
|
JSR VDU16 ; Clear HGR screen
|
||||||
|
|
||||||
* Set up default cursors
|
* Set up default cursors
|
||||||
VDU22C LDA #'_'
|
VDU22C LDA #'_'
|
||||||
|
@ -580,7 +575,6 @@ SCNTAB DW $800,$880,$900,$980,$A00,$A80,$B00,$B80
|
||||||
DW $850,$8D0,$950,$9D0,$A50,$AD0,$B50,$BD0
|
DW $850,$8D0,$950,$9D0,$A50,$AD0,$B50,$BD0
|
||||||
|
|
||||||
|
|
||||||
* Unimplemented
|
|
||||||
* May end up moving graphics bits to separate source
|
* May end up moving graphics bits to separate source
|
||||||
|
|
||||||
* VDU 1 - Send one character to printer
|
* VDU 1 - Send one character to printer
|
||||||
|
@ -599,19 +593,25 @@ VDU16RET >>> ENTAUX
|
||||||
VDU17 RTS
|
VDU17 RTS
|
||||||
|
|
||||||
* VDU 18 - GCOL k,a - select graphics colour and plot action
|
* VDU 18 - GCOL k,a - select graphics colour and plot action
|
||||||
VDU18 LDA VDUQ+7 ; 'k'
|
VDU18 LDA VDUQ+7 ; Argument 'k'
|
||||||
CMP #$04 ; k=4 means XOR
|
CMP #$04 ; k=4 means XOR
|
||||||
LDA #$00 ; Normal drawing mode
|
LDA #$00 ; Normal drawing mode
|
||||||
BNE :NORM
|
BNE :NORM
|
||||||
LDA #$01 ; XOR mode
|
LDA #$01 ; XOR mode
|
||||||
:NORM >>> WRTMAIN
|
:NORM >>> WRTMAIN
|
||||||
|
STA LINETYPE
|
||||||
STA Entry+5
|
STA Entry+5
|
||||||
>>> WRTAUX
|
>>> WRTAUX
|
||||||
>>> XF2MAIN,SETLINE
|
>>> XF2MAIN,SETLINE
|
||||||
VDU18RET1 >>> ENTAUX
|
VDU18RET1 >>> ENTAUX
|
||||||
:NORM LDA VDUQ+8 ; 'a'
|
:NORM LDA VDUQ+8 ; Argument 'a'
|
||||||
STA HCOLOR
|
BPL :FOREGND ; <128 is foreground
|
||||||
>>> WRTMAIN
|
>>> WRTMAIN
|
||||||
|
STA BGCOLOR ; Stored in main memory
|
||||||
|
>>> WRTAUX
|
||||||
|
RTS
|
||||||
|
:FOREGND >>> WRTMAIN
|
||||||
|
STA FGCOLOR ; Stored in main memory
|
||||||
STA Entry+5
|
STA Entry+5
|
||||||
>>> WRTAUX
|
>>> WRTAUX
|
||||||
>>> XF2MAIN,SETCOLOR
|
>>> XF2MAIN,SETCOLOR
|
||||||
|
@ -669,8 +669,6 @@ HGRPOS LDA VDUQ+5
|
||||||
RTS
|
RTS
|
||||||
XPIXEL DW $0000 ; Previous plot x-coord
|
XPIXEL DW $0000 ; Previous plot x-coord
|
||||||
YPIXEL DW $0000 ; Previous plot y-coord
|
YPIXEL DW $0000 ; Previous plot y-coord
|
||||||
HCOLOR DB $00 ; High res foreground colour
|
|
||||||
BCOLOR DB $00 ; High res background colour
|
|
||||||
|
|
||||||
* VDU 26 - Reset to default windows
|
* VDU 26 - Reset to default windows
|
||||||
VDU26 RTS
|
VDU26 RTS
|
||||||
|
|
|
@ -102,15 +102,7 @@ START JSR ROMMENU
|
||||||
LDA #>GSBRK
|
LDA #>GSBRK
|
||||||
STA $3F0+1
|
STA $3F0+1
|
||||||
|
|
||||||
* LDA $C057 ; Enable hi-res
|
JSR GFXINIT ; Initialize FDraw graphics
|
||||||
* LDA $C054 ; Enable page 1
|
|
||||||
* LDA $C050 ; Enable graphics
|
|
||||||
JSR Entry+0 ; Initialize FDRAW library
|
|
||||||
LDA #$20
|
|
||||||
STA Entry+5
|
|
||||||
JSR Entry+19 ; FDRAW: Set page $2000
|
|
||||||
JSR Entry+22 ; FDRAW: clear HGR screen
|
|
||||||
* LDA $C051 ; Enable text again
|
|
||||||
|
|
||||||
TSX ; Save SP at $0100 in aux
|
TSX ; Save SP at $0100 in aux
|
||||||
STA $C005 ; Write to aux
|
STA $C005 ; Write to aux
|
||||||
|
|
|
@ -1059,7 +1059,13 @@ MAINRDEXIT >>> XF2AUX,NULLRTS ; Back to an RTS
|
||||||
|
|
||||||
* Call FDraw Clear routine
|
* Call FDraw Clear routine
|
||||||
CLRHGR >>> ENTMAIN
|
CLRHGR >>> ENTMAIN
|
||||||
|
LDA BGCOLOR
|
||||||
|
STA Entry+5
|
||||||
|
JSR Entry+16 ; FDRAW: SetColor
|
||||||
JSR Entry+22 ; FDRAW: Clear
|
JSR Entry+22 ; FDRAW: Clear
|
||||||
|
LDA FGCOLOR
|
||||||
|
STA Entry+5
|
||||||
|
JSR Entry+16 ; FDRAW: SetColor
|
||||||
>>> XF2AUX,VDU16RET
|
>>> XF2AUX,VDU16RET
|
||||||
|
|
||||||
* Call FDraw SetColor routine
|
* Call FDraw SetColor routine
|
||||||
|
@ -1077,6 +1083,25 @@ DRAWLINE >>> ENTMAIN
|
||||||
JSR Entry+28 ; FDRAW: DrawLine
|
JSR Entry+28 ; FDRAW: DrawLine
|
||||||
>>> XF2AUX,VDU25RET
|
>>> XF2AUX,VDU25RET
|
||||||
|
|
||||||
|
* Reset colours and linetype
|
||||||
|
GFXINIT JSR Entry+0 ; Initialize FDRAW library
|
||||||
|
LDA #$20
|
||||||
|
STA Entry+5
|
||||||
|
JSR Entry+19 ; FDRAW: Set page $2000
|
||||||
|
STZ LINETYPE
|
||||||
|
STZ Entry+5
|
||||||
|
JSR Entry+43 ; FDRAW: SetLineMode
|
||||||
|
LDA #$07
|
||||||
|
STA FGCOLOR
|
||||||
|
STA Entry+5
|
||||||
|
JSR Entry+16 ; FDRAW: SetColor
|
||||||
|
STZ BGCOLOR
|
||||||
|
JSR Entry+22 ; FDRAW: clear HGR screen
|
||||||
|
RTS
|
||||||
|
|
||||||
|
FGCOLOR DB $00 ; Foreground colour
|
||||||
|
BGCOLOR DB $00 ; Background colour
|
||||||
|
LINETYPE DB $00 ; 0 normal, 1 XOR
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user