|
Post by z9leca on Sept 22, 2023 19:59:04 GMT
Hi all,
I am trying to get the VDC running properly in interlaced 80x50 text mode (or 80x47, or 80x45), with 8x8 character cells. I can't manage to remove the spacing between character lines. I always get at least one blank line between each character row. When I try to remove it by setting R9 to 7 the whole thing goes out of sync on a 1084 monitor. It syncs fine when R9 is set to 8 (but then I get the blank line).
(It does actually work fine in Z64K, but not on real hardware)
These are the register settings I'm using: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 $80,$50,$66,$49,$38,$e6,$2d,$33,$ff,$e7,$e0,$e8,$00,$00,$00,$a7,$00,$00,$10,$a8,$10,$00,$78,$e8,$20,$47,$e0,$00,$2f,$e7,$4f,$0e,$0f,$d0,$7d,$64,$f5,$3f
(Pardon me if there is a solution laying around here that I´ve missed, I have been searching for quite some time and come up emptyhanded though).
|
|
|
Post by tokra on Sept 23, 2023 18:14:29 GMT
Can you post a link to a full program? Kind of cumbersome to try your register settings manually.
|
|
|
Post by z9leca on Sept 23, 2023 20:42:31 GMT
Hi Tokra, sure - here it is : Restest d64You need to load "rtest",08,01300 in the monitor and start it with sys4864 from basic. Or you can load the source file "restest" from e-buddy which is also on the disk. Please bear in mind that I'm a novice assembler programmer, so I'm sure there are lots of things in the code that could be better. I am also well aware that I don't need to set all $25 VDC registers, but I pulled the settings straight from Zed (and Rockfall, not that I'm using those for the moment since it uses 8x16 chars). I am using PAL systems when working on real hardware.
|
|
|
Post by tokra on Sept 23, 2023 22:02:20 GMT
Hmm, I can barely get a stable picture on my 1901 but I see a colorful image consisting of two red areas and a blue area. However I see no vertical or horizonzal spacing you speak of. In the bottom I see a blinking text-line with what seems are random characters.
I also tried the registers of your first post manually and can see neither spacing then as well.
|
|
|
Post by z9leca on Sept 23, 2023 22:39:50 GMT
Thank you for the quick reply, and the picture you're describing sounds about right.
And you DO get a stable picture? My 1901 is currently in pieces since i need to replace all the potentiometers, otherwise I'd tested on that one too. And it definitely does not work on the 1084 with those settings. At least not mine. I´ve tried both on my C128D and a flat 128.
Anyway - since my last post I actually got it working. I extracted and used the register settings used from the "128gameVDCTest.prg" in the thread below this, in this subforum. Now it works on real hardware (with a 1084S monitor) and on Z64K. Not on Vice though, which is strange since 128gameVDCTest.prg works on Vice for me. It's time for bed now but I'll look deeper into this tomorrow.
|
|
|
Post by tokra on Sept 24, 2023 10:37:00 GMT
Yes, your fist mode barely displayed on my 1901 if I turned the VSYNC-knob all the way. My suggestion for testing out modes is to use VICE and the Monitor (ALT+M or ALT+H depending on version) and using the "io d600"-command to show the register-settings and what they mean.
The "128gameVDCTest.prg"-mode show a resolution of 640x400 in a frame of 1032x520 which is a little off standard. I would sugest for this mode to go for better NTSC-compatibility and change the registers as follows:
0 -> 126 5 > 228 36 -> 0
This will give 524 interlaced lines at 60.11 Hz and keep the horizontal frequency at NTSC-standard. I never understood why so many modes change register 0. It only leads to trouble.
|
|
|
Post by z9leca on Sept 24, 2023 16:49:58 GMT
Well, thank you that was a great tip! I wasn't aware of how easy you could show the VDC registers in Vice, I injected a small program via the monitor which read out the values instead. I haven't managed to get it working on Vice still - even though the registers read out the same in 128gamevdctest.prg and my program (using the method you just taught me). But I'll put some more time and effort into it. I did try your three suggested register changes on the real hardware and that broke it. (The hardware didn't break but the picture got scrambled).
|
|
|
Post by tokra on Sept 24, 2023 19:36:09 GMT
I just tried my settings on a 1901 and in VICE. In VICE the picture is not correctly interlaced, but on the 1901 this looks perfect. Apparantly still missing emulation in VICE. On a 1901 I only get a stable picture with EVEN values for Reg 5, on VICE only on ODD values - and ZERO strangely. So if you want to work around this VICE-bug you can set Reg 0 to ZERO. Then again: I have had interlace-recognition exactly the other way around on my TFT with an RGBI->SCART-adapter, so this is always going to be working in one case and not in another. Best practice would probably be to make this user-adjustable. Here's my program: 10 bank15:fast:w=dec("cdcc"):fori=0to36:reada$:sysdec("cdcc"),dec(a$),i:next 20 sysw,0,18:sysw,0,19:sysw,13,31:fori=0to31:sysw,0,30:next:scnclr5 100 data7e,50,64,49,40,e4,32,3a,ff,e7,a0,e7,00,00,00,00,00,00,1f,a0,10,00,78,e8,00,47,00,00,2f,e7,4f,00,00,00,7d,64,f0
Again: confirmed working on my 1901
|
|
|
Post by z9leca on Sept 26, 2023 6:00:14 GMT
Great!! Thanks again for very useful information.
I used the settings you provided and I can confirm that they work fine on a 1084s and in VICE if I change reg 5 per your instructions. So, yeah, making R5 user adjustable depending on where you're running the software sounds like a good plan. My TFT's doesn't like the output from the scandoubler in interlace though, but that's a curveball I really don't need to support. I'll try it out without the scan doubler and directly connect cga2rgb->scart to tv scart in and see it that works after work.
It's s pity the interlace mode doesn't look very good in VICE, it's very jumpy. When run in Z64K it's looks steady and properly scan doubled.
|
|
|
Post by z9leca on Sept 27, 2023 17:46:10 GMT
Hi again,
I just wanted to follow up on my continued experiments when using a real C128 connected via cga2rgb directly into a RGB capable Scart input on a TV/TFT. When using the settings you provide, on some of my TV:s it looks fine, but on some it just skips to show some rasterlines. Like every 8th or so.
I guess it's hopeless to get it to display properly on all available setups, but it'd be interesting to investigate a bit further. Any suggestions on what regs to tweak?
|
|