V9958 documentation unclear

Página 1/3
| 2 | 3

Por Accumulator

Champion (339)

imagem de Accumulator

26-03-2023, 16:18

As I read and re-read the V9958 documentation some info is not clear to me.
What is Mode-I and Mode-Ii, how to access the modes?
The amount of colors is 192.68 as mentioned, however it is also stated the color specification can be up to 2^16. The A bit is ignored. My calculations takes me to $FFFF, 65535 colors...
If someone can clear the results, is helpful.

If I compare the V9958 and Sega VDP, not so much difference, except for hussling the registry numbers and bits.
In my opinion register #24, (VDP 25) is intentionally removed or only be used under special circumstances, to avoid Sega compatibility. This register was intended for horizontal scrolling.. (Like VDP #8 and #9 Sega style)

Entrar ou registrar-se para comentar

Por Grauw

Ascended (10772)

imagem de Grauw

27-03-2023, 01:18

I don’t know what you refer to by Mode I and Mode II, but if you refer to the mode0 and mode1 pins on the chip, those are the I/O port selection inputs, you don’t need to worry about them from a software perspective. If you refer to Sprite Mode I and II, then the TMS9918 compatible modes use Sprite Mode I and all of the new screen modes (screen 4 aka graphic 3 and up) in the V9938 use Sprite Mode II.

The V9958 DAC is indeed 15-bit (5 bits per R, G, B component, plus 1 transparency bit) which means that it can output 32 shades per colour component, up to a theoretical maximum of 32^3 = 32768.

However the palette registers of the V9958 still only allows you to specify 3 bits per R, G, B component (compatible with the 9-bit V9938), allowing you to specify 512 colours max for palette colours. The larger 15 bits output colour space is only available in the YJK modes (screen 10-12) which use a special encoding that more or less separates luminance from colour, where the luminance (Y) can be specified per-pixel and the colour information (JK) is shared between 4 adjacent pixels.

Either way, because of that encoding, it can still only specify up to 19268 colours out of the 32768 possible. The colour with the slightly reduced resolution is blue (which is the least visible to the human eye). For more information read my The YJK screen modes article on the MAP.

The Sega VDP and V99x8 series are both derived from the YM2220 which is Yamaha’s TMS9918 clone, so they have commonalities, however all the new screen modes of the V99x8 are quite different, e.g. the V99x8 introduces bitmap modes which the Sega VDP does not have, while the Sega VDPs has a more powerful pattern mode and in later versions (SG-1000 Mark III and MegaDrive) dropped support for the TMS9918 compatible modes.

Por gdx

Enlighted (6221)

imagem de gdx

27-03-2023, 01:53

About documentation unclear, can someone explain the use of bits 0-6 of register 3 and bits 0-1 of register 4 in screen 2/4 mode?

Grauw wrote:

The colour with the slightly reduced resolution is blue (which is the least visible to the human eye).

Red!

Por gdx

Enlighted (6221)

imagem de gdx

27-03-2023, 11:42

Quote:

About documentation unclear, can someone explain the use of bits 0-6 of register 3 and bits 0-1 of register 4 in screen 2/4 mode?

I've found. On the other hand, these bits do not react in the same way according to the type of VDP. So better to leave them set.

Por Grauw

Ascended (10772)

imagem de Grauw

27-03-2023, 12:35

gdx wrote:
Grauw wrote:

The colour with the slightly reduced resolution is blue (which is the least visible to the human eye).

Red!

No, blue. Why do you say red?

Por gdx

Enlighted (6221)

imagem de gdx

28-03-2023, 02:03

You are right, since I often see more defects on red in compressed images, I thought that it was on this color that we reserved less space to store its values.

Por TomH

Champion (372)

imagem de TomH

28-03-2023, 04:30

bits 0–7 of register 3 are A6 upwards of the colour table address. Bits 0–1 of register 4 are address bits 11 and 12 for the pattern generator table. This answer feels so simple that I must have misunderstood the question, or failed to perceive a relevant complexity? Apologies.

Por Accumulator

Champion (339)

imagem de Accumulator

28-03-2023, 12:05

@Grauw,
I am referring to page 29 of V9958 manual. CPU can select A0 and A1, is that related to superimpose?
Page 9 is mentioning colors 2^16 = 65536.
Short summary mentioned 256 colors max simultaneously.
Also 192.68 colors.

Blue is correct, see also color specification for screen 8. 3 bits green, 3 bits red and 2 bits blue, which makes total of 8 bits.

Por TomH

Champion (372)

imagem de TomH

28-03-2023, 17:15

Accumulator wrote:

@Grauw,
I am referring to page 29 of V9958 manual. CPU can select A0 and A1, is that related to superimpose?

Supposing you're talking about the publication entitled "V9958 MSX-VIDEO Technical Data Book" then Page 29 shows what Grauw already said: MODE-1 and MODE-0 are pins on the VDP that are connected so that the VDP knows which port the CPU is accessing. So they indicate whether the CPU is accessing registers, register indirection, the palette or VRAM.

You don’t need to worry about them from a software perspective.

Por Grauw

Ascended (10772)

imagem de Grauw

28-03-2023, 18:02

Accumulator wrote:

I am referring to page 29 of V9958 manual. CPU can select A0 and A1, is that related to superimpose?

No, A0 and A1 are CPU address lines, they select the I/O port.

Accumulator wrote:

Page 9 is mentioning colors 2^16 = 65536.

It’s phrased confusingly, but what they mean is that the Y, J and K components combined are 16 bits (4 bits for Y, 6 bits for J and K). On page 8 (bottom right) you see that in YJK+YAE mode they also say the colour specification is 2^17, one additional bit for the Y component.

However this does not give you 2^16 or 2^17 colours to display, because the formula adds Y (unsigned 5-bit), J and K (signed 6-bit) in such a way that the resulting colour component value can be lower than 0 or higher than 31. In these cases, the colour component value clips and is clamped to either 0 or 31.

On the Interactive YJK colour space visualisation on the MAP YJK screen modes article, turn on the “Clip range” checkbox to see this clipping visualised. There are 16384 (2^14) un-clipped colours, and due to the clamping to the 0-31 range you get an additional 2884 unique colours totalling 19268.

p.s. The A bit in YJK+YAE mode is not "alpha" (transparency), but "attribute"; whether the four Y bits are interpreted as an YJK luminance value, or as a 16-bit palette colour code (like in screen 5 / graphic 4). This allows the developer to use palette colours to e.g. to draw menus on top of a photo, or cover up colour spill artefacts. In ways you can see this as a screen 5 image overlaid on an YJK image.

In YJK mode you can’t superimpose the image (except the borders). In YJK+YAE mode you can superimpose the image, by setting the A bit and specifying palette colour 0 in the Y bits (the TP flag in register 0 must not be set).

Accumulator wrote:

Short summary mentioned 256 colors max simultaneously.

This refers to the V9938 screen 8 / graphic 7. In YJK mode it can exceed that number to 19268.

Accumulator wrote:

Also 192.68 colors.

You put the dot in a strange place for the second time now, so just to make sure you didn’t misread the colour count; there are 19 thousand 268 colours, not 192 and 68/100ths.

Accumulator wrote:

Blue is correct, see also color specification for screen 8. 3 bits green, 3 bits red and 2 bits blue, which makes total of 8 bits.

That is the case for screen 8. For YJK mode it’s more like 5 bits red, 5 bits green, “4 bits” blue. In YJK+YAE mode blue resolution is further reduced to “3 bits”.

Note I put quotation marks around those, because in isolation blue still uses all 32 discrete output voltages. However the precise value is offset by 0-1 (YJK) or 0-3 (YJK+YAE) depending on the red and green components. E.g. in YJK (20, 20, 17) and (20, 21, 18) can be represented, but (20, 20, 16) and (20, 21, 17) can not.

Por DarkSchneider

Paladin (1021)

imagem de DarkSchneider

28-03-2023, 19:49

Grauw wrote:
gdx wrote:
Grauw wrote:

The colour with the slightly reduced resolution is blue (which is the least visible to the human eye).

Red!

No, blue. Why do you say red?

Maybe Sir Galahad related? XD
https://youtu.be/0D7hFHfLEyk

Página 1/3
| 2 | 3