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
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
ROMIN2 := $C082 ; Read ROM; no write

View File

@ -1,4 +1,7 @@
# 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.
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)
* Black text on a black background

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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