Post by willymanilly on Oct 17, 2018 14:53:56 GMT
Another thing: Why do you think interlace-text-mode with attributes has graphics corruption? I noticed I can get rid of this with value 0 to register 36. But since interlace is essentially just two fields, why should each rasterline need more time than non-interlace mode?
Yes, I agree. Only PAL would really benefit from 2 frames merged.
Regarding interlaced text mode, it is essential 2 fields being weaved into one frame. However there are less free cycles to buffer both character and attribute data. From my observations using my vdc raster split test program, I've concluded so far for every line where character data is displayed:-
- Fetch bitmap information for each column (register 1 value + 1). I've only tested this with a horizontal display of 80 so far.
- Refresh DRAM (register 36)
For a standard line this means at least 86 cycles are required for each scan line in the screen display area. The remaining cycles are used for buffering character and attribute data for the next character row. For PAL using a horizontal total value of 127 this means there are 128-86 = 42 free cycles. 42 x 8 = 336. The buffering for 80 characters with attribute data is 81(extra character fetched for smooth scroll I'm guessing) + 4 additional cycles. Multiply that by 2 for the character and attribute byte and total cycles required is 170. 170 is less than 336 so there will be no issues with displaying non interlaced multicolor text mode.
However for interlaced text mode you only have 4 scan lines for each field to buffer character and attribute data which means you have 42 x 4 = 168. That is not enough to fetch all attribute data. The glitch can be seen using the X128 VDC TESTER available from the VICE test repository when switching 80 column text mode with attributes on to interlaced mode (see attached Single Pixel Intelaced image). It's even more noticeable in double pixel mode (see attached Double Pixel Intelaced image) where I'm assuming there are even less free cycles to fetch all the character and attribute data. Interlaced text modes without attributes off show fine because those modes only need to buffer character data.
Note multicolor bitmaps only need to buffer attribute data so have more free cycles. Your 8 x 1 mode requires to fetch 60 bitmap + buffer 60 attribute bytes per line and a few additional cycles per line where graphics is drawn so the horizontal resolution cannot be easily increased in standard PAL or NTSC modes.
The numbers I have used are not exact but a pretty close to what I've observed so far with the VDC split test program and I've only included them as an example of concept. My preliminary implementation of this behaviour into Z64K produces similar results to real hardware. I haven't released any of this yet because it is something I'm still testing as part of fine tuning the VDC busy status flag behavior.
Single Pixel Interlaced
Double Pixel Intelaced