diff --git a/readme.txt b/readme.txt index c370acd..cce56c8 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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. diff --git a/src/6502/c64_frontend.s b/src/6502/c64_frontend.s index dddbc30..333937f 100644 --- a/src/6502/c64_frontend.s +++ b/src/6502/c64_frontend.s @@ -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 diff --git a/src/6502/engine.s b/src/6502/engine.s index d24d3bd..d728bde 100644 --- a/src/6502/engine.s +++ b/src/6502/engine.s @@ -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 @@ -10407,9 +10431,10 @@ 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 @@ -10417,6 +10442,7 @@ csskeywords .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 @@ -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"