|
Post by willymanilly on Sept 3, 2018 15:31:08 GMT
Has anyone ever explored splitting the VDC screen into a bitmap and text modes similar to what can be done the VICII?
I've done some preliminary testing to see if it can be done and am using the VDC lightpen register triggered by the CIA to assist with removing as much jitter as I can as an attempt to get a stable raster.
I'm not sure if is is possible to remove the jitter totally because of the different clock the VDC uses compared to the rest of the computer but I'm getting promising results.
Attached is a simple test program I'm working on which I welcome others to build upon.
At the moment there are only 5 tests available by pushing keys 1-5
1. Change background color at trigger point 2. Change from mono text ==> mono bitmap at trigger point
3. Change from color text ==> color bitmap at trigger point
4. Change from mono bitmap ==> mono text at trigger point
5. Change from color bitmap ==> color text at trigger point
Other keys:
A - shifts trigger point to the left. *
D - shifts trigger point to the right. *
X - exits the program
*note: trigger point can be shifted off screen to next raster line.
You should be in 80 column mode and enusre there is text on the screen before running the program to see best results. I plan on updating the program in future to automatically configure the screen to show text.
I have not been able to get a jitter free screen for Test 4 or 5.
Test 2 and 3 are jitter free by default on my PAL c128D. Other machines might need to adjust the trigger point by using keys A and D. I would be interested in results from other setups and welcome any suggestions on how to further reduce the VDC jitter.
I've done a lot of updates recently to the VDC emulation in Z64K to support more features and screen modes but there seems to be a lot more to explore to get it perfect.
See source for more information on how the test program works and feel free to ask me any questions.
Test 1
Test 2
Test 3
Test 4 (Unstable - can't remove jitter)
Test 5 (Unstable - can't remove jitter)
Attachments:vdcsplit.zip (3.45 KB)
|
|
|
Post by Pyrofer on Sept 3, 2018 16:41:41 GMT
This is awesome work! I love seeing people push the VDC finally. Only 30 years late It's worth it just to prove all the people who cuss the 128 and the VDC wrong.
|
|
|
Post by mirkosoft on Sept 3, 2018 20:31:50 GMT
Great - and will be useful, for both function - test/graphic and lightpen...
Miro
|
|
|
Post by robertb on Sept 4, 2018 0:54:20 GMT
Has anyone ever explored splitting the VDC screen into a bitmap and text modes similar to what can be done the VICII? IIRC, the commercial product, Colorez 128, was able to do that. Truly, Robert Bernardo Fresno Commodore User Group - www.dickestel.com/fcug.htmSouthern California Commodore & Amiga Network - www.portcommodore.com/commvex
|
|
|
Post by tokra on Sept 5, 2018 15:58:24 GMT
There has been the "VDC-Raster-Demo" in 128er Sonderheft 95. You can find the disk-image here: www.idealine.info/emuecke/index_quereinstieg.htm?/emuecke/sonderheft_128.htmAlthough, the author apparantly did not know that each VDC has a slightly different timing. I was able to have this run nicely on my newer C128, but not my old 128D. Either way, he is using raster-interrupts. The magazine itself and the disk-image also has a small demo-creator for these raster effects, but without the timing-correction, this is only good for some machines. Regarding the tests above: Never seen the lightpen-registers used and don't know how accurate they are. For my little VDC 8x1-demo I just used the VBLANK-bit of $d600. Although this is fired only once per frame, maybe you can get more exact results with that?
|
|
|
Post by willymanilly on Sept 5, 2018 21:53:28 GMT
IIRC, the commercial product, Colorez 128, was able to do that. I just checked that product and it seems to only copy the character data to bitmap which gives the illusion that the screen is split between text and bitmap. Still a good trick though.
|
|
|
Post by willymanilly on Sept 5, 2018 22:26:02 GMT
There has been the "VDC-Raster-Demo" in 128er Sonderheft 95. You can find the disk-image here: www.idealine.info/emuecke/index_quereinstieg.htm?/emuecke/sonderheft_128.htmAlthough, the author apparantly did not know that each VDC has a slightly different timing. I was able to have this run nicely on my newer C128, but not my old 128D. Either way, he is using raster-interrupts. The magazine itself and the disk-image also has a small demo-creator for these raster effects, but without the timing-correction, this is only good for some machines. Regarding the tests above: Never seen the lightpen-registers used and don't know how accurate they are. For my little VDC 8x1-demo I just used the VBLANK-bit of $d600. Although this is fired only once per frame, maybe you can get more exact results with that? VDC Risen From Oblivion also has a nice raster effect as well hence why the speed test at the start of the demo is required to determine exact timing so it works on multiple machines.
The lightpen register seems quite accurate, at least on my C128D. With the VBLANK-bit method alone I usually get about a 12 character jitter which is OK in most instances. With the additional lightpen check I reduce it to about a 2 character jitter with the standard VDC 80 column mode. This is what is expected when running in ~1 MHZ mode because the VDC draws ~2 characters/CPU cycle. Not sure if this can be improved because even setting the CPU to fast mode, the CPU still goes back to 1Mhz mode for the DRAM refresh cycles and reading/writing to IO. Maybe Z80 has a way to reduce the jitter...
Using the lightpen register I've been able to write some tests to get some insight in how the internal timing of VDC works including the busy status bit in register $d600. I will share them soon when I make them a bit more user friendly and where they can demonstrate meaningful results.
|
|
|
Post by Pyrofer on Sept 6, 2018 14:43:24 GMT
This is amazing work! More knowledge of the inside of the VDC is very welcome. Especially the vblank bit! I totally failed to get smooth horizontal scrolling working. With lots of effort I got vertical smooth but could never crack horizontal.
|
|
|
Post by willymanilly on Sept 8, 2018 9:23:46 GMT
This is amazing work! More knowledge of the inside of the VDC is very welcome. Especially the vblank bit! I totally failed to get smooth horizontal scrolling working. With lots of effort I got vertical smooth but could never crack horizontal. Smooth horizontal scrolling does seem bit of a challenge and part of my experiments will be to find out exactly at what point the VDC latches the display and attribute pointers because they do affect the smooth scrolling. As you're probably very familiar with, if you get the timing wrong the scroll is more than likley to jitter very noticeably.
I've attached a simple program where smooth horizontal smooth scrolling works on my real PAL C128D. I've provided source code with comments for more information.
Attachments:vdcsmoothx.zip (945 B)
|
|
|
Post by willymanilly on Sept 8, 2018 9:31:09 GMT
I've also updated the VDC split test. It's still incomplete and I got heaps to clean up with the code so I will provide source once I've done that.
Just one notable test is test 6 where it appears the attribute data is either buffered from the previous frame and/or delayed when switching attributes from off to on.
Test 6
Attachments:vdcsplitV0.2.zip (1.34 KB)
|
|