|
Post by mirkosoft on Sept 3, 2019 23:42:06 GMT
Hi!
I want to try to use VDC text mode with characters 9x11. I know how to store data if is character height up to 16 pixels - this is by default.
We know that height is maximum 32 pixels - but how to store data when is character more than 16 pixels high? Or requires 32 pixels high character interlace?
Even - how to do it when is character more than 8 pixels wide? Here is also Q what with remaining bits - is possible to use them for custom data? Not affecting characters?
These Qs began when I tried to convert MS-DOS fonts with their standard size which are different to 8x8...
Thank you for explaining and maybe correction.
Miro
|
|
|
Post by tokra on Sept 4, 2019 8:18:11 GMT
I experimented with this in 2013, please see attached. Can't remember what I did there, just check the source-code. I know that the character-definitions in the ibmfont-file do not match the position they need to be in the Commodore-setup. So for this to work properly you would need to map each character to the correct place in RAM. At least this is a start Attachments:vdcdosfont.d64 (170.75 KB)
|
|
|
Post by oziphantom on Sept 5, 2019 5:43:46 GMT
for 16-32 high chars the format is char 0: 0,1,2,3,4.......29,31 char 1: 0,1,2,3,4.......29,31
You can not have more than 8 pixels of data per line of a char, any locations beyond the 8th will always be empty.
|
|
|
Post by nikoniko on Sept 7, 2019 17:17:26 GMT
You can have more than 8 pixels per character in a limited sense by enabling semigraphic mode. The rightmost pixel will then be repeated in the horizontal intercharacter space. The only good use I know of for that is the one suggested by the PRG, making graphic characters like ┌ and ┐join seamlessly.
|
|
|
Post by mirkosoft on Sept 10, 2019 2:05:18 GMT
So, finally - is 9 and larger width by any way useful? No matter of hard work. 'Cause using 8x32 is useless while we are talking about non-interlace mode. Using 16x32 characters could be very useful...
Miro
|
|
|
Post by mirkosoft on Sept 10, 2019 5:00:57 GMT
Ok - please correct me if I'm writing wrong: Widest usable size is 9 pixels, larger is not applicable.
Miro
|
|
|
Post by nikoniko on Sept 10, 2019 16:57:34 GMT
I'm sure tokra could speak more definitively on whether 9 pixel characters with full control over the 9th pixel is possible. For a 16 pixel wide 256-character font, you could disable horizontal intercharacter spacing and define your character set such that the left half of a character is in the first 256 slots in character definition RAM, and the right half in the second 256 slots. Then when you write to screen RAM, write the same byte twice. For example, for character 0, write two 0s. But in attribute RAM, clear bit 7 for the left character, and set bit 7 for the right character to select the second half of character definition RAM.
Even widths in between 8 and 16 should be possible too if you don't mind wasting some bits in your character definitions. So for instance, if you want 14 pixel wide characters, I think you'd put 7 in R22 3-0, and 6 in R22 7-4. I might be wrong on the exact numbers but it should work something like that.
One thing to keep in mind with intercharacter spacing off, you'll have to build spacing into your character definitions if you want it. So a 16 pixel wide font would really only be 15 useable pixels.
|
|
|
Post by mirkosoft on Sept 11, 2019 22:56:54 GMT
Thank you for this info. Characters wide 9px and larger is not only wasting bits - they can be used for some data. Look at - if W = 9 there are free 7-bits to store data without visible problem, similar way also larger W, but less free bits.
Miro
|
|
|
Post by strobe on Sept 17, 2019 13:40:49 GMT
I'm sure tokra could speak more definitively on whether 9 pixel characters with full control over the 9th pixel is possible. It's not. Semi-graphics mode is as close as you get to any control over the intercharacter gap. You can set a total width of up to and including 16 pixels if you want, but you can only ever define the first 8. Yes you could do that and you would effectively have a 40column display with 16pixel wide chars with full control of the definitions. This is essentially what is done in the vertical scroller at the end of RFO VDC. If you only needed 128 chars, you could use a single font and with the top $80 chars for the other half. Because you can reverse with attributes on the VDC, you could still do a full CBM font with reverse that way. No, a total width of less than 8 pixels is invalid and you just get black. i.e. you are restricted to multiples of 8 pixels. Yes. It might look a little tight and you might want to 'waste' 2 pixels to get a more readable font, a bit like a 2x2 multicolour font on the VIC.
|
|
|
Post by willymanilly on Sept 17, 2019 23:21:12 GMT
No, a total width of less than 8 pixels is invalid and you just get black. i.e. you are restricted to multiples of 8 pixels. Not totally true. The screen turns black if:- - horizontal smooth scroll (bits 0-3 of VDC register 25) is greater than the character width (bits 4-7 of VDC register 22) for single pixel mode.
- horizontal smooth scroll (bits 0-3 of VDC register 25) is greater than or equal to the character width (bits 4-7 of VDC register 22) for double pixel mode.
An example of a 6x12 font is SOCI VDC test 6 available in the VICE test repositiory
|
|