Colour blue on NTSC VICs.

You need an actual VIC.

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Colour blue on NTSC VICs.

Post by pixel »

Hi there!

Is this really happening on real NTSC VICs? The blue bricks are black inside with VICE:
viclue.png
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: Colour blue on NTSC VICs.

Post by tokra »

This is not happening in VICE for me. Both WinVICE 3.2 and the latest GTK VICE 3.7.1

Bricks are blue as they should be. You picture shows them as a blue outline with red stripes inside? Strange. I'd suggest deleting the vice.ini and starting fresh.
groepaz
Vic 20 Scientist
Posts: 1188
Joined: Wed Aug 25, 2010 5:30 pm

Re: Colour blue on NTSC VICs.

Post by groepaz »

Link to the PRG?

There might be a problem with limiting the values in the CRT emulation, so something overflows.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
furroy
Vic 20 Drifter
Posts: 20
Joined: Sun Aug 27, 2023 5:03 am

Re: Colour blue on NTSC VICs.

Post by furroy »

i had weird color issues in vice until i changed my palette to colodore. all other palettes had weird, yet different issues.
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Colour blue on NTSC VICs.

Post by pixel »

groepaz wrote: Wed Oct 25, 2023 3:45 am Link to the PRG?

There might be a problem with limiting the values in the CRT emulation, so something overflows.
Here you go:
arukanoido.zip
(20.91 KiB) Downloaded 33 times
Would be more comfy if one could upload PRGs here (for both uploaders and downloaders). 8)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Colour blue on NTSC VICs.

Post by pixel »

tokra wrote: Wed Oct 25, 2023 3:28 am This is not happening in VICE for me. Both WinVICE 3.2 and the latest GTK VICE 3.7.1

Bricks are blue as they should be. You picture shows them as a blue outline with red stripes inside? Strange. I'd suggest deleting the vice.ini and starting fresh.
Thanks! (For Linux users: it's probably ~/.config/vice/vicerc)

That fixed blue but killed green:
vicoldrc.png
(Old config with VICExternalPalette=1. No idea which one that would be.)
vicnewrc.png
(With vicerc vanished.)

EDIT: BTW I'm using the latest code from the subversion repository.
Last edited by pixel on Wed Oct 25, 2023 5:34 am, edited 1 time in total.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1188
Joined: Wed Aug 25, 2010 5:30 pm

Re: Colour blue on NTSC VICs.

Post by groepaz »

No problem at all here, with xvic -default

(No need to actually delete vice.ini, starting with -default does the same)

Edit: Just realized i was missing NTSC - i also see green turned into cyan now. No idea if that is just how it is?
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: Colour blue on NTSC VICs.

Post by tokra »

Just checked. Green looks like Cyan on my VICE as well. That is only with the internal palette, however. If you choose "Mike (NTSC)" as external palette in Settings-Display-VIC-VIC palette it looks more like green, and this palette was derived my Mike from the results from my personal NTSC-machine using his colour-test-program and S-Video output:

viewtopic.php?p=118949#p118949
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Colour blue on NTSC VICs.

Post by pixel »

tokra wrote: Wed Oct 25, 2023 6:33 am … however. If you choose "Mike (NTSC)" as external palette in Settings-Display-VIC-VIC palette it looks more like green…
Turned out that I was using that palette as well. Looking more like a bug in VICE. Subtracted a bit from the blue value but that only made the blue borders wider at the sides.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1188
Joined: Wed Aug 25, 2010 5:30 pm

Re: Colour blue on NTSC VICs.

Post by groepaz »

> Just checked. Green looks like Cyan on my VICE as well. That is only with the internal palette, however. If you choose "Mike (NTSC)" as external palette in Settings-Display-VIC-VIC palette it looks more like green, and this palette was derived my Mike from the results from my personal NTSC-machine using his colour-test-program and S-Video output:

And according the comments in the source, the internal palette was tweaked to look like this one - at some point. Some other change probably broke it again. I'll have a look
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
mathop
Vic 20 Amateur
Posts: 40
Joined: Thu Aug 12, 2021 3:13 pm

Re: Colour blue on NTSC VICs.

Post by mathop »

The NTSC VIC has two variations of cyan apparently.
I found this post that may be related https://www.lemon64.com/forum/viewtopic.php?p=979712
My NTSC VIC cyan looks distinctly blue so I guess this is an older variant - see images from capture card (NTSC contrast is a bit off but the color should be correct.)
vbars_pal.png
pal
vbars_ntsc.png
ntsc

[edit] never mind - the issue is apparently that green is looking rather like cyan. This appears to be the case on a real VIC also. The 'normal' colors (2-8) have a phase error on NTSC compared to their lighter variations (9-15) - this is due to how the color signal is generated on the chip.
PAL does not have this issue since there the phase errors cancel out more or less.
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Colour blue on NTSC VICs.

Post by pixel »

Are these bars correct? If I count from left to right green is at index 8 (when starting with 0).
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
mathop
Vic 20 Amateur
Posts: 40
Joined: Thu Aug 12, 2021 3:13 pm

Re: Colour blue on NTSC VICs.

Post by mathop »

The order from left to right is
black / white
red / light red
cyan / light cyan
purple / light purple
green / light green
blue / light blue
yellow / light yellow
orange / light orange
so then green would be at index 8 indeed.

I also notice that yellow is also very greenish (compared to light yellow.)
It could well be that newer NTSC VICs don't have this exaggerated phase difference.

(FWIW I attached the colorbar programs below - these are for the unexpanded VIC - i.e. they don't work if you have a memory expansion.)
Attachments
vic20colorbars.zip
(826 Bytes) Downloaded 42 times
groepaz
Vic 20 Scientist
Posts: 1188
Joined: Wed Aug 25, 2010 5:30 pm

Re: Colour blue on NTSC VICs.

Post by groepaz »

The 'normal' colors (2-8) have a phase error on NTSC compared to their lighter variations (9-15) - this is due to how the color signal is generated on the chip.
Can you quantify that phase error? I am experimenting a bit now... i added 30 degrees to colors 0-8, the result seems close to your capture, *except* the blueish cyan, which turns out noticeably less blueish (so perhaps there is more to it?)

Edit: BUT it does quite closely match (including cyan) the reference pictures tokra made a while ago. No idea where the strange (obviously broken) tweaks came from before. I will clean this up and commit.

Edit++: comitted in r44613, grab dev build here in half an our or so: https://github.com/VICE-Team/svn-mirror/releases
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
mathop
Vic 20 Amateur
Posts: 40
Joined: Thu Aug 12, 2021 3:13 pm

Re: Colour blue on NTSC VICs.

Post by mathop »

If needed I can do a new capture - in theory I could also measure the phase offset between light and dark colors with my oscilloscope, although how exactly I haven't yet found out. :)
Post Reply