Code formatting, constants, and comments

This commit is contained in:
Joshua Bell 2022-01-06 16:58:03 -08:00
parent 392ab0b7ef
commit f740575697
10 changed files with 238 additions and 209 deletions

View File

@ -23,6 +23,9 @@ RDALTZP := $C016
RD80STORE := $C018 RD80STORE := $C018
RDPAGE2 := $C01C RDPAGE2 := $C01C
TBCOLOR := $C022 ; IIgs: low nibble is text bg color, high is fg
CLOCKCTL := $C034 ; IIgs: low nibble is border color
BANKSEL := $C073 ; Select RamWorks bank BANKSEL := $C073 ; Select RamWorks bank
ROMIN2 := $C082 ; Read ROM; no write ROMIN2 := $C082 ; Read ROM; no write

View File

@ -1,4 +1,7 @@
# Text Color Utilities # Text Color Utilities
Author: @chrisparana
These utilities will work with the Apple IIgs or on any Apple II equipped with a VidHD card. Each will set the color of the text, background, and border and then invoke the ProDOS quit handler immediately. These utilities will work with the Apple IIgs or on any Apple II equipped with a VidHD card. Each will set the color of the text, background, and border and then invoke the ProDOS quit handler immediately.
Useful if you'd like to automatically set a theme at boot or select one manually afterwards. Originally created because I wanted my GS to use a different set of colors when booting my ProDOS 8 partition then what I have set as default in the Control Panel. Useful if you'd like to automatically set a theme at boot or select one manually afterwards. Originally created because I wanted my GS to use a different set of colors when booting my ProDOS 8 partition then what I have set as default in the Control Panel.
@ -30,4 +33,3 @@ To have these themes applied at boot, place one of the theme SYSTEM at the end o
[WB.SYSTEM](wb.system.s) [WB.SYSTEM](wb.system.s)
* Black text on a black background * Black text on a black background

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$C0 jsr HOME
sta $c022
lda #$00 lda #$C0 ; text: bright greeen on black
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$00 ; border: black
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$0f jsr HOME
sta $c022
lda #$0f lda #$0f ; text: black on white
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$0f ; border: white
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$f2 jsr HOME
sta $c022
lda #$02 lda #$f2 ; text: white on dark blue
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$02 ; text: dark blue
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$5a jsr HOME
sta $c022
lda #$0a lda #$5a ; text: dark gray on light gray
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$0a ; border: gray
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$f6 jsr HOME
sta $c022
lda #$06 lda #$f6 ; border: white on medium blue
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$06 ; border: medium blue
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$2e jsr HOME
sta $c022
lda #$0e lda #$2e ; text: dark blue on bright green
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$0e ; border: bright green
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$5b jsr HOME
sta $c022
lda #$07 lda #$5b ; text: gray on pink
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$07 ; border: light blue
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params

View File

@ -1,26 +1,29 @@
.setcpu "6502" .setcpu "6502"
.include "apple2.inc" .include "apple2.inc"
.include "../inc/apple2.inc" .include "../inc/apple2.inc"
.include "../inc/prodos.inc" .include "../inc/prodos.inc"
.org SYS_ADDR .org SYS_ADDR
cld cld
bit ROMIN2
sta CLR80VID bit ROMIN2
sta CLRALTCHAR sta CLR80VID
sta CLR80COL sta CLRALTCHAR
jsr SETVID sta CLR80COL
jsr SETKBD jsr SETVID
jsr SETNORM jsr SETKBD
jsr INIT jsr SETNORM
jsr HOME jsr INIT
lda #$f0 jsr HOME
sta $c022
lda #$00 lda #$f0 ; text: white on black
sta $c034 sta TBCOLOR
MLI_CALL QUIT, quit_params lda #$00 ; border: black
brk sta CLOCKCTL
DEFINE_QUIT_PARAMS quit_params MLI_CALL QUIT, quit_params
brk
DEFINE_QUIT_PARAMS quit_params