diff --git a/res/Courier Double Prime/OFL.txt b/res/Courier Double Prime/OFL.txt new file mode 100644 index 0000000..b97aa23 --- /dev/null +++ b/res/Courier Double Prime/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2019-2020, 4am +with Reserved Font Name "Courier Double Prime" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/res/Courier Double Prime/font.py b/res/Courier Double Prime/font.py index 174e977..a8d3721 100755 --- a/res/Courier Double Prime/font.py +++ b/res/Courier Double Prime/font.py @@ -17,6 +17,9 @@ with open("font.txt", "r") as f: #print(myhex(left), myhex(right)) leftdata[row].append(myhex(left)) rightdata[row].append(myhex(right)) +print("; Courier Double Prime pixel font") +print("; (c) 2019-2020 by 4am") +print("; license:Open Font License 1.1, see OFL.txt") print("; This file is automatically generated") for row in range(16): print("LeftFontRow%s" % row) diff --git a/res/Heavy Silk/OFL.txt b/res/Heavy Silk/OFL.txt new file mode 100644 index 0000000..3bb1564 --- /dev/null +++ b/res/Heavy Silk/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2020, 4am +with Reserved Font Name "Heavy Silk" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/res/Heavy Silk/font.py b/res/Heavy Silk/font.py new file mode 100755 index 0000000..6e64c26 --- /dev/null +++ b/res/Heavy Silk/font.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +def myhex(bitstring): + return hex(int(bitstring, 2))[2:].rjust(2, "0").upper() + +data = [ [], [], [], [], [], [], [], [] ] +with open("font.txt", "r") as f: + for c in map(chr, range(33, 91)): + f.readline() + for row in range(8): + rawbits = f.readline().strip() + bits = "0b1" + rawbits[::-1] + data[row].append(myhex(bits)) +print("; Heavy Silk pixel font") +print("; (c) 2020 by 4am") +print("; license:Open Font License 1.1, see OFL.txt") +print("; This file is automatically generated") +for row in range(8): + print("HeavySilkRow%s" % row) + print(" !byte $80 ; space") + for c, i in zip(data[row], range(len(data[row]))): + print(" !byte $%s ; %s" % (c, chr(i+33))) diff --git a/res/Heavy Silk/font.txt b/res/Heavy Silk/font.txt new file mode 100755 index 0000000..9886a96 --- /dev/null +++ b/res/Heavy Silk/font.txt @@ -0,0 +1,522 @@ +#! +0000000 +0011000 +0011000 +0011000 +0000000 +0011000 +0011000 +0000000 +#" +0000000 +1101100 +1101100 +1101100 +0000000 +0000000 +0000000 +0000000 +## +0000000 +0110100 +1111110 +0110100 +1111110 +1111110 +0110100 +0000000 +#$ +0000000 +0001000 +0111100 +1101000 +0111100 +0010110 +0111100 +0000000 +#% +0000000 +1100110 +1101110 +0011100 +0111000 +1110110 +1100110 +0000000 +#& +0000000 +0111000 +1100000 +0110010 +1100110 +1111100 +0111000 +0000000 +#' +0000000 +0011000 +0011000 +0011000 +0000000 +0000000 +0000000 +0000000 +#( +0000000 +0011100 +0110000 +0110000 +0110000 +0111100 +0011100 +0000000 +#) +0000000 +0111000 +0001100 +0001100 +0001100 +0111100 +0111000 +0000000 +#* +0000000 +0011000 +1111110 +0111100 +0111100 +1111110 +0011000 +0000000 +#+ +0000000 +0011000 +0011000 +1111110 +1111110 +0011000 +0011000 +0000000 +#, +0000000 +0000000 +0000000 +0000000 +0001100 +0011100 +0011000 +0000000 +#- +0000000 +0000000 +0000000 +0111100 +0111100 +0000000 +0000000 +0000000 +#. +0000000 +0000000 +0000000 +0000000 +0000000 +0011000 +0011000 +0000000 +#/ +0000000 +0000110 +0001110 +0011100 +0111000 +1110000 +1100000 +0000000 +#0 +0000000 +0111100 +1100110 +1101110 +1110110 +1100110 +0111100 +0000000 +#1 +0000000 +0011000 +0111000 +0011000 +0011000 +0111100 +0111100 +0000000 +#2 +0000000 +0111100 +1000110 +0011100 +0110000 +1111110 +1111110 +0000000 +#3 +0000000 +0111100 +0000110 +0011100 +0000110 +1111110 +0111100 +0000000 +#4 +0000000 +1100110 +1100110 +1100110 +1111110 +0111110 +0000110 +0000000 +#5 +0000000 +1111110 +1100000 +1111100 +0000110 +1111110 +1111100 +0000000 +#6 +0000000 +0111100 +1100000 +1111100 +1100010 +1111110 +0111100 +0000000 +#7 +0000000 +1111110 +0001110 +0011100 +0111000 +0111000 +0111000 +0000000 +#8 +0000000 +0111100 +1100110 +0111100 +1100110 +1111110 +0111100 +0000000 +#9 +0000000 +0111100 +1100110 +0111110 +0000110 +1111110 +0111100 +0000000 +#: +0000000 +0000000 +0011000 +0011000 +0000000 +0011000 +0011000 +0000000 +#; +0000000 +0000000 +0011000 +0011000 +0000000 +0011000 +0010000 +0000000 +#< +0000000 +0001100 +0011000 +0110000 +0110000 +0011000 +0001100 +0000000 +#= +0000000 +0000000 +0111100 +0111100 +0000000 +0111100 +0111100 +0000000 +#> +0000000 +0110000 +0011000 +0001100 +0001100 +0011000 +0110000 +0000000 +#? +0000000 +0111100 +1100110 +0001100 +0011000 +0000000 +0011000 +0000000 +#@ +0000000 +0111100 +1100110 +1110110 +1111100 +1100000 +0111100 +0000000 +#A +0000000 +0111100 +1100110 +1100110 +1111110 +1111110 +1100110 +0000000 +#B +0000000 +1111100 +1100110 +1111100 +1100110 +1111110 +1111100 +0000000 +#C +0000000 +0111100 +1100110 +1100000 +1100110 +1111110 +0111100 +0000000 +#D +0000000 +1111100 +1100110 +1100110 +1100110 +1111110 +1111100 +0000000 +#E +0000000 +1111110 +1100000 +1111000 +1100000 +1111110 +1111110 +0000000 +#F +0000000 +1111110 +1100000 +1111100 +1100000 +1100000 +1100000 +0000000 +#G +0000000 +0111100 +1100110 +1100000 +1101110 +1100110 +0111100 +0000000 +#H +0000000 +1100110 +1100110 +1100110 +1111110 +1100110 +1100110 +0000000 +#I +0000000 +1111110 +0011000 +0011000 +0011000 +1111110 +1111110 +0000000 +#J +0000000 +0111110 +0001100 +0001100 +1101100 +1111100 +0111000 +0000000 +#K +0000000 +1100110 +1101100 +1111000 +1111100 +1101110 +1100110 +0000000 +#L +0000000 +1100000 +1100000 +1100000 +1100000 +1111110 +1111110 +0000000 +#M +0000000 +1100110 +1111110 +1111110 +1100110 +1100110 +1100110 +0000000 +#N +0000000 +1100110 +1110110 +1111110 +1111110 +1101110 +1100110 +0000000 +#O +0000000 +0111100 +1100110 +1100110 +1100110 +1111110 +0111100 +0000000 +#P +0000000 +1111100 +1100110 +1100110 +1111100 +1100000 +1100000 +0000000 +#Q +0000000 +0111100 +1100110 +1100110 +1100110 +1111100 +0111110 +0000000 +#R +0000000 +1111100 +1100110 +1100110 +1111100 +1101110 +1100110 +0000000 +#S +0000000 +0111100 +1100000 +0111100 +0000110 +1111110 +0111100 +0000000 +#T +0000000 +1111110 +1111110 +0011000 +0011000 +0011000 +0011000 +0000000 +#U +0000000 +1100110 +1100110 +1100110 +1100110 +1111110 +0111100 +0000000 +#V +0000000 +1100110 +1100110 +1100110 +1111110 +0111100 +0011000 +0000000 +#W +0000000 +1100110 +1100110 +1100110 +1111110 +1111110 +1100110 +0000000 +#X +0000000 +1100110 +1100110 +0111100 +0111100 +1111110 +1100110 +0000000 +#Y +0000000 +1100110 +1100110 +1111110 +0111100 +0011000 +0011000 +0000000 +#Z +0000000 +1111110 +0001100 +0011000 +0110000 +1111110 +1111110 +0000000 diff --git a/src/macros.a b/src/macros.a index 63e063e..0ce9ce7 100644 --- a/src/macros.a +++ b/src/macros.a @@ -167,6 +167,15 @@ + } +!macro PRINT_AT .str, .vtab, .htab { + lda #.vtab + sta VTAB + lda #.htab + sta HTAB + +LDADDR .str + jsr DrawHeavySilkString +} + ; debugging !macro DEBUGWAIT { bit $c010 diff --git a/src/million.a b/src/million.a index ec1b836..cb7c358 100644 --- a/src/million.a +++ b/src/million.a @@ -16,8 +16,10 @@ row = $FD FirstMover !pseudopc $4000 { Start - +DEBUGWAIT jsr TitlePage + + +DEBUGWAIT + lda #$0A sta GlobalLeftMargin lda #7 @@ -97,7 +99,7 @@ FoundTargetWord ldx #4 ldy #0 - lda puzzle_data4, y - jsr DrawCharacter + jsr DrawLargeCharacter iny cpy puzzle_logical_width bne - @@ -144,10 +146,12 @@ targetword2 targetword3 !raw "SHERBET" - !source "src/ds.puzzle.a" + !source "src/puzzle.a" !source "src/hw.vbl.a" !source "src/ui.title.a" !source "src/ui.common.a" - !source "src/ui.font.a" - !source "src/ui.font.data.a" + !source "src/ui.font.courier.double.prime.a" + !source "src/ui.font.courier.double.prime.data.a" + !source "src/ui.font.heavy.silk.a" + !source "src/ui.font.heavy.silk.data.a" } diff --git a/src/ds.puzzle.a b/src/puzzle.a similarity index 99% rename from src/ds.puzzle.a rename to src/puzzle.a index 0558062..8247490 100644 --- a/src/ds.puzzle.a +++ b/src/puzzle.a @@ -229,13 +229,14 @@ ScrollPuzzleUp RedrawPuzzle jsr Home + bit TEXTMODE jsr DrawThinLines +LDADDR puzzle_data +ST16 $FE ldx #0 ; logical row -- ldy #0 ; logical column - lda ($FE), y - jsr DrawCharacter + jsr DrawLargeCharacter iny cpy puzzle_logical_width bne - diff --git a/src/ui.common.a b/src/ui.common.a index ceac6a7..f4f88fd 100644 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -11,7 +11,7 @@ GlobalLeftMargin Home ; in: none, but assumes text screen 1 is clear (this is done at program startup) -; out: hi-res page 1 cleared but text screen 1 still displayed +; out: hi-res page 1 cleared and displayed bit PAGE1 bit FULLGFX bit HIRES @@ -26,6 +26,7 @@ Home inc @erase+2 dex bne @erase + bit GFXMODE rts DrawThinLines diff --git a/src/ui.font.a b/src/ui.font.courier.double.prime.a similarity index 99% rename from src/ui.font.a rename to src/ui.font.courier.double.prime.a index ca4f691..5a23d06 100644 --- a/src/ui.font.a +++ b/src/ui.font.courier.double.prime.a @@ -22,7 +22,7 @@ +COMPUTE_DRAW_ADDRESSES } -DrawCharacter +DrawLargeCharacter ; A contains character (0x41..0x5A) or 0x00 ; X contains logical line number (0x00..0x08) ; Y contains logical column number (0x00..0x0C) diff --git a/src/ui.font.data.a b/src/ui.font.courier.double.prime.data.a similarity index 100% rename from src/ui.font.data.a rename to src/ui.font.courier.double.prime.data.a diff --git a/src/ui.font.heavy.silk.a b/src/ui.font.heavy.silk.a new file mode 100644 index 0000000..4b5932c --- /dev/null +++ b/src/ui.font.heavy.silk.a @@ -0,0 +1,93 @@ +;license:MIT +;(c) 2020 by 4am +; +; font drawing routines for Heavy Silk pixel font +; + +DrawHeavySilkString +; A/Y contains address of length-prefixed string (length 1..40, characters 0x20..0x5A only) +; $24 (HTAB) contains starting column (0..39) +; $25 (VTAB) contains textpage line (0..23) +; all characters are drawn on the same line +; HTAB is incremented for each character +; clobbers A/X/Y +; clobbers $FE/$FF + +ST16 $FE + ldy #0 + lda ($FE),y + tax + inc $FE + bne + + inc $FF ++ + +LD16 $FE + ; /!\ execution falls through here to DrawHeavySilk + +DrawHeavySilkBuffer +; A/Y contains address of character buffer (characters 0x20..0x5A only) +; X contains buffer length (1..40) +; $24 (HTAB) contains starting column (0..39) +; $25 (VTAB) contains textpage line (0..23) +; all characters are drawn on the same line +; HTAB is incremented for each character +; VTAB is NOT incremented +; clobbers A/X/Y + +ST16 DBISrc+1 + dex + lda VTAB + asl + asl + asl + tay + lda HGRLO, y + sta @hgrlo+1 + lda HGRHI, y + clc + sta DBIRow0+2 + adc #$04 + sta DBIRow1+2 + adc #$04 + sta DBIRow2+2 + adc #$04 + sta DBIRow3+2 + adc #$04 + sta DBIRow4+2 + adc #$04 + sta DBIRow5+2 + adc #$04 + sta DBIRow6+2 + adc #$04 + sta DBIRow7+2 +@hgrlo lda #$FD + clc + adc HTAB + sta DBIRow0+1 + sta DBIRow1+1 + sta DBIRow2+1 + sta DBIRow3+1 + sta DBIRow4+1 + sta DBIRow5+1 + sta DBIRow6+1 + sta DBIRow7+1 +DBILoop +DBISrc ldy $FDFD,x + lda HeavySilkRow0-$20,y +DBIRow0 sta $FDFD,x + lda HeavySilkRow1-$20,y +DBIRow1 sta $FDFD,x + lda HeavySilkRow2-$20,y +DBIRow2 sta $FDFD,x + lda HeavySilkRow3-$20,y +DBIRow3 sta $FDFD,x + lda HeavySilkRow4-$20,y +DBIRow4 sta $FDFD,x + lda HeavySilkRow5-$20,y +DBIRow5 sta $FDFD,x + lda HeavySilkRow6-$20,y +DBIRow6 sta $FDFD,x + lda HeavySilkRow7-$20,y +DBIRow7 sta $FDFD,x + inc HTAB + dex + bpl DBILoop + rts diff --git a/src/ui.font.heavy.silk.data.a b/src/ui.font.heavy.silk.data.a new file mode 100644 index 0000000..03be772 --- /dev/null +++ b/src/ui.font.heavy.silk.data.a @@ -0,0 +1,484 @@ +; Heavy Silk pixel font +; (c) 2020 by 4am +; license:Open Font License 1.1, see OFL.txt +; This file is automatically generated +HeavySilkRow0 + !byte $80 ; space + !byte $80 ; ! + !byte $80 ; " + !byte $80 ; # + !byte $80 ; $ + !byte $80 ; % + !byte $80 ; & + !byte $80 ; ' + !byte $80 ; ( + !byte $80 ; ) + !byte $80 ; * + !byte $80 ; + + !byte $80 ; , + !byte $80 ; - + !byte $80 ; . + !byte $80 ; / + !byte $80 ; 0 + !byte $80 ; 1 + !byte $80 ; 2 + !byte $80 ; 3 + !byte $80 ; 4 + !byte $80 ; 5 + !byte $80 ; 6 + !byte $80 ; 7 + !byte $80 ; 8 + !byte $80 ; 9 + !byte $80 ; : + !byte $80 ; ; + !byte $80 ; < + !byte $80 ; = + !byte $80 ; > + !byte $80 ; ? + !byte $80 ; @ + !byte $80 ; A + !byte $80 ; B + !byte $80 ; C + !byte $80 ; D + !byte $80 ; E + !byte $80 ; F + !byte $80 ; G + !byte $80 ; H + !byte $80 ; I + !byte $80 ; J + !byte $80 ; K + !byte $80 ; L + !byte $80 ; M + !byte $80 ; N + !byte $80 ; O + !byte $80 ; P + !byte $80 ; Q + !byte $80 ; R + !byte $80 ; S + !byte $80 ; T + !byte $80 ; U + !byte $80 ; V + !byte $80 ; W + !byte $80 ; X + !byte $80 ; Y + !byte $80 ; Z +HeavySilkRow1 + !byte $80 ; space + !byte $8C ; ! + !byte $9B ; " + !byte $96 ; # + !byte $88 ; $ + !byte $B3 ; % + !byte $8E ; & + !byte $8C ; ' + !byte $9C ; ( + !byte $8E ; ) + !byte $8C ; * + !byte $8C ; + + !byte $80 ; , + !byte $80 ; - + !byte $80 ; . + !byte $B0 ; / + !byte $9E ; 0 + !byte $8C ; 1 + !byte $9E ; 2 + !byte $9E ; 3 + !byte $B3 ; 4 + !byte $BF ; 5 + !byte $9E ; 6 + !byte $BF ; 7 + !byte $9E ; 8 + !byte $9E ; 9 + !byte $80 ; : + !byte $80 ; ; + !byte $98 ; < + !byte $80 ; = + !byte $86 ; > + !byte $9E ; ? + !byte $9E ; @ + !byte $9E ; A + !byte $9F ; B + !byte $9E ; C + !byte $9F ; D + !byte $BF ; E + !byte $BF ; F + !byte $9E ; G + !byte $B3 ; H + !byte $BF ; I + !byte $BE ; J + !byte $B3 ; K + !byte $83 ; L + !byte $B3 ; M + !byte $B3 ; N + !byte $9E ; O + !byte $9F ; P + !byte $9E ; Q + !byte $9F ; R + !byte $9E ; S + !byte $BF ; T + !byte $B3 ; U + !byte $B3 ; V + !byte $B3 ; W + !byte $B3 ; X + !byte $B3 ; Y + !byte $BF ; Z +HeavySilkRow2 + !byte $80 ; space + !byte $8C ; ! + !byte $9B ; " + !byte $BF ; # + !byte $9E ; $ + !byte $BB ; % + !byte $83 ; & + !byte $8C ; ' + !byte $86 ; ( + !byte $98 ; ) + !byte $BF ; * + !byte $8C ; + + !byte $80 ; , + !byte $80 ; - + !byte $80 ; . + !byte $B8 ; / + !byte $B3 ; 0 + !byte $8E ; 1 + !byte $B1 ; 2 + !byte $B0 ; 3 + !byte $B3 ; 4 + !byte $83 ; 5 + !byte $83 ; 6 + !byte $B8 ; 7 + !byte $B3 ; 8 + !byte $B3 ; 9 + !byte $8C ; : + !byte $8C ; ; + !byte $8C ; < + !byte $9E ; = + !byte $8C ; > + !byte $B3 ; ? + !byte $B3 ; @ + !byte $B3 ; A + !byte $B3 ; B + !byte $B3 ; C + !byte $B3 ; D + !byte $83 ; E + !byte $83 ; F + !byte $B3 ; G + !byte $B3 ; H + !byte $8C ; I + !byte $98 ; J + !byte $9B ; K + !byte $83 ; L + !byte $BF ; M + !byte $B7 ; N + !byte $B3 ; O + !byte $B3 ; P + !byte $B3 ; Q + !byte $B3 ; R + !byte $83 ; S + !byte $BF ; T + !byte $B3 ; U + !byte $B3 ; V + !byte $B3 ; W + !byte $B3 ; X + !byte $B3 ; Y + !byte $98 ; Z +HeavySilkRow3 + !byte $80 ; space + !byte $8C ; ! + !byte $9B ; " + !byte $96 ; # + !byte $8B ; $ + !byte $9C ; % + !byte $A6 ; & + !byte $8C ; ' + !byte $86 ; ( + !byte $98 ; ) + !byte $9E ; * + !byte $BF ; + + !byte $80 ; , + !byte $9E ; - + !byte $80 ; . + !byte $9C ; / + !byte $BB ; 0 + !byte $8C ; 1 + !byte $9C ; 2 + !byte $9C ; 3 + !byte $B3 ; 4 + !byte $9F ; 5 + !byte $9F ; 6 + !byte $9C ; 7 + !byte $9E ; 8 + !byte $BE ; 9 + !byte $8C ; : + !byte $8C ; ; + !byte $86 ; < + !byte $9E ; = + !byte $98 ; > + !byte $98 ; ? + !byte $B7 ; @ + !byte $B3 ; A + !byte $9F ; B + !byte $83 ; C + !byte $B3 ; D + !byte $8F ; E + !byte $9F ; F + !byte $83 ; G + !byte $B3 ; H + !byte $8C ; I + !byte $98 ; J + !byte $8F ; K + !byte $83 ; L + !byte $BF ; M + !byte $BF ; N + !byte $B3 ; O + !byte $B3 ; P + !byte $B3 ; Q + !byte $B3 ; R + !byte $9E ; S + !byte $8C ; T + !byte $B3 ; U + !byte $B3 ; V + !byte $B3 ; W + !byte $9E ; X + !byte $BF ; Y + !byte $8C ; Z +HeavySilkRow4 + !byte $80 ; space + !byte $80 ; ! + !byte $80 ; " + !byte $BF ; # + !byte $9E ; $ + !byte $8E ; % + !byte $B3 ; & + !byte $80 ; ' + !byte $86 ; ( + !byte $98 ; ) + !byte $9E ; * + !byte $BF ; + + !byte $98 ; , + !byte $9E ; - + !byte $80 ; . + !byte $8E ; / + !byte $B7 ; 0 + !byte $8C ; 1 + !byte $86 ; 2 + !byte $B0 ; 3 + !byte $BF ; 4 + !byte $B0 ; 5 + !byte $A3 ; 6 + !byte $8E ; 7 + !byte $B3 ; 8 + !byte $B0 ; 9 + !byte $80 ; : + !byte $80 ; ; + !byte $86 ; < + !byte $80 ; = + !byte $98 ; > + !byte $8C ; ? + !byte $9F ; @ + !byte $BF ; A + !byte $B3 ; B + !byte $B3 ; C + !byte $B3 ; D + !byte $83 ; E + !byte $83 ; F + !byte $BB ; G + !byte $BF ; H + !byte $8C ; I + !byte $9B ; J + !byte $9F ; K + !byte $83 ; L + !byte $B3 ; M + !byte $BF ; N + !byte $B3 ; O + !byte $9F ; P + !byte $B3 ; Q + !byte $9F ; R + !byte $B0 ; S + !byte $8C ; T + !byte $B3 ; U + !byte $BF ; V + !byte $BF ; W + !byte $9E ; X + !byte $9E ; Y + !byte $86 ; Z +HeavySilkRow5 + !byte $80 ; space + !byte $8C ; ! + !byte $80 ; " + !byte $BF ; # + !byte $B4 ; $ + !byte $B7 ; % + !byte $9F ; & + !byte $80 ; ' + !byte $9E ; ( + !byte $9E ; ) + !byte $BF ; * + !byte $8C ; + + !byte $9C ; , + !byte $80 ; - + !byte $8C ; . + !byte $87 ; / + !byte $B3 ; 0 + !byte $9E ; 1 + !byte $BF ; 2 + !byte $BF ; 3 + !byte $BE ; 4 + !byte $BF ; 5 + !byte $BF ; 6 + !byte $8E ; 7 + !byte $BF ; 8 + !byte $BF ; 9 + !byte $8C ; : + !byte $8C ; ; + !byte $8C ; < + !byte $9E ; = + !byte $8C ; > + !byte $80 ; ? + !byte $83 ; @ + !byte $BF ; A + !byte $BF ; B + !byte $BF ; C + !byte $BF ; D + !byte $BF ; E + !byte $83 ; F + !byte $B3 ; G + !byte $B3 ; H + !byte $BF ; I + !byte $9F ; J + !byte $BB ; K + !byte $BF ; L + !byte $B3 ; M + !byte $BB ; N + !byte $BF ; O + !byte $83 ; P + !byte $9F ; Q + !byte $BB ; R + !byte $BF ; S + !byte $8C ; T + !byte $BF ; U + !byte $9E ; V + !byte $BF ; W + !byte $BF ; X + !byte $8C ; Y + !byte $BF ; Z +HeavySilkRow6 + !byte $80 ; space + !byte $8C ; ! + !byte $80 ; " + !byte $96 ; # + !byte $9E ; $ + !byte $B3 ; % + !byte $8E ; & + !byte $80 ; ' + !byte $9C ; ( + !byte $8E ; ) + !byte $8C ; * + !byte $8C ; + + !byte $8C ; , + !byte $80 ; - + !byte $8C ; . + !byte $83 ; / + !byte $9E ; 0 + !byte $9E ; 1 + !byte $BF ; 2 + !byte $9E ; 3 + !byte $B0 ; 4 + !byte $9F ; 5 + !byte $9E ; 6 + !byte $8E ; 7 + !byte $9E ; 8 + !byte $9E ; 9 + !byte $8C ; : + !byte $84 ; ; + !byte $98 ; < + !byte $9E ; = + !byte $86 ; > + !byte $8C ; ? + !byte $9E ; @ + !byte $B3 ; A + !byte $9F ; B + !byte $9E ; C + !byte $9F ; D + !byte $BF ; E + !byte $83 ; F + !byte $9E ; G + !byte $B3 ; H + !byte $BF ; I + !byte $8E ; J + !byte $B3 ; K + !byte $BF ; L + !byte $B3 ; M + !byte $B3 ; N + !byte $9E ; O + !byte $83 ; P + !byte $BE ; Q + !byte $B3 ; R + !byte $9E ; S + !byte $8C ; T + !byte $9E ; U + !byte $8C ; V + !byte $B3 ; W + !byte $B3 ; X + !byte $8C ; Y + !byte $BF ; Z +HeavySilkRow7 + !byte $80 ; space + !byte $80 ; ! + !byte $80 ; " + !byte $80 ; # + !byte $80 ; $ + !byte $80 ; % + !byte $80 ; & + !byte $80 ; ' + !byte $80 ; ( + !byte $80 ; ) + !byte $80 ; * + !byte $80 ; + + !byte $80 ; , + !byte $80 ; - + !byte $80 ; . + !byte $80 ; / + !byte $80 ; 0 + !byte $80 ; 1 + !byte $80 ; 2 + !byte $80 ; 3 + !byte $80 ; 4 + !byte $80 ; 5 + !byte $80 ; 6 + !byte $80 ; 7 + !byte $80 ; 8 + !byte $80 ; 9 + !byte $80 ; : + !byte $80 ; ; + !byte $80 ; < + !byte $80 ; = + !byte $80 ; > + !byte $80 ; ? + !byte $80 ; @ + !byte $80 ; A + !byte $80 ; B + !byte $80 ; C + !byte $80 ; D + !byte $80 ; E + !byte $80 ; F + !byte $80 ; G + !byte $80 ; H + !byte $80 ; I + !byte $80 ; J + !byte $80 ; K + !byte $80 ; L + !byte $80 ; M + !byte $80 ; N + !byte $80 ; O + !byte $80 ; P + !byte $80 ; Q + !byte $80 ; R + !byte $80 ; S + !byte $80 ; T + !byte $80 ; U + !byte $80 ; V + !byte $80 ; W + !byte $80 ; X + !byte $80 ; Y + !byte $80 ; Z diff --git a/src/ui.title.a b/src/ui.title.a index ebd8844..f3bab65 100644 --- a/src/ui.title.a +++ b/src/ui.title.a @@ -13,10 +13,9 @@ titleline3 TitlePage jsr Home - bit GFXMODE - lda #$00 + lda #$01 sta GlobalLeftMargin - lda #$41 + lda #$41 ; 'A' @outerloop sta titlechar @@ -73,7 +72,7 @@ TitlePage @line2 lda titleline2-3, y bne + @line3 lda titleline3-3, y -+ jsr DrawCharacter ++ jsr DrawLargeCharacter lda titlechar beq + inc titlechar @@ -108,7 +107,7 @@ TitlePage lda titlechar beq @phase2 - lda #$C1 + lda #$C1 ; 'A' with high bit bit titlechar +LBPL @outerloop lda #$00 @@ -117,12 +116,17 @@ TitlePage @prematureexit jsr Home bit GFXMODE + ;TODO @exit - +DEBUGWAIT + +PRINT_AT asterisk, 2, 30 + +PRINT_AT menuline1, 13, 10 + +PRINT_AT menuline2, 14, 10 + +PRINT_AT menuline3, 15, 10 + +PRINT_AT disclaimer, 23, 0 rts @phase2 ldy #$03 --- ldx #$03 +-- ldx #$02 - jsr ScrollUp dex bne - @@ -146,134 +150,18 @@ WaitForKeyWithTimeout bne @wait1 @exit rts - -OldTitlePage - jsr Home - ;TODO add logical-width parameter - jsr DrawThinLines - - lda #3 - sta row - +LDADDR title - +ST16 $FE --- lda #6 - sta column -- ldy column - lda ($FE), y - ldx row - jsr DrawCharacter - dec column - bpl - - lda $FE - clc - adc #7 - sta $FE - bcc + - inc $FF -+ inc row - lda row - cmp #6 - bne -- - - bit GFXMODE - - lda #$00 - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - - ldy #$00 - jsr ScrollUp - ldy #$02 - jsr ScrollDown - iny - jsr ScrollUp - ldy #$05 - jsr ScrollDown - iny - jsr ScrollUp - -@loop - +RTS_IF_KEY - lda #$00 - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - - ldy #$00 - jsr ScrollDown - jsr ScrollDown - iny - jsr ScrollDown - iny - jsr ScrollUp - iny - jsr ScrollDown - iny - jsr ScrollDown - iny - jsr ScrollUp - iny - jsr ScrollDown - jsr ScrollDown - - +RTS_IF_KEY - lda #$00 - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - - ldy #$00 - jsr ScrollUp - ldy #$02 - jsr ScrollUp - iny - jsr ScrollDown - ldy #$05 - jsr ScrollUp - iny - jsr ScrollUp - - +RTS_IF_KEY - lda #$00 - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - jsr ROM_WAIT - +RTS_IF_KEY - rts -!if 0 { - ldy #$00 - jsr ScrollUp - iny - jsr ScrollUp - iny - jsr ScrollDown - jsr ScrollDown - iny - jsr ScrollUp - jsr ScrollUp - iny - jsr ScrollUp - iny - jsr ScrollDown - jsr ScrollDown - iny - jsr ScrollUp - - jmp @loop -} -title - !raw "PELTEOT" - !raw "LIRFICS" - !raw "M TL RN" +asterisk + !byte 1 + !byte "*" +menuline1 + !byte 20 + !raw "RETURN.....PLAY GAME" +menuline2 + !byte 21 + !raw "CTRL-S.....SOUND (ON)" +menuline3 + !byte 15 + !raw "CTRL-Q.....QUIT" +disclaimer + !byte 40 + !raw "* NOT GUARANTEED, ACTUAL COUNT MAY VARY." diff --git a/src/ui.title.old.a b/src/ui.title.old.a new file mode 100644 index 0000000..11c3178 --- /dev/null +++ b/src/ui.title.old.a @@ -0,0 +1,130 @@ +OldTitlePage + jsr Home + ;TODO add logical-width parameter + jsr DrawThinLines + + lda #3 + sta row + +LDADDR title + +ST16 $FE +-- lda #6 + sta column +- ldy column + lda ($FE), y + ldx row + jsr DrawLargeCharacter + dec column + bpl - + lda $FE + clc + adc #7 + sta $FE + bcc + + inc $FF ++ inc row + lda row + cmp #6 + bne -- + + bit GFXMODE + + lda #$00 + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + + ldy #$00 + jsr ScrollUp + ldy #$02 + jsr ScrollDown + iny + jsr ScrollUp + ldy #$05 + jsr ScrollDown + iny + jsr ScrollUp + +@loop + +RTS_IF_KEY + lda #$00 + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + + ldy #$00 + jsr ScrollDown + jsr ScrollDown + iny + jsr ScrollDown + iny + jsr ScrollUp + iny + jsr ScrollDown + iny + jsr ScrollDown + iny + jsr ScrollUp + iny + jsr ScrollDown + jsr ScrollDown + + +RTS_IF_KEY + lda #$00 + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + + ldy #$00 + jsr ScrollUp + ldy #$02 + jsr ScrollUp + iny + jsr ScrollDown + ldy #$05 + jsr ScrollUp + iny + jsr ScrollUp + + +RTS_IF_KEY + lda #$00 + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + jsr ROM_WAIT + +RTS_IF_KEY + rts +!if 0 { + ldy #$00 + jsr ScrollUp + iny + jsr ScrollUp + iny + jsr ScrollDown + jsr ScrollDown + iny + jsr ScrollUp + jsr ScrollUp + iny + jsr ScrollUp + iny + jsr ScrollDown + jsr ScrollDown + iny + jsr ScrollUp + + jmp @loop +} +title + !raw "PELTEOT" + !raw "LIRFICS" + !raw "M TL RN"