|
Post by sjgray on Jun 24, 2022 16:06:41 GMT
I have a new project and it requires displaying a 6x8 pixel font on a widescreen lcd panel. I'm having trouble getting a stable picture on the panel (and other regular lcd monitors) using the composite monochrome output. I can set the VDC to show only 6 horizontal pixels, but with total width of 8 pixels (2 inter character pixels). When I reduce the total width to 6 my screen is not displayed. I have tried adjusting the total h characters but no luck. I even tried putting the parameters into an online 6545/6845 register calculator here: mrboot.de/mc6845.phpI have written a program called "VDC Explorer" that lets me interactively adjust the VDC registers. FYI, i can not add an attachment as it says there is no space to add one. I'm wondering if anyone has played with font widths <8 in text mode and what register settings are needed?
|
|
|
Post by willymanilly on Jun 25, 2022 23:22:42 GMT
I've done some playing around on my real hardware (c128D PAL with 1084S monitor) and it doesn't appear it's possible to get a stable picture in single pixel mode for a font with total pixel width less than 8 pixels. Anything with a total width less than 7 pixels only displays vertical lines that only appear briefly before the screen clears. They reappear whenever the VDC is written to. Total pixel width of 7 shows a corrupted screen with the cursor offset by 2 characters. Worse still it seems block transfer gets corrupted. The effects of this can be seen when listing a program that scrolls the screen. I'd also be interested if anyone has been able to get font widths <8 working in single pixel mode. I know there's a test in the VICE test repository with a pixel width of 6 that works in double pixel mode. I've updated Z64K to simulate some of the odd behaviors I've witnessed but more research will need to be done to determine exactly how the VDC is handling pixel width less than 8 in single pixel mode... 5 rem 7 pixels 10 sys dec("cdcc"),dec("91"),0 20 sys dec("cdcc"),dec("75"),2 30 sys dec("cdcc"),dec("4a"),3 40 sys dec("cdcc"),dec("68"),22 50 sys dec("cdcc"),dec("46"),25
5 rem 6 pixels 10 sys dec("cdcc"),dec("aa"),0 20 sys dec("cdcc"),dec("88"),2 30 sys dec("cdcc"),dec("4b"),3 40 sys dec("cdcc"),dec("58"),22 50 sys dec("cdcc"),dec("45"),25
5 rem 5 pixels 10 sys dec("cdcc"),dec("cc"),0 20 sys dec("cdcc"),dec("a3"),2 30 sys dec("cdcc"),dec("4f"),3 40 sys dec("cdcc"),dec("48"),22 50 sys dec("cdcc"),dec("44"),25
|
|
|
Post by sjgray on Jun 26, 2022 2:28:22 GMT
Ok, thanks. I'll keep playing with it.
|
|
|
Post by c128old on Jun 26, 2022 20:53:17 GMT
On c128 flat PAL with LCD panel I see three columns of text doing funny at 7 pixel test. I'm using the corrected PAL value for Vertical Total (VT, reg 04) of 38 When I set RAM refresh to zero, the screen looks 'steady' sys dec("cdcc"),0,36
|
|
|
Post by willymanilly on Jun 26, 2022 21:52:23 GMT
I tested with register 4 with decimal 38 (hex 26) and register 36 (DRAM refresh) with 0 and I get a stable screen with @ in columns 0 and 63, and a blank column 45. With a DRAM refresh cycle greater than 0 those 3 columns flicker with "random" values. The attribute data seems affected with the flicker in the middle column of the 3 and the graphics data is affected in the other 2. The position of those columns depends on the refresh cycle value. I suspect they are artifacts from the refresh cycles. The same behavior is seen with the default of decimal 39 (hex 27) for register 4 on my system.
|
|
|
Post by sjgray on Jun 27, 2022 2:53:11 GMT
Does anyone have one of those SaRuMaN 64K sram modules, and does that affect things? I have one but haven't tried installing it.
Steve
|
|
|
Post by tokra on Jun 28, 2022 8:12:17 GMT
I remember trying a lower-than-8-pixel font a few years back and just tried again. It seems the VDC just cannot keep up with lower-than-8 pixels per character and this leads to display corruptions.
If you truly want a 6x8 character-setup your only way seems to do this in bitmap-mode using software, much like 80 column-mode on the C64 or 40 column-mode on the VIC-20 is done. This probably defeats your purpose though...
|
|
|
Post by sjgray on Jun 28, 2022 12:44:44 GMT
I could do 7 pixels, but not 6. Six is not an absolute necessity. I was hoping to use the original font but I can do 8 pixels. Thanks for testing.
|
|
|
Post by willymanilly on Jun 30, 2022 17:33:41 GMT
One potential outcome of investing the behavior of pixel width less than 8 in single pixel mode opens the door to get a better understanding of how the VDC works internally. When pixel width is 7 I notice if register 36 is set to 10 (hex a) or above then a 4th corrupted column appears that affects the attribute data! The position of the corrupted columns are determined as follows. I'm assuming the "corrupted" data is what is currently on the VDC bus, probably from the DRAM refresh cycle. Column 0=0 (GFX) Column 1=45-((reg36&0xf)*2) (ATTR) Column 2=63-(reg36&0xf) (GFX) if (reg36&0xf)>9 Column 3=(DRAM1+48) (ATTR) Character data starts displaying in column 1. Cursor is offset by 2 columns. Attribute data starts displaying in column 0. I have implemented the above in Z64K. It still doesn't match real hardware behavior perfectly but it's getting close. 5 rem 7 pixels - press 0-9 or a-f to change dram refresh. 10 sys dec("cdcc"),dec("91"),0 20 sys dec("cdcc"),dec("75"),2 30 sys dec("cdcc"),dec("4a"),3 40 sys dec("cdcc"),dec("68"),22 50 sys dec("cdcc"),dec("46"),25 60 sys dec("cdcc"),dec("00"),36 70 get a$ 80 if a$="" goto 70 90 sys dec("cdcc"),dec(a$),36 100 goto 70
|
|
|
Post by strobe on Jul 8, 2022 3:32:49 GMT
The only way I managed to get < 8 pixel wide characters was to cheat a bit and use what I call "horizontal interlace", with this method you can get down to even 4 pixel wide chars for a 160 column display at the expense of flicker and the requirement to actively maintain the display. See my "xlace132" entry here, showing 132 columns of text: www.pyrofersprojects.com/blog/c128-coding-competition-2019/And yes it is text mode so is fast to update/scroll etc.. If you want something without flicker you'll have to use bitmap like others have suggested which would be horribly slow like any other soft-80 or similar methods, and not give you any real control over colour as the colour cells wouldn't line up with the characters, but as you're using composite in your particular application that's not really an issue. In my demo you can disable attributes with A key. The other thing you might want to consider to fit more text on the screen without any of the above hacks is to go for more rows rather than more columns, e.g. just use shorter characters, you can easily reduce the height of your characters to e.g. 6 and get 33+ rows of text. Or use interlace to get 80x50+. And/or you can also increase the height of the active display usually to at least 30 rows visible depending on your monitor. E.g. increase R6 to 30 and adjust R7 to centre the screen vertically.
|
|