Article 40201 of comp.sys.cbm: Xref: undergrad.math.uwaterloo.ca comp.sys.cbm:40201 Newsgroups: comp.sys.cbm Path: undergrad.math.uwaterloo.ca!csbruce From: csbruce@ccnga.uwaterloo.ca (Craig Bruce) Subject: Re: Editor for C64? Message-ID: Sender: news@undergrad.math.uwaterloo.ca (news spool owner) Nntp-Posting-Host: ccnga.uwaterloo.ca Organization: University of Waterloo, Canada (eh!) Date: Tue, 18 Jul 1995 15:00:37 GMT pre7874@u.cc.utah.edu (Perry Eidelbus) writes: >Now, to direct my post to someone else. Thank you for your offer, Mr. >Bruce. I'll have to send you my customized 'font80.nova wide' file, once >my server fixes the rb/rc/rx commands--aargh! Sorry I haven't replied to >you sooner, but with my news server's crash, it's been a devil of a time >trying to recover old messages. I thought I could figure out how to >modify the ACE 4-bit charset myself, but it's not at all as simple as >Novaterm (giveaways with the zero bits in the first char, a space). I've >been looking at it and still can't figure out how you store the character >images. The format is a little more complicated than raw character sets. The format includes four pieces: (1) the header, (2) the graphic-character palette, (3) the 8-bit-wide raw characterset, and (4) the 4-bit-wide raw characterset. More specifically (note that the offsets don't include the two-byte loading address at the start of all PRG files): OFFSET SIZE DESC ------ ---- ----- $0000 1 the petscii letter "c": code $43 $0001 1 code $cb $0002 1 code $06 $0003 1 format version: $01 $0004 1 character sets present: $c0 $0005 1 reverseable character set: $80, $00==not $0006 10 reserved: $00s $0010 32 character palette $0030 2048 8-bit-wide raw character set font, 8x8 cells $0830 2048 4-bit-wide raw character set font, 8x8 cells, dual 4-bit images $1030 - SIZE The first three bytes identify the file as being an ACE character set. The only current version is $01. The "character sets present" field indicates which character images are present: $80==8-bit-wide, $40==4-bit-wide, and $c0==both (currently the only supported option). The "reversable" flag tells whether the character set includes the regular Commodore characters in the regular positions and the inverse images of the regular Commodore characters in the normal ACE positions, or not. This information is used for displaying reversed characters on the 40-column screen. For example, "acechr-commodore" has a value of $80 for this field, whereas "acechr-iso8859-1" has a value of $00. The character palette gives the codes of 32 graphics characters to be used for composing boxes, etc. The images for the codes have the following description per position (the characters in parentheses are approxiate ASCII characters): POS DESC POS DESC --- ----- --- ----- 0 bullet (*) 16 filled-in circle (*) 1 vertical line (|) 17 hollow circle (O) 2 horizontal line (-) 18 pound (#) 3 cross (+) 19 check mark (+) 4 top-left corner (.) 20 pi (~) 5 top-right corner (.) 21 +/- sign (~) 6 bottom-left corner (`) 22 divide sign (/) 7 bottom-right corner (') 23 degree sign (o) 8 left 'tee' (*) 24 coarse checkerboard (#) 9 right 'tee' (*) 25 fine checkerboard (#) 10 top 'tee' (*) 26 solid block (#) 11 bottom 'tee' (*) 27 carriage-return symbol (@) 12 heart (*) 28 up arrow (^) 13 diamond (*) 29 down arrow (v) 14 club (*) 30 left arrow (<) 15 spade (*) 31 right arrow (>) Applications will be using this palette to figure out which graphics characters to use for various effects. This palette is necessary because the character codes may be different in different character sets. The 8-bit-wide images are in the standard format (eight bytes per character). The 4-bit-wide images are in the same format as the 8-bit-wide images, except that each 4-bit-wide image is repeated on both the high and low nybbles of the eight bytes that define the character. This representation allows the raw image to be editable with a standard character set editor, and allows the soft-80 screen driver to work efficiently. BTW, are there any copyright problems with using other programs's fonts? ("font80.nova wide" obviously comes form NovaTerm). Keep on Hackin'! -Craig Bruce csbruce@ccnga.uwaterloo.ca "When you are finished with it, put it back in the first place that you looked for it."