Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ Release notes:

1.0.3:

6502 engine: Fixed some memory corruption issues, especially
involving save/restore/undo operations.

New Apple II interpreter:
- Supports Apple II+ and later models
- 64 or 128 kB
Expand All @@ -147,17 +144,22 @@ Release notes:
Aambundle: Stories without a title in their metadata are
named after the base name of the story file.

6502 engine: Fixed some memory corruption issues, especially
involving save/restore/undo operations.

6502 engine: Fixed NBSP so that it properly degrades to a
breaking space instead of being ignored.

6502 engine: Fixed blank lines when printing long words.

C64 interpreter: Fixed inline progress bars.

6502: Added five glyphs/transliterations (A with Acute,
N with Tilde, Hyphen, Ellipsis, NNBSP) and those listed
in The Z-Machine Standards Document.

C64 interpreter: Added "reverse" (warm palette) styling.

C64 interpreter: Fixed inline progress bars.

1.0.2:

Cleaned up the specification and some dev tools.
Expand Down
27 changes: 20 additions & 7 deletions src/6502/c64_frontend.s
Original file line number Diff line number Diff line change
Expand Up @@ -507,23 +507,36 @@ done

io_mstyle
; input a = style bits
; 1 reverse, 2 bold, 4 italic
; Or on C64:
; 1 warm, 2 light, 4 blue

.(
pha
jsr io_mflush
pla
lsr
and #3
and #7
tax
lda palette,x
sta currfg
rts
palette
.byt $0 ; normal
.byt $b ; bold
.byt $6 ; italic
.byt $e ; italic bold
.)
.byt $0 ; normal = black
.byt $1 ; reverse = white (warm)
.byt $b ; bold = dark gray (light)
.byt $7 ; bold reverse = yellow (light + warm)
.byt $6 ; italic = blue (saturated)
.byt $2 ; italic reverse = red (warm + saturated)
.byt $e ; italic bold = light blue (saturated + light)
.byt $a ; italic bold reverse = pink (warm + saturated + light)
.)
; available colors:
; 0 black 1 white 2 red 3 cyan
; 4 purple 5 green 6 blue 7 yellow
; 8 orange 9 brown a pink b dark gray
; c gray d light green e light blue f light gray

; The current palette was decided at https://intfiction.org/t/help-dialog-choose-a-commodore-64-color-palette/81746/2 but see that post for some of the other options considered and how people felt about them

io_mprogress
; input x = progress
Expand Down
36 changes: 33 additions & 3 deletions src/6502/engine.s
Original file line number Diff line number Diff line change
Expand Up @@ -10201,6 +10201,30 @@ fixednext
nofixed
jmp attrsloop
noffamily
dey
bne noifrev

ldy #cssparam_reverse
jsr css_check_param
bcc noreverse

ldy #STY_STYON
lda (phytmp),y
ora #1
sta (phytmp),y
jmp attrsloop
noreverse
ldy #cssparam_none
jsr css_check_param
bcc nounreverse

ldy #STY_STYOFF
lda (phytmp),y
ora #1
sta (phytmp),y
nounreverse
jmp attrsloop
noifrev
dey
bne nomtop

Expand Down Expand Up @@ -10407,16 +10431,18 @@ CSS_FLOAT = 2
CSS_FONTSTYLE = 3
CSS_FONTWEIGHT = 4
CSS_FONTFAMILY = 5
CSS_MARGINTOP = 6
CSS_MARGINBTM = 7
CSS_N = 8
CSS_REVERSE = 6
CSS_MARGINTOP = 7
CSS_MARGINBTM = 8
CSS_N = 9
csskeywords
.byt "width",0
.byt "height",0
.byt "float",0
.byt "font-style",0
.byt "font-weight",0
.byt "font-family",0
.byt "-iftf-reverse-video",0
.byt "margin-top",0
.byt "margin-bottom",0

Expand All @@ -10433,6 +10459,10 @@ cssparam_normal = * - cssparams
.byt "normal",0
cssparam_bold = * - cssparams
.byt "bold",0
cssparam_reverse = * - cssparams
.byt "reverse",0
cssparam_none = * - cssparams
.byt "none",0

css_monospace
.byt "monospace"
Expand Down
Loading